diff --git a/.travis.yml b/.travis.yml index cccc1efe1c4..d5583ef6ff2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -200,6 +200,7 @@ before_script: mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql fi if [ "$DB" = 'postgresql' ]; then + #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql #pgloader mysql://root:pass@127.0.0.1/dolibarr_9 postgresql://dolibarrowner:dolibarrownerpass@127.0.0.1/dolibarr_dev echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis pgloader mysql://root@127.0.0.1/travis postgresql:///travis @@ -209,7 +210,6 @@ before_script: #echo 'select * from information_schema.table_constraints;' | psql travis #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis fi - # TODO: SQLite echo - | @@ -222,6 +222,7 @@ before_script: echo '$'dolibarr_main_db_host=\'127.0.0.1\'';' >> $CONF_FILE echo '$'dolibarr_main_db_name=\'travis\'';' >> $CONF_FILE echo '$'dolibarr_main_db_user=\'travis\'';' >> $CONF_FILE + echo '$'dolibarr_main_instance_unique_id=\'travis1234567890\'';' >> $CONF_FILE if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then echo '$'dolibarr_main_db_type=\'mysqli\'';' >> $CONF_FILE echo '$'dolibarr_main_db_port=\'3306\'';' >> $CONF_FILE @@ -230,7 +231,6 @@ before_script: echo '$'dolibarr_main_db_type=\'pgsql\'';' >> $CONF_FILE echo '$'dolibarr_main_db_port=\'5432\'';' >> $CONF_FILE fi - # TODO: SQLite echo '$'dolibarr_main_authentication=\'dolibarr\'';' >> $CONF_FILE cat $CONF_FILE echo @@ -299,10 +299,70 @@ script: set +e echo -# TODO: Check Javascript (jshint?) +- | + export INSTALL_FORCED_FILE=htdocs/install/install.forced.php + echo "Setting up Dolibarr $INSTALL_FORCED_FILE to test installation" + # Ensure we catch errors + set +e + echo ' $INSTALL_FORCED_FILE + echo '$'force_install_noedit=2';' >> $INSTALL_FORCED_FILE + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ]; then + echo '$'force_install_type=\'mysqli\'';' >> $INSTALL_FORCED_FILE + fi + if [ "$DB" = 'postgresql' ]; then + echo '$'force_install_type=\'pgsql\'';' >> $INSTALL_FORCED_FILE + fi + echo '$'force_install_dbserver=\'127.0.0.1\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_database=\'travis\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_databaselogin=\'travis\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_databasepass=\'\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_port=\'5432\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_prefix=\'llx_\'';' >> $INSTALL_FORCED_FILE + echo '$'force_install_createdatabase=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_createuser=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_mainforcehttps=false';' >> $INSTALL_FORCED_FILE + echo '$'force_install_main_data_root=\'$TRAVIS_BUILD_DIR/htdocs\'';' >> $INSTALL_FORCED_FILE + #cat $INSTALL_FORCED_FILE -# TODO: Check CSS (csslint?) +#- | +# echo "Installing Dolibarr" +# cd htdocs/install +# php step1.php $TRAVIS_BUILD_DIR/htdocs > $TRAVIS_BUILD_DIR/install.log +# php step2.php set >> $TRAVIS_BUILD_DIR/install.log +# if [ "$?" -ne "0" ]; then +# echo "SORRY, AN ERROR OCCURED DURING INSTALLATION PROCESS" +# cat $TRAVIS_BUILD_DIR/install.log +# exit 1 +# fi +# cd ../.. +# rm $INSTALL_FORCED_FILE +# #cat $TRAVIS_BUILD_DIR/install.log +# set +e +# echo +- | + echo "Setting up database to test migrations" + if [ "$DB" = 'mysql' ] || [ "$DB" = 'mariadb' ] || [ "$DB" = 'postgresql' ]; then + echo "MySQL" + mysql -e 'DROP DATABASE IF EXISTS travis;' + mysql -e 'CREATE DATABASE IF NOT EXISTS travis;' + mysql -e 'GRANT ALL PRIVILEGES ON travis.* TO travis@127.0.0.1;' + mysql -e 'FLUSH PRIVILEGES;' + mysql -D travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + fi + if [ "$DB" = 'postgresql' ]; then + #pgsql travis < dev/initdemo/mysqldump_dolibarr_3.5.0.sql + #pgloader mysql://root:pass@127.0.0.1/base postgresql://dolibarrowner@127.0.0.1/dolibarr + echo pgloader mysql://root@127.0.0.1/travis postgresql:///travis + pgloader mysql://root@127.0.0.1/travis postgresql:///travis + echo 'ALTER SEQUENCE llx_accountingaccount_rowid_seq RENAME TO llx_accounting_account_rowid_seq' | psql travis + echo 'ALTER SEQUENCE llx_accounting_account_rowid_seq RESTART WITH 1000001;' | psql travis + #echo 'select * from INFORMATION_SCHEMA.COLUMNS where table_name = 'llx_accountingaccount' | psql travis + #echo 'select * from information_schema.table_constraints;' | psql travis + #echo 'ALTER TABLE "llx_accounting_account" DROP CONSTRAINT "idx_16390_primary"' | psql travis + fi + echo + - | echo "Upgrading Dolibarr" # Ensure we catch errors. Set this to +e if you want to go to the end to see log files. diff --git a/.tx/config b/.tx/config index 0044fb91f49..5c52849c29c 100644 --- a/.tx/config +++ b/.tx/config @@ -410,3 +410,9 @@ source_file = htdocs/langs/en_US/workflow.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.zapier] +file_filter = htdocs/langs//zapier.lang +source_file = htdocs/langs/en_US/zapier.lang +source_lang = en_US +type = MOZILLAPROPERTIES + diff --git a/COPYING b/COPYING index 94a9ed024d3..2a000655e93 100644 --- a/COPYING +++ b/COPYING @@ -645,7 +645,7 @@ the "copyright" line and a pointer to where the full notice is found. GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. @@ -664,11 +664,11 @@ might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see -. +. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read -. +. diff --git a/COPYRIGHT b/COPYRIGHT index b9560cdaa45..1af09e6fdaf 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -5,7 +5,7 @@ License Dolibarr is released under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version (GPL-3+). -More information: http://www.gnu.org/licenses/gpl-3.0.txt +More information: https://www.gnu.org/licenses/gpl-3.0.txt Dolibarr uses some external libraries released under different licenses. This is compatibility summary: @@ -17,7 +17,7 @@ CKEditor 4.12.1 LGPL-2.1+ Yes EvalMath 1.0 BSD Yes Safe math expressions evaluation Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package) -Mobiledetect 2.8.83 MIT License Yes Detect mobile devices browsers +Mobiledetect 2.8.33 MIT License Yes Detect mobile devices browsers NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package) PEAR Mail_MIME 1.8.9 BSD Yes NuSoap dependency ParseDown 1.6 MIT License Yes Markdown parser @@ -33,10 +33,11 @@ Restler 3.0.0RC6 LGPL-3+ Yes Sabre 3.2.2 BSD Yes DAV support Swift Mailer 5.4.2-DEV MIT license Yes Comprehensive mailing tools for PHP Stripe 6.41 MIT licence Yes Library for Stripe module -TCPDF 6.2.25 LGPL-3+ Yes PDF generation +TCPDF 6.3.2 LGPL-3+ Yes PDF generation TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement JS libraries: +Ace 1.4.6 BSD Yes JS library to get code syntaxique coloration in a textarea. jQuery 3.4.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.5 GPL and Apache License Yes JS library plugin for sexier multiselect @@ -54,7 +55,6 @@ jQuery Timepicker 1.1.0 GPL and MIT License Yes jsGanttImproved 1.7.5.4 BSD License Yes JS library (to build Gantt reports) JsTimezoneDetect 1.0.6 MIT License Yes JS library to detect user timezone SwaggerUI 2.0.24 GPL-2+ Yes JS library to offer the REST API explorer -Ace 1.2.8 BSD Yes JS library to get code syntaxique coloration in a textarea. Image libraries: Octicons 8.1 MIT Yes @@ -64,7 +64,7 @@ Fontawesome 5.7.2 Font Awesome Free licence Yes For licenses compatibility informations: -http://www.gnu.org/licenses/licenses.en.html +https://www.gnu.org/licenses/licenses.en.html Copyright / Authors diff --git a/ChangeLog b/ChangeLog index b8a3fea2ce9..0f4d3c30ddf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,7 @@ Following changes may create regressions for some external modules, but were nec * Removed deprecated method actioncomm->add(), use create() instead * If you have developed your own emailing target selector and used parent::add_to_target(...), you must now use parent::addToTargets(...) * Removed function dol_micro_time. Use native PHP microtime instead. +* The trigger BON_PRELEVEMENT_CREATE has been renamed into DIRECT_DEBIT_ORDER_CREATE. ***** ChangeLog for 10.0.2 compared to 10.0.1 ***** diff --git a/build/debian/copyright b/build/debian/copyright index a5832aa7754..7b199adf693 100644 --- a/build/debian/copyright +++ b/build/debian/copyright @@ -338,7 +338,7 @@ License: GPL-2+ details. . You should have received a copy of the GNU General Public License - along with this program. If not, see . + along with this program. If not, see . . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file diff --git a/build/docker/README.md b/build/docker/README.md index 5a0997cf121..616cbd8fa78 100644 --- a/build/docker/README.md +++ b/build/docker/README.md @@ -23,3 +23,6 @@ The URL to go to the Dolibarr is : The URL to go to PhpMyAdmin is (login/password is root/root) : http://0.0.0.0:8080 + +Setup the database connection during the installation process, please use mariad +b (name of the database container) as database host. diff --git a/build/doxygen/dolibarr-doxygen.doxyfile b/build/doxygen/dolibarr-doxygen.doxyfile index 271b64f5481..31400661ecc 100644 --- a/build/doxygen/dolibarr-doxygen.doxyfile +++ b/build/doxygen/dolibarr-doxygen.doxyfile @@ -18,7 +18,7 @@ # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. +# https://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 @@ -587,7 +587,7 @@ INPUT = ../../htdocs ../../scripts # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for +# into libc) for the transcoding. See https://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 @@ -737,7 +737,7 @@ REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# tagging system (see https://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO diff --git a/build/exe/doliwamp/README b/build/exe/doliwamp/README deleted file mode 100644 index 9d4c68daf3d..00000000000 --- a/build/exe/doliwamp/README +++ /dev/null @@ -1,8 +0,0 @@ -README (English) -################################################## -DOLIWAMP Package tools -################################################## - -This directory contains files used by makepack-dolibarr.pl -script to build the all-in-on .EXE package DoliWamp, ready -to be distributed (for Windows). \ No newline at end of file diff --git a/build/exe/doliwamp/README.md b/build/exe/doliwamp/README.md index 8e6f4744438..87d3371f9bb 100644 --- a/build/exe/doliwamp/README.md +++ b/build/exe/doliwamp/README.md @@ -3,5 +3,8 @@ DoliWamp is a special all in one package installer for Windows (Dolibarr+Mysql+Apache+PHP). It's a dedicated Dolibarr version for Windows newbies with no technical knowledge. This package will install or upgrade Dolibarr but also all prerequisites like the web server, and the database in one auto-install process. +This directory contains files used by *makepack-dolibarr.pl* script to build the all-in-on .EXE package DoliWamp, ready +to be distributed (for Windows). + If you have technical knowledge in web administration and plan to share your server instance (Apache, Mysql or PHP) with other projects than Dolibarr or want to use Dolibarr other components (PostgreSQL), you should not use this assistant and make a manual installation of Dolibarr on your existing server by downloading the standard package (.tgz or .zip file). diff --git a/build/exe/doliwamp/config.inc.php.install b/build/exe/doliwamp/config.inc.php.install index 2a885a8c886..19a3d36a45e 100644 --- a/build/exe/doliwamp/config.inc.php.install +++ b/build/exe/doliwamp/config.inc.php.install @@ -402,7 +402,7 @@ $cfg['RecodingEngine'] = 'auto'; // Specify some parameters for iconv used in charset conversion. See iconv // documentation for details: -// http://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html +// https://www.gnu.org/software/libiconv/documentation/libiconv/iconv_open.3.html $cfg['IconvExtraParams'] = '//TRANSLIT'; // Available charsets for MySQL conversion. currently contains all which could diff --git a/composer.json b/composer.json index 89688ec3fd5..a3407d7fa20 100644 --- a/composer.json +++ b/composer.json @@ -26,15 +26,13 @@ "require" : { "php" : ">=5.3.0", "ext-curl" : "*", - "ccampbell/chromephp" : "4.1.0", - "ckeditor/ckeditor" : "4.6.2", + "ckeditor/ckeditor" : "4.12.1", "mike42/escpos-php" : "1.2.1", - "mobiledetect/mobiledetectlib" : "2.8.17", + "mobiledetect/mobiledetectlib" : "2.8.33", "phpoffice/phpexcel" : "1.8.1", "restler/framework" : "3.0.0-RC6", "tecnickcom/tcpdf" : "^6.2", - "atgp/factur-x" : "^1.0", - "luracast/restler": "^3.0" + "luracast/restler" : "^3.0" }, "require-dev" : { "jakub-onderka/php-parallel-lint" : "^0", @@ -59,4 +57,4 @@ "ext-xml" : "Excel support", "firephp/firephp-core" : "Logging to Firebug console support" } -} +} \ No newline at end of file diff --git a/composer.lock b/composer.lock index 90843be163f..e9ea391bba2 100644 --- a/composer.lock +++ b/composer.lock @@ -4,114 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "content-hash": "949d55d933c4e0725a2086a189595483", + "content-hash": "16c94fd4f22ac17820d85ee57b0616e1", "packages": [ - { - "name": "atgp/factur-x", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/atgp/factur-x.git", - "reference": "22e22c3b5dfbb0f25afbd7c3fe69a0305199414c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/atgp/factur-x/zipball/22e22c3b5dfbb0f25afbd7c3fe69a0305199414c", - "reference": "22e22c3b5dfbb0f25afbd7c3fe69a0305199414c", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-fileinfo": "*", - "ext-libxml": "*", - "ext-simplexml": "*", - "ext-zlib": "*", - "php": ">=5.6", - "setasign/fpdi-fpdf": "^2.0", - "smalot/pdfparser": "^0.13.2" - }, - "type": "library", - "autoload": { - "psr-4": { - "Atgp\\FacturX\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Lucas Gouy-Pailler", - "email": "lucas.gouypailler@atgp.net" - } - ], - "description": "PHP library to manage your Factur-X / ZUGFeRD 2.0 PDF invoices files", - "keywords": [ - "ZUGFeRD", - "factur-x", - "invoice", - "pdf", - "php", - "xml" - ], - "time": "2019-01-16T10:09:35+00:00" - }, - { - "name": "ccampbell/chromephp", - "version": "4.1.0", - "source": { - "type": "git", - "url": "https://github.com/ccampbell/chromephp.git", - "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ccampbell/chromephp/zipball/c3c297615d48ae5b2a86a82311152d1ed095fcef", - "reference": "c3c297615d48ae5b2a86a82311152d1ed095fcef", - "shasum": "" - }, - "require": { - "php": ">=5.0.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "ChromePhp": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "Apache-2.0" - ], - "authors": [ - { - "name": "Craig Campbell", - "email": "iamcraigcampbell@gmail.com", - "homepage": "http://craig.is", - "role": "Developer" - } - ], - "description": "Log variables to the Chrome console (via Chrome Logger Google Chrome extension).", - "homepage": "http://github.com/ccampbell/chromephp", - "keywords": [ - "log", - "logging" - ], - "time": "2013-06-26T03:44:33+00:00" - }, { "name": "ckeditor/ckeditor", - "version": "4.6.2", + "version": "4.12.1", "source": { "type": "git", "url": "https://github.com/ckeditor/ckeditor-releases.git", - "reference": "268078ab43195b6004d64bc8764c41f2f829640e" + "reference": "b1a25e93ae0b038f45dcba458f4c2c18bd7318e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/268078ab43195b6004d64bc8764c41f2f829640e", - "reference": "268078ab43195b6004d64bc8764c41f2f829640e", + "url": "https://api.github.com/repos/ckeditor/ckeditor-releases/zipball/b1a25e93ae0b038f45dcba458f4c2c18bd7318e5", + "reference": "b1a25e93ae0b038f45dcba458f4c2c18bd7318e5", "shasum": "" }, "type": "library", @@ -139,7 +45,7 @@ "text", "wysiwyg" ], - "time": "2017-01-12T17:36:48+00:00" + "time": "2019-06-28T10:41:23+00:00" }, { "name": "mike42/escpos-php", @@ -207,25 +113,23 @@ }, { "name": "mobiledetect/mobiledetectlib", - "version": "2.8.17", + "version": "2.8.33", "source": { "type": "git", "url": "https://github.com/serbanghita/Mobile-Detect.git", - "reference": "b87da5f63a76e9615a0c74fcf168657b1ea7e41d" + "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/b87da5f63a76e9615a0c74fcf168657b1ea7e41d", - "reference": "b87da5f63a76e9615a0c74fcf168657b1ea7e41d", + "url": "https://api.github.com/repos/serbanghita/Mobile-Detect/zipball/cd385290f9a0d609d2eddd165a1e44ec1bf12102", + "reference": "cd385290f9a0d609d2eddd165a1e44ec1bf12102", "shasum": "" }, "require": { "php": ">=5.0.0" }, "require-dev": { - "codeclimate/php-test-reporter": "dev-master", - "johnkary/phpunit-speedtrap": "~1.0@dev", - "phpunit/phpunit": "*" + "phpunit/phpunit": "~4.8.35||~5.7" }, "type": "library", "autoload": { @@ -257,7 +161,7 @@ "mobile detector", "php mobile detect" ], - "time": "2015-09-17T14:45:21+00:00" + "time": "2018-09-01T15:05:15+00:00" }, { "name": "phpoffice/phpexcel", @@ -324,12 +228,12 @@ "source": { "type": "git", "url": "https://github.com/Luracast/Restler-Framework.git", - "reference": "6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09" + "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09", - "reference": "6bc0968f8c8aa47c9a62d548b9d7e34f1ed4fc09", + "url": "https://api.github.com/repos/Luracast/Restler-Framework/zipball/0f6b0f26152f83e43a2a86820206c455095fb2b0", + "reference": "0f6b0f26152f83e43a2a86820206c455095fb2b0", "shasum": "" }, "require": { @@ -376,209 +280,20 @@ "rest", "server" ], - "time": "2018-01-06T01:39:27+00:00" - }, - { - "name": "setasign/fpdf", - "version": "1.8.1", - "source": { - "type": "git", - "url": "https://github.com/Setasign/FPDF.git", - "reference": "2c68c9e6c034ac3187d25968790139a73184cdb1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDF/zipball/2c68c9e6c034ac3187d25968790139a73184cdb1", - "reference": "2c68c9e6c034ac3187d25968790139a73184cdb1", - "shasum": "" - }, - "type": "library", - "autoload": { - "classmap": [ - "fpdf.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "no usage restriction" - ], - "authors": [ - { - "name": "Olivier Plathey", - "email": "oliver@fpdf.org", - "homepage": "http://fpdf.org/" - } - ], - "description": "FPDF is a PHP class which allows to generate PDF files with pure PHP. F from FPDF stands for Free: you may use it for any kind of usage and modify it to suit your needs.", - "homepage": "http://www.fpdf.org", - "keywords": [ - "fpdf", - "pdf" - ], - "time": "2016-01-01T17:47:15+00:00" - }, - { - "name": "setasign/fpdi", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/Setasign/FPDI.git", - "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI/zipball/3c266002f8044f61b17329f7cd702d44d73f0f7f", - "reference": "3c266002f8044f61b17329f7cd702d44d73f0f7f", - "shasum": "" - }, - "require": { - "ext-zlib": "*", - "php": "^5.6 || ^7.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.7", - "setasign/fpdf": "~1.8", - "setasign/tfpdf": "1.25", - "tecnickcom/tcpdf": "~6.2" - }, - "suggest": { - "setasign/fpdf": "FPDI will extend this class but as it is also possible to use TCPDF or tFPDF as an alternative. There's no fixed dependency configured.", - "setasign/fpdi-fpdf": "Use this package to automatically evaluate dependencies to FPDF.", - "setasign/fpdi-tcpdf": "Use this package to automatically evaluate dependencies to TCPDF.", - "setasign/fpdi-tfpdf": "Use this package to automatically evaluate dependencies to tFPDF." - }, - "type": "library", - "autoload": { - "psr-4": { - "setasign\\Fpdi\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Slabon", - "email": "jan.slabon@setasign.com", - "homepage": "https://www.setasign.com" - }, - { - "name": "Maximilian Kresse", - "email": "maximilian.kresse@setasign.com", - "homepage": "https://www.setasign.com" - } - ], - "description": "FPDI is a collection of PHP classes facilitating developers to read pages from existing PDF documents and use them as templates in FPDF. Because it is also possible to use FPDI with TCPDF, there are no fixed dependencies defined. Please see suggestions for packages which evaluates the dependencies automatically.", - "homepage": "https://www.setasign.com/fpdi", - "keywords": [ - "fpdf", - "fpdi", - "pdf" - ], - "time": "2019-01-30T14:11:19+00:00" - }, - { - "name": "setasign/fpdi-fpdf", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/Setasign/FPDI-FPDF.git", - "reference": "e4363ac09e1b766b38ebea1c3cbe82b3480a11e9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Setasign/FPDI-FPDF/zipball/e4363ac09e1b766b38ebea1c3cbe82b3480a11e9", - "reference": "e4363ac09e1b766b38ebea1c3cbe82b3480a11e9", - "shasum": "" - }, - "require": { - "setasign/fpdf": "^1.8", - "setasign/fpdi": "^2.2" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jan Slabon", - "email": "jan.slabon@setasign.com", - "homepage": "https://www.setasign.com" - } - ], - "description": "Kind of metadata package for dependencies of the latest versions of FPDI and FPDF.", - "homepage": "https://www.setasign.com/fpdi", - "keywords": [ - "fpdf", - "fpdi", - "pdf" - ], - "time": "2019-01-30T14:38:19+00:00" - }, - { - "name": "smalot/pdfparser", - "version": "v0.13.3", - "source": { - "type": "git", - "url": "https://github.com/smalot/pdfparser.git", - "reference": "c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/smalot/pdfparser/zipball/c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6", - "reference": "c3a050fb9b47ec3a0ce1b6f1b6f48ec822ba04d6", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "ext-zlib": "*", - "php": ">=5.3.0", - "tecnickcom/tcpdf": "~6.0" - }, - "require-dev": { - "atoum/atoum": "^2.8 | ^3.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Smalot\\PdfParser\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "LGPL-3.0" - ], - "authors": [ - { - "name": "Sebastien MALOT", - "email": "sebastien@malot.fr" - } - ], - "description": "Pdf parser library. Can read and extract information from pdf file.", - "homepage": "http://www.pdfparser.org", - "keywords": [ - "extract", - "parse", - "parser", - "pdf", - "text" - ], - "time": "2019-01-11T08:49:57+00:00" + "time": "2019-05-12T15:15:11+00:00" }, { "name": "tecnickcom/tcpdf", - "version": "6.2.26", + "version": "6.3.2", "source": { "type": "git", "url": "https://github.com/tecnickcom/TCPDF.git", - "reference": "367241059ca166e3a76490f4448c284e0a161f15" + "reference": "9fde7bb9b404b945e7ea88fb7eccd23d9a4e324b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/367241059ca166e3a76490f4448c284e0a161f15", - "reference": "367241059ca166e3a76490f4448c284e0a161f15", + "url": "https://api.github.com/repos/tecnickcom/TCPDF/zipball/9fde7bb9b404b945e7ea88fb7eccd23d9a4e324b", + "reference": "9fde7bb9b404b945e7ea88fb7eccd23d9a4e324b", "shasum": "" }, "require": { @@ -627,7 +342,7 @@ "pdf417", "qrcode" ], - "time": "2018-10-16T17:24:05+00:00" + "time": "2019-09-20T09:35:01+00:00" } ], "packages-dev": [ @@ -687,32 +402,32 @@ }, { "name": "jakub-onderka/php-console-color", - "version": "0.1", + "version": "v0.2", "source": { "type": "git", "url": "https://github.com/JakubOnderka/PHP-Console-Color.git", - "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1" + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/e0b393dacf7703fc36a4efc3df1435485197e6c1", - "reference": "e0b393dacf7703fc36a4efc3df1435485197e6c1", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Color/zipball/d5deaecff52a0d61ccb613bb3804088da0307191", + "reference": "d5deaecff52a0d61ccb613bb3804088da0307191", "shasum": "" }, "require": { - "php": ">=5.3.2" + "php": ">=5.4.0" }, "require-dev": { "jakub-onderka/php-code-style": "1.0", - "jakub-onderka/php-parallel-lint": "0.*", + "jakub-onderka/php-parallel-lint": "1.0", "jakub-onderka/php-var-dump-check": "0.*", - "phpunit/phpunit": "3.7.*", + "phpunit/phpunit": "~4.3", "squizlabs/php_codesniffer": "1.*" }, "type": "library", "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleColor": "src/" + "psr-4": { + "JakubOnderka\\PhpConsoleColor\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -722,41 +437,41 @@ "authors": [ { "name": "Jakub Onderka", - "email": "jakub.onderka@gmail.com", - "homepage": "http://www.acci.cz" + "email": "jakub.onderka@gmail.com" } ], - "time": "2014-04-08T15:00:19+00:00" + "time": "2018-09-29T17:23:10+00:00" }, { "name": "jakub-onderka/php-console-highlighter", - "version": "v0.3.2", + "version": "v0.4", "source": { "type": "git", "url": "https://github.com/JakubOnderka/PHP-Console-Highlighter.git", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5" + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/7daa75df45242c8d5b75a22c00a201e7954e4fb5", - "reference": "7daa75df45242c8d5b75a22c00a201e7954e4fb5", + "url": "https://api.github.com/repos/JakubOnderka/PHP-Console-Highlighter/zipball/9f7a229a69d52506914b4bc61bfdb199d90c5547", + "reference": "9f7a229a69d52506914b4bc61bfdb199d90c5547", "shasum": "" }, "require": { - "jakub-onderka/php-console-color": "~0.1", - "php": ">=5.3.0" + "ext-tokenizer": "*", + "jakub-onderka/php-console-color": "~0.2", + "php": ">=5.4.0" }, "require-dev": { "jakub-onderka/php-code-style": "~1.0", - "jakub-onderka/php-parallel-lint": "~0.5", + "jakub-onderka/php-parallel-lint": "~1.0", "jakub-onderka/php-var-dump-check": "~0.1", "phpunit/phpunit": "~4.0", "squizlabs/php_codesniffer": "~1.5" }, "type": "library", "autoload": { - "psr-0": { - "JakubOnderka\\PhpConsoleHighlighter": "src/" + "psr-4": { + "JakubOnderka\\PhpConsoleHighlighter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", @@ -770,7 +485,8 @@ "homepage": "http://www.acci.cz/" } ], - "time": "2015-04-20T18:58:01+00:00" + "description": "Highlight PHP code in terminal", + "time": "2018-09-29T18:48:56+00:00" }, { "name": "jakub-onderka/php-parallel-lint", @@ -821,16 +537,16 @@ }, { "name": "phpdocumentor/reflection-common", - "version": "1.0", + "version": "1.0.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", - "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", + "reference": "21bdeb5f65d7ebf9f43b1b25d404f87deab5bfb6", "shasum": "" }, "require": { @@ -871,33 +587,39 @@ "reflection", "static analysis" ], - "time": "2015-12-27T11:43:31+00:00" + "time": "2017-09-11T18:02:19+00:00" }, { "name": "phpdocumentor/reflection-docblock", - "version": "3.1.1", + "version": "4.3.2", "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", - "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/b83ff7cfcfee7827e1e78b637a5904fe6a96698e", + "reference": "b83ff7cfcfee7827e1e78b637a5904fe6a96698e", "shasum": "" }, "require": { - "php": ">=5.5", - "phpdocumentor/reflection-common": "^1.0@dev", - "phpdocumentor/type-resolver": "^0.2.0", + "php": "^7.0", + "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", + "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", "webmozart/assert": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^4.4" + "doctrine/instantiator": "^1.0.5", + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.x-dev" + } + }, "autoload": { "psr-4": { "phpDocumentor\\Reflection\\": [ @@ -916,29 +638,29 @@ } ], "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", - "time": "2016-09-30T07:12:33+00:00" + "time": "2019-09-12T14:27:41+00:00" }, { "name": "phpdocumentor/type-resolver", - "version": "0.2", + "version": "0.5.1", "source": { "type": "git", "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443" + "reference": "cf842904952e64e703800d094cdf34e715a8a3ae" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/b39c7a5b194f9ed7bd0dd345c751007a41862443", - "reference": "b39c7a5b194f9ed7bd0dd345c751007a41862443", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/cf842904952e64e703800d094cdf34e715a8a3ae", + "reference": "cf842904952e64e703800d094cdf34e715a8a3ae", "shasum": "" }, "require": { - "php": ">=5.5", + "php": "^7.0", "phpdocumentor/reflection-common": "^1.0" }, "require-dev": { - "mockery/mockery": "^0.9.4", - "phpunit/phpunit": "^5.2||^4.8.24" + "mockery/mockery": "^1.0", + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { @@ -948,9 +670,7 @@ }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "phpDocumentor\\Reflection\\": "src" } }, "notification-url": "https://packagist.org/downloads/", @@ -963,41 +683,42 @@ "email": "me@mikevanriel.com" } ], - "time": "2016-06-10T07:14:17+00:00" + "time": "2017-12-30T13:23:38+00:00" }, { "name": "phpspec/prophecy", - "version": "v1.6.1", + "version": "1.9.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0" + "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/58a8137754bc24b25740d4281399a4a3596058e0", - "reference": "58a8137754bc24b25740d4281399a4a3596058e0", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/f6811d96d97bdf400077a0cc100ae56aa32b9203", + "reference": "f6811d96d97bdf400077a0cc100ae56aa32b9203", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", - "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", - "sebastian/comparator": "^1.1", - "sebastian/recursion-context": "^1.0" + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { - "phpspec/phpspec": "^2.0" + "phpspec/phpspec": "^2.5|^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { - "psr-0": { - "Prophecy\\": "src/" + "psr-4": { + "Prophecy\\": "src/Prophecy" } }, "notification-url": "https://packagist.org/downloads/", @@ -1025,7 +746,7 @@ "spy", "stub" ], - "time": "2016-06-07T08:13:47+00:00" + "time": "2019-10-03T11:07:50+00:00" }, { "name": "phpunit/php-code-coverage", @@ -1091,16 +812,16 @@ }, { "name": "phpunit/php-file-iterator", - "version": "1.4.1", + "version": "1.4.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", "shasum": "" }, "require": { @@ -1134,7 +855,7 @@ "filesystem", "iterator" ], - "time": "2015-06-21T13:08:43+00:00" + "time": "2017-11-27T13:52:08+00:00" }, { "name": "phpunit/php-text-template", @@ -1179,25 +900,30 @@ }, { "name": "phpunit/php-timer", - "version": "1.0.8", + "version": "1.0.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -1219,20 +945,20 @@ "keywords": [ "timer" ], - "time": "2016-05-12T18:03:57+00:00" + "time": "2017-02-26T11:10:40+00:00" }, { "name": "phpunit/php-token-stream", - "version": "1.4.8", + "version": "1.4.12", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/1ce90ba27c42e4e44e6d8458241466380b51fa16", + "reference": "1ce90ba27c42e4e44e6d8458241466380b51fa16", "shasum": "" }, "require": { @@ -1268,20 +994,20 @@ "keywords": [ "tokenizer" ], - "time": "2015-09-15T10:49:45+00:00" + "time": "2017-12-04T08:55:13+00:00" }, { "name": "phpunit/phpunit", - "version": "4.8.27", + "version": "4.8.36", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90" + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c062dddcb68e44b563f66ee319ddae2b5a322a90", - "reference": "c062dddcb68e44b563f66ee319ddae2b5a322a90", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/46023de9a91eec7dfb06cc56cb4e260017298517", + "reference": "46023de9a91eec7dfb06cc56cb4e260017298517", "shasum": "" }, "require": { @@ -1297,7 +1023,7 @@ "phpunit/php-text-template": "~1.2", "phpunit/php-timer": "^1.0.6", "phpunit/phpunit-mock-objects": "~2.3", - "sebastian/comparator": "~1.1", + "sebastian/comparator": "~1.2.2", "sebastian/diff": "~1.2", "sebastian/environment": "~1.3", "sebastian/exporter": "~1.2", @@ -1340,7 +1066,7 @@ "testing", "xunit" ], - "time": "2016-07-21T06:48:14+00:00" + "time": "2017-06-21T08:07:12+00:00" }, { "name": "phpunit/phpunit-mock-objects", @@ -1396,20 +1122,21 @@ "mock", "xunit" ], + "abandoned": true, "time": "2015-10-02T06:51:40+00:00" }, { "name": "phpunit/phpunit-selenium", - "version": "2.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/giorgiosironi/phpunit-selenium.git", - "reference": "2bad798ec0daf20d2854400e3bc5329ee0a7b2d1" + "reference": "013037eeea481657d236431634042648797e1da8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/giorgiosironi/phpunit-selenium/zipball/2bad798ec0daf20d2854400e3bc5329ee0a7b2d1", - "reference": "2bad798ec0daf20d2854400e3bc5329ee0a7b2d1", + "url": "https://api.github.com/repos/giorgiosironi/phpunit-selenium/zipball/013037eeea481657d236431634042648797e1da8", + "reference": "013037eeea481657d236431634042648797e1da8", "shasum": "" }, "require": { @@ -1460,26 +1187,26 @@ "testing", "xunit" ], - "time": "2016-03-01T10:33:56+00:00" + "time": "2017-01-23T22:15:32+00:00" }, { "name": "sebastian/comparator", - "version": "1.2.0", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { "php": ">=5.3.3", "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { "phpunit/phpunit": "~4.4" @@ -1524,27 +1251,27 @@ "compare", "equality" ], - "time": "2015-07-26T15:48:44+00:00" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "1.4.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", - "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "~4.8" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { @@ -1576,7 +1303,7 @@ "keywords": [ "diff" ], - "time": "2015-12-08T07:14:41+00:00" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", @@ -1748,16 +1475,16 @@ }, { "name": "sebastian/recursion-context", - "version": "1.0.2", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", - "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/b19cc3298482a335a95f3016d2f8a6950f0fbcd7", + "reference": "b19cc3298482a335a95f3016d2f8a6950f0fbcd7", "shasum": "" }, "require": { @@ -1797,7 +1524,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2015-11-11T19:50:13+00:00" + "time": "2016-10-03T07:41:43+00:00" }, { "name": "sebastian/version", @@ -1836,16 +1563,16 @@ }, { "name": "squizlabs/php_codesniffer", - "version": "2.7.0", + "version": "2.9.2", "source": { "type": "git", "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed" + "reference": "2acf168de78487db620ab4bc524135a13cfe6745" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", - "reference": "571e27b6348e5b3a637b2abc82ac0d01e6d7bbed", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/2acf168de78487db620ab4bc524135a13cfe6745", + "reference": "2acf168de78487db620ab4bc524135a13cfe6745", "shasum": "" }, "require": { @@ -1910,29 +1637,97 @@ "phpcs", "standards" ], - "time": "2016-09-01T23:53:02+00:00" + "time": "2018-11-07T22:31:41+00:00" }, { - "name": "symfony/yaml", - "version": "v3.1.6", + "name": "symfony/polyfill-ctype", + "version": "v1.12.0", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/7ff51b06c6c3d5cc6686df69004a42c69df09e27", - "reference": "7ff51b06c6c3d5cc6686df69004a42c69df09e27", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/550ebaac289296ce228a706d0867afc34687e3f4", + "reference": "550ebaac289296ce228a706d0867afc34687e3f4", "shasum": "" }, "require": { - "php": ">=5.5.9" + "php": ">=5.3.3" + }, + "suggest": { + "ext-ctype": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "1.12-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "ctype", + "polyfill", + "portable" + ], + "time": "2019-08-06T08:03:45+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.4.32", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "768f817446da74a776a31eea335540f9dcb53942" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/768f817446da74a776a31eea335540f9dcb53942", + "reference": "768f817446da74a776a31eea335540f9dcb53942", + "shasum": "" + }, + "require": { + "php": "^5.5.9|>=7.0.8", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.4-dev" } }, "autoload": { @@ -1959,33 +1754,33 @@ ], "description": "Symfony Yaml Component", "homepage": "https://symfony.com", - "time": "2016-10-24T18:41:13+00:00" + "time": "2019-09-10T10:38:46+00:00" }, { "name": "webmozart/assert", - "version": "1.1.0", + "version": "1.5.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308" + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/bb2d123231c095735130cc8f6d31385a44c7b308", - "reference": "bb2d123231c095735130cc8f6d31385a44c7b308", + "url": "https://api.github.com/repos/webmozart/assert/zipball/88e6d84706d09a236046d686bbea96f07b3a34f4", + "reference": "88e6d84706d09a236046d686bbea96f07b3a34f4", "shasum": "" }, "require": { - "php": "^5.3.3|^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { - "phpunit/phpunit": "^4.6", - "sebastian/version": "^1.0.1" + "phpunit/phpunit": "^4.8.36 || ^7.5.13" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -2009,7 +1804,7 @@ "check", "validate" ], - "time": "2016-08-09T15:02:57+00:00" + "time": "2019-08-24T08:43:50+00:00" } ], "aliases": [], diff --git a/dev/dolibarr_changes.txt b/dev/dolibarr_changes.txt index e87b082dd06..668db97a0c7 100644 --- a/dev/dolibarr_changes.txt +++ b/dev/dolibarr_changes.txt @@ -67,7 +67,7 @@ define('QR_FIND_FROM_RANDOM', false); zapfdingbats.php (for special chars like form checkboxes) * Optionnaly, made freemono the default monotype font if we removed courier -In htdocs/includes/tcpdf/tcpdf.php +In htdocs/includes/tecnickcom/tcpdf/tcpdf.php - protected $default_monospaced_font = 'courier'; + protected $default_monospaced_font = 'freemono'; @@ -137,20 +137,7 @@ with: RESTLER: -------- - -* Add 2 lines into file AutoLoader.php to complete function - private function alias($className, $currentClass) - { - ... -to get - - private function alias($className, $currentClass) - { - if ($className == 'Luracast\Restler\string') return; - if ($className == 'Luracast\Restler\mixed') return; - ... - -Change also content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html +Change content of file htdocs/includes/restler/framework/Luracast/Restler/explorer/index.html +With swagger 2: diff --git a/dev/examples/zapier/.gitignore b/dev/examples/zapier/.gitignore new file mode 100644 index 00000000000..d81e057e6d3 --- /dev/null +++ b/dev/examples/zapier/.gitignore @@ -0,0 +1,7 @@ +build +docs +node_modules +*.log +.environment +.env +.zapierapprc diff --git a/dev/examples/zapier/.travis.yml b/dev/examples/zapier/.travis.yml new file mode 100644 index 00000000000..5b8db5906a8 --- /dev/null +++ b/dev/examples/zapier/.travis.yml @@ -0,0 +1,7 @@ +language: node_js +node_js: + - 8.10.0 +before_script: 'npm install -g zapier-platform-cli' +script: 'zapier test' +notifications: + email: false diff --git a/dev/examples/zapier/action.json b/dev/examples/zapier/action.json new file mode 100644 index 00000000000..e3aa4e69881 --- /dev/null +++ b/dev/examples/zapier/action.json @@ -0,0 +1,56 @@ +{ + "table_rowid": "id", + "id": 6764, + "ref": null, + "type_id": "5", + "type_code": "AC_RDV", + "type": null, + "type_color": null, + "code": null, + "label": "azerty", + "datec": null, + "datem": null, + "authorid": null, + "usermodid": null, + "datep": 1555365600, + "datef": 1555538399, + "durationp": 172799, + "fulldayevent": 1, + "punctual": 1, + "percentage": "-1", + "location": "", + "transparency": 1, + "priority": 0, + "userassigned": { + "1": { + "id": "1", + "transparency": 1 + } + }, + "userownerid": "1", + "userdoneid": null, + "usertodo": null, + "userdone": null, + "socid": null, + "contactid": null, + "elementtype": "", + "icalname": null, + "icalcolor": null, + "actions": [], + "email_msgid": null, + "email_from": null, + "email_sender": null, + "email_to": null, + "email_tocc": null, + "email_tobcc": null, + "email_subject": null, + "errors_to": null, + "import_key": null, + "linkedObjectsIds": null, + "fk_project": 0, + "modelpdf": null, + "note_public": null, + "note_private": null, + "note": "wxcvbn", + "duree": 0 +} \ No newline at end of file diff --git a/dev/examples/zapier/authentication.js b/dev/examples/zapier/authentication.js new file mode 100644 index 00000000000..1c95c76f9c2 --- /dev/null +++ b/dev/examples/zapier/authentication.js @@ -0,0 +1,77 @@ +/*jshint esversion: 6 */ +const testAuth = (z , bundle) => { + const url = bundle.authData.url+'/api/index.php/login'; + // Normally you want to make a request to an endpoint that is either specifically designed to test auth, or one that + // every user will have access to, such as an account or profile endpoint like /me. + // In this example, we'll hit httpbin, which validates the Authorization Header against the arguments passed in the URL path + const promise = z.request({ + url: url, + }); + + // This method can return any truthy value to indicate the credentials are valid. + // Raise an error to show + return promise.then((response) => { + if (response.status === 401) { + throw new Error('The Session Key you supplied is invalid'); + } + return response; + }); +}; + +const getSessionKey = (z, bundle) => { + const url = bundle.authData.url + '/api/index.php/login'; + + const promise = z.request({ + method: 'POST', + url: url, + body: { + login: bundle.authData.login, + password: bundle.authData.password, + } + }); + + return promise.then((response) => { + if (response.status === 401) { + throw new Error('The login/password you supplied is invalid'); + } + const json = JSON.parse(response.content); + return { + sessionKey: json.success.token || 'secret' + }; + }); +}; + +module.exports = { + type: 'session', + // Define any auth fields your app requires here. The user will be prompted to enter this info when + // they connect their account. + fields: [ + { + key: 'url', + label: 'Url of service', + required: true, + type: 'string' + }, + { + key: 'login', + label: 'Login', + required: true, + type: 'string' + }, + { + key: 'password', + label: 'Password', + required: true, + type: 'password' + } + ], + // The test method allows Zapier to verify that the credentials a user provides are valid. We'll execute this + // method whenever a user connects their account for the first time. + test: testAuth, + // The method that will exchange the fields provided by the user for session credentials. + sessionConfig: { + perform: getSessionKey + }, + // assuming "login" is a key returned from the test + connectionLabel: '{{login}}' +}; diff --git a/dev/examples/zapier/creates/thirdparty.js b/dev/examples/zapier/creates/thirdparty.js new file mode 100644 index 00000000000..82cc39f8fab --- /dev/null +++ b/dev/examples/zapier/creates/thirdparty.js @@ -0,0 +1,90 @@ +/*jshint esversion: 6 */ +// create a particular thirdparty by name +const createThirdparty = async (z, bundle) => { + const apiurl = bundle.authData.url + '/api/index.php/thirdparties'; + + const response = await z.request({ + method: 'POST', + url: apiurl, + body: JSON.stringify({ + name: bundle.inputData.name, + name_alias: bundle.inputData.name_alias, + ref_ext: bundle.inputData.ref_ext, + ref_int: bundle.inputData.ref_int, + address: bundle.inputData.address, + zip: bundle.inputData.zip, + town: bundle.inputData.town, + country_code: bundle.inputData.country_code, + country_id: bundle.inputData.country_id, + country: bundle.inputData.country, + phone: bundle.inputData.phone, + email: bundle.inputData.email, + client: bundle.inputData.client, + fournisseur: bundle.inputData.fournisseur, + code_client: bundle.inputData.code_client, + code_fournisseur: bundle.inputData.code_fournisseur, + sens: 'fromzapier' + }) + }); + const result = z.JSON.parse(response.content); + // api returns an integer when ok, a json when ko + return result.response || {id: response}; +}; + +module.exports = { + key: 'thirdparty', + noun: 'Thirdparty', + + display: { + label: 'Create Thirdparty', + description: 'Creates a thirdparty.' + }, + + operation: { + inputFields: [ + {key: 'name', required: true}, + {key: 'name_alias', required: false}, + {key: 'address', required: false}, + {key: 'zip', required: false}, + {key: 'town', required: false}, + {key: 'email', required: false}, + {key: 'client', type: 'integer', required: false}, + {key: 'fournisseur', type: 'integer', required: false}, + {key: 'code_client', required: false}, + {key: 'code_fournisseur', required: false} + ], + perform: createThirdparty, + + sample: { + id: 1, + name: 'DUPOND', + name_alias: 'DUPOND Ltd', + address: 'Rue des Canaries', + zip: '34090', + town: 'MONTPELLIER', + phone: '0123456789', + fax: '2345678901', + email: 'robot@domain.com', + client: 1, + fournisseur: 0, + code_client: 'CU1903-1234', + code_fournisseur: 'SU1903-2345' + }, + + outputFields: [ + {key: 'id', label: 'ID'}, + {key: 'name', label: 'Name'}, + {key: 'name_alias', label: 'Name alias'}, + {key: 'address', label: 'Address'}, + {key: 'zip', label: 'Zip'}, + {key: 'town', label: 'Town'}, + {key: 'phone', label: 'Phone'}, + {key: 'fax', label: 'Fax'}, + {key: 'email', label: 'Email'}, + {key: 'client', label: 'Customer/Prospect 0/1/2/3'}, + {key: 'fournisseur', label: 'Supplier 0/1'}, + {key: 'code_client', label: 'Customer code'}, + {key: 'code_fournisseur', label: 'Supplier code'} + ] + } +}; diff --git a/dev/examples/zapier/index.js b/dev/examples/zapier/index.js new file mode 100644 index 00000000000..fc452a196e6 --- /dev/null +++ b/dev/examples/zapier/index.js @@ -0,0 +1,73 @@ +/*jshint esversion: 6 */ +const triggerThirdparty = require('./triggers/thirdparty'); +const triggerOrder = require('./triggers/order'); +const triggerAction = require('./triggers/action'); + +const searchThirdparty = require('./searches/thirdparty'); + +const createThirdparty = require('./creates/thirdparty'); + +const authentication = require('./authentication'); + +// To include the session key header on all outbound requests, simply define a function here. +// It runs runs before each request is sent out, allowing you to make tweaks to the request in a centralized spot +const includeSessionKeyHeader = (request, z, bundle) => { + if (bundle.authData.sessionKey) { + request.headers = request.headers || {}; + request.headers['DOLAPIKEY'] = bundle.authData.sessionKey; + } + return request; +}; + +// If we get a response and it is a 401, we can raise a special error telling Zapier to retry this after another exchange. +const sessionRefreshIf401 = (response, z, bundle) => { + if (bundle.authData.sessionKey) { + if (response.status === 401) { + throw new z.errors.RefreshAuthError('Session apikey needs refreshing.'); + } + } + return response; +}; + +// We can roll up all our behaviors in an App. +const App = { + // This is just shorthand to reference the installed dependencies you have. Zapier will + // need to know these before we can upload + version: require('./package.json').version, + platformVersion: require('zapier-platform-core').version, + + authentication: authentication, + + // beforeRequest & afterResponse are optional hooks into the provided HTTP client + beforeRequest: [ + includeSessionKeyHeader + ], + + afterResponse: [ + sessionRefreshIf401 + ], + + // If you want to define optional resources to simplify creation of triggers, searches, creates - do that here! + resources: { + }, + + // If you want your trigger to show up, you better include it here! + triggers: { + [triggerThirdparty.key]: triggerThirdparty, + [triggerOrder.key]: triggerOrder, + [triggerAction.key]: triggerAction + }, + + // If you want your searches to show up, you better include it here! + searches: { + [searchThirdparty.key]: searchThirdparty, + }, + + // If you want your creates to show up, you better include it here! + creates: { + [createThirdparty.key]: createThirdparty, + } +}; + +// Finally, export the app. +module.exports = App; diff --git a/dev/examples/zapier/package-lock.json b/dev/examples/zapier/package-lock.json new file mode 100644 index 00000000000..7483948d5b8 --- /dev/null +++ b/dev/examples/zapier/package-lock.json @@ -0,0 +1,405 @@ +{ + "name": "Dolibarr", + "version": "1.0.2", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@types/node": { + "version": "8.10.20", + "resolved": "https://registry.npmjs.org/@types/node/-/node-8.10.20.tgz", + "integrity": "sha512-M7x8+5D1k/CuA6jhiwuSCmE8sbUWJF0wYsjcig9WrXvwUI5ArEoUBdOXpV4JcEMrLp02/QbDjw+kI+vQeKyQgg==", + "optional": true + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "bluebird": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.5.0.tgz", + "integrity": "sha1-eRQg1/VR7qKJdFOop3ZT+WYG1nw=" + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "combined-stream": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.6.tgz", + "integrity": "sha1-cj599ugBrFYTETp+RFqbactjKBg=", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "commander": { + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.15.1.tgz", + "integrity": "sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "content-disposition": { + "version": "0.5.2", + "resolved": "https://registry.npmjs.org/content-disposition/-/content-disposition-0.5.2.tgz", + "integrity": "sha1-DPaLud318r55YcOoUXjLhdunjLQ=" + }, + "debug": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", + "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", + "dev": true, + "requires": { + "ms": "2.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "diff": { + "version": "3.5.0", + "resolved": "https://registry.npmjs.org/diff/-/diff-3.5.0.tgz", + "integrity": "sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==", + "dev": true + }, + "dotenv": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/dotenv/-/dotenv-5.0.1.tgz", + "integrity": "sha512-4As8uPrjfwb7VXC+WnLCbXK7y+Ueb2B3zgNCePYfhxS1PYeaO1YTeplffTEcbfLhvFNGLAz90VvJs9yomG7bow==" + }, + "encoding": { + "version": "0.1.12", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", + "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "requires": { + "iconv-lite": "~0.4.13" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "form-data": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.2.tgz", + "integrity": "sha1-SXBJi+YEwgwAXU9cI67NIda0kJk=", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "1.0.6", + "mime-types": "^2.1.12" + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "glob": { + "version": "7.1.2", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", + "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "he": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", + "integrity": "sha1-k0EP0hsAlzUVH4howvJx80J+I/0=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=" + }, + "json-tryparse": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/json-tryparse/-/json-tryparse-1.0.5.tgz", + "integrity": "sha1-Khy6CLTjEjNo+p+2o01GQwBFeyc=" + }, + "jsonschema": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/jsonschema/-/jsonschema-1.1.1.tgz", + "integrity": "sha1-PO3o4+QR03eHLu+8n98mODy8Ptk=" + }, + "lodash": { + "version": "4.17.11", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.11.tgz", + "integrity": "sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==" + }, + "mime-db": { + "version": "1.38.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.38.0.tgz", + "integrity": "sha512-bqVioMFFzc2awcdJZIzR3HjZFX20QhilVS7hytkKrv7xFAn8bM1gzc/FOX2awLISvWe0PV8ptFKcon+wZ5qYkg==" + }, + "mime-types": { + "version": "2.1.22", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.22.tgz", + "integrity": "sha512-aGl6TZGnhm/li6F7yx82bJiBZwgiEa4Hf6CNr8YO+r5UHr53tSTYZb102zyU50DOWWKeOv0uQLRL0/9EiKWCog==", + "requires": { + "mime-db": "~1.38.0" + } + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", + "integrity": "sha1-hX/Kv8M5fSYluCKCYuhqp6ARsF0=", + "dev": true + }, + "mkdirp": { + "version": "0.5.1", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", + "integrity": "sha1-MAV0OOrGz3+MR2fzhkjWaX11yQM=", + "dev": true, + "requires": { + "minimist": "0.0.8" + } + }, + "mocha": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-5.2.0.tgz", + "integrity": "sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ==", + "dev": true, + "requires": { + "browser-stdout": "1.3.1", + "commander": "2.15.1", + "debug": "3.1.0", + "diff": "3.5.0", + "escape-string-regexp": "1.0.5", + "glob": "7.1.2", + "growl": "1.10.5", + "he": "1.1.1", + "minimatch": "3.0.4", + "mkdirp": "0.5.1", + "supports-color": "5.4.0" + } + }, + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + }, + "node-fetch": { + "version": "1.7.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-1.7.1.tgz", + "integrity": "sha512-j8XsFGCLw79vWXkZtMSmmLaOk9z5SQ9bV/tkbZVCqvgwzrjAGq66igobLofHtF63NvMTp2WjytpsNTGKa+XRIQ==", + "requires": { + "encoding": "^0.1.11", + "is-stream": "^1.0.1" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", + "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==" + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==" + }, + "semver": { + "version": "5.6.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.6.0.tgz", + "integrity": "sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg==" + }, + "should": { + "version": "13.2.3", + "resolved": "https://registry.npmjs.org/should/-/should-13.2.3.tgz", + "integrity": "sha512-ggLesLtu2xp+ZxI+ysJTmNjh2U0TsC+rQ/pfED9bUZZ4DKefP27D+7YJVVTvKsmjLpIi9jAa7itwDGkDDmt1GQ==", + "dev": true, + "requires": { + "should-equal": "^2.0.0", + "should-format": "^3.0.3", + "should-type": "^1.4.0", + "should-type-adaptors": "^1.0.1", + "should-util": "^1.0.0" + } + }, + "should-equal": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/should-equal/-/should-equal-2.0.0.tgz", + "integrity": "sha512-ZP36TMrK9euEuWQYBig9W55WPC7uo37qzAEmbjHz4gfyuXrEUgF8cUvQVO+w+d3OMfPvSRQJ22lSm8MQJ43LTA==", + "dev": true, + "requires": { + "should-type": "^1.4.0" + } + }, + "should-format": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/should-format/-/should-format-3.0.3.tgz", + "integrity": "sha1-m/yPdPo5IFxT04w01xcwPidxJPE=", + "dev": true, + "requires": { + "should-type": "^1.3.0", + "should-type-adaptors": "^1.0.1" + } + }, + "should-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/should-type/-/should-type-1.4.0.tgz", + "integrity": "sha1-B1bYzoRt/QmEOmlHcZ36DUz/XPM=", + "dev": true + }, + "should-type-adaptors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/should-type-adaptors/-/should-type-adaptors-1.1.0.tgz", + "integrity": "sha512-JA4hdoLnN+kebEp2Vs8eBe9g7uy0zbRo+RMcU0EsNy+R+k049Ki+N5tT5Jagst2g7EAja+euFuoXFCa8vIklfA==", + "dev": true, + "requires": { + "should-type": "^1.3.0", + "should-util": "^1.0.0" + } + }, + "should-util": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/should-util/-/should-util-1.0.0.tgz", + "integrity": "sha1-yYzaN0qmsZDfi6h8mInCtNtiAGM=", + "dev": true + }, + "supports-color": { + "version": "5.4.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.4.0.tgz", + "integrity": "sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "zapier-platform-core": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/zapier-platform-core/-/zapier-platform-core-8.0.1.tgz", + "integrity": "sha512-vuAe7JkFQ88AeQ//NwwNEh8ZjiZr30GRWtwYo7Wo/nx1cqZwq+CRc9zJU2WRrhJfJOtOOTUF6w+pArBTtMOC5A==", + "requires": { + "@types/node": "8.10.20", + "bluebird": "3.5.0", + "content-disposition": "0.5.2", + "dotenv": "5.0.1", + "form-data": "2.3.2", + "lodash": "4.17.11", + "node-fetch": "1.7.1", + "oauth-sign": "0.9.0", + "semver": "5.6.0", + "zapier-platform-schema": "8.0.1" + } + }, + "zapier-platform-schema": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/zapier-platform-schema/-/zapier-platform-schema-8.0.1.tgz", + "integrity": "sha512-97KJ0xVLtpU4BiXVaMTPQpiA0T6CQIEzWfzAWwJAWbu5336+6DMFUzDWN4bANBeD3CIsRHHPcZkP8n/17U05ag==", + "requires": { + "jsonschema": "1.1.1", + "lodash": "4.17.10" + }, + "dependencies": { + "lodash": { + "version": "4.17.10", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.10.tgz", + "integrity": "sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg==" + } + } + } + } +} diff --git a/dev/examples/zapier/package.json b/dev/examples/zapier/package.json new file mode 100644 index 00000000000..8fbd203f962 --- /dev/null +++ b/dev/examples/zapier/package.json @@ -0,0 +1,24 @@ +{ + "name": "Dolibarr", + "version": "1.0.0", + "description": "An app for connecting Dolibarr to the Zapier platform.", + "repository": "Dolibarr/dolibarr", + "homepage": "https://www.dolibarr.fr/", + "author": "Frédéric France ", + "license": "BSD-3-Clause", + "main": "index.js", + "scripts": { + "test": "mocha --recursive" + }, + "engines": { + "node": "8.10.0", + "npm": ">=5.6.0" + }, + "dependencies": { + "zapier-platform-core": "8.0.1" + }, + "devDependencies": { + "mocha": "^5.2.0", + "should": "^13.2.0" + } +} diff --git a/htdocs/theme/common/fontawesome/index.html b/dev/examples/zapier/resources/resources.js similarity index 100% rename from htdocs/theme/common/fontawesome/index.html rename to dev/examples/zapier/resources/resources.js diff --git a/dev/examples/zapier/searches/thirdparty.js b/dev/examples/zapier/searches/thirdparty.js new file mode 100644 index 00000000000..c71c2965789 --- /dev/null +++ b/dev/examples/zapier/searches/thirdparty.js @@ -0,0 +1,66 @@ +module.exports = { + key: 'thirdparty', + + // You'll want to provide some helpful display labels and descriptions + // for users. Zapier will put them into the UX. + noun: 'Thirdparty', + display: { + label: 'Find a Thirdparty', + description: 'Search for thirdparty.' + }, + + // `operation` is where we make the call to your API to do the search + operation: { + // This search only has one search field. Your searches might have just one, or many + // search fields. + inputFields: [ + { + key: 'name', + type: 'string', + label: 'Name', + helpText: 'Name to limit to the search to (i.e. The company or %company%).' + } + ], + + perform: (z, bundle) => { + const url = bundle.authData.url + '/api/index.php/thirdparties/'; + + // Put the search value in a query param. The details of how to build + // a search URL will depend on how your API works. + const options = { + params: { + sqlfilters: "t.nom like \'%"+bundle.inputData.name+"%\'" + } + }; + + return z.request(url, options).then(response => JSON.parse(response.content)); + }, + + // In cases where Zapier needs to show an example record to the user, but we are unable to get a live example + // from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of + // returned records, and have obviously dummy values that we can show to any user. + sample: { + id: 1, + createdAt: 1472069465, + name: 'DOE', + firstname: 'John', + authorId: 1, + directions: '1. Boil Noodles\n2.Serve with sauce', + style: 'italian' + }, + + // If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom + // field definitions. The result will be used to augment the sample. + // outputFields: () => { return []; } + // Alternatively, a static field definition should be provided, to specify labels for the fields + outputFields: [ + {key: 'id', label: 'ID'}, + {key: 'createdAt', label: 'Created At'}, + {key: 'name', label: 'Name'}, + {key: 'firstname', label: 'Firstname'}, + {key: 'directions', label: 'Directions'}, + {key: 'authorId', label: 'Author ID'}, + {key: 'style', label: 'Style'} + ] + } +}; diff --git a/dev/examples/zapier/test/index.js b/dev/examples/zapier/test/index.js new file mode 100644 index 00000000000..220e48f540f --- /dev/null +++ b/dev/examples/zapier/test/index.js @@ -0,0 +1,17 @@ +require('should'); + +const zapier = require('zapier-platform-core'); + +// Use this to make test calls into your app: +const App = require('../index'); +const appTester = zapier.createAppTester(App); + +describe('My App', () => { + + it('should test something', (done) => { + const x = 1; + x.should.eql(1); + done(); + }); + +}); diff --git a/dev/examples/zapier/triggers/action.js b/dev/examples/zapier/triggers/action.js new file mode 100644 index 00000000000..d387d88ec1f --- /dev/null +++ b/dev/examples/zapier/triggers/action.js @@ -0,0 +1,156 @@ +const subscribeHook = (z, bundle) => { + // `z.console.log()` is similar to `console.log()`. + z.console.log('suscribing hook!'); + + // bundle.targetUrl has the Hook URL this app should call when an action is created. + const data = { + url: bundle.targetUrl, + event: bundle.event, + module: 'action', + action: bundle.inputData.action + }; + + const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + + // You can build requests and our client will helpfully inject all the variables + // you need to complete. You can also register middleware to control this. + const options = { + url: url, + method: 'POST', + body: JSON.stringify(data) + }; + + // You may return a promise or a normal data structure from any perform method. + return z.request(options).then((response) => JSON.parse(response.content)); +}; + +const unsubscribeHook = (z, bundle) => { + // bundle.subscribeData contains the parsed response JSON from the subscribe + // request made initially. + z.console.log('unsuscribing hook!'); + + // You can build requests and our client will helpfully inject all the variables + // you need to complete. You can also register middleware to control this. + const options = { + url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + method: 'DELETE', + }; + + // You may return a promise or a normal data structure from any perform method. + return z.request(options).then((response) => JSON.parse(response.content)); +}; + +const getAction = (z, bundle) => { + // bundle.cleanedRequest will include the parsed JSON object (if it's not a + // test poll) and also a .querystring property with the URL's query string. + const action = { + id: bundle.cleanedRequest.id, + ref: bundle.cleanedRequest.ref, + ref_client: bundle.cleanedRequest.ref_client, + name: bundle.cleanedRequest.name, + firstname: bundle.cleanedRequest.firstname, + usertodo__name: bundle.cleanedRequest.usertodo__name, + location: bundle.cleanedRequest.location, + label: bundle.cleanedRequest.label, + authorId: bundle.cleanedRequest.authorId, + createdAt: bundle.cleanedRequest.createdAt, + module: bundle.cleanedRequest.module, + datep: bundle.cleanedRequest.datep, + datef: bundle.cleanedRequest.datef, + fulldayevent: bundle.cleanedRequest.fulldayevent, + transparency: bundle.cleanedRequest.transparency, + icalname: bundle.cleanedRequest.icalname, + icalcolor: bundle.cleanedRequest.icalcolor, + note: bundle.cleanedRequest.note, + note_public: bundle.cleanedRequest.note_public, + note_private: bundle.cleanedRequest.note_private, + action: bundle.cleanedRequest.action + }; + + return [action]; +}; + +const getFallbackRealAction = (z, bundle) => { + // For the test poll, you should get some real data, to aid the setup process. + const module = bundle.inputData.module; + const options = { + url: bundle.authData.url + '/api/index.php/agendaevents/0', + }; + + return z.request(options).then((response) => [JSON.parse(response.content)]); +}; + +// const getActionsChoices = (z, bundle) => { +// // For the test poll, you should get some real data, to aid the setup process. +// const module = bundle.inputData.module; +// const options = { +// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/actions', +// }; + +// return z.request(options).then((response) => JSON.parse(response.content)); +// }; + +// We recommend writing your actions separate like this and rolling them +// into the App definition at the end. +module.exports = { + key: 'action', + + // You'll want to provide some helpful display labels and descriptions + // for users. Zapier will put them into the UX. + noun: 'Action', + display: { + label: 'New Agenda', + description: 'Trigger when a new agenda with action is done in Dolibarr.' + }, + + // `operation` is where the business logic goes. + operation: { + + // `inputFields` can define the fields a user could provide, + // we'll pass them in as `bundle.inputData` later. + inputFields: [ + { + key: 'action', + type: 'string', + helpText: 'Which action of agenda this should trigger on.', + choices: { + create: "Create", + modify: "Modify", + delete: "Delete", + } + } + ], + + type: 'hook', + + performSubscribe: subscribeHook, + performUnsubscribe: unsubscribeHook, + + perform: getAction, + performList: getFallbackRealAction, + + // In cases where Zapier needs to show an example record to the user, but we are unable to get a live example + // from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of + // returned records, and have obviously dummy values that we can show to any user. + sample: { + id: 1, + createdAt: 1472069465, + name: 'Best Spagetti Ever', + authorId: 1, + action: 'create' + }, + + // If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom + // field definitions. The result will be used to augment the sample. + // outputFields: () => { return []; } + // Alternatively, a static field definition should be provided, to specify labels for the fields + outputFields: [ + {key: 'id', label: 'ID'}, + {key: 'createdAt', label: 'Created At'}, + {key: 'name', label: 'Name'}, + {key: 'usertodo__name', label: 'UserToDo Name'}, + {key: 'authorId', label: 'Author ID'}, + {key: 'action', label: 'Action'} + ] + } +}; diff --git a/dev/examples/zapier/triggers/order.js b/dev/examples/zapier/triggers/order.js new file mode 100644 index 00000000000..6262d734edc --- /dev/null +++ b/dev/examples/zapier/triggers/order.js @@ -0,0 +1,148 @@ +const subscribeHook = (z, bundle) => { + // `z.console.log()` is similar to `console.log()`. + z.console.log('suscribing hook!'); + + // bundle.targetUrl has the Hook URL this app should call when an action is created. + const data = { + url: bundle.targetUrl, + event: bundle.event, + module: 'order', + action: bundle.inputData.action + }; + + const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + + // You can build requests and our client will helpfully inject all the variables + // you need to complete. You can also register middleware to control this. + const options = { + url: url, + method: 'POST', + body: JSON.stringify(data) + }; + + // You may return a promise or a normal data structure from any perform method. + return z.request(options).then((response) => JSON.parse(response.content)); +}; + +const unsubscribeHook = (z, bundle) => { + // bundle.subscribeData contains the parsed response JSON from the subscribe + // request made initially. + z.console.log('unsuscribing hook!'); + + // You can build requests and our client will helpfully inject all the variables + // you need to complete. You can also register middleware to control this. + const options = { + url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + method: 'DELETE', + }; + + // You may return a promise or a normal data structure from any perform method. + return z.request(options).then((response) => JSON.parse(response.content)); +}; + +const getOrder = (z, bundle) => { + // bundle.cleanedRequest will include the parsed JSON object (if it's not a + // test poll) and also a .querystring property with the URL's query string. + const order = { + id: bundle.cleanedRequest.id, + ref: bundle.cleanedRequest.ref, + ref_client: bundle.cleanedRequest.ref_client, + name: bundle.cleanedRequest.name, + firstname: bundle.cleanedRequest.firstname, + directions: bundle.cleanedRequest.directions, + authorId: bundle.cleanedRequest.authorId, + createdAt: bundle.cleanedRequest.createdAt, + note_public: bundle.cleanedRequest.note_public, + note_private: bundle.cleanedRequest.note_private, + action: bundle.cleanedRequest.action + }; + + return [order]; +}; + +const getFallbackRealOrder = (z, bundle) => { + // For the test poll, you should get some real data, to aid the setup process. + const module = bundle.inputData.module; + const options = { + url: bundle.authData.url + '/api/index.php/orders/0', + }; + + return z.request(options).then((response) => [JSON.parse(response.content)]); +}; + +// const getActionsChoices = (z, bundle) => { +// // For the test poll, you should get some real data, to aid the setup process. +// const module = bundle.inputData.module; +// const options = { +// url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/orders', +// }; + +// return z.request(options).then((response) => JSON.parse(response.content)); +// }; + +// We recommend writing your orders separate like this and rolling them +// into the App definition at the end. +module.exports = { + key: 'order', + + // You'll want to provide some helpful display labels and descriptions + // for users. Zapier will put them into the UX. + noun: 'Order', + display: { + label: 'New Order', + description: 'Trigger when a new order with action is done in Dolibarr.' + }, + + // `operation` is where the business logic goes. + operation: { + + // `inputFields` can define the fields a user could provide, + // we'll pass them in as `bundle.inputData` later. + inputFields: [ + { + key: 'action', + type: 'string', + helpText: 'Which action of order this should trigger on.', + choices: { + create: "Create", + modify: "Modify", + validate: "Validate", + } + } + ], + + type: 'hook', + + performSubscribe: subscribeHook, + performUnsubscribe: unsubscribeHook, + + perform: getOrder, + performList: getFallbackRealOrder, + + // In cases where Zapier needs to show an example record to the user, but we are unable to get a live example + // from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of + // returned records, and have obviously dummy values that we can show to any user. + sample: { + id: 1, + createdAt: 1472069465, + name: 'Best Spagetti Ever', + authorId: 1, + directions: '1. Boil Noodles\n2.Serve with sauce', + action: 'create' + }, + + // If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom + // field definitions. The result will be used to augment the sample. + // outputFields: () => { return []; } + // Alternatively, a static field definition should be provided, to specify labels for the fields + outputFields: [ + {key: 'id', label: 'ID'}, + {key: 'createdAt', label: 'Created At'}, + {key: 'name', label: 'Name'}, + {key: 'directions', label: 'Directions'}, + {key: 'authorId', label: 'Author ID'}, + {key: 'module', label: 'Module'}, + {key: 'action', label: 'Action'} + ] + } +}; diff --git a/dev/examples/zapier/triggers/thirdparty.js b/dev/examples/zapier/triggers/thirdparty.js new file mode 100644 index 00000000000..4b13e23ff1c --- /dev/null +++ b/dev/examples/zapier/triggers/thirdparty.js @@ -0,0 +1,175 @@ +const subscribeHook = (z, bundle) => { + // `z.console.log()` is similar to `console.log()`. + z.console.log('suscribing hook!'); + + // bundle.targetUrl has the Hook URL this app should call when an action is created. + const data = { + url: bundle.targetUrl, + event: bundle.event, + module: 'company', + action: bundle.inputData.action + }; + + const url = bundle.authData.url + '/api/index.php/zapierapi/hook'; + + // You can build requests and our client will helpfully inject all the variables + // you need to complete. You can also register middleware to control this. + const options = { + url: url, + method: 'POST', + body: JSON.stringify(data) + }; + + // You may return a promise or a normal data structure from any perform method. + return z.request(options).then((response) => JSON.parse(response.content)); +}; + +const unsubscribeHook = (z, bundle) => { + // bundle.subscribeData contains the parsed response JSON from the subscribe + // request made initially. + z.console.log('unsuscribing hook!'); + + // You can build requests and our client will helpfully inject all the variables + // you need to complete. You can also register middleware to control this. + const options = { + url: bundle.authData.url + '/api/index.php/zapierapi/hook/' + bundle.subscribeData.id, + method: 'DELETE', + }; + + // You may return a promise or a normal data structure from any perform method. + return z.request(options).then((response) => JSON.parse(response.content)); +}; + +const getThirdparty = (z, bundle) => { + // bundle.cleanedRequest will include the parsed JSON object (if it's not a + // test poll) and also a .querystring property with the URL's query string. + const thirdparty = { + id: bundle.cleanedRequest.id, + name: bundle.cleanedRequest.name, + name_alias: bundle.cleanedRequest.name_alias, + firstname: bundle.cleanedRequest.firstname, + address: bundle.cleanedRequest.address, + zip: bundle.cleanedRequest.zip, + town: bundle.cleanedRequest.town, + email: bundle.cleanedRequest.email, + client: bundle.cleanedRequest.client, + fournisseur: bundle.cleanedRequest.fournisseur, + code_client: bundle.cleanedRequest.code_client, + code_fournisseur: bundle.cleanedRequest.code_fournisseur, + authorId: bundle.cleanedRequest.authorId, + createdAt: bundle.cleanedRequest.createdAt, + action: bundle.cleanedRequest.action + }; + + return [thirdparty]; +}; + +const getFallbackRealThirdparty = (z, bundle) => { + // For the test poll, you should get some real data, to aid the setup process. + const module = bundle.inputData.module; + const options = { + url: bundle.authData.url + '/api/index.php/thirdparties/0', + }; + + return z.request(options).then((response) => [JSON.parse(response.content)]); +}; + +// const getModulesChoices = (z/*, bundle*/) => { +// // For the test poll, you should get some real data, to aid the setup process. +// const options = { +// url: bundle.authData.url + '/api/index.php/zapierapi/getmoduleschoices', +// }; + +// return z.request(options).then((response) => JSON.parse(response.content)); +// }; +// const getModulesChoices = () => { + +// return { +// orders: "Order", +// invoices: "Invoice", +// thirdparties: "Thirdparty", +// contacts: "Contacts" +// }; +// }; + +// const getActionsChoices = (z, bundle) => { +// // For the test poll, you should get some real data, to aid the setup process. +// const module = bundle.inputData.module; +// const options = { +// url: url: bundle.authData.url + '/api/index.php/zapierapi/getactionschoices/thirparty`, +// }; + +// return z.request(options).then((response) => JSON.parse(response.content)); +// }; + +// We recommend writing your triggers separate like this and rolling them +// into the App definition at the end. +module.exports = { + key: 'thirdparty', + + // You'll want to provide some helpful display labels and descriptions + // for users. Zapier will put them into the UX. + noun: 'Thirdparty', + display: { + label: 'New Thirdparty', + description: 'Trigger when a new thirdpaty action is done in Dolibarr.' + }, + + // `operation` is where the business logic goes. + operation: { + + // `inputFields` can define the fields a user could provide, + // we'll pass them in as `bundle.inputData` later. + inputFields: [ + { + key: 'action', + type: 'string', + helpText: 'Which action of thirdparty this should trigger on.', + choices: { + create: "Create", + modify: "Modify", + validate: "Validate", + } + } + ], + + type: 'hook', + + performSubscribe: subscribeHook, + performUnsubscribe: unsubscribeHook, + + perform: getThirdparty, + performList: getFallbackRealThirdparty, + + // In cases where Zapier needs to show an example record to the user, but we are unable to get a live example + // from the API, Zapier will fallback to this hard-coded sample. It should reflect the data structure of + // returned records, and have obviously dummy values that we can show to any user. + sample: { + id: 1, + createdAt: 1472069465, + name: 'DOE', + name_alias: 'DOE Ltd', + firstname: 'John', + authorId: 1, + action: 'create' + }, + + // If the resource can have fields that are custom on a per-user basis, define a function to fetch the custom + // field definitions. The result will be used to augment the sample. + // outputFields: () => { return []; } + // Alternatively, a static field definition should be provided, to specify labels for the fields + outputFields: [ + {key: 'id', label: 'ID'}, + {key: 'createdAt', label: 'Created At'}, + {key: 'name', label: 'Name'}, + {key: 'name_alias', label: 'Name alias'}, + {key: 'firstname', label: 'Firstame'}, + {key: 'authorId', label: 'Author ID'}, + {key: 'action', label: 'Action'}, + {key: 'client', label: 'Customer/Prospect 0/1/2/3'}, + {key: 'fournisseur', label: 'Supplier 0/1'}, + {key: 'code_client', label: 'Customer code'}, + {key: 'code_fournisseur', label: 'Supplier code'} + ] + } +}; diff --git a/dev/initdemo/sftpget_and_loaddump.php b/dev/initdemo/sftpget_and_loaddump.php index e5ade3aa2f6..5b16d3afe9b 100755 --- a/dev/initdemo/sftpget_and_loaddump.php +++ b/dev/initdemo/sftpget_and_loaddump.php @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * or see http://www.gnu.org/ + * or see https://www.gnu.org/ * * Get a distant dump file and load it into a mysql database */ diff --git a/dev/initdemo/updatedemo.php b/dev/initdemo/updatedemo.php index dcaa44c43a6..a1410d3d962 100755 --- a/dev/initdemo/updatedemo.php +++ b/dev/initdemo/updatedemo.php @@ -14,7 +14,7 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * or see http://www.gnu.org/ + * or see https://www.gnu.org/ * * Get a distant dump file and load it into a mysql database */ diff --git a/dev/namespacemig/aaa.class.php b/dev/namespacemig/aaa.class.php index 1070e96f875..d7578b78e40 100644 --- a/dev/namespacemig/aaa.class.php +++ b/dev/namespacemig/aaa.class.php @@ -2,10 +2,14 @@ namespace Dolibarr; - global $globalaaa; $globalaaa = 'globalaaa'; +/** + * faaa + * + * @return string + */ function faaa() { return 'faaa'; @@ -15,9 +19,12 @@ class Aaa { const AAA='aaa'; + /** + * do + * @return void + */ public function do() { echo 'doaaa'."\n"; } } - diff --git a/dev/namespacemig/bbb.class.php b/dev/namespacemig/bbb.class.php index cc53aa6517d..f68b3b2f36c 100644 --- a/dev/namespacemig/bbb.class.php +++ b/dev/namespacemig/bbb.class.php @@ -1,11 +1,12 @@ 0 - + + 0 + + '; + } print '
'; if ($optioncss != '') print ''; @@ -278,7 +297,8 @@ if ($resql) else dol_print_error($db); print ""; print ajax_combobox("chartofaccounts"); - print ''; + print ''; + print ''; print '
'; print '
'; @@ -286,6 +306,9 @@ if ($resql) $varpage=empty($contextpage)?$_SERVER["PHP_SELF"]:$contextpage; $selectedfields=$form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage); // This also change content of $arrayfields + $moreforfilter = ''; + $massactionbutton = ''; + print '
'; print ''."\n"; diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php index 87a7464dda6..06a2fb60d67 100644 --- a/htdocs/accountancy/admin/accountmodel.php +++ b/htdocs/accountancy/admin/accountmodel.php @@ -23,7 +23,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/card.php b/htdocs/accountancy/admin/card.php index a6c3969e64a..c49ed42741b 100644 --- a/htdocs/accountancy/admin/card.php +++ b/htdocs/accountancy/admin/card.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/categories.php b/htdocs/accountancy/admin/categories.php index 17fa65d4f5e..a7fe40acefc 100644 --- a/htdocs/accountancy/admin/categories.php +++ b/htdocs/accountancy/admin/categories.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/categories_list.php b/htdocs/accountancy/admin/categories_list.php index e7cdc800aee..28c771c19b9 100644 --- a/htdocs/accountancy/admin/categories_list.php +++ b/htdocs/accountancy/admin/categories_list.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/admin/closure.php b/htdocs/accountancy/admin/closure.php index 479dd410f33..55ed84d4ad0 100644 --- a/htdocs/accountancy/admin/closure.php +++ b/htdocs/accountancy/admin/closure.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/defaultaccounts.php b/htdocs/accountancy/admin/defaultaccounts.php index 079e3585341..13d3a267956 100644 --- a/htdocs/accountancy/admin/defaultaccounts.php +++ b/htdocs/accountancy/admin/defaultaccounts.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/accountancy/admin/export.php b/htdocs/accountancy/admin/export.php index 81dc83b2ae5..e13a66998b7 100644 --- a/htdocs/accountancy/admin/export.php +++ b/htdocs/accountancy/admin/export.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -132,12 +132,15 @@ if ($action == 'update') { * View */ -llxHeader(); - $form = new Form($db); +$title = $langs->trans('ConfigAccountingExpert'); +llxHeader('', $title); + + +$linkback=''; // $linkback = '' . $langs->trans("BackToModuleList") . ''; -print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'title_setup'); +print load_fiche_titre($langs->trans('ConfigAccountingExpert'), $linkback, 'accountancy'); print "\n".''; + } + + + print load_fiche_titre($langs->trans("AccountancyArea"), $showtutorial . $resultboxes['selectboxlist'], 'accountancy'); + + print '
'; // hideobject is to start hidden + print "
\n"; + print ''.$langs->trans("AccountancyAreaDescIntro")."
\n"; print "
\n";print "
\n"; print load_fiche_titre(' '.$langs->trans("AccountancyAreaDescActionOnce"), '', '')."\n"; @@ -172,12 +207,51 @@ if ($conf->accounting->enabled) $step++; print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescAnalyze", chr(64+$step))."
\n"; print "
\n"; + + print '
'; + + print '
'; + + print '
'; + + print '
'; + + /* + * Show boxes + */ + $boxlist.='
'; + + $boxlist.='
'; + if(!empty($nbworkboardcount)) + { + $boxlist.=$boxwork; + } + + $boxlist.=$resultboxes['boxlista']; + + $boxlist.= '
'; + + $boxlist.= '
'; + + $boxlist.=$boxstat; + $boxlist.=$resultboxes['boxlistb']; + + $boxlist.= '
'; + $boxlist.= "\n"; + + $boxlist.='
'; + + + print $boxlist; + + print '
'; } else { + print load_fiche_titre($langs->trans("AccountancyArea"), '', 'accountancy'); + print $langs->trans("Module10Desc")."
\n"; } -//dol_fiche_end(); // End of page llxFooter(); diff --git a/htdocs/accountancy/journal/bankjournal.php b/htdocs/accountancy/journal/bankjournal.php index ced89cbe515..b36da4a2855 100644 --- a/htdocs/accountancy/journal/bankjournal.php +++ b/htdocs/accountancy/journal/bankjournal.php @@ -22,7 +22,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/expensereportsjournal.php b/htdocs/accountancy/journal/expensereportsjournal.php index fd22446554c..23d97360563 100644 --- a/htdocs/accountancy/journal/expensereportsjournal.php +++ b/htdocs/accountancy/journal/expensereportsjournal.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/purchasesjournal.php b/htdocs/accountancy/journal/purchasesjournal.php index 6f6f37125ab..c83c004c6b2 100644 --- a/htdocs/accountancy/journal/purchasesjournal.php +++ b/htdocs/accountancy/journal/purchasesjournal.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/journal/sellsjournal.php b/htdocs/accountancy/journal/sellsjournal.php index 4595557de13..17b2657b5dc 100644 --- a/htdocs/accountancy/journal/sellsjournal.php +++ b/htdocs/accountancy/journal/sellsjournal.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/card.php b/htdocs/accountancy/supplier/card.php index 97f7d618ce8..7e9d7fbbd7c 100644 --- a/htdocs/accountancy/supplier/card.php +++ b/htdocs/accountancy/supplier/card.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ /** diff --git a/htdocs/accountancy/supplier/index.php b/htdocs/accountancy/supplier/index.php index bc632118da7..88a599d1fc5 100644 --- a/htdocs/accountancy/supplier/index.php +++ b/htdocs/accountancy/supplier/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/accountancy/supplier/lines.php b/htdocs/accountancy/supplier/lines.php index c4aa1316876..97f1c771122 100644 --- a/htdocs/accountancy/supplier/lines.php +++ b/htdocs/accountancy/supplier/lines.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -210,19 +210,7 @@ if (strlen(trim($search_account))) { if (strlen(trim($search_vat))) { $sql .= natural_search("l.tva_tx", price2num($search_vat), 1); } -if ($search_month > 0) -{ - if ($search_year > 0 && empty($search_day)) - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'"; - elseif ($search_year > 0 && ! empty($search_day)) - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; - else - $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; -} -elseif ($search_year > 0) -{ - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'"; -} +$sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year); if (strlen(trim($search_country))) { $arrayofcode = getCountriesInEEC(); $country_code_in_EEC = $country_code_in_EEC_without_me = ''; diff --git a/htdocs/accountancy/supplier/list.php b/htdocs/accountancy/supplier/list.php index 9ce49b23e6a..d00e5901107 100644 --- a/htdocs/accountancy/supplier/list.php +++ b/htdocs/accountancy/supplier/list.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -252,19 +252,7 @@ if (strlen(trim($search_account))) { if (strlen(trim($search_vat))) { $sql .= natural_search("l.tva_tx", price2num($search_vat), 1); } -if ($search_month > 0) -{ - if ($search_year > 0 && empty($search_day)) - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, $search_month, false))."' AND '".$db->idate(dol_get_last_day($search_year, $search_month, false))."'"; - elseif ($search_year > 0 && ! empty($search_day)) - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $search_month, $search_day, $search_year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $search_month, $search_day, $search_year))."'"; - else - $sql.= " AND date_format(f.datef, '%m') = '".$db->escape($search_month)."'"; -} -elseif ($search_year > 0) -{ - $sql.= " AND f.datef BETWEEN '".$db->idate(dol_get_first_day($search_year, 1, false))."' AND '".$db->idate(dol_get_last_day($search_year, 12, false))."'"; -} +$sql.=dolSqlDateFilter('f.datef', $search_day, $search_month, $search_year); if (strlen(trim($search_country))) { $arrayofcode = getCountriesInEEC(); $country_code_in_EEC = $country_code_in_EEC_without_me = ''; diff --git a/htdocs/accountancy/tpl/export_journal.tpl.php b/htdocs/accountancy/tpl/export_journal.tpl.php index 97f0da548ca..5c9f7ad48ed 100644 --- a/htdocs/accountancy/tpl/export_journal.tpl.php +++ b/htdocs/accountancy/tpl/export_journal.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/adherents/admin/adherent.php b/htdocs/adherents/admin/adherent.php index e39fb6bb233..526b325c7ac 100644 --- a/htdocs/adherents/admin/adherent.php +++ b/htdocs/adherents/admin/adherent.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_emails.php b/htdocs/adherents/admin/adherent_emails.php index 70ed003f9d4..cdcc898498a 100644 --- a/htdocs/adherents/admin/adherent_emails.php +++ b/htdocs/adherents/admin/adherent_emails.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_extrafields.php b/htdocs/adherents/admin/adherent_extrafields.php index e8e112d42b6..6f2b899dc5c 100644 --- a/htdocs/adherents/admin/adherent_extrafields.php +++ b/htdocs/adherents/admin/adherent_extrafields.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/admin/adherent_type_extrafields.php b/htdocs/adherents/admin/adherent_type_extrafields.php index e9e7c601a30..3e091acdfda 100644 --- a/htdocs/adherents/admin/adherent_type_extrafields.php +++ b/htdocs/adherents/admin/adherent_type_extrafields.php @@ -17,8 +17,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/adherents/admin/website.php b/htdocs/adherents/admin/website.php index f38c0b5ff6d..ead5e767243 100644 --- a/htdocs/adherents/admin/website.php +++ b/htdocs/adherents/admin/website.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -225,7 +225,7 @@ if (! empty($conf->global->MEMBER_ENABLE_PUBLIC)) { print '
'; //print $langs->trans('FollowingLinksArePublic').'
'; - print img_picto('', 'object_globe.png').' '.$langs->trans('BlankSubscriptionForm').':
'; + print img_picto('', 'globe').' '.$langs->trans('BlankSubscriptionForm').':
'; if ($conf->multicompany->enabled) { $entity_qr='?entity='.$conf->entity; } else { diff --git a/htdocs/adherents/agenda.php b/htdocs/adherents/agenda.php index 105251ec114..710d69fe621 100644 --- a/htdocs/adherents/agenda.php +++ b/htdocs/adherents/agenda.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/canvas/actions_adherentcard_common.class.php b/htdocs/adherents/canvas/actions_adherentcard_common.class.php index c019a8eb88f..0f954ecf201 100644 --- a/htdocs/adherents/canvas/actions_adherentcard_common.class.php +++ b/htdocs/adherents/canvas/actions_adherentcard_common.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php index 40424540312..eb295431e8d 100644 --- a/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php +++ b/htdocs/adherents/canvas/default/actions_adherentcard_default.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php index 742c11d5160..4572164fdcf 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_create.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -127,4 +127,4 @@ echo $this->control->tpl['ajax_selectcountry']; ?> - \ No newline at end of file + diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php index 3b25467860b..942ddb2d647 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_edit.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -144,4 +144,4 @@ echo $this->control->tpl['ajax_selectcountry']; - \ No newline at end of file + diff --git a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php index 39c7810e621..87190bef2fe 100644 --- a/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php +++ b/htdocs/adherents/canvas/default/tpl/adherentcard_view.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -146,4 +146,4 @@ echo $this->control->tpl['actionstodo']; echo $this->control->tpl['actionsdone']; ?> - \ No newline at end of file + diff --git a/htdocs/adherents/card.php b/htdocs/adherents/card.php index badf93b4e80..06053127c9a 100644 --- a/htdocs/adherents/card.php +++ b/htdocs/adherents/card.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -68,7 +68,7 @@ $object = new Adherent($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Get object canvas (By default, this is not defined, so standard usage of dolibarr) $object->getCanvas($id); @@ -320,7 +320,7 @@ if (empty($reshook)) $object->public = GETPOST("public", 'alpha'); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; // Check if we need to also synchronize user information @@ -497,7 +497,7 @@ if (empty($reshook)) $object->public = $public; // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; // Check parameters @@ -866,10 +866,22 @@ else $object->country_code=$tmparray['code']; $object->country=$tmparray['label']; } + + if (!empty($socid)) { +$object = new Societe($db); +if ($socid > 0) $object->fetch($socid); + +if (! ($object->id > 0)) +{ + $langs->load("errors"); + print($langs->trans('ErrorRecordNotFound')); + exit; +} + } $adht = new AdherentType($db); - print load_fiche_titre($langs->trans("NewMember")); + print load_fiche_titre($langs->trans("NewMember"), '', 'members'); if ($conf->use_javascript_ajax) { @@ -905,6 +917,7 @@ else print '
'; print ''; print ''; + print ''; if ($backtopage) print ''; dol_fiche_head(''); @@ -1039,8 +1052,8 @@ else print '
'; } - // Birthday - print "\n"; @@ -1308,8 +1321,8 @@ else print ''; } - // Birthday - print "\n"; @@ -1362,15 +1375,8 @@ else else print $langs->trans("NoDolibarrAccess"); print ''; - // Other attributes + // Other attributes. Fields from hook formObjectOptions and Extrafields. include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_add.tpl.php'; - //Hooks here - $reshook=$hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook - print $hookmanager->resPrint; - if (empty($reshook)) - { - print $object->showOptionals($extrafields, 'edit'); - } print '
'.$langs->trans("LinkedIn").'
".$langs->trans("Birthday")."\n"; + // Birth Date + print "
".$langs->trans("DateToBirth")."\n"; print $form->selectDate(($object->birth ? $object->birth : -1), 'birth', '', '', 1, 'formsoc'); print "
'.$langs->trans("LinkedIn").'linkedin).'">
".$langs->trans("Birthday")."\n"; + // Birth Date + print "
".$langs->trans("DateToBirth")."\n"; print $form->selectDate(($object->birth ? $object->birth : -1), 'birth', '', '', 1, 'formsoc'); print "
'; dol_fiche_end(); @@ -1672,11 +1678,15 @@ else } else { - if (! $adht->subscription) + if ($object->need_subscription == 0) + { + print $langs->trans("SubscriptionNotNeeded"); + } + elseif (! $adht->subscription) { print $langs->trans("SubscriptionNotRecorded"); if ($object->statut > 0) print " ".img_warning($langs->trans("Late")); // displays delay Pictogram only if not a draft and not terminated - } + } else { print $langs->trans("SubscriptionNotReceived"); @@ -1750,8 +1760,8 @@ else print ''; - // Birthday - print ''; + // Birth Date + print ''; // Public print ''; diff --git a/htdocs/adherents/cartes/carte.php b/htdocs/adherents/cartes/carte.php index dc02e48cbab..177e2eef18f 100644 --- a/htdocs/adherents/cartes/carte.php +++ b/htdocs/adherents/cartes/carte.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -48,7 +48,7 @@ $object=new Adherent($db); $extrafields = new ExtraFields($db); // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('adherent'); +$extrafields->fetch_name_optionals_label($object->table_element); /* @@ -248,7 +248,7 @@ $form=new Form($db); llxHeader('', $langs->trans("MembersCards")); -print load_fiche_titre($langs->trans("LinkToGeneratedPages")); +print load_fiche_titre($langs->trans("LinkToGeneratedPages"), '', 'members'); print ''.$langs->trans("LinkToGeneratedPagesDesc").'
'; print '
'; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 4b4dcc518d2..14eb401866a 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -24,7 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -581,6 +581,7 @@ class Adherent extends CommonObject $sql.= ", fk_adherent_type = ".$this->db->escape($this->typeid); $sql.= ", morphy = '".$this->db->escape($this->morphy)."'"; $sql.= ", birth = ".($this->birth?"'".$this->db->idate($this->birth)."'":"null"); + if ($this->socid) $sql.= ", fk_soc = '".$this->db->escape($this->socid)."'"; // Must be modified only when creating from a third-party if ($this->datefin) $sql.= ", datefin = '".$this->db->idate($this->datefin)."'"; // Must be modified only when deleting a subscription if ($this->datevalid) $sql.= ", datevalid = '".$this->db->idate($this->datevalid)."'"; // Must be modified only when validating a member $sql.= ", fk_user_mod = ".($user->id>0?$user->id:'null'); // Can be null because member can be create by a guest @@ -2178,7 +2179,8 @@ class Adherent extends CommonObject { if ($statut == -1) return $langs->trans("MemberStatusDraft"); elseif ($statut >= 1) { - if (! $date_end_subscription) return $langs->trans("MemberStatusActive"); + if ($need_subscription == 0) return $langs->trans("MemberStatusNoSubscription"); + elseif (! $date_end_subscription) return $langs->trans("MemberStatusActive"); elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate"); else return $langs->trans("MemberStatusPaid"); } @@ -2188,7 +2190,8 @@ class Adherent extends CommonObject { if ($statut == -1) return $langs->trans("MemberStatusDraftShort"); elseif ($statut >= 1) { - if (! $date_end_subscription) return $langs->trans("MemberStatusActiveShort"); + if ($need_subscription == 0) return $langs->trans("MemberStatusNoSubscription"); + elseif (! $date_end_subscription) return $langs->trans("MemberStatusActiveShort"); elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLateShort"); else return $langs->trans("MemberStatusPaidShort"); } @@ -2198,7 +2201,8 @@ class Adherent extends CommonObject { if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'), 'statut0').' '.$langs->trans("MemberStatusDraftShort"); elseif ($statut >= 1) { - if (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1').' '.$langs->trans("MemberStatusActiveShort"); + if ($need_subscription == 0) return img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4').' '.$langs->trans("MemberStatusNoSubscriptionShort"); + elseif (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1').' '.$langs->trans("MemberStatusActiveShort"); elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'), 'statut3').' '.$langs->trans("MemberStatusActiveLateShort"); else return img_picto($langs->trans('MemberStatusPaid'), 'statut4').' '.$langs->trans("MemberStatusPaidShort"); } @@ -2208,7 +2212,8 @@ class Adherent extends CommonObject { if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'), 'statut0'); elseif ($statut >= 1) { - if (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1'); + if ($need_subscription == 0) return img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4'); + elseif (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1'); elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'), 'statut3'); else return img_picto($langs->trans('MemberStatusPaid'), 'statut4'); } @@ -2218,7 +2223,8 @@ class Adherent extends CommonObject { if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'), 'statut0').' '.$langs->trans("MemberStatusDraft"); elseif ($statut >= 1) { - if (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1').' '.$langs->trans("MemberStatusActive"); + if ($need_subscription == 0) return img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4').' '.$langs->trans("MemberStatusNoSubscription"); + elseif (! $date_end_subscription) return img_picto($langs->trans('MemberStatusActive'), 'statut1').' '.$langs->trans("MemberStatusActive"); elseif ($date_end_subscription < time()) return img_picto($langs->trans('MemberStatusActiveLate'), 'statut3').' '.$langs->trans("MemberStatusActiveLate"); else return img_picto($langs->trans('MemberStatusPaid'), 'statut4').' '.$langs->trans("MemberStatusPaid"); } @@ -2228,7 +2234,8 @@ class Adherent extends CommonObject { if ($statut == -1) return ''.$langs->trans("MemberStatusDraftShort").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0'); elseif ($statut >= 1) { - if (! $date_end_subscription) return ''.$langs->trans("MemberStatusActiveShort").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1'); + if ($need_subscription == 0) return ''.$langs->trans("MemberStatusNoSubscriptionShort").' '.img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4'); + elseif (! $date_end_subscription) return ''.$langs->trans("MemberStatusActiveShort").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1'); elseif ($date_end_subscription < time()) return ''.$langs->trans("MemberStatusActiveLateShort").' '.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3'); else return ''.$langs->trans("MemberStatusPaidShort").' '.img_picto($langs->trans('MemberStatusPaid'), 'statut4'); } @@ -2238,7 +2245,8 @@ class Adherent extends CommonObject { if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0'); if ($statut >= 1) { - if (! $date_end_subscription) return $langs->trans("MemberStatusActive").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1'); + if ($need_subscription == 0) return $langs->trans("MemberStatusNoSubscription").' '.img_picto($langs->trans('MemberStatusNoSubscription'), 'statut4'); + elseif (! $date_end_subscription) return $langs->trans("MemberStatusActive").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1'); elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate").' '.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3'); else return $langs->trans("MemberStatusPaid").' '.img_picto($langs->trans('MemberStatusPaid'), 'statut4'); } @@ -2301,9 +2309,11 @@ class Adherent extends CommonObject $sql = "SELECT a.rowid, a.datefin, a.statut"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as a"; - $sql.= " WHERE a.statut = 1"; + $sql.= ", ".MAIN_DB_PREFIX."adherent_type as t"; + $sql.= " WHERE a.fk_adherent_type = t.rowid"; + $sql.= " AND a.statut = 1"; $sql.= " AND a.entity IN (".getEntity('adherent').")"; - $sql.= " AND (a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."')"; + $sql.= " AND ((a.datefin IS NULL or a.datefin < '".$this->db->idate($now)."') AND t.subscription = 1)"; $resql=$this->db->query($sql); if ($resql) diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 9591a24fa78..a57a90a3aac 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -88,6 +88,8 @@ class AdherentType extends CommonObject /** @var array Array of members */ public $members=array(); + + public $multilangs=array(); /** @@ -101,6 +103,185 @@ class AdherentType extends CommonObject $this->statut = 1; } + /** + * Load array this->multilangs + * + * @return int <0 if KO, >0 if OK + */ + public function getMultiLangs() + { + global $langs; + + $current_lang = $langs->getDefaultLang(); + + $sql = "SELECT lang, label, description, email"; + $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type_lang"; + $sql.= " WHERE fk_type=".$this->id; + + $result = $this->db->query($sql); + if ($result) { + while ($obj = $this->db->fetch_object($result)) + { + //print 'lang='.$obj->lang.' current='.$current_lang.'
'; + if ($obj->lang == $current_lang) // si on a les traduct. dans la langue courante on les charge en infos principales. + { + $this->label = $obj->label; + $this->description = $obj->description; + $this->email = $obj->email; + } + $this->multilangs["$obj->lang"]["label"] = $obj->label; + $this->multilangs["$obj->lang"]["description"] = $obj->description; + $this->multilangs["$obj->lang"]["email"] = $obj->email; + } + return 1; + } + else + { + $this->error="Error: ".$this->db->lasterror()." - ".$sql; + return -1; + } + } + + /** + * Update or add a translation for a product + * + * @param User $user Object user making update + * @return int <0 if KO, >0 if OK + */ + public function setMultiLangs($user) + { + global $conf, $langs; + + $langs_available = $langs->get_available_languages(DOL_DOCUMENT_ROOT, 0, 2); + $current_lang = $langs->getDefaultLang(); + + foreach ($langs_available as $key => $value) + { + if ($key == $current_lang) { + $sql = "SELECT rowid"; + $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type_lang"; + $sql.= " WHERE fk_type=".$this->id; + $sql.= " AND lang='".$key."'"; + + $result = $this->db->query($sql); + + if ($this->db->num_rows($result)) // if there is already a description line for this language + { + $sql2 = "UPDATE ".MAIN_DB_PREFIX."adherent_type_lang"; + $sql2.= " SET "; + $sql2.= " label='".$this->db->escape($this->label)."',"; + $sql2.= " description='".$this->db->escape($this->description)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2.= ", email='".$this->db->escape($this->other)."'"; + } + $sql2.= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'"; + } + else + { + $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2.=", email"; + } + $sql2.= ")"; + $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->label)."',"; + $sql2.= " '".$this->db->escape($this->description)."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2.= ", '".$this->db->escape($this->other)."'"; + } + $sql2.= ")"; + } + dol_syslog(get_class($this).'::setMultiLangs key = current_lang = '.$key); + if (! $this->db->query($sql2)) { + $this->error=$this->db->lasterror(); + return -1; + } + } + elseif (isset($this->multilangs[$key])) { + $sql = "SELECT rowid"; + $sql.= " FROM ".MAIN_DB_PREFIX."adherent_type_lang"; + $sql.= " WHERE fk_type=".$this->id; + $sql.= " AND lang='".$key."'"; + + $result = $this->db->query($sql); + + if ($this->db->num_rows($result)) // if there is already a description line for this language + { + $sql2 = "UPDATE ".MAIN_DB_PREFIX."adherent_type_lang"; + $sql2.= " SET "; + $sql2.= " label='".$this->db->escape($this->multilangs["$key"]["label"])."',"; + $sql2.= " description='".$this->db->escape($this->multilangs["$key"]["description"])."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2.= ", email='".$this->db->escape($this->multilangs["$key"]["other"])."'"; + } + $sql2.= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($key)."'"; + } + else + { + $sql2 = "INSERT INTO ".MAIN_DB_PREFIX."adherent_type_lang (fk_type, lang, label, description"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2.=", email"; + } + $sql2.= ")"; + $sql2.= " VALUES(".$this->id.",'".$this->db->escape($key)."','". $this->db->escape($this->multilangs["$key"]["label"])."',"; + $sql2.= " '".$this->db->escape($this->multilangs["$key"]["description"])."'"; + if (! empty($conf->global->PRODUCT_USE_OTHER_FIELD_IN_TRANSLATION)) { $sql2.= ", '".$this->db->escape($this->multilangs["$key"]["other"])."'"; + } + $sql2.= ")"; + } + + // We do not save if main fields are empty + if ($this->multilangs["$key"]["label"] || $this->multilangs["$key"]["description"]) { + if (! $this->db->query($sql2)) { + $this->error=$this->db->lasterror(); + return -1; + } + } + } + else + { + // language is not current language and we didn't provide a multilang description for this language + } + } + + // Call trigger + $result = $this->call_trigger('MEMBER_TYPE_SET_MULTILANGS', $user); + if ($result < 0) { + $this->error = $this->db->lasterror(); + return -1; + } + // End call triggers + + return 1; + } + + /** + * Delete a language for this product + * + * @param string $langtodelete Language code to delete + * @param User $user Object user making delete + * + * @return int <0 if KO, >0 if OK + */ + public function delMultiLangs($langtodelete, $user) + { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."adherent_type_lang"; + $sql.= " WHERE fk_type=".$this->id." AND lang='".$this->db->escape($langtodelete)."'"; + + dol_syslog(get_class($this).'::delMultiLangs', LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + // Call trigger + $result = $this->call_trigger('ADHERENT_TYPE_DEL_MULTILANGS', $user); + if ($result < 0) { + $this->error = $this->db->lasterror(); + dol_syslog(get_class($this).'::delMultiLangs error='.$this->error, LOG_ERR); + return -1; + } + // End call triggers + return 1; + } + else + { + $this->error=$this->db->lasterror(); + dol_syslog(get_class($this).'::delMultiLangs error='.$this->error, LOG_ERR); + return -1; + } + } /** * Fonction qui permet de creer le status de l'adherent @@ -111,7 +292,7 @@ class AdherentType extends CommonObject */ public function create($user, $notrigger = 0) { - global $conf; + global $langs, $conf; $error=0; @@ -180,7 +361,7 @@ class AdherentType extends CommonObject */ public function update($user, $notrigger = 0) { - global $conf, $hookmanager; + global $langs, $conf, $hookmanager; $error=0; @@ -202,6 +383,17 @@ class AdherentType extends CommonObject $result = $this->db->query($sql); if ($result) { + + $this->description = $this->db->escape($this->note); + + // Multilangs + if (! empty($conf->global->MAIN_MULTILANGS)) { + if ($this->setMultiLangs($user) < 0) { + $this->error=$langs->trans("Error")." : ".$this->db->error()." - ".$sql; + return -2; + } + } + $action='update'; // Actions on extra fields @@ -283,6 +475,8 @@ class AdherentType extends CommonObject */ public function fetch($rowid) { + global $langs, $conf; + $sql = "SELECT d.rowid, d.libelle as label, d.morphy, d.statut, d.subscription, d.mail_valid, d.note, d.vote"; $sql .= " FROM ".MAIN_DB_PREFIX."adherent_type as d"; $sql .= " WHERE d.rowid = ".(int) $rowid; @@ -299,12 +493,17 @@ class AdherentType extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->rowid; $this->label = $obj->label; - $this->morphy = $obj->morphy; + $this->morphy = $obj->morphy; $this->statut = $obj->statut; $this->subscription = $obj->subscription; $this->mail_valid = $obj->mail_valid; $this->note = $obj->note; $this->vote = $obj->vote; + + // multilangs + if (! empty($conf->global->MAIN_MULTILANGS)) { + $this->getMultiLangs(); + } } return 1; diff --git a/htdocs/adherents/class/adherentstats.class.php b/htdocs/adherents/class/adherentstats.class.php index f8e4cea5977..9ef8e122c9b 100644 --- a/htdocs/adherents/class/adherentstats.class.php +++ b/htdocs/adherents/class/adherentstats.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/class/api_members.class.php b/htdocs/adherents/class/api_members.class.php index 7ad51fdcfda..3a17f5c7c28 100644 --- a/htdocs/adherents/class/api_members.class.php +++ b/htdocs/adherents/class/api_members.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/adherents/class/api_memberstypes.class.php b/htdocs/adherents/class/api_memberstypes.class.php index c703ca1ba6a..987e3e2ea87 100644 --- a/htdocs/adherents/class/api_memberstypes.class.php +++ b/htdocs/adherents/class/api_memberstypes.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/adherents/class/api_subscriptions.class.php b/htdocs/adherents/class/api_subscriptions.class.php index e5173005460..101ed822466 100644 --- a/htdocs/adherents/class/api_subscriptions.class.php +++ b/htdocs/adherents/class/api_subscriptions.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/adherents/class/subscription.class.php b/htdocs/adherents/class/subscription.class.php index 571879788ee..986649d15e2 100644 --- a/htdocs/adherents/class/subscription.class.php +++ b/htdocs/adherents/class/subscription.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/document.php b/htdocs/adherents/document.php index 7d9b3405d1e..092827ef731 100644 --- a/htdocs/adherents/document.php +++ b/htdocs/adherents/document.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/htpasswd.php b/htdocs/adherents/htpasswd.php index 79de1971dbc..2dd8c95923f 100644 --- a/htdocs/adherents/htpasswd.php +++ b/htdocs/adherents/htpasswd.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/index.php b/htdocs/adherents/index.php index 3e26ae1ce3a..b858693255e 100644 --- a/htdocs/adherents/index.php +++ b/htdocs/adherents/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -52,7 +52,7 @@ $staticmember=new Adherent($db); $statictype=new AdherentType($db); $subscriptionstatic=new Subscription($db); -print load_fiche_titre($langs->trans("MembersArea")); +print load_fiche_titre($langs->trans("MembersArea"), '', 'members'); $Adherents=array(); $AdherentsAValider=array(); @@ -104,8 +104,7 @@ $now=dol_now(); $sql = "SELECT count(*) as somme , d.fk_adherent_type"; $sql.= " FROM ".MAIN_DB_PREFIX."adherent as d, ".MAIN_DB_PREFIX."adherent_type as t"; $sql.= " WHERE d.entity IN (".getEntity('adherent').")"; -//$sql.= " AND d.statut = 1 AND ((t.subscription = 0 AND d.datefin IS NULL) OR d.datefin >= '".$db->idate($now)."')"; -$sql.= " AND d.statut = 1 AND d.datefin >= '".$db->idate($now)."'"; +$sql.= " AND d.statut = 1 AND (d.datefin >= '".$db->idate($now)."' OR t.subscription = 0)"; $sql.= " AND t.rowid = d.fk_adherent_type"; $sql.= " GROUP BY d.fk_adherent_type"; diff --git a/htdocs/adherents/ldap.php b/htdocs/adherents/ldap.php index db5cd04de22..fafa69b8b3f 100644 --- a/htdocs/adherents/ldap.php +++ b/htdocs/adherents/ldap.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/list.php b/htdocs/adherents/list.php index f78059c2969..877dde34af0 100644 --- a/htdocs/adherents/list.php +++ b/htdocs/adherents/list.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -39,6 +39,7 @@ $massaction=GETPOST('massaction', 'alpha'); $show_files=GETPOST('show_files', 'int'); $confirm=GETPOST('confirm', 'alpha'); $toselect = GETPOST('toselect', 'array'); +$contextpage= GETPOST('contextpage', 'aZ')?GETPOST('contextpage', 'aZ'):'memberslist'; // To manage different context of search // Security check $result=restrictedArea($user, 'adherent'); @@ -88,7 +89,8 @@ $hookmanager->initHooks(array('memberlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('adherent'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -292,8 +294,8 @@ if ($search_town) $sql.= natural_search("d.town", $search_town); if ($search_zip) $sql.= natural_search("d.zip", $search_zip); if ($search_state) $sql.= natural_search("state.nom", $search_state); if ($search_country) $sql .= " AND d.country IN (".$search_country.')'; -if ($filter == 'uptodate') $sql.=" AND datefin >= '".$db->idate($now)."'"; -if ($filter == 'outofdate') $sql.=" AND (datefin IS NULL OR datefin < '".$db->idate($now)."')"; +if ($filter == 'uptodate') $sql.=" AND (datefin >= '".$db->idate($now)."' OR t.subscription = 0)"; +if ($filter == 'outofdate') $sql.=" AND ((datefin IS NULL OR datefin < '".$db->idate($now)."') AND t.subscription = 1)"; // Add where from extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_sql.tpl.php'; @@ -418,7 +420,7 @@ print ''; print ''; print ''; -print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); +print_barre_liste($titre, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="member"; @@ -955,7 +957,7 @@ print "
'.$langs->trans("Birthday").''.dol_print_date($object->birth, 'day').'
'.$langs->trans("DateToBirth").''.dol_print_date($object->birth, 'day').'
'.$langs->trans("Public").''.yn($object->public).'
\n"; print "
"; print ''; -if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, '', '', $limit, 1); +if ($num > $limit || $page) print_barre_liste('', $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'generic', 0, '', '', $limit, 1); // End of page llxFooter(); diff --git a/htdocs/adherents/note.php b/htdocs/adherents/note.php index 083c056a518..b7d9c840633 100644 --- a/htdocs/adherents/note.php +++ b/htdocs/adherents/note.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/stats/byproperties.php b/htdocs/adherents/stats/byproperties.php index 1832e14e6eb..d954484c839 100644 --- a/htdocs/adherents/stats/byproperties.php +++ b/htdocs/adherents/stats/byproperties.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/stats/geo.php b/htdocs/adherents/stats/geo.php index bffb3418dba..afc2e2b5218 100644 --- a/htdocs/adherents/stats/geo.php +++ b/htdocs/adherents/stats/geo.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/stats/index.php b/htdocs/adherents/stats/index.php index 9955466b158..2f2c6f33920 100644 --- a/htdocs/adherents/stats/index.php +++ b/htdocs/adherents/stats/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -56,9 +56,10 @@ $langs->loadLangs(array("companies","members")); $form=new Form($db); -llxHeader(); +$title = $langs->trans("SubscriptionsStatistics"); +llxHeader('', $title); -print load_fiche_titre($langs->trans("SubscriptionsStatistics"), $mesg); +print load_fiche_titre($title, '', 'members'); $dir=$conf->adherent->dir_temp; diff --git a/htdocs/adherents/subscription.php b/htdocs/adherents/subscription.php index 49e1cbbc553..415efdc8570 100644 --- a/htdocs/adherents/subscription.php +++ b/htdocs/adherents/subscription.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -68,7 +68,7 @@ $extrafields = new ExtraFields($db); $adht = new AdherentType($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); $errmsg=''; $errmsgs=array(); @@ -571,7 +571,7 @@ if ($rowid > 0) print ''; - if ($action != 'editthirdparty' && $user->rights->adherent->creer) print ''; + if ($action != 'editthirdparty' && $user->rights->adherent->creer) print ''; print '
'; print $langs->trans("LinkedToDolibarrThirdParty"); print 'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'id.'">'.img_edit($langs->trans('SetLinkToThirdParty'), 1).'
'; print ''; if ($action == 'editthirdparty') @@ -614,7 +614,7 @@ if ($rowid > 0) print ''; if ($user->rights->user->user->creer) { - print 'id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetLinkToUser'), 1).''; } print ''; } diff --git a/htdocs/adherents/subscription/card.php b/htdocs/adherents/subscription/card.php index 21b5b68794f..0a40f441e92 100644 --- a/htdocs/adherents/subscription/card.php +++ b/htdocs/adherents/subscription/card.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/subscription/info.php b/htdocs/adherents/subscription/info.php index 37a719e52bc..b2f903c1ade 100644 --- a/htdocs/adherents/subscription/info.php +++ b/htdocs/adherents/subscription/info.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/subscription/list.php b/htdocs/adherents/subscription/list.php index 026ac9b20bf..dbc14e2999e 100644 --- a/htdocs/adherents/subscription/list.php +++ b/htdocs/adherents/subscription/list.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -68,7 +68,8 @@ $hookmanager->initHooks(array('subscriptionlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('subscription'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -261,7 +262,7 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="subscription"; diff --git a/htdocs/adherents/tpl/linkedobjectblock.tpl.php b/htdocs/adherents/tpl/linkedobjectblock.tpl.php index 99e3cc5f526..4334a54605b 100644 --- a/htdocs/adherents/tpl/linkedobjectblock.tpl.php +++ b/htdocs/adherents/tpl/linkedobjectblock.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -58,4 +58,4 @@ foreach($linkedObjectBlock as $key => $objectlink) } ?> - \ No newline at end of file + diff --git a/htdocs/adherents/type.php b/htdocs/adherents/type.php index 849d787c220..b24e3361d16 100644 --- a/htdocs/adherents/type.php +++ b/htdocs/adherents/type.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -73,7 +73,7 @@ $object = new AdherentType($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label('adherent_type'); +$extrafields->fetch_name_optionals_label($object->table_element); if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { @@ -113,7 +113,7 @@ if ($action == 'add' && $user->rights->adherent->configurer) { $object->vote = (int) $vote; // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if (empty($object->label)) { @@ -168,7 +168,7 @@ if ($action == 'update' && $user->rights->adherent->configurer) $object->vote = (boolean) trim($vote); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; $ret=$object->update($user); @@ -248,7 +248,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''; - print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("MembersTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'members', 0, $newcardbutton, '', $limit); $moreforfilter = ''; @@ -322,7 +322,7 @@ if ($action == 'create') { $object = new AdherentType($db); - print load_fiche_titre($langs->trans("NewMemberType")); + print load_fiche_titre($langs->trans("NewMemberType"), '', 'members'); print '
'; print ''; @@ -524,14 +524,14 @@ if ($rowid > 0) { $sql.= natural_search("d.email", $search_email); } - if ($filter == 'uptodate') - { - $sql.=" AND datefin >= '".$db->idate($now)."'"; - } - if ($filter == 'outofdate') - { - $sql.=" AND datefin < '".$db->idate($now)."'"; - } + if ($filter == 'uptodate') + { + $sql.=" AND (datefin >= '".$db->idate($now)."') OR t.subscription = 0)"; + } + if ($filter == 'outofdate') + { + $sql.=" AND (datefin < '".$db->idate($now)."' AND t.subscription = 1)"; + } $sql.= " ".$db->order($sortfield, $sortorder); @@ -713,7 +713,7 @@ if ($rowid > 0) print ''; if ($user->rights->adherent->creer) { - print ''.img_edit().''; + print ''.img_edit().''; } print ' '; if ($user->rights->adherent->supprimer) diff --git a/htdocs/adherents/type_ldap.php b/htdocs/adherents/type_ldap.php index 86672386502..35704c592f9 100644 --- a/htdocs/adherents/type_ldap.php +++ b/htdocs/adherents/type_ldap.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/adherents/type_translation.php b/htdocs/adherents/type_translation.php new file mode 100644 index 00000000000..5122bebcecf --- /dev/null +++ b/htdocs/adherents/type_translation.php @@ -0,0 +1,323 @@ + + * Copyright (C) 2007 Rodolphe Quiedeville + * Copyright (C) 2010-2012 Destailleur Laurent + * Copyright (C) 2014 Henry Florian + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + * or see http://www.gnu.org/ + */ + +/** + * \file htdocs/adherents/type_translation.php + * \ingroup product + * \brief Page de traduction des produits + */ + +require '../main.inc.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/member.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php'; +require_once DOL_DOCUMENT_ROOT.'/core/class/html.formadmin.class.php'; + +// Load translation files required by the page +$langs->loadLangs(array('members', 'languages')); + +$id = GETPOST('rowid', 'int'); +$action=GETPOST('action', 'alpha'); +$cancel=GETPOST('cancel', 'alpha'); + +// Security check +$fieldvalue = (! empty($id) ? $id : (! empty($ref) ? $ref : '')); +$fieldtype = (! empty($ref) ? 'ref' : 'rowid'); +if ($user->societe_id) $socid=$user->societe_id; +// Security check +$result=restrictedArea($user, 'adherent', $id, 'adherent_type'); + + +/* + * Actions + */ + +// retour a l'affichage des traduction si annulation +if ($cancel == $langs->trans("Cancel")) +{ + $action = ''; +} + +if ($action == 'delete' && GETPOST('langtodelete', 'alpha')) +{ + $object = new AdherentType($db); + $object->fetch($id); + $object->delMultiLangs(GETPOST('langtodelete', 'alpha'), $user); +} + +// Add translation +if ($action == 'vadd' && $cancel != $langs->trans("Cancel") && $user->rights->adherent->configurer) +{ + $object = new AdherentType($db); + $object->fetch($id); + $current_lang = $langs->getDefaultLang(); + + // update de l'objet + if ( $_POST["forcelangprod"] == $current_lang ) + { + $object->label = $_POST["libelle"]; + $object->description = dol_htmlcleanlastbr($_POST["desc"]); + $object->other = dol_htmlcleanlastbr($_POST["other"]); + } + else + { + $object->multilangs[$_POST["forcelangprod"]]["label"] = $_POST["libelle"]; + $object->multilangs[$_POST["forcelangprod"]]["description"] = dol_htmlcleanlastbr($_POST["desc"]); + $object->multilangs[$_POST["forcelangprod"]]["other"] = dol_htmlcleanlastbr($_POST["other"]); + } + + // sauvegarde en base + if ( $object->setMultiLangs($user) > 0 ) + { + $action = ''; + } + else + { + $action = 'add'; + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Edit translation +if ($action == 'vedit' && $cancel != $langs->trans("Cancel") && $user->rights->adherent->configurer) +{ + $object = new AdherentType($db); + $object->fetch($id); + $current_lang = $langs->getDefaultLang(); + + foreach ($object->multilangs as $key => $value) // enregistrement des nouvelles valeurs dans l'objet + { + if ( $key == $current_lang ) + { + $object->label = $_POST["libelle-".$key]; + $object->description = dol_htmlcleanlastbr($_POST["desc-".$key]); + $object->other = dol_htmlcleanlastbr($_POST["other-".$key]); + } + else + { + $object->multilangs[$key]["label"] = $_POST["libelle-".$key]; + $object->multilangs[$key]["description"] = dol_htmlcleanlastbr($_POST["desc-".$key]); + $object->multilangs[$key]["other"] = dol_htmlcleanlastbr($_POST["other-".$key]); + } + } + + if ( $object->setMultiLangs($user) > 0 ) + { + $action = ''; + } + else + { + $action = 'edit'; + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +// Delete translation +if ($action == 'vdelete' && $cancel != $langs->trans("Cancel") && $user->rights->adherent->configurer) +{ + $object = new AdherentType($db); + $object->fetch($id); + $langtodelete=GETPOST('langdel', 'alpha'); + + + if ( $object->delMultiLangs($langtodelete, $user) > 0 ) + { + $action = ''; + } + else + { + $action = 'edit'; + setEventMessages($object->error, $object->errors, 'errors'); + } +} + +$object = new AdherentType($db); +$result = $object->fetch($id); + + +/* + * View + */ + +$title = $langs->trans('MemberTypeCard'); +$helpurl = ''; +$shortlabel = dol_trunc($object->label, 16); + +$title = $langs->trans('MemberType')." ". $shortlabel ." - ".$langs->trans('Translation'); +$helpurl='EN:Module_Services_En|FR:Module_Services|ES:Módulo_Servicios'; + +llxHeader('', $title, $helpurl); + +$form = new Form($db); +$formadmin=new FormAdmin($db); + +$head = member_type_prepare_head($object); +$titre=$langs->trans("MemberType".$object->type); + +// Calculate $cnt_trans +$cnt_trans = 0; +if (! empty($object->multilangs)) +{ + foreach ($object->multilangs as $key => $value) + { + $cnt_trans++; + } +} + + +dol_fiche_head($head, 'translation', $titre, 0, 'group'); + +$linkback = ''.$langs->trans("BackToList").''; + +dol_banner_tab($object, 'rowid', $linkback); + +dol_fiche_end(); + + + +/* ************************************************************************** */ +/* */ +/* Barre d'action */ +/* */ +/* ************************************************************************** */ + +print "\n
\n"; + +if ($action == '') +{ + if ($user->rights->produit->creer || $user->rights->service->creer) + { + print ''.$langs->trans("Add").''; + if ($cnt_trans > 0) print ''.$langs->trans("Update").''; + } +} + +print "\n
\n"; + + + +if ($action == 'edit') +{ + //WYSIWYG Editor + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + + print ''; + print ''; + print ''; + print ''; + + if (! empty($object->multilangs)) + { + foreach ($object->multilangs as $key => $value) + { + $s=picto_from_langcode($key); + print "
".($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"')."
"; + + print '
'; + print ''; + print ''; + print ''; + print ''; + print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; + $doleditor = new DolEditor("desc-$key", $object->multilangs[$key]["description"], '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); + $doleditor->Create(); + print '
'; + } + } + + print '
'; + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print ''; +} +elseif ($action != 'add') +{ + if (! empty($object->multilangs)) + { + foreach ($object->multilangs as $key => $value) + { + $s=picto_from_langcode($key); + print ($s?$s.' ':'')." ".$langs->trans('Language_'.$key).": ".''.img_delete('', 'class="valigntextbottom"').''; + + print '
'; + print '
'; + print ''; + print ''; + print ''; + print '
'.$langs->trans('Label').''.$object->multilangs[$key]["label"].'
'.$langs->trans('Description').''.$object->multilangs[$key]["description"].'
'; + print '
'; + } + } + if (! $cnt_trans && $action != 'add') print '
'. $langs->trans('NoTranslation').'
'; +} + + + +/* + * Form to add a new translation + */ + +if ($action == 'add' && $user->rights->adherent->configurer) +{ + //WYSIWYG Editor + require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php'; + + print '
'; + print '
'; + print ''; + print ''; + print ''; + + dol_fiche_head(); + + print ''; + print ''; + print ''; + print ''; + + print '
'.$langs->trans('Language').''; + print $formadmin->select_language('', 'forcelangprod', 0, $object->multilangs, 1); + print '
'.$langs->trans('Label').'
'.$langs->trans('Description').''; + $doleditor = new DolEditor('desc', '', '', 160, 'dolibarr_notes', '', false, true, $conf->global->FCKEDITOR_ENABLE_PRODUCTDESC, ROWS_3, '90%'); + $doleditor->Create(); + print '
'; + + dol_fiche_end(); + + print '
'; + print ''; + print '     '; + print ''; + print '
'; + + print '
'; + + print '
'; +} + +// End of page +llxFooter(); +$db->close(); diff --git a/htdocs/admin/accountant.php b/htdocs/admin/accountant.php index abef1ab65a4..cba3fd822cc 100644 --- a/htdocs/admin/accountant.php +++ b/htdocs/admin/accountant.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/agenda.php b/htdocs/admin/agenda.php index 4c5c02d0b3d..c253f6cbe91 100644 --- a/htdocs/admin/agenda.php +++ b/htdocs/admin/agenda.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/agenda_extrafields.php b/htdocs/admin/agenda_extrafields.php index d0eb1bbaeed..b4d71415e05 100644 --- a/htdocs/admin/agenda_extrafields.php +++ b/htdocs/admin/agenda_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/agenda_extsites.php b/htdocs/admin/agenda_extsites.php index b59c311eb2f..7eac38293d5 100644 --- a/htdocs/admin/agenda_extsites.php +++ b/htdocs/admin/agenda_extsites.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index ce9db532f21..a13b7bd1580 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/agenda_reminder.php b/htdocs/admin/agenda_reminder.php index 43e031a8ce9..57a20b8bf42 100644 --- a/htdocs/admin/agenda_reminder.php +++ b/htdocs/admin/agenda_reminder.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/agenda_xcal.php b/htdocs/admin/agenda_xcal.php index 8a771bfe492..f3c16941ebc 100644 --- a/htdocs/admin/agenda_xcal.php +++ b/htdocs/admin/agenda_xcal.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -161,13 +161,13 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain // Show message $message=''; $urlvcal=''.$urlwithroot.'/public/agenda/agendaexport.php?format=vcal&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').''; -$message.=img_picto('', 'object_globe.png').' '.$langs->trans("WebCalUrlForVCalExport", 'vcal', $urlvcal); +$message.=img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'vcal', $urlvcal); $message.='
'; $urlical=''.$urlwithroot.'/public/agenda/agendaexport.php?format=ical&type=event&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').''; -$message.=img_picto('', 'object_globe.png').' '.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', $urlical); +$message.=img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'ical/ics', $urlical); $message.='
'; $urlrss=''.$urlwithroot.'/public/agenda/agendaexport.php?format=rss&exportkey='.($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY?urlencode($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY):'KEYNOTDEFINED').''; -$message.=img_picto('', 'object_globe.png').' '.$langs->trans("WebCalUrlForVCalExport", 'rss', $urlrss); +$message.=img_picto('', 'globe').' '.$langs->trans("WebCalUrlForVCalExport", 'rss', $urlrss); $message.='
'; $message.='
'; print $message; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index a40448acdc8..689202c023d 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/admin/bank_extrafields.php b/htdocs/admin/bank_extrafields.php index de04c6d3a32..5daafd17fb9 100644 --- a/htdocs/admin/bank_extrafields.php +++ b/htdocs/admin/bank_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/barcode.php b/htdocs/admin/barcode.php index f844b135a4a..0475cdfccf1 100644 --- a/htdocs/admin/barcode.php +++ b/htdocs/admin/barcode.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index b6e62973cf7..e5e12d41808 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/boxes.php b/htdocs/admin/boxes.php index 796d9c7a42b..58c07b5ca3e 100644 --- a/htdocs/admin/boxes.php +++ b/htdocs/admin/boxes.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('admin', 'boxes')); +$langs->loadLangs(array('admin', 'boxes', 'accountancy')); if (! $user->admin) accessforbidden(); diff --git a/htdocs/admin/chequereceipts.php b/htdocs/admin/chequereceipts.php index 7e136bf6978..629018ba998 100644 --- a/htdocs/admin/chequereceipts.php +++ b/htdocs/admin/chequereceipts.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/admin/clicktodial.php b/htdocs/admin/clicktodial.php index 99c6cea7b39..0c3514015f2 100644 --- a/htdocs/admin/clicktodial.php +++ b/htdocs/admin/clicktodial.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index 40514cd1890..cb07d741a06 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/commande_fournisseur_dispatch_extrafields.php b/htdocs/admin/commande_fournisseur_dispatch_extrafields.php index cf2c7e20627..f06c4412207 100644 --- a/htdocs/admin/commande_fournisseur_dispatch_extrafields.php +++ b/htdocs/admin/commande_fournisseur_dispatch_extrafields.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/company.php b/htdocs/admin/company.php index 8961385c584..a3534d3bc5a 100644 --- a/htdocs/admin/company.php +++ b/htdocs/admin/company.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php index 5bbfd15a0c4..bb2bfdde409 100644 --- a/htdocs/admin/compta.php +++ b/htdocs/admin/compta.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/confexped.php b/htdocs/admin/confexped.php index cead92670a4..06cf38c71cc 100644 --- a/htdocs/admin/confexped.php +++ b/htdocs/admin/confexped.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/const.php b/htdocs/admin/const.php index 062fcb1d998..a5b1170d552 100644 --- a/htdocs/admin/const.php +++ b/htdocs/admin/const.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -44,6 +44,17 @@ $constname=GETPOST('constname', 'alpha'); $constvalue=GETPOST('constvalue', 'none'); // We shoul dbe able to send everything here $constnote=GETPOST('constnote', 'alpha'); +// Load variable for pagination +$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):$conf->liste_limit; +$sortfield = GETPOST('sortfield', 'alpha'); +$sortorder = GETPOST('sortorder', 'alpha'); +$page = GETPOST('page', 'int'); +if (empty($page) || $page == -1 || GETPOST('button_search', 'alpha') || GETPOST('button_removefilter', 'alpha') || (empty($toselect) && $massaction === '0')) { $page = 0; } // If $page is not defined, or '' or -1 or if we click on clear filters or if we select empty mass action +$offset = $limit * $page; +$pageprev = $page - 1; +$pagenext = $page + 1; +if (empty($sortfield)) $sortfield = 'entity,name'; +if (empty($sortorder)) $sortorder = 'ASC'; /* @@ -176,9 +187,11 @@ jQuery(document).ready(function() { print load_fiche_titre($langs->trans("OtherSetup"), '', 'title_setup'); -print $langs->trans("ConstDesc")."
\n"; +print ''.$langs->trans("ConstDesc")."
\n"; print "
\n"; +$param = ''; + print '
entity) && $debug)?'?debug=1':'').'" method="POST">'; print ''; print ''; @@ -186,16 +199,19 @@ print ''; print '
'; print ''; print ''; -print ''; +print getTitleFieldOfList('Name', 0, $_SERVER['PHP_SELF'], 'name', '', $param, '', $sortfield, $sortorder, '')."\n"; print ''; print ''; -if (! empty($conf->multicompany->enabled) && !$user->entity) print ''; +print getTitleFieldOfList('DateModificationShort', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n"; +if (! empty($conf->multicompany->enabled) && !$user->entity) +{ + print getTitleFieldOfList('Entity', 0, $_SERVER['PHP_SELF'], 'tms', '', $param, '', $sortfield, $sortorder, 'center')."\n"; +} print ''; print "\n"; // Line to add new record -$var=false; print "\n"; print ''."\n"; @@ -204,6 +220,8 @@ print ''; print ''; +print ''; // Limit to superadmin if (! empty($conf->multicompany->enabled) && !$user->entity) { @@ -229,13 +247,14 @@ $sql.= ", ".$db->decrypt('name')." as name"; $sql.= ", ".$db->decrypt('value')." as value"; $sql.= ", type"; $sql.= ", note"; +$sql.= ", tms"; $sql.= ", entity"; $sql.= " FROM ".MAIN_DB_PREFIX."const"; $sql.= " WHERE entity IN (".$user->entity.",".$conf->entity.")"; if ((empty($user->entity) || $user->admin) && $debug) {} // to force for superadmin to debug elseif (! GETPOST('visible') || GETPOST('visible') != 'all') $sql.= " AND visible = 1"; // We must always have this. Otherwise, array is too large and submitting data fails due to apache POST or GET limits if (GETPOST('name')) $sql.=natural_search("name", GETPOST('name')); -$sql.= " ORDER BY entity, name ASC"; +$sql.= $db->order($sortfield, $sortorder); dol_syslog("Const::listConstant", LOG_DEBUG); $result = $db->query($sql); @@ -243,13 +262,11 @@ if ($result) { $num = $db->num_rows($result); $i = 0; - $var=false; while ($i < $num) { $obj = $db->fetch_object($result); - print "\n"; print ''."\n"; @@ -267,6 +284,11 @@ if ($result) print ''; print ''; + // Date last change + print ''; + // Entity limit to superadmin if (! empty($conf->multicompany->enabled) && !$user->entity) { diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 63597eaa22b..e6c8c15c0d4 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/dav.php b/htdocs/admin/dav.php index 032c4f07e56..1d187c57e17 100644 --- a/htdocs/admin/dav.php +++ b/htdocs/admin/dav.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -123,7 +123,9 @@ else { print ''; print ''; print ''; print '\n"; print "\n"; ?> - \ No newline at end of file + diff --git a/htdocs/bom/tpl/objectline_view.tpl.php b/htdocs/bom/tpl/objectline_view.tpl.php index 6df0362d1c4..9582e69f967 100644 --- a/htdocs/bom/tpl/objectline_view.tpl.php +++ b/htdocs/bom/tpl/objectline_view.tpl.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -149,9 +149,9 @@ $objectline = new BOMLine($object->db); showOptionals($extrafieldsline, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?> diff --git a/htdocs/bookmarks/admin/bookmark.php b/htdocs/bookmarks/admin/bookmark.php index 659b8c96c5f..1f227d7316f 100644 --- a/htdocs/bookmarks/admin/bookmark.php +++ b/htdocs/bookmarks/admin/bookmark.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** \file htdocs/bookmarks/admin/bookmark.php diff --git a/htdocs/bookmarks/bookmarks.lib.php b/htdocs/bookmarks/bookmarks.lib.php index 5dd55a95873..1e54cc816fd 100644 --- a/htdocs/bookmarks/bookmarks.lib.php +++ b/htdocs/bookmarks/bookmarks.lib.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -150,3 +150,140 @@ function printBookmarksList($aDb, $aLangs) return $ret; } + + + +/** + * Add area with bookmarks in top menu + * + * @param DoliDb $aDb Database handler + * @param Translate $aLangs Object lang + * @return string + */ +function printDropdownBookmarksList($aDb, $aLangs) +{ + global $conf, $user; + + $db = $aDb; + $langs = $aLangs; + + require_once DOL_DOCUMENT_ROOT.'/bookmarks/class/bookmark.class.php'; + if (! isset($conf->global->BOOKMARKS_SHOW_IN_MENU)) $conf->global->BOOKMARKS_SHOW_IN_MENU=5; + + $langs->load("bookmarks"); + + $url= $_SERVER["PHP_SELF"]; + + if (! empty($_SERVER["QUERY_STRING"])) + { + $url.=(dol_escape_htmltag($_SERVER["QUERY_STRING"])?'?'.dol_escape_htmltag($_SERVER["QUERY_STRING"]):''); + } + else + { + global $sortfield,$sortorder; + $tmpurl=''; + // No urlencode, all param $url will be urlencoded later + if ($sortfield) $tmpurl.=($tmpurl?'&':'').'sortfield='.$sortfield; + if ($sortorder) $tmpurl.=($tmpurl?'&':'').'sortorder='.$sortorder; + if (is_array($_POST)) + { + foreach($_POST as $key => $val) + { + if (preg_match('/^search_/', $key) && $val != '') $tmpurl.=($tmpurl?'&':'').$key.'='.$val; + } + } + $url.=($tmpurl?'?'.$tmpurl:''); + } + + $searchForm = ''."\n"; + $searchForm.= ''; + $searchForm.= ''; + $searchForm.= ''; + + // Url to list bookmark + $listbtn = ''; + $listbtn.= ' '.$langs->trans('Bookmarks').''; + + // Url to go on create new bookmark page + $newbtn = ''; + if (! empty($user->rights->bookmark->creer)) + { + //$urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&urlsource='.urlencode($url).'&url='.urlencode($url); + $urltoadd=DOL_URL_ROOT.'/bookmarks/card.php?action=create&url='.urlencode($url); + $newbtn.= ''; + $newbtn.= ' '.dol_escape_htmltag($langs->trans('AddThisPageToBookmarks')).''; + } + + + $bookmarkList=''; + + $html= ''; + if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU)) { + $html.= ' + + + '; + } + + $html.= ' + + + '; + + $html.= ' + + + '; + + if (! empty($conf->global->BOOKMARKS_SHOW_IN_MENU)) { + $html .= ''; + } + + return $html; +} diff --git a/htdocs/bookmarks/card.php b/htdocs/bookmarks/card.php index 40558895fe2..0ba6d7569b5 100644 --- a/htdocs/bookmarks/card.php +++ b/htdocs/bookmarks/card.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/bookmarks/class/bookmark.class.php b/htdocs/bookmarks/class/bookmark.class.php index c9650cc854e..7b5890d32b2 100644 --- a/htdocs/bookmarks/class/bookmark.class.php +++ b/htdocs/bookmarks/class/bookmark.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/bookmarks/list.php b/htdocs/bookmarks/list.php index 844443244cd..bdd4f0b5429 100644 --- a/htdocs/bookmarks/list.php +++ b/htdocs/bookmarks/list.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -85,7 +85,7 @@ $newcardbutton=''; $newcardbutton.= dolGetButtonTitle($langs->trans('NewBookmark'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/bookmarks/card.php?action=create', '', !empty($user->rights->bookmark->creer)); -print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'title_generic.png', 0, $newcardbutton); +print_barre_liste($langs->trans("ListOfBookmarks"), $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, '', -1, '', 'generic', 0, $newcardbutton); $sql = "SELECT b.rowid, b.dateb, b.fk_user, b.url, b.target, b.title, b.favicon, b.position,"; $sql.= " u.login, u.lastname, u.firstname"; @@ -181,7 +181,7 @@ if ($resql) print ''; print "\n"; diff --git a/htdocs/cashdesk/index_verif.php b/htdocs/cashdesk/index_verif.php index bb0e037bf7d..39c877c0f0f 100644 --- a/htdocs/cashdesk/index_verif.php +++ b/htdocs/cashdesk/index_verif.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * This page is called after submission of login page. * We set here login choices into session. diff --git a/htdocs/cashdesk/javascript/dhtml.js b/htdocs/cashdesk/javascript/dhtml.js index e2000abf56e..fd15704b318 100644 --- a/htdocs/cashdesk/javascript/dhtml.js +++ b/htdocs/cashdesk/javascript/dhtml.js @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Instanciation et initialisation de l'objet xmlhttprequest diff --git a/htdocs/cashdesk/javascript/facturation1.js b/htdocs/cashdesk/javascript/facturation1.js index b0b9a45a028..b25a1473c53 100644 --- a/htdocs/cashdesk/javascript/facturation1.js +++ b/htdocs/cashdesk/javascript/facturation1.js @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Calcul et affichage en temps reel des informations sur le produit en cours diff --git a/htdocs/cashdesk/javascript/keypad.js b/htdocs/cashdesk/javascript/keypad.js index 6de759fc35a..48d8491e8bc 100644 --- a/htdocs/cashdesk/javascript/keypad.js +++ b/htdocs/cashdesk/javascript/keypad.js @@ -11,7 +11,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ function closekeypad(keypadname) diff --git a/htdocs/cashdesk/tpl/facturation1.tpl.php b/htdocs/cashdesk/tpl/facturation1.tpl.php index 4230227717e..e8dad4d2fb1 100644 --- a/htdocs/cashdesk/tpl/facturation1.tpl.php +++ b/htdocs/cashdesk/tpl/facturation1.tpl.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/cashdesk/tpl/liste_articles.tpl.php b/htdocs/cashdesk/tpl/liste_articles.tpl.php index d2a4908afa9..a35abb46789 100644 --- a/htdocs/cashdesk/tpl/liste_articles.tpl.php +++ b/htdocs/cashdesk/tpl/liste_articles.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/cashdesk/tpl/menu.tpl.php b/htdocs/cashdesk/tpl/menu.tpl.php index bc8bb1bcaed..efec574e953 100644 --- a/htdocs/cashdesk/tpl/menu.tpl.php +++ b/htdocs/cashdesk/tpl/menu.tpl.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -74,8 +74,8 @@ print ''; // Disconnect -print ''; - $out.='
  • '.img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone pictoactionview"'); - $out.=''.$langs->trans("ViewCal").''; - $out.='
  • '; - $out.='
  • '.img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone pictoactionview"'); - $out.=''.$langs->trans("ViewWeek").''; - $out.='
  • '; - $out.='
  • '.img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); - $out.=''.$langs->trans("ViewDay").''; - $out.='
  • '; - $out.='
  • '.img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="hideonsmartphone pictoactionview"'); - $out.=''.$langs->trans("ViewPerUser").''; - $linkback.=$out; + $linkback.=img_picto($langs->trans("BackToList"), 'object_list', 'class="hideonsmartphone pictoactionview"'); + $linkback.=''.$langs->trans("BackToList").''; + $linkback.='
  • '; + $linkback.='
  • '; + $linkback.=img_picto($langs->trans("ViewCal"), 'object_calendar', 'class="hideonsmartphone pictoactionview"'); + $linkback.=''.$langs->trans("ViewCal").''; + $linkback.='
  • '; + $linkback.='
  • '; + $linkback.=img_picto($langs->trans("ViewWeek"), 'object_calendarweek', 'class="hideonsmartphone pictoactionview"'); + $linkback.=''.$langs->trans("ViewWeek").''; + $linkback.='
  • '; + $linkback.='
  • '; + $linkback.=img_picto($langs->trans("ViewDay"), 'object_calendarday', 'class="hideonsmartphone pictoactionview"'); + $linkback.=''.$langs->trans("ViewDay").''; + $linkback.='
  • '; + $linkback.='
  • '; + $linkback.=img_picto($langs->trans("ViewPerUser"), 'object_calendarperuser', 'class="hideonsmartphone pictoactionview"'); + $linkback.=''.$langs->trans("ViewPerUser").''; + + //$linkback.=$out; $morehtmlref='
    '; // Thirdparty @@ -1513,7 +1582,7 @@ if ($id > 0) (($object->authorid == $user->id || $object->userownerid == $user->id) && $user->rights->agenda->myactions->create)) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; @@ -1553,7 +1622,7 @@ if ($id > 0) // Type if (! empty($conf->global->AGENDA_USE_EVENT_TYPE)) { - print '
  • '; + print ''; } // Full day event diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index 3c138043d26..5803c0afc20 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -1637,7 +1637,7 @@ class ActionComm extends CommonObject * Used to build previews or test instances. * id must be 0 if object instance is a specimen. * - * @return void + * @return int >0 if ok */ public function initAsSpecimen() { @@ -1669,6 +1669,7 @@ class ActionComm extends CommonObject $this->userownerid=$user->id; $this->userassigned[$user->id]=array('id'=>$user->id, 'transparency'=> 1); + return 1; } /** diff --git a/htdocs/comm/action/class/actioncommreminder.class.php b/htdocs/comm/action/class/actioncommreminder.class.php index b01e0e6a544..9ead4a3e88c 100644 --- a/htdocs/comm/action/class/actioncommreminder.class.php +++ b/htdocs/comm/action/class/actioncommreminder.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/action/class/api_agendaevents.class.php b/htdocs/comm/action/class/api_agendaevents.class.php index 3f21e94f53d..652e0d80966 100644 --- a/htdocs/comm/action/class/api_agendaevents.class.php +++ b/htdocs/comm/action/class/api_agendaevents.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; @@ -64,25 +64,28 @@ class AgendaEvents extends DolibarrApi public function get($id) { if (! DolibarrApiAccess::$user->rights->agenda->myactions->read) { - throw new RestException(401, "Insuffisant rights to read an event"); + throw new RestException(401, "Insufficient rights to read an event"); + } + if ($id == 0) { + $result = $this->actioncomm->initAsSpecimen(); + } else { + $result = $this->actioncomm->fetch($id); + if ($result) { + $this->actioncomm->fetch_optionals(); + $this->actioncomm->fetchObjectLinked(); + } } - - $result = $this->actioncomm->fetch($id); if ( ! $result ) { throw new RestException(404, 'Agenda Events not found'); } if (! DolibarrApiAccess::$user->rights->agenda->allactions->read && $this->actioncomm->ownerid != DolibarrApiAccess::$user->id) { - throw new RestException(401, "Insuffisant rights to read event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); + throw new RestException(401, "Insufficient rights to read event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); } if ( ! DolibarrApi::_checkAccessToResource('agenda', $this->actioncomm->id, 'actioncomm', '', 'fk_soc', 'id')) { throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login); } - - $result = $this->actioncomm->fetch_optionals(); - - $this->actioncomm->fetchObjectLinked(); return $this->_cleanObjectDatas($this->actioncomm); } @@ -106,7 +109,7 @@ class AgendaEvents extends DolibarrApi $obj_ret = array(); if (! DolibarrApiAccess::$user->rights->agenda->myactions->read) { - throw new RestException(401, "Insuffisant rights to read events"); + throw new RestException(401, "Insufficient rights to read events"); } // case of external user @@ -191,10 +194,10 @@ class AgendaEvents extends DolibarrApi public function post($request_data = null) { if (! DolibarrApiAccess::$user->rights->agenda->myactions->create) { - throw new RestException(401, "Insuffisant rights to create your Agenda Event"); + throw new RestException(401, "Insufficient rights to create your Agenda Event"); } if (! DolibarrApiAccess::$user->rights->agenda->allactions->create && DolibarrApiAccess::$user->id != $request_data['userownerid']) { - throw new RestException(401, "Insuffisant rights to create an Agenda Event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); + throw new RestException(401, "Insufficient rights to create an Agenda Event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); } // Check mandatory fields @@ -230,10 +233,10 @@ class AgendaEvents extends DolibarrApi public function put($id, $request_data = null) { if (! DolibarrApiAccess::$user->rights->agenda->myactions->create) { - throw new RestException(401, "Insuffisant rights to create your Agenda Event"); + throw new RestException(401, "Insufficient rights to create your Agenda Event"); } if (! DolibarrApiAccess::$user->rights->agenda->allactions->create && DolibarrApiAccess::$user->id != $request_data['userownerid']) { - throw new RestException(401, "Insuffisant rights to create an Agenda Event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); + throw new RestException(401, "Insufficient rights to create an Agenda Event for owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); } $result = $this->actioncomm->fetch($id); @@ -271,7 +274,7 @@ class AgendaEvents extends DolibarrApi public function delete($id) { if(! DolibarrApiAccess::$user->rights->agenda->myactions->delete) { - throw new RestException(401, "Insuffisant rights to delete your Agenda Event"); + throw new RestException(401, "Insufficient rights to delete your Agenda Event"); } $result = $this->actioncomm->fetch($id); @@ -282,7 +285,7 @@ class AgendaEvents extends DolibarrApi } if(! DolibarrApiAccess::$user->rights->agenda->allactions->delete && DolibarrApiAccess::$user->id != $this->actioncomm->userownerid) { - throw new RestException(401, "Insuffisant rights to delete an Agenda Event of owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); + throw new RestException(401, "Insufficient rights to delete an Agenda Event of owner id ".$request_data['userownerid'].' Your id is '.DolibarrApiAccess::$user->id); } if( ! $result ) { diff --git a/htdocs/comm/action/class/cactioncomm.class.php b/htdocs/comm/action/class/cactioncomm.class.php index 5d3290599b9..7362a82840d 100644 --- a/htdocs/comm/action/class/cactioncomm.class.php +++ b/htdocs/comm/action/class/cactioncomm.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/action/class/ical.class.php b/htdocs/comm/action/class/ical.class.php index 41fe3c42e90..7c696b70247 100644 --- a/htdocs/comm/action/class/ical.class.php +++ b/htdocs/comm/action/class/ical.class.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/action/document.php b/htdocs/comm/action/document.php index 7eec20c3499..6f0875be879 100644 --- a/htdocs/comm/action/document.php +++ b/htdocs/comm/action/document.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index a2328dd9ca4..d503c1bc71d 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ @@ -174,6 +174,26 @@ if ($action =='delete_action') /* * View */ +$parameters = array( + 'socid' => $socid, + 'status' => $status, + 'year' => $year, + 'month' => $month, + 'day' => $day, + 'type' => $type, + 'maxprint' => $maxprint, + 'filter' => $filter, + 'filtert' => $filtert, + 'showbirthday' => $showbirthday, + 'canedit' => $canedit, + 'optioncss' => $optioncss, + 'actioncode' => $actioncode, + 'pid' => $pid, + 'resourceid' => $resourceid, + 'usergroup' => $usergroup, +); +$reshook = $hookmanager->executeHooks('beforeAgenda', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks +if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors'); $help_url='EN:Module_Agenda_En|FR:Module_Agenda|ES:Módulo_Agenda'; llxHeader('', $langs->trans("Agenda"), $help_url); @@ -1542,7 +1562,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa $savlabel=$event->label?$event->label:$event->libelle; $event->label=$titletoshow; $event->libelle=$titletoshow; - print $event->getNomUrl(0, $maxnbofchar, 'cal_event', '', 0, 1); + print $event->getNomUrl(0, $maxnbofchar, 'cal_event', '', 0, 0); $event->label=$savlabel; $event->libelle=$savlabel; } diff --git a/htdocs/comm/action/info.php b/htdocs/comm/action/info.php index e0936994364..c873adee9de 100644 --- a/htdocs/comm/action/info.php +++ b/htdocs/comm/action/info.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index 2ef4c74f765..efb11a7e22b 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -80,8 +80,10 @@ $object = new ActionComm($db); $hookmanager->initHooks(array('agendalist')); $extrafields = new ExtraFields($db); + // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('actioncomm'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // If not choice done on calendar owner, we filter on user. if (empty($filtert) && empty($conf->global->AGENDA_ALL_CALENDARS)) @@ -502,8 +504,8 @@ if ($resql) if (! empty($arrayfields['a.datep']['checked'])) print_liste_field_titre($arrayfields['a.datep']['label'], $_SERVER["PHP_SELF"], "a.datep,a.id", $param, '', 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['a.datep2']['checked'])) print_liste_field_titre($arrayfields['a.datep2']['label'], $_SERVER["PHP_SELF"], "a.datep2", $param, '', 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", $param, "", "", $sortfield, $sortorder); - if (! empty($arrayfields['a.fk_contact']['checked'])) print_liste_field_titre($arrayfields['a.fk_contact']['label'], $_SERVER["PHP_SELF"], "a.fk_contact", $param, "", "", $sortfield, $sortorder); - if (! empty($arrayfields['a.fk_element']['checked'])) print_liste_field_titre($arrayfields['a.fk_element']['label'], $_SERVER["PHP_SELF"], "a.fk_element", $param, "", "", $sortfield, $sortorder); + if (! empty($arrayfields['a.fk_contact']['checked'])) print_liste_field_titre($arrayfields['a.fk_contact']['label'], $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder); + if (! empty($arrayfields['a.fk_element']['checked'])) print_liste_field_titre($arrayfields['a.fk_element']['label'], $_SERVER["PHP_SELF"], "", $param, "", "", $sortfield, $sortorder); // Extra fields include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; @@ -560,7 +562,7 @@ if ($resql) // User owner if (! empty($arrayfields['owner']['checked'])) { - print '
    '.$langs->trans("Name").''.$langs->trans("Value").''.$langs->trans("Comment").''.$langs->trans("Entity").''.$langs->trans("Action").'
    '; +print '
    '.$obj->name.''; + print dol_print_date($db->jdate($obj->tms), 'dayhour'); + print '
    '; $tooltiphelp = (($langs->trans($key.'Tooltip') != $key.'Tooltip') ? $langs->trans($key.'Tooltip') : ''); - print $form->textwithpicto($langs->trans($key), $tooltiphelp); + $label = $langs->trans($key); + if ($key == 'DAV_RESTICT_ON_IP') $label = $langs->trans("RESTRICT_ON_IP"); + print $form->textwithpicto($label, $tooltiphelp); print ''; if ($key == 'DAV_ALLOW_PRIVATE_DIR') { @@ -172,13 +174,13 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain // Show message $message=''; $url=''.$urlwithroot.'/dav/fileserver.php'; -$message.=img_picto('', 'object_globe.png').' '.$langs->trans("WebDavServer", 'WebDAV', $url); +$message.=img_picto('', 'globe').' '.$langs->trans("WebDavServer", 'WebDAV', $url); $message.='
    '; if (! empty($conf->global->DAV_ALLOW_PUBLIC_DIR)) { $urlEntity = (! empty($conf->multicompany->enabled)?'?entity='.$conf->entity:''); $url=''.$urlwithroot.'/dav/fileserver.php/public/'.$urlEntity.''; - $message.=img_picto('', 'object_globe.png').' '.$langs->trans("WebDavServer", 'WebDAV public', $url); + $message.=img_picto('', 'globe').' '.$langs->trans("WebDavServer", 'WebDAV public', $url); $message.='
    '; } print $message; diff --git a/htdocs/admin/debugbar.php b/htdocs/admin/debugbar.php index 8a72e3e40c8..6f2b4cea089 100644 --- a/htdocs/admin/debugbar.php +++ b/htdocs/admin/debugbar.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/defaultvalues.php b/htdocs/admin/defaultvalues.php index 1f0ada4a6f3..40ffed80e60 100644 --- a/htdocs/admin/defaultvalues.php +++ b/htdocs/admin/defaultvalues.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/delais.php b/htdocs/admin/delais.php index 6d6ebe13333..47f668f69c3 100644 --- a/htdocs/admin/delais.php +++ b/htdocs/admin/delais.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 9033819b540..d739205124e 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -23,7 +23,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -565,7 +565,7 @@ if ($id == 11) 'project' => $langs->trans('Project'), 'project_task' => $langs->trans('Task'), 'agenda' => $langs->trans('Agenda'), - 'resource' => $langs->trans('Resource'), + 'dolresource' => $langs->trans('Resource'), // old deprecated 'propal' => $langs->trans('Proposal'), 'commande' => $langs->trans('Order'), @@ -938,34 +938,35 @@ if ($action == 'disable_favorite') $form = new Form($db); $formadmin=new FormAdmin($db); -llxHeader(); +$title=$langs->trans("DictionarySetup"); + +llxHeader('', $title); -$titre=$langs->trans("DictionarySetup"); $linkback=''; if ($id) { - $titre.=' - '.$langs->trans($tablib[$id]); + $title.=' - '.$langs->trans($tablib[$id]); $linkback=''.$langs->trans("BackToDictionaryList").''; } $titlepicto='title_setup'; if ($id == 10 && GETPOST('from') == 'accountancy') { - $titre=$langs->trans("MenuVatAccounts"); - $titlepicto='title_accountancy'; + $title=$langs->trans("MenuVatAccounts"); + $titlepicto='accountancy'; } if ($id == 7 && GETPOST('from') == 'accountancy') { - $titre=$langs->trans("MenuTaxAccounts"); - $titlepicto='title_accountancy'; + $title=$langs->trans("MenuTaxAccounts"); + $titlepicto='accountancy'; } -print load_fiche_titre($titre, $linkback, $titlepicto); +print load_fiche_titre($title, $linkback, $titlepicto); if (empty($id)) { - print $langs->trans("DictionaryDesc"); + print ''.$langs->trans("DictionaryDesc"); print " ".$langs->trans("OnlyActiveElementsAreShown")."
    \n"; - print '
    '; + print '

    '; } @@ -1697,7 +1698,6 @@ if ($id) dol_print_error($db); } - print ''; } else @@ -1711,7 +1711,6 @@ else print '
    '; print ''; print ''; - //print ''; print ''; print ''; print ''; @@ -1726,7 +1725,7 @@ else if ($showemptyline) { - print ''; + print ''; $showemptyline=0; } diff --git a/htdocs/admin/dolistore/ajax/image.php b/htdocs/admin/dolistore/ajax/image.php index 1fac509705c..ecba02c712c 100644 --- a/htdocs/admin/dolistore/ajax/image.php +++ b/htdocs/admin/dolistore/ajax/image.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ if (!defined('REQUIRE_JQUERY_BLOCKUI')) define('REQUIRE_JQUERY_BLOCKUI', 1); diff --git a/htdocs/admin/dolistore/class/dolistore.class.php b/htdocs/admin/dolistore/class/dolistore.class.php index 9ef3a4686a4..4951f57c22f 100644 --- a/htdocs/admin/dolistore/class/dolistore.class.php +++ b/htdocs/admin/dolistore/class/dolistore.class.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ include_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php'; diff --git a/htdocs/admin/ecm.php b/htdocs/admin/ecm.php index 1cb165552f1..067ed0ea353 100644 --- a/htdocs/admin/ecm.php +++ b/htdocs/admin/ecm.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 4b3da666aa0..255fdb68a0d 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -55,8 +55,10 @@ $object = new EmailCollector($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->emailcollector->dir_output . '/temp/massgeneration/' . $user->id; $hookmanager->initHooks(array('emailcollectorcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('emailcollector'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias @@ -376,7 +378,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { if ($action != 'classify') { - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.='
    '; diff --git a/htdocs/admin/emailcollector_list.php b/htdocs/admin/emailcollector_list.php index a55f6ee962e..09ba5f7224f 100644 --- a/htdocs/admin/emailcollector_list.php +++ b/htdocs/admin/emailcollector_list.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -66,8 +66,10 @@ $object = new EmailCollector($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->emailcollector->dir_output . '/temp/massgeneration/' . $user->id; $hookmanager->initHooks(array('emailcollectorlist')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('emailcollector'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) diff --git a/htdocs/admin/events.php b/htdocs/admin/events.php index f6e731aaee6..ca569b66b76 100644 --- a/htdocs/admin/events.php +++ b/htdocs/admin/events.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 23a154511c1..e8dbfab9942 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/expedition_extrafields.php b/htdocs/admin/expedition_extrafields.php index 9ef686962ed..a34bd841c81 100644 --- a/htdocs/admin/expedition_extrafields.php +++ b/htdocs/admin/expedition_extrafields.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/expeditiondet_extrafields.php b/htdocs/admin/expeditiondet_extrafields.php index 9c0fa60f12a..51e3de9c80d 100644 --- a/htdocs/admin/expeditiondet_extrafields.php +++ b/htdocs/admin/expeditiondet_extrafields.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index d0ba9c63a3c..8dde3449b6e 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/expensereport_extrafields.php b/htdocs/admin/expensereport_extrafields.php index 013db3d36f1..276a50bc440 100644 --- a/htdocs/admin/expensereport_extrafields.php +++ b/htdocs/admin/expensereport_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/expensereport_ik.php b/htdocs/admin/expensereport_ik.php index e79e7888f69..4d10403c692 100644 --- a/htdocs/admin/expensereport_ik.php +++ b/htdocs/admin/expensereport_ik.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/admin/expensereport_rules.php b/htdocs/admin/expensereport_rules.php index 835a4b2b824..a785d5f2927 100644 --- a/htdocs/admin/expensereport_rules.php +++ b/htdocs/admin/expensereport_rules.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/admin/export.php b/htdocs/admin/export.php index c61cf4f81a2..b12dcf4c530 100644 --- a/htdocs/admin/export.php +++ b/htdocs/admin/export.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 94abf8df2ab..d16f3e493f5 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 765f2e6f995..759038930ef 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -808,36 +808,39 @@ print '
    '.$langs->trans("Module").''.$langs->trans("Dictionary").''.$langs->trans("Table").'
       
       
    '; print '
    '; print load_fiche_titre($langs->trans("PathToDocuments"), '', ''); -print ''."\n"; +print '
    '; +print '
    '."\n"; print ''."\n"; print ''."\n"; print ''."\n"; print "\n"; -print ''."\n"; +print ''."\n"; print ''."\n"; print ''."\n"; print ''."\n"; print "
    '.$langs->trans("Name").''.$langs->trans("Value").'
    '.$langs->trans("PathDirectory").''.$conf->facture->dir_output.'
    \n"; - +print "
    \n"; /* * Notifications */ print '
    '; print load_fiche_titre($langs->trans("Notifications"), '', ''); -print ''; + +print '
    '; +print '
    '; print ''; print ''; print ''; print ''; print "\n"; - print '\n"; - print '
    '.$langs->trans("Parameter").' 
    '; print $langs->trans("YouMayFindNotificationsFeaturesIntoModuleNotification").'
    '; print '
    '; print "
    '; +print "\n"; + dol_fiche_end(); diff --git a/htdocs/admin/facture_situation.php b/htdocs/admin/facture_situation.php index 0e62029e8f2..71fc1f8eac2 100644 --- a/htdocs/admin/facture_situation.php +++ b/htdocs/admin/facture_situation.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -183,41 +183,41 @@ function _printInputFormPart($confkey, $title = false, $desc = '', $metas = arra $var=!$var; $inputCount = empty($inputCount)?1:($inputCount+1); $form=new Form($db); - + $defaultMetas = array( 'name' => 'value'.$inputCount ); - + if ($type!='textarea') { $defaultMetas['type'] = 'text'; $defaultMetas['value'] = $conf->global->{$confkey}; } - - + + $metas = array_merge($defaultMetas, $metas); $metascompil = ''; foreach ($metas as $key => $values) { $metascompil .= ' '.$key.'="'.$values.'" '; } - + print '
    '; - + if (!empty($help)) { print $form->textwithtooltip(($title?$title:$langs->trans($confkey)), $langs->trans($help), 2, 1, img_help(1, '')); } else { print $title?$title:$langs->trans($confkey); } - + if (!empty($desc)) { print '
    '.$langs->trans($desc).''; } - + print '
     '; print ''; - + print ''; if ($type=='textarea') { print ''; diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 6c7cc5a7f66..c2c49eb4943 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -1,7 +1,8 @@ * Copyright (C) 2005-2012 Regis Houssin - * Copyright (C) 2012-20113 Juanjo Menent + * Copyright (C) 2012-2013 Juanjo Menent + * Copyright (C) 2019 Christophe Battarel * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -14,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -49,7 +50,8 @@ $modules = array( 'DETAILS' => 'FCKeditorForProductDetails', 'USERSIGN' => 'FCKeditorForUserSignature', 'MAILING' => 'FCKeditorForMailing', -'MAIL' => 'FCKeditorForMail' +'MAIL' => 'FCKeditorForMail', +'TICKET' => 'FCKeditorForTicket' ); // Conditions pour que l'option soit proposee $conditions = array( @@ -58,7 +60,8 @@ $conditions = array( 'DETAILS' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled) || ! empty($conf->supplier_proposal->enabled) || ! empty($conf->fournisseur->enabled)), 'USERSIGN' => 1, 'MAILING' => ! empty($conf->mailing->enabled), -'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)) +'MAIL' => (! empty($conf->facture->enabled) || ! empty($conf->propal->enabled) || ! empty($conf->commande->enabled)), +'TICKET' => ! empty($conf->ticket->enabled) ); // Picto $picto = array( @@ -67,7 +70,8 @@ $picto = array( 'DETAILS' => 'product', 'USERSIGN' => 'user', 'MAILING' => 'email', -'MAIL' => 'email' +'MAIL' => 'email', +'TICKET' => 'ticket' ); diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 27f105435d5..d6866298321 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/geoipmaxmind.php b/htdocs/admin/geoipmaxmind.php index 8f8cbf98607..7ed797b8618 100644 --- a/htdocs/admin/geoipmaxmind.php +++ b/htdocs/admin/geoipmaxmind.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 27dddf8668a..239ca6c93f5 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ihm.php b/htdocs/admin/ihm.php index 7b0a7983b5a..b07a7984e09 100644 --- a/htdocs/admin/ihm.php +++ b/htdocs/admin/ihm.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/index.php b/htdocs/admin/index.php index a6336d11d8e..2fe4d02e495 100644 --- a/htdocs/admin/index.php +++ b/htdocs/admin/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -45,7 +45,6 @@ llxHeader('', $langs->trans("Setup"), $wikihelp); print load_fiche_titre($langs->trans("SetupArea"), '', 'tools'); - if (! empty($conf->global->MAIN_MOTD_SETUPPAGE)) { $conf->global->MAIN_MOTD_SETUPPAGE=preg_replace('//i', '
    ', $conf->global->MAIN_MOTD_SETUPPAGE); diff --git a/htdocs/admin/ldap.php b/htdocs/admin/ldap.php index f110c32e441..dba2cee41a5 100644 --- a/htdocs/admin/ldap.php +++ b/htdocs/admin/ldap.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ldap_contacts.php b/htdocs/admin/ldap_contacts.php index 03fafaaf3c8..c466f4e6c1e 100644 --- a/htdocs/admin/ldap_contacts.php +++ b/htdocs/admin/ldap_contacts.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ldap_groups.php b/htdocs/admin/ldap_groups.php index 8ae918ce180..17f156ca223 100644 --- a/htdocs/admin/ldap_groups.php +++ b/htdocs/admin/ldap_groups.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ldap_members.php b/htdocs/admin/ldap_members.php index 94c9a32d9e0..618e5ac87d5 100644 --- a/htdocs/admin/ldap_members.php +++ b/htdocs/admin/ldap_members.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ldap_members_types.php b/htdocs/admin/ldap_members_types.php index 94d1355dd67..45d0d488c8a 100644 --- a/htdocs/admin/ldap_members_types.php +++ b/htdocs/admin/ldap_members_types.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ldap_users.php b/htdocs/admin/ldap_users.php index 394451c9472..cba9481849d 100644 --- a/htdocs/admin/ldap_users.php +++ b/htdocs/admin/ldap_users.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 5eb3532e47d..c9e69cc469e 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/livraison.php b/htdocs/admin/livraison.php index 7635c9a3c19..1f8a74f6eb8 100644 --- a/htdocs/admin/livraison.php +++ b/htdocs/admin/livraison.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/livraison_extrafields.php b/htdocs/admin/livraison_extrafields.php index a7bd8929cad..b78e6f1730e 100644 --- a/htdocs/admin/livraison_extrafields.php +++ b/htdocs/admin/livraison_extrafields.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/livraisondet_extrafields.php b/htdocs/admin/livraisondet_extrafields.php index 50f34f9d133..09bd37eb326 100644 --- a/htdocs/admin/livraisondet_extrafields.php +++ b/htdocs/admin/livraisondet_extrafields.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/loan.php b/htdocs/admin/loan.php index 56d80c2e7d7..46d104736b0 100644 --- a/htdocs/admin/loan.php +++ b/htdocs/admin/loan.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/admin/mailing.php b/htdocs/admin/mailing.php index d10e0e9a497..6ff32e1d406 100644 --- a/htdocs/admin/mailing.php +++ b/htdocs/admin/mailing.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/mailman.php b/htdocs/admin/mailman.php index a2403315614..42f9ada8c0f 100644 --- a/htdocs/admin/mailman.php +++ b/htdocs/admin/mailman.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 997b0e97bdb..ff2b788a026 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/mails_emailing.php b/htdocs/admin/mails_emailing.php index 12076a00579..3d6cfc2d228 100644 --- a/htdocs/admin/mails_emailing.php +++ b/htdocs/admin/mails_emailing.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/mails_senderprofile_list.php b/htdocs/admin/mails_senderprofile_list.php index 7abf8247a71..58f107dfdf5 100644 --- a/htdocs/admin/mails_senderprofile_list.php +++ b/htdocs/admin/mails_senderprofile_list.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -59,8 +59,10 @@ $object=new EmailSenderProfile($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->admin->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('emailsenderprofilelist')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('emailsenderprofile'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) @@ -187,14 +189,15 @@ foreach($object->fields as $key => $val) $sql.='t.'.$key.', '; } // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; -$sql=preg_replace('/, $/', '', $sql); +$sql=preg_replace('/,\s*$/', '', $sql); $sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."myobject_extrafields as ef on (t.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('emailsenderprofile').")"; else $sql.=" WHERE 1 = 1"; foreach($search as $key => $val) @@ -217,7 +220,8 @@ foreach($object->fields as $key => $val) $sql.='t.'.$key.', '; } // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); // Add where from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/admin/mails_templates.php b/htdocs/admin/mails_templates.php index b5f22376c16..0dbdf90b53b 100644 --- a/htdocs/admin/mails_templates.php +++ b/htdocs/admin/mails_templates.php @@ -24,7 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/menus.php b/htdocs/admin/menus.php index 4c3c306cc59..b334ccadf45 100644 --- a/htdocs/admin/menus.php +++ b/htdocs/admin/menus.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/menus/edit.php b/htdocs/admin/menus/edit.php index 6bacc97e92f..43888d3e061 100644 --- a/htdocs/admin/menus/edit.php +++ b/htdocs/admin/menus/edit.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/menus/index.php b/htdocs/admin/menus/index.php index 1790eaf5aee..34543456bfe 100644 --- a/htdocs/admin/menus/index.php +++ b/htdocs/admin/menus/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/menus/other.php b/htdocs/admin/menus/other.php index 5b1cb8e5f4b..e339b1854d8 100644 --- a/htdocs/admin/menus/other.php +++ b/htdocs/admin/menus/other.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 8d8bf531443..d5b0f864be6 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php index 162d5290a36..787f3ded291 100644 --- a/htdocs/admin/modules.php +++ b/htdocs/admin/modules.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -460,6 +460,7 @@ asort($orders); $nbofactivatedmodules=count($conf->modules); $moreinfo=$langs->trans("TotalNumberOfActivatedModules", ($nbofactivatedmodules-1), count($modules)); if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule")); + print load_fiche_titre($langs->trans("ModulesSetup"), $moreinfo, 'title_setup'); // Start to show page @@ -870,21 +871,23 @@ if ($mode == 'marketplace') dol_fiche_head($head, $mode, '', -1); // Marketplace - print "\n"; - print "\n"; - //print ''; - print ''; + print '
    '; + print '
    '.$langs->trans("Logo").''.$langs->trans("WebSiteDesc").'
    '."\n"; + print ''."\n"; + print ''; + print ''; print ''; print ''; print ''."\n"; $url='https://www.dolistore.com'; - print ''; + print ''; print ''; print ''; print ''; print "
    '.$form->textwithpicto($langs->trans("Provider"), $langs->trans("WebSiteDesc")).''.$langs->trans("URL").'
    '.$langs->trans("DoliStoreDesc").''.$url.'
    \n"; + print ''; dol_fiche_end(); diff --git a/htdocs/admin/multicurrency.php b/htdocs/admin/multicurrency.php index 206c251309e..63000d61c8b 100644 --- a/htdocs/admin/multicurrency.php +++ b/htdocs/admin/multicurrency.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/notification.php b/htdocs/admin/notification.php index 3c7ce730d03..cc1d53d14f8 100644 --- a/htdocs/admin/notification.php +++ b/htdocs/admin/notification.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/oauth.php b/htdocs/admin/oauth.php index 0f7206a5d73..b0795152d05 100644 --- a/htdocs/admin/oauth.php +++ b/htdocs/admin/oauth.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/admin/oauthlogintokens.php b/htdocs/admin/oauthlogintokens.php index 0be3330bec4..20c0ae222eb 100644 --- a/htdocs/admin/oauthlogintokens.php +++ b/htdocs/admin/oauthlogintokens.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/openinghours.php b/htdocs/admin/openinghours.php index b68508f557a..d931cdbf230 100644 --- a/htdocs/admin/openinghours.php +++ b/htdocs/admin/openinghours.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/order_extrafields.php b/htdocs/admin/order_extrafields.php index 61288260acd..f81b3cc1e69 100644 --- a/htdocs/admin/order_extrafields.php +++ b/htdocs/admin/order_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/orderdet_extrafields.php b/htdocs/admin/orderdet_extrafields.php index 685176a3f88..2b239de0932 100644 --- a/htdocs/admin/orderdet_extrafields.php +++ b/htdocs/admin/orderdet_extrafields.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/payment.php b/htdocs/admin/payment.php index eb3261f46c6..65b66636a10 100644 --- a/htdocs/admin/payment.php +++ b/htdocs/admin/payment.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/pdf.php b/htdocs/admin/pdf.php index 56c6f977827..a8c1aa41b5f 100644 --- a/htdocs/admin/pdf.php +++ b/htdocs/admin/pdf.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/perms.php b/htdocs/admin/perms.php index 28774ab82b6..8e1de4d83b6 100644 --- a/htdocs/admin/perms.php +++ b/htdocs/admin/perms.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 144ec744d41..7dd00938dc9 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index 843de325e73..4c8f4188e4b 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/proxy.php b/htdocs/admin/proxy.php index 0baa25d1134..9974e58a1f6 100644 --- a/htdocs/admin/proxy.php +++ b/htdocs/admin/proxy.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/receiptprinter.php b/htdocs/admin/receiptprinter.php index f532db76ce4..6184bebd97f 100644 --- a/htdocs/admin/receiptprinter.php +++ b/htdocs/admin/receiptprinter.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/reception_extrafields.php b/htdocs/admin/reception_extrafields.php index e9d4e1d08dc..454fe1c4a8f 100644 --- a/htdocs/admin/reception_extrafields.php +++ b/htdocs/admin/reception_extrafields.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index a1fd76e0d5d..0297333a917 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/resource.php b/htdocs/admin/resource.php index 3dfd8e1e2c2..44e4d1ae9de 100644 --- a/htdocs/admin/resource.php +++ b/htdocs/admin/resource.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/admin/resource_extrafields.php b/htdocs/admin/resource_extrafields.php index 6bc9b4af64c..12e9ff58c8a 100644 --- a/htdocs/admin/resource_extrafields.php +++ b/htdocs/admin/resource_extrafields.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/security.php b/htdocs/admin/security.php index df2d2b09ee6..d2d5ecde622 100644 --- a/htdocs/admin/security.php +++ b/htdocs/admin/security.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -170,9 +170,23 @@ elseif ($action == 'disable_MAIN_SECURITY_DISABLEFORGETPASSLINK') if ($action == 'maj_pattern') { - dolibarr_set_const($db, "USER_PASSWORD_PATTERN", GETPOST("pattern"), 'chaine', 0, '', $conf->entity); - header("Location: security.php"); - exit; + $pattern = GETPOST("pattern"); + $explodePattern = explode(';', $pattern); + + $patternInError = false; + if($explodePattern[0] < 1 || $explodePattern[4] < 0){ + $patternInError = true; + } + + if($explodePattern[0] < $explodePattern[1] + $explodePattern[2] + $explodePattern[3]){ + $patternInError = true; + } + + if(!$patternInError){ + dolibarr_set_const($db, "USER_PASSWORD_PATTERN", $pattern, 'chaine', 0, '', $conf->entity); + header("Location: security.php"); + exit; + } } @@ -278,13 +292,6 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ $tabConf = explode(";", $conf->global->USER_PASSWORD_PATTERN); - /*$this->length2 = $tabConf[0]; - $this->NbMaj = $tabConf[1]; - $this->NbNum = $tabConf[2]; - $this->NbSpe = $tabConf[3]; - $this->NbRepeat = $tabConf[4]; - $this->WithoutAmbi = $tabConf[5]; - */ print '
    '; print ''; print ''; @@ -350,6 +357,13 @@ if ($conf->global->USER_PASSWORD_GENERATED == "Perso"){ print ' }'; print ' function valuePossible(){'; + print ' var fields = ["#minlenght", "#NbMajMin", "#NbNumMin", "#NbSpeMin", "#NbIteConsecutive"];'; + print ' for(var i = 0 ; i < fields.length ; i++){'; + print ' if($(fields[i]).val() < $(fields[i]).attr("min")){'; + print ' return false;'; + print ' }'; + print ' }'; + print ' '; print ' var length = parseInt($("#minlenght").val());'; print ' var length_mini = parseInt($("#NbMajMin").val()) + parseInt($("#NbNumMin").val()) + parseInt($("#NbSpeMin").val());'; print ' return length >= length_mini;'; diff --git a/htdocs/admin/security_file.php b/htdocs/admin/security_file.php index 8149a5af8d0..0bd2dcdb1be 100644 --- a/htdocs/admin/security_file.php +++ b/htdocs/admin/security_file.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/security_other.php b/htdocs/admin/security_other.php index dfc16c4bd45..28c3db6f1d3 100644 --- a/htdocs/admin/security_other.php +++ b/htdocs/admin/security_other.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/sms.php b/htdocs/admin/sms.php index d6f2ee170d8..e08c2c5eca8 100644 --- a/htdocs/admin/sms.php +++ b/htdocs/admin/sms.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/socialnetworks.php b/htdocs/admin/socialnetworks.php index 8b7c061dc64..af72c3c8ace 100644 --- a/htdocs/admin/socialnetworks.php +++ b/htdocs/admin/socialnetworks.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/spip.php b/htdocs/admin/spip.php index 579363395f3..d3611577a34 100644 --- a/htdocs/admin/spip.php +++ b/htdocs/admin/spip.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 572f034f259..42daea12861 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 836afc27a7c..27a126c7ef6 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 2dbc601c264..ac7d5e98539 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index 49af65bd786..65bb18fcc5f 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index e627068b692..55fb4329d39 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ require '../main.inc.php'; diff --git a/htdocs/admin/supplierinvoice_extrafields.php b/htdocs/admin/supplierinvoice_extrafields.php index 19fcc95bbcd..20c6f3f66a8 100644 --- a/htdocs/admin/supplierinvoice_extrafields.php +++ b/htdocs/admin/supplierinvoice_extrafields.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplierinvoicedet_extrafields.php b/htdocs/admin/supplierinvoicedet_extrafields.php index e6718a75e3f..bcb3b5769ee 100644 --- a/htdocs/admin/supplierinvoicedet_extrafields.php +++ b/htdocs/admin/supplierinvoicedet_extrafields.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplierorder_extrafields.php b/htdocs/admin/supplierorder_extrafields.php index 34fb919bba2..78c31291414 100644 --- a/htdocs/admin/supplierorder_extrafields.php +++ b/htdocs/admin/supplierorder_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/supplierorderdet_extrafields.php b/htdocs/admin/supplierorderdet_extrafields.php index 752f65ffc29..737742f2b95 100644 --- a/htdocs/admin/supplierorderdet_extrafields.php +++ b/htdocs/admin/supplierorderdet_extrafields.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/syslog.php b/htdocs/admin/syslog.php index 69c2c48ffca..92823045a62 100644 --- a/htdocs/admin/syslog.php +++ b/htdocs/admin/syslog.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/about.php b/htdocs/admin/system/about.php index a941c89b994..64f8fba72ad 100644 --- a/htdocs/admin/system/about.php +++ b/htdocs/admin/system/about.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -63,7 +63,7 @@ print '
    '; print $langs->trans("DolibarrLicense").' : '; print ''; //print "
    \n"; @@ -160,7 +160,6 @@ print ''; diff --git a/htdocs/admin/system/browser.php b/htdocs/admin/system/browser.php index 118e8c97d29..ef5ec419c8f 100644 --- a/htdocs/admin/system/browser.php +++ b/htdocs/admin/system/browser.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/constall.php b/htdocs/admin/system/constall.php index 9148d44e53c..4e203a770f7 100644 --- a/htdocs/admin/system/constall.php +++ b/htdocs/admin/system/constall.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/database-tables.php b/htdocs/admin/system/database-tables.php index 135efb734c2..195b5c83143 100644 --- a/htdocs/admin/system/database-tables.php +++ b/htdocs/admin/system/database-tables.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/database.php b/htdocs/admin/system/database.php index 9de661ce825..6ed657ba8cd 100644 --- a/htdocs/admin/system/database.php +++ b/htdocs/admin/system/database.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/dbtable.php b/htdocs/admin/system/dbtable.php index e01581eee3d..7195fd42869 100644 --- a/htdocs/admin/system/dbtable.php +++ b/htdocs/admin/system/dbtable.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/dolibarr.php b/htdocs/admin/system/dolibarr.php index edf6f627a31..5c55c668b1a 100644 --- a/htdocs/admin/system/dolibarr.php +++ b/htdocs/admin/system/dolibarr.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/filecheck.php b/htdocs/admin/system/filecheck.php index 2a3bb1d752d..94864123220 100644 --- a/htdocs/admin/system/filecheck.php +++ b/htdocs/admin/system/filecheck.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/index.php b/htdocs/admin/system/index.php index f33c742aabf..d08eb564f17 100644 --- a/htdocs/admin/system/index.php +++ b/htdocs/admin/system/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/modules.php b/htdocs/admin/system/modules.php index 3269542a7bf..9b6d33e5faa 100644 --- a/htdocs/admin/system/modules.php +++ b/htdocs/admin/system/modules.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/os.php b/htdocs/admin/system/os.php index e0031da1377..33587f3c1c6 100644 --- a/htdocs/admin/system/os.php +++ b/htdocs/admin/system/os.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/perf.php b/htdocs/admin/system/perf.php index e17756391f1..3dae3c91f9d 100644 --- a/htdocs/admin/system/perf.php +++ b/htdocs/admin/system/perf.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/phpinfo.php b/htdocs/admin/system/phpinfo.php index d1c737ef5a8..afed312cdbd 100644 --- a/htdocs/admin/system/phpinfo.php +++ b/htdocs/admin/system/phpinfo.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/web.php b/htdocs/admin/system/web.php index 0cb4572d1e8..b5e8e2c3866 100644 --- a/htdocs/admin/system/web.php +++ b/htdocs/admin/system/web.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/xcache.php b/htdocs/admin/system/xcache.php index fd572a83e7d..3e0e087c424 100644 --- a/htdocs/admin/system/xcache.php +++ b/htdocs/admin/system/xcache.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/system/xdebug.php b/htdocs/admin/system/xdebug.php index d036780b661..56b452706f5 100644 --- a/htdocs/admin/system/xdebug.php +++ b/htdocs/admin/system/xdebug.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/admin/taxes.php b/htdocs/admin/taxes.php index 113b0029fdd..99c67b038ae 100644 --- a/htdocs/admin/taxes.php +++ b/htdocs/admin/taxes.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ticket.php b/htdocs/admin/ticket.php index 8cb1e85afe4..d97252dc53b 100644 --- a/htdocs/admin/ticket.php +++ b/htdocs/admin/ticket.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -42,6 +42,12 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); $type = 'ticket'; +$error = 0; + +/* + * Actions + */ + if ($action == 'updateMask') { $maskconstticket = GETPOST('maskconstticket', 'alpha'); $maskticket = GETPOST('maskticket', 'alpha'); @@ -91,7 +97,7 @@ if ($action == 'updateMask') { $error++; } - $mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'alpha'); + $mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'restricthtml'); if (!empty($mail_intro)) { $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity); } else { @@ -101,7 +107,7 @@ if ($action == 'updateMask') { $error++; } - $mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'alpha'); + $mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'restricthtml'); if (!empty($mail_signature)) { $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity); } else { @@ -110,16 +116,6 @@ if ($action == 'updateMask') { if (!$res > 0) { $error++; } - - $text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'alpha'); - if (!empty($text_help)) { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity); - } else { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); - } - if (!$res > 0) { - $error++; - } } if ($action == 'setvarother') { diff --git a/htdocs/admin/ticket_extrafields.php b/htdocs/admin/ticket_extrafields.php index 3c65fcf693e..18d5eee40a6 100644 --- a/htdocs/admin/ticket_extrafields.php +++ b/htdocs/admin/ticket_extrafields.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/ticket_public.php b/htdocs/admin/ticket_public.php index 4e6b6d75e85..c5cadac11c1 100644 --- a/htdocs/admin/ticket_public.php +++ b/htdocs/admin/ticket_public.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -42,6 +42,12 @@ $label = GETPOST('label', 'alpha'); $scandir = GETPOST('scandir', 'alpha'); $type = 'ticket'; +$error = 0; + +/* + * Actions + */ + if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') { if (GETPOST('value')) dolibarr_set_const($db, 'TICKET_ENABLE_PUBLIC_INTERFACE', 1, 'chaine', 0, '', $conf->entity); @@ -51,95 +57,54 @@ if ($action == 'setTICKET_ENABLE_PUBLIC_INTERFACE') if ($action == 'setvar') { include_once DOL_DOCUMENT_ROOT . "/core/lib/files.lib.php"; - $notification_email = GETPOST('TICKET_NOTIFICATION_EMAIL_FROM', 'alpha'); - if (!empty($notification_email)) { - $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', $notification_email, 'chaine', 0, '', $conf->entity); + $topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'nohtml'); + if (!empty($topic_interface)) { + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_FROM', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity); } if (!$res > 0) { - $error++; + $error++; } - // altairis : differentiate notification email FROM and TO - $notification_email_to = GETPOST('TICKET_NOTIFICATION_EMAIL_TO', 'alpha'); - if (!empty($notification_email_to)) { - $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', $notification_email_to, 'chaine', 0, '', $conf->entity); + $text_home = GETPOST('TICKET_PUBLIC_TEXT_HOME', 'restricthtml'); + if (!empty($text_home)) { + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKET_NOTIFICATION_EMAIL_TO', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { - $error++; + $error++; } - $mail_new_ticket = GETPOST('TICKET_MESSAGE_MAIL_NEW', 'alpha'); + $text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'restricthtml'); + if (!empty($text_help)) { + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity); + } else { + $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); + } + if (!$res > 0) { + $error++; + } + + $mail_new_ticket = GETPOST('TICKET_MESSAGE_MAIL_NEW', 'restricthtml'); if (!empty($mail_new_ticket)) { - $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $mail_new_ticket, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_NEW', $langs->trans('TicketMessageMailNewText'), 'chaine', 0, '', $conf->entity); } if (!$res > 0) { - $error++; - } - - $mail_intro = GETPOST('TICKET_MESSAGE_MAIL_INTRO', 'alpha'); - if (!empty($mail_intro)) { - $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $mail_intro, 'chaine', 0, '', $conf->entity); - } else { - $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_INTRO', $langs->trans('TicketMessageMailIntroText'), 'chaine', 0, '', $conf->entity); - } - if (!$res > 0) { - $error++; - } - - $mail_signature = GETPOST('TICKET_MESSAGE_MAIL_SIGNATURE', 'alpha'); - if (!empty($mail_signature)) { - $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $mail_signature, 'chaine', 0, '', $conf->entity); - } else { - $res = dolibarr_set_const($db, 'TICKET_MESSAGE_MAIL_SIGNATURE', $langs->trans('TicketMessageMailSignatureText'), 'chaine', 0, '', $conf->entity); - } - if (!$res > 0) { - $error++; + $error++; } $url_interface = GETPOST('TICKET_URL_PUBLIC_INTERFACE', 'alpha'); if (!empty($url_interface)) { - $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', $url_interface, 'chaine', 0, '', $conf->entity); } else { - $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity); + $res = dolibarr_set_const($db, 'TICKET_URL_PUBLIC_INTERFACE', '', 'chaine', 0, '', $conf->entity); } if (!$res > 0) { - $error++; - } - - $topic_interface = GETPOST('TICKET_PUBLIC_INTERFACE_TOPIC', 'alpha'); - if (!empty($topic_interface)) { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', $topic_interface, 'chaine', 0, '', $conf->entity); - } else { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_INTERFACE_TOPIC', '', 'chaine', 0, '', $conf->entity); - } - if (!$res > 0) { - $error++; - } - - $text_home = GETPOST('TICKET_PUBLIC_TEXT_HOME', 'alpha'); - if (!empty($text_home)) { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $text_home, 'chaine', 0, '', $conf->entity); - } else { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HOME', $langs->trans('TicketPublicInterfaceTextHome'), 'chaine', 0, '', $conf->entity); - } - if (!$res > 0) { - $error++; - } - - $text_help = GETPOST('TICKET_PUBLIC_TEXT_HELP_MESSAGE', 'alpha'); - if (!empty($text_help)) { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $text_help, 'chaine', 0, '', $conf->entity); - } else { - $res = dolibarr_set_const($db, 'TICKET_PUBLIC_TEXT_HELP_MESSAGE', $langs->trans('TicketPublicPleaseBeAccuratelyDescribe'), 'chaine', 0, '', $conf->entity); - } - if (!$res > 0) { - $error++; + $error++; } } @@ -162,14 +127,11 @@ if ($action == 'setvarother') { $error++; } - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) - { - $param_show_module_logo = GETPOST('TICKET_SHOW_MODULE_LOGO', 'alpha'); - $res = dolibarr_set_const($db, 'TICKET_SHOW_MODULE_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { - $error++; - } - } + $param_show_module_logo = GETPOST('TICKET_SHOW_COMPANY_LOGO', 'alpha'); + $res = dolibarr_set_const($db, 'TICKET_SHOW_COMPANY_LOGO', $param_show_module_logo, 'chaine', 0, '', $conf->entity); + if (!$res > 0) { + $error++; + } if ($conf->global->MAIN_FEATURES_LEVEL >= 2) { @@ -179,12 +141,6 @@ if ($action == 'setvarother') { $error++; } } - - $param_limit_view = GETPOST('TICKET_LIMIT_VIEW_ASSIGNED_ONLY', 'alpha'); - $res = dolibarr_set_const($db, 'TICKET_LIMIT_VIEW_ASSIGNED_ONLY', $param_limit_view, 'chaine', 0, '', $conf->entity); - if (!$res > 0) { - $error++; - } } @@ -238,8 +194,7 @@ print '

    '; if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) { - - if (!$conf->use_javascript_ajax) { + if (empty($conf->use_javascript_ajax)) { print ''; print ''; print ''; @@ -349,16 +304,6 @@ if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) print "
    \n"; } - // Url public interface - $url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE; - print ''; - print ''; - print ''; - // Interface topic $url_interface = $conf->global->TICKET_PUBLIC_INTERFACE_TOPIC; print ''; + // Url public interface + $url_interface = $conf->global->TICKET_URL_PUBLIC_INTERFACE; + print ''; + print ''; + print ''; + print '
    ' . $langs->trans("TicketUrlPublicInterfaceLabelAdmin") . ''; - print ''; - print ''; - print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help'); - print '
    ' . $langs->trans("TicketPublicInterfaceTopicLabelAdmin") . ''; @@ -420,6 +365,16 @@ if (! empty($conf->global->TICKET_ENABLE_PUBLIC_INTERFACE)) print $form->textwithpicto('', $langs->trans("TicketNewEmailBodyHelp"), 1, 'help'); print '
    ' . $langs->trans("TicketUrlPublicInterfaceLabelAdmin") . ''; + print ''; + print ''; + print $form->textwithpicto('', $langs->trans("TicketUrlPublicInterfaceHelpAdmin"), 1, 'help'); + print '
    '; print '
    '; diff --git a/htdocs/admin/tools/dolibarr_export.php b/htdocs/admin/tools/dolibarr_export.php index 3c6bc1d48ec..109b2a748fb 100644 --- a/htdocs/admin/tools/dolibarr_export.php +++ b/htdocs/admin/tools/dolibarr_export.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/dolibarr_import.php b/htdocs/admin/tools/dolibarr_import.php index f5afa6c9bbd..a5d52eb2929 100644 --- a/htdocs/admin/tools/dolibarr_import.php +++ b/htdocs/admin/tools/dolibarr_import.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/eaccelerator.php b/htdocs/admin/tools/eaccelerator.php index b37e10ca2e7..660c1647783 100644 --- a/htdocs/admin/tools/eaccelerator.php +++ b/htdocs/admin/tools/eaccelerator.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/export.php b/htdocs/admin/tools/export.php index 16f9c38602a..e05e4fc143d 100644 --- a/htdocs/admin/tools/export.php +++ b/htdocs/admin/tools/export.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/export_files.php b/htdocs/admin/tools/export_files.php index 4f9e8b933d2..04bf1fac7dd 100644 --- a/htdocs/admin/tools/export_files.php +++ b/htdocs/admin/tools/export_files.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/index.php b/htdocs/admin/tools/index.php index 4c9bc0c753a..99a4600bf71 100644 --- a/htdocs/admin/tools/index.php +++ b/htdocs/admin/tools/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/listevents.php b/htdocs/admin/tools/listevents.php index bcb727f1fcb..9bbe81993c4 100644 --- a/htdocs/admin/tools/listevents.php +++ b/htdocs/admin/tools/listevents.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/listsessions.php b/htdocs/admin/tools/listsessions.php index 08890379955..7db64a8a3ed 100644 --- a/htdocs/admin/tools/listsessions.php +++ b/htdocs/admin/tools/listsessions.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/purge.php b/htdocs/admin/tools/purge.php index 569409fe91a..3c99e3e10b8 100644 --- a/htdocs/admin/tools/purge.php +++ b/htdocs/admin/tools/purge.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/tools/update.php b/htdocs/admin/tools/update.php index 66197c87deb..664cda18916 100644 --- a/htdocs/admin/tools/update.php +++ b/htdocs/admin/tools/update.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/translation.php b/htdocs/admin/translation.php index 2a9983d95b1..ad7a2278991 100644 --- a/htdocs/admin/translation.php +++ b/htdocs/admin/translation.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -553,7 +553,7 @@ if ($mode == 'searchkey') //$transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?key='.$key; $transifexurl = 'https://www.transifex.com/dolibarr-association/dolibarr/translate/#'.$langcode.'/'.$transifexlangfile.'?q=key%3A'.$key; - print '   '.img_picto('FixOnTransifex', 'object_globe').''; + print '   '.img_picto('FixOnTransifex', 'globe').''; } } else diff --git a/htdocs/admin/triggers.php b/htdocs/admin/triggers.php index 6266d7020af..819688ddcc1 100644 --- a/htdocs/admin/triggers.php +++ b/htdocs/admin/triggers.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index f73c3d4ecf3..2ead8e03210 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index db57fa9730a..c0c4e3c57d8 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/website.php b/htdocs/admin/website.php index 8bcc6cc5417..1c7fe75f0de 100644 --- a/htdocs/admin/website.php +++ b/htdocs/admin/website.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/website_options.php b/htdocs/admin/website_options.php index 35b34f1b9da..610a83f302d 100644 --- a/htdocs/admin/website_options.php +++ b/htdocs/admin/website_options.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/admin/workflow.php b/htdocs/admin/workflow.php index 806f53c463c..3c4232cbc0a 100644 --- a/htdocs/admin/workflow.php +++ b/htdocs/admin/workflow.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/api/admin/explorer.php b/htdocs/api/admin/explorer.php index 001e7d07cee..0f541b93708 100644 --- a/htdocs/api/admin/explorer.php +++ b/htdocs/api/admin/explorer.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * @deprecated Old explorer. Not using Swagger. See instead explorer in htdocs/api/index.php. */ @@ -179,7 +179,7 @@ print '
    '; $message=''; $url=''.$urlwithroot.'/api/index.php/login?login='.urlencode($user->login).'&password=yourpassword[&reset=1]'; $message.=$langs->trans("UrlToGetKeyToUseAPIs").':
    '; -$message.=img_picto('', 'object_globe.png').' '.$url; +$message.=img_picto('', 'globe').' '.$url; print $message; print '
    '; print '
    '; @@ -208,7 +208,7 @@ foreach($listofapis['v1'] as $key => $val) //print $key.' - '.$val['classname'].' - '.$val['fullpath']." - ".DOL_MAIN_URL_ROOT.'/api/index.php/'.strtolower(preg_replace('/Api$/','',$val['classname']))."/xxx
    \n"; $url=$urlwithroot.'/api/index.php/'.$key; $url.='?api_key=token'; - print img_picto('', 'object_globe.png').' '.$method.' '.$url."
    \n"; + print img_picto('', 'globe').' '.$method.' '.$url."
    \n"; } } } diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index cbf18f92222..f8a354683e0 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -152,7 +152,7 @@ $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain $message=''; $url=$urlwithroot.'/api/index.php/login?login=auserlogin&password=thepassword[&reset=1]'; $message.=$langs->trans("UrlToGetKeyToUseAPIs").':
    '; -$message.=img_picto('', 'object_globe.png').' '.$url; +$message.=img_picto('', 'globe').' '.$url; print $message; print '
    '; print '
    '; @@ -162,7 +162,7 @@ print ''.$langs->trans("ApiExporerIs").':
    '; if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/explorer')) { $url=DOL_MAIN_URL_ROOT.'/api/index.php/explorer'; - print img_picto('', 'object_globe.png').' '.$url."
    \n"; + print img_picto('', 'globe').' '.$url."
    \n"; } else { diff --git a/htdocs/api/class/api.class.php b/htdocs/api/class/api.class.php index 1b79f661dd6..c0e81bc77cb 100644 --- a/htdocs/api/class/api.class.php +++ b/htdocs/api/class/api.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\Restler; diff --git a/htdocs/api/class/api_access.class.php b/htdocs/api/class/api_access.class.php index 983d9d3dca5..edeb32e8353 100644 --- a/htdocs/api/class/api_access.class.php +++ b/htdocs/api/class/api_access.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Create the autoloader for Luracast diff --git a/htdocs/api/class/api_documents.class.php b/htdocs/api/class/api_documents.class.php index d1d51798e4a..1360d2657b7 100644 --- a/htdocs/api/class/api_documents.class.php +++ b/htdocs/api/class/api_documents.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/api/class/api_login.class.php b/htdocs/api/class/api_login.class.php index 9d8b90a0123..59a527d251c 100644 --- a/htdocs/api/class/api_login.class.php +++ b/htdocs/api/class/api_login.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/api/class/api_setup.class.php b/htdocs/api/class/api_setup.class.php index dfc14d31889..dd0a08039ef 100644 --- a/htdocs/api/class/api_setup.class.php +++ b/htdocs/api/class/api_setup.class.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/api/class/api_status.class.php b/htdocs/api/class/api_status.class.php index 3e61b2e6d0a..8090e1ba4f5 100644 --- a/htdocs/api/class/api_status.class.php +++ b/htdocs/api/class/api_status.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php'; diff --git a/htdocs/api/index.php b/htdocs/api/index.php index dd9ff7aadcb..2a734b9336d 100644 --- a/htdocs/api/index.php +++ b/htdocs/api/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asset/admin/assets_extrafields.php b/htdocs/asset/admin/assets_extrafields.php index f35ed7f391a..60147cf512b 100644 --- a/htdocs/asset/admin/assets_extrafields.php +++ b/htdocs/asset/admin/assets_extrafields.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asset/admin/assets_type_extrafields.php b/htdocs/asset/admin/assets_type_extrafields.php index 1ea4393fb69..f9e8944f47d 100644 --- a/htdocs/asset/admin/assets_type_extrafields.php +++ b/htdocs/asset/admin/assets_type_extrafields.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/asset/admin/setup.php b/htdocs/asset/admin/setup.php index 83ccadc7e1f..77d16820a43 100644 --- a/htdocs/asset/admin/setup.php +++ b/htdocs/asset/admin/setup.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asset/card.php b/htdocs/asset/card.php index 5bf3767ece1..7c2f1b42f32 100644 --- a/htdocs/asset/card.php +++ b/htdocs/asset/card.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -43,8 +43,10 @@ $object=new Asset($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('assetcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('asset'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias @@ -62,9 +64,6 @@ if (empty($action) && empty($id) && empty($ref)) $action='view'; //if ($user->societe_id > 0) $socid = $user->societe_id; //$result = restrictedArea($user, 'asset', $id); -// fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once. @@ -140,7 +139,7 @@ jQuery(document).ready(function() { // Part to create if ($action == 'create') { - print load_fiche_titre($langs->trans("NewAsset")); + print load_fiche_titre($langs->trans("NewAsset"), '', 'accountancy'); print ''; print ''; @@ -205,7 +204,7 @@ if (($id || $ref) && $action == 'edit') // Part to show record if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'create'))) { - $res = $object->fetch_optionals($object->id, $extralabels); + $res = $object->fetch_optionals($object->id); $head = asset_prepare_head($object); dol_fiche_head($head, 'card', $langs->trans("Asset"), -1, 'generic'); diff --git a/htdocs/asset/class/asset.class.php b/htdocs/asset/class/asset.class.php index 37aeb4607c8..04c195c08ff 100644 --- a/htdocs/asset/class/asset.class.php +++ b/htdocs/asset/class/asset.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asset/class/asset_type.class.php b/htdocs/asset/class/asset_type.class.php index 9cc96ae6c44..d48ebf9d089 100644 --- a/htdocs/asset/class/asset_type.class.php +++ b/htdocs/asset/class/asset_type.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asset/document.php b/htdocs/asset/document.php index 1de1030dec9..d1fa8c1e04b 100644 --- a/htdocs/asset/document.php +++ b/htdocs/asset/document.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -60,8 +60,9 @@ $object=new Asset($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->assets->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('assetdocument')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('asset'); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals diff --git a/htdocs/asset/info.php b/htdocs/asset/info.php index 45157e9b7a5..f3758ebca8e 100644 --- a/htdocs/asset/info.php +++ b/htdocs/asset/info.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asset/list.php b/htdocs/asset/list.php index 26fcb76795f..bd2d19bbc87 100644 --- a/htdocs/asset/list.php +++ b/htdocs/asset/list.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -60,8 +60,10 @@ $object=new Asset($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('assetlist')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('asset'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) @@ -181,14 +183,15 @@ foreach($object->fields as $key => $val) $sql.='t.'.$key.', '; } // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.' as options_'.$key.', ' : ''); // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters, $object); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; -$sql=preg_replace('/, $/', '', $sql); +$sql=preg_replace('/,\s*$/', '', $sql); $sql.= " FROM ".MAIN_DB_PREFIX.$object->table_element." as t"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."assets_extrafields as ef on (t.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (t.rowid = ef.fk_object)"; if ($object->ismultientitymanaged == 1) $sql.= " WHERE t.entity IN (".getEntity('assets').")"; else $sql.=" WHERE 1 = 1"; foreach($search as $key => $val) @@ -211,7 +214,8 @@ foreach($object->fields as $key => $val) $sql.='t.'.$key.', '; } // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ",ef.".$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) { + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef.".$key.', ' : ''); // Add where from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListGroupBy',$parameters); // Note that $action and $object may have been modified by hook @@ -314,7 +318,7 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail="SendAssetsRef"; diff --git a/htdocs/asset/note.php b/htdocs/asset/note.php index cfcb5fe70bc..0c03619d31c 100644 --- a/htdocs/asset/note.php +++ b/htdocs/asset/note.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -41,8 +41,9 @@ $object=new Asset($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->asset->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('assetnote')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('asset'); +$extrafields->fetch_name_optionals_label($object->table_element); // Security check - Protection if external user //if ($user->societe_id > 0) access_forbidden(); @@ -101,7 +102,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->asset->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/asset/type.php b/htdocs/asset/type.php index 303d05b298b..6803f9d65e7 100644 --- a/htdocs/asset/type.php +++ b/htdocs/asset/type.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -65,7 +65,7 @@ $object = new AssetType($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label('asset_type'); +$extrafields->fetch_name_optionals_label($object->table_element); if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', 'alpha')) // All tests are required to be compatible with all browsers { @@ -102,7 +102,7 @@ if ($action == 'add' && $user->rights->asset->write) $object->note = trim($comment); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if (empty($object->label)) { @@ -155,7 +155,7 @@ if ($action == 'update' && $user->rights->asset->write) $object->note = trim($comment); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; $ret=$object->update($user); @@ -197,6 +197,7 @@ if ($action == 'confirm_delete' && $user->rights->asset->write) */ $form=new Form($db); + $helpurl=''; llxHeader('', $langs->trans("AssetsTypeSetup"), $helpurl); @@ -237,7 +238,7 @@ if (! $rowid && $action != 'create' && $action != 'edit') print ''; print ''; - print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("AssetsTypes"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'accountancy', 0, $newcardbutton, '', $limit); $moreforfilter = ''; diff --git a/htdocs/asterisk/cidlookup.php b/htdocs/asterisk/cidlookup.php index a27bb9353e1..529e2adad05 100644 --- a/htdocs/asterisk/cidlookup.php +++ b/htdocs/asterisk/cidlookup.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/asterisk/wrapper.php b/htdocs/asterisk/wrapper.php index 22b78b421f6..14471c2d8ab 100644 --- a/htdocs/asterisk/wrapper.php +++ b/htdocs/asterisk/wrapper.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/barcode/codeinit.php b/htdocs/barcode/codeinit.php index b06e6112fc4..927f0f1a83f 100644 --- a/htdocs/barcode/codeinit.php +++ b/htdocs/barcode/codeinit.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -252,7 +252,7 @@ if ($conf->product->enabled || $conf->product->service) $nbno=$nbtotal=0; - print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'title_products'); + print load_fiche_titre($langs->trans("BarcodeInitForProductsOrServices"), '', 'products'); print '
    '."\n"; $sql ="SELECT count(rowid) as nb, fk_product_type, datec"; diff --git a/htdocs/barcode/printsheet.php b/htdocs/barcode/printsheet.php index ccfaf978fcb..a0bb66f2b81 100644 --- a/htdocs/barcode/printsheet.php +++ b/htdocs/barcode/printsheet.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/admin/blockedlog.php b/htdocs/blockedlog/admin/blockedlog.php index 25e983887df..a0260cc6682 100644 --- a/htdocs/blockedlog/admin/blockedlog.php +++ b/htdocs/blockedlog/admin/blockedlog.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/admin/blockedlog_list.php b/htdocs/blockedlog/admin/blockedlog_list.php index 2a7bee7335f..b44f27f7fe8 100644 --- a/htdocs/blockedlog/admin/blockedlog_list.php +++ b/htdocs/blockedlog/admin/blockedlog_list.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/ajax/authority.php b/htdocs/blockedlog/ajax/authority.php index fb7428710c4..bcbb4a66f91 100644 --- a/htdocs/blockedlog/ajax/authority.php +++ b/htdocs/blockedlog/ajax/authority.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/ajax/block-add.php b/htdocs/blockedlog/ajax/block-add.php index 91d96def177..f38efde42b2 100644 --- a/htdocs/blockedlog/ajax/block-add.php +++ b/htdocs/blockedlog/ajax/block-add.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/ajax/block-info.php b/htdocs/blockedlog/ajax/block-info.php index 802caf4d2e9..605cbacd1cb 100644 --- a/htdocs/blockedlog/ajax/block-info.php +++ b/htdocs/blockedlog/ajax/block-info.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/ajax/check_signature.php b/htdocs/blockedlog/ajax/check_signature.php index 6de8a2352d0..b0d5fd52731 100644 --- a/htdocs/blockedlog/ajax/check_signature.php +++ b/htdocs/blockedlog/ajax/check_signature.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/class/authority.class.php b/htdocs/blockedlog/class/authority.class.php index 376a1d3986a..7325f9ae50c 100644 --- a/htdocs/blockedlog/class/authority.class.php +++ b/htdocs/blockedlog/class/authority.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/blockedlog/class/blockedlog.class.php b/htdocs/blockedlog/class/blockedlog.class.php index c313a0b7666..1320c20ffbb 100644 --- a/htdocs/blockedlog/class/blockedlog.class.php +++ b/htdocs/blockedlog/class/blockedlog.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * See https://medium.com/@lhartikk/a-blockchain-in-200-lines-of-code-963cc1cc0e54 */ diff --git a/htdocs/blockedlog/lib/blockedlog.lib.php b/htdocs/blockedlog/lib/blockedlog.lib.php index 07d9966d90d..0d7c69a6d00 100644 --- a/htdocs/blockedlog/lib/blockedlog.lib.php +++ b/htdocs/blockedlog/lib/blockedlog.lib.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/bom/admin/setup.php b/htdocs/bom/admin/setup.php index a484718ac32..3bcdd0cbd79 100644 --- a/htdocs/bom/admin/setup.php +++ b/htdocs/bom/admin/setup.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/bom/bom_agenda.php b/htdocs/bom/bom_agenda.php index d7d86c50543..87fb55a6541 100644 --- a/htdocs/bom/bom_agenda.php +++ b/htdocs/bom/bom_agenda.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -74,7 +74,7 @@ $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomagenda','globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('bom'); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals @@ -149,7 +149,7 @@ if ($object->id > 0) if ($user->rights->bom->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index d788be5354a..5e24724b6f7 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -48,7 +48,7 @@ $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomcard', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Initialize array of search criterias @@ -204,7 +204,7 @@ jQuery(document).ready(function() { // Part to create if ($action == 'create') { - print load_fiche_titre($langs->trans("NewBOM")); + print load_fiche_titre($langs->trans("NewBOM"), '', 'cubes'); print ''; print ''; @@ -237,7 +237,7 @@ if ($action == 'create') // Part to edit record if (($id || $ref) && $action == 'edit') { - print load_fiche_titre($langs->trans("BillOfMaterials")); + print load_fiche_titre($langs->trans("BillOfMaterials"), '', 'cubes'); print ''; print ''; @@ -339,7 +339,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if ($user->rights->bom->write) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/bom/bom_document.php b/htdocs/bom/bom_document.php index 3cc042941b2..826222af8b0 100644 --- a/htdocs/bom/bom_document.php +++ b/htdocs/bom/bom_document.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -63,7 +63,7 @@ $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomdocument', 'globalcard')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('bom'); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals diff --git a/htdocs/bom/bom_list.php b/htdocs/bom/bom_list.php index bbb51211137..4b0a6ff29be 100644 --- a/htdocs/bom/bom_list.php +++ b/htdocs/bom/bom_list.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -60,8 +60,10 @@ $object = new BOM($db); $extrafields = new ExtraFields($db); $diroutputmassaction = $conf->bom->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomlist')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('bom'); // Load $extrafields->attributes['bom'] +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) @@ -327,7 +329,7 @@ $newcardbutton=''; // $newcardbutton.= ''; //} -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cubes', 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail="SendBillOfMaterialsRef"; diff --git a/htdocs/bom/bom_note.php b/htdocs/bom/bom_note.php index 75232a74d42..481d8f1d799 100644 --- a/htdocs/bom/bom_note.php +++ b/htdocs/bom/bom_note.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -42,8 +42,9 @@ $object=new BOM($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->bom->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('bomnote','globalcard')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('bom'); +$extrafields->fetch_name_optionals_label($object->table_element); // Security check - Protection if external user //if ($user->societe_id > 0) access_forbidden(); @@ -103,7 +104,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->bom->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index 89f3e337099..f6b25d0cca7 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; @@ -302,7 +302,7 @@ class Boms extends DolibarrApi private function _validate($data) { $myobject = array(); - foreach ($this->myobject->fields as $field => $propfield) { + foreach ($this->bom->fields as $field => $propfield) { if (in_array($field, array('rowid', 'entity', 'date_creation', 'tms', 'fk_user_creat')) || $propfield['notnull'] != 1) continue; // Not a mandatory field if (!isset($data[$field])) throw new RestException(400, "$field field missing"); diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 7ad86b59ae8..3835baf3b25 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -245,7 +245,7 @@ class BOM extends CommonObject // Clear extrafields that are unique if (is_array($object->array_options) && count($object->array_options) > 0) { - $extrafields->fetch_name_optionals_label($this->element); + $extrafields->fetch_name_optionals_label($object->table_element); foreach($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); diff --git a/htdocs/bom/lib/bom.lib.php b/htdocs/bom/lib/bom.lib.php index 290e29c3f2b..e78ef64b5c7 100644 --- a/htdocs/bom/lib/bom.lib.php +++ b/htdocs/bom/lib/bom.lib.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/bom/tpl/objectline_create.tpl.php b/htdocs/bom/tpl/objectline_create.tpl.php index e266c142480..b574efc81df 100644 --- a/htdocs/bom/tpl/objectline_create.tpl.php +++ b/htdocs/bom/tpl/objectline_create.tpl.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -140,7 +140,7 @@ if ($nolinesbefore) { showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?> diff --git a/htdocs/bom/tpl/objectline_edit.tpl.php b/htdocs/bom/tpl/objectline_edit.tpl.php index 2c099ab89f8..05b9094d10e 100644 --- a/htdocs/bom/tpl/objectline_edit.tpl.php +++ b/htdocs/bom/tpl/objectline_edit.tpl.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -138,7 +138,7 @@ $coldisplay=0; showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $objectline->showOptionals($extrafields, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?> diff --git a/htdocs/bom/tpl/objectline_title.tpl.php b/htdocs/bom/tpl/objectline_title.tpl.php index ffc2426c32f..26010a70eb8 100644 --- a/htdocs/bom/tpl/objectline_title.tpl.php +++ b/htdocs/bom/tpl/objectline_title.tpl.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -81,4 +81,4 @@ print "
    '; if ($user->rights->bookmark->creer) { - print "rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"])."\">".img_edit()." "; + print 'rowid."&backtopage=".urlencode($_SERVER["PHP_SELF"]).'">'.img_edit().""; } if ($user->rights->bookmark->supprimer) { diff --git a/htdocs/cashdesk/admin/cashdesk.php b/htdocs/cashdesk/admin/cashdesk.php index cdba572f96c..22b8fea0a05 100644 --- a/htdocs/cashdesk/admin/cashdesk.php +++ b/htdocs/cashdesk/admin/cashdesk.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/affContenu.php b/htdocs/cashdesk/affContenu.php index 1fe77c439db..2f184350ed4 100644 --- a/htdocs/cashdesk/affContenu.php +++ b/htdocs/cashdesk/affContenu.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/affIndex.php b/htdocs/cashdesk/affIndex.php index 49e5e5d0817..75a492a95e9 100644 --- a/htdocs/cashdesk/affIndex.php +++ b/htdocs/cashdesk/affIndex.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/affPied.php b/htdocs/cashdesk/affPied.php index 8f54dd732a7..87d1fc5176a 100644 --- a/htdocs/cashdesk/affPied.php +++ b/htdocs/cashdesk/affPied.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/class/Auth.class.php b/htdocs/cashdesk/class/Auth.class.php index d33081f8e74..c6e7a90ca30 100644 --- a/htdocs/cashdesk/class/Auth.class.php +++ b/htdocs/cashdesk/class/Auth.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/cashdesk/class/Facturation.class.php b/htdocs/cashdesk/class/Facturation.class.php index 0a84ea371f3..40b338ccca6 100644 --- a/htdocs/cashdesk/class/Facturation.class.php +++ b/htdocs/cashdesk/class/Facturation.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; diff --git a/htdocs/cashdesk/css/style.css b/htdocs/cashdesk/css/style.css index 9d9be27f3ce..b17a63e548e 100644 --- a/htdocs/cashdesk/css/style.css +++ b/htdocs/cashdesk/css/style.css @@ -11,7 +11,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ body { @@ -66,6 +66,10 @@ p { display: none; } +.principal_login td.label1 { + width: 50%; +} + /* ------------------- Menu ------------------- */ .menu_principal { margin: 0; diff --git a/htdocs/cashdesk/deconnexion.php b/htdocs/cashdesk/deconnexion.php index dbdecd1ea1f..c5562028592 100644 --- a/htdocs/cashdesk/deconnexion.php +++ b/htdocs/cashdesk/deconnexion.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/facturation.php b/htdocs/cashdesk/facturation.php index 82f58bd6c6b..f7e7c3af501 100644 --- a/htdocs/cashdesk/facturation.php +++ b/htdocs/cashdesk/facturation.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/facturation_dhtml.php b/htdocs/cashdesk/facturation_dhtml.php index 16500e50990..b853a16759b 100644 --- a/htdocs/cashdesk/facturation_dhtml.php +++ b/htdocs/cashdesk/facturation_dhtml.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/facturation_verif.php b/htdocs/cashdesk/facturation_verif.php index 6dbbdd4f900..a3b411f0417 100644 --- a/htdocs/cashdesk/facturation_verif.php +++ b/htdocs/cashdesk/facturation_verif.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/include/environnement.php b/htdocs/cashdesk/include/environnement.php index e06bd7d3704..6e5f9f7d05b 100644 --- a/htdocs/cashdesk/include/environnement.php +++ b/htdocs/cashdesk/include/environnement.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // This file initializes more variables to already initialized variables with main.inc.php diff --git a/htdocs/cashdesk/include/keypad.php b/htdocs/cashdesk/include/keypad.php index 7560180396a..513e725099d 100644 --- a/htdocs/cashdesk/include/keypad.php +++ b/htdocs/cashdesk/include/keypad.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cashdesk/index.php b/htdocs/cashdesk/index.php index 57dc1cbb394..df424e078fd 100644 --- a/htdocs/cashdesk/index.php +++ b/htdocs/cashdesk/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -134,7 +134,7 @@ print ''; $disabled=0; $langs->load("companies"); if (! empty($conf->global->CASHDESK_ID_THIRDPARTY)) $disabled=1; // If a particular third party is defined, we disable choice -print $form->select_company(GETPOST('socid', 'int')?GETPOST('socid', 'int'):$conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s.client IN (1,3) AND s.status = 1)', !$disabled, $disabled, 1); +print $form->select_company(GETPOST('socid', 'int')?GETPOST('socid', 'int'):$conf->global->CASHDESK_ID_THIRDPARTY, 'socid', '(s.client IN (1,3) AND s.status = 1)', !$disabled, $disabled, 0, array(), 0, 'maxwidth300'); //print ''; print '
    '.$langs->trans("Type").''.$object->type.'
    '.$langs->trans("Type").''.$langs->trans($object->type).'
    '; // With edge and chrom the td overflow is not supported correctly when content is not full text. + print ''; // With edge and chrome the td overflow is not supported correctly when content is not full text. if ($obj->fk_user_action > 0) { $userstatic->fetch($obj->fk_user_action); @@ -630,7 +632,7 @@ if ($resql) // Third party if (! empty($arrayfields['s.nom']['checked'])) { - print ''; + print ''; if ($obj->socid > 0) { $societestatic->id=$obj->socid; @@ -648,12 +650,11 @@ if ($resql) if (! empty($arrayfields['a.fk_contact']['checked'])) { print ''; - $actionstatic->fetchResources(); if(!empty($actionstatic->socpeopleassigned)) { $contactList = array(); - foreach ($actionstatic->socpeopleassigned as $socpeopleId => $socpeopleassigned) + foreach ($actionstatic->socpeopleassigned as $socpeopleassigned) { if(!isset($contactListCache[$socpeopleassigned['id']])) { @@ -661,8 +662,8 @@ if ($resql) $contact = new Contact($db); if($contact->fetch($socpeopleassigned['id'])>0) { - $contactListCache[$socpeopleassigned['id']] = $contact->getNomUrl(1, '', 28); - $contactList[] = $contact->getNomUrl(1, '', 28); + $contactListCache[$socpeopleassigned['id']] = $contact->getNomUrl(1, '', 0); + $contactList[] = $contact->getNomUrl(1, '', 0); } } else{ @@ -684,7 +685,7 @@ if ($resql) $contactstatic->phone_mobile=$obj->phone_mobile; $contactstatic->phone_perso=$obj->phone_perso; $contactstatic->country_id=$obj->country_id; - print $contactstatic->getNomUrl(1, '', 28); + print $contactstatic->getNomUrl(1, '', 0); } else { diff --git a/htdocs/comm/action/pertype.php b/htdocs/comm/action/pertype.php index b52635b80d4..286863c7dc6 100644 --- a/htdocs/comm/action/pertype.php +++ b/htdocs/comm/action/pertype.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/comm/action/peruser.php b/htdocs/comm/action/peruser.php index d4020f4df92..e6ee5e9d1d0 100644 --- a/htdocs/comm/action/peruser.php +++ b/htdocs/comm/action/peruser.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ @@ -109,6 +109,7 @@ if ($dateselect > 0) } $tmp=empty($conf->global->MAIN_DEFAULT_WORKING_HOURS)?'9-18':$conf->global->MAIN_DEFAULT_WORKING_HOURS; +$tmp=str_replace(' ', '', $tmp); // FIX 7533 $tmparray=explode('-', $tmp); $begin_h = GETPOST('begin_h', 'int')!=''?GETPOST('begin_h', 'int'):($tmparray[0] != '' ? $tmparray[0] : 9); $end_h = GETPOST('end_h', 'int')?GETPOST('end_h', 'int'):($tmparray[1] != '' ? $tmparray[1] : 18); @@ -117,6 +118,7 @@ if ($end_h < 1 || $end_h > 24) $end_h = 18; if ($end_h <= $begin_h) $end_h = $begin_h + 1; $tmp=empty($conf->global->MAIN_DEFAULT_WORKING_DAYS)?'1-5':$conf->global->MAIN_DEFAULT_WORKING_DAYS; +$tmp=str_replace(' ', '', $tmp); // FIX 7533 $tmparray=explode('-', $tmp); $begin_d = GETPOST('begin_d', 'int')?GETPOST('begin_d', 'int'):($tmparray[0] != '' ? $tmparray[0] : 1); $end_d = GETPOST('end_d', 'int')?GETPOST('end_d', 'int'):($tmparray[1] != '' ? $tmparray[1] : 5); diff --git a/htdocs/comm/action/rapport/index.php b/htdocs/comm/action/rapport/index.php index 565d12b9c70..5d1b7ba919e 100644 --- a/htdocs/comm/action/rapport/index.php +++ b/htdocs/comm/action/rapport/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/admin/propal_extrafields.php b/htdocs/comm/admin/propal_extrafields.php index f3c429b2cad..a2006ba92a5 100644 --- a/htdocs/comm/admin/propal_extrafields.php +++ b/htdocs/comm/admin/propal_extrafields.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/admin/propaldet_extrafields.php b/htdocs/comm/admin/propaldet_extrafields.php index 990a52c7496..fc53f90ed55 100644 --- a/htdocs/comm/admin/propaldet_extrafields.php +++ b/htdocs/comm/admin/propaldet_extrafields.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php index 285ed03e7c3..3f50c6ab6c8 100644 --- a/htdocs/comm/card.php +++ b/htdocs/comm/card.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -80,12 +80,13 @@ $object = new Client($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('thirdpartycomm','globalcard')); + /* * Actions */ @@ -193,8 +194,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) { @@ -323,7 +323,7 @@ if ($object->id > 0) print ''; + if (($action != 'editconditions') && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('PaymentConditions'); print ''; - if (($action != 'editconditions') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
    '; print '
    '; if ($action == 'editconditions') @@ -342,7 +342,7 @@ if ($object->id > 0) print ''; + if (($action != 'editmode') && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('PaymentMode'); print ''; - if (($action != 'editmode') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; print '
    '; if ($action == 'editmode') @@ -363,7 +363,7 @@ if ($object->id > 0) print ''; + if (($action != 'editbankaccount') && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('PaymentBankAccount'); print ''; - if (($action != 'editbankaccount') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).'
    '; print '
    '; if ($action == 'editbankaccount') @@ -389,7 +389,7 @@ if ($object->id > 0) print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { - print ''.img_edit($langs->trans("Modify")).''; + print ''.img_edit($langs->trans("Modify")).''; } print '
    '; print ''.($object->remise_percent?''.$object->remise_percent.'%':'').''; @@ -456,7 +456,7 @@ if ($object->id > 0) print ''; if ($user->rights->societe->creer) { - print ''.img_edit($langs->trans("Modify")).''; + print ''.img_edit($langs->trans("Modify")).''; } print ''; print ''; @@ -473,7 +473,7 @@ if ($object->id > 0) print ''; + if (($action != 'editshipping') && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('SendingMethod'); print ''; - if (($action != 'editshipping') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; print ''; if ($action == 'editshipping') @@ -541,7 +541,7 @@ if ($object->id > 0) print ''; + if ($action != 'editlevel' && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('ProspectLevel'); print ''; - if ($action != 'editlevel' && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('Modify'), 1).'id.'">'.img_edit($langs->trans('Modify'), 1).'
    '; print ''; if ($action == 'editlevel') diff --git a/htdocs/comm/contact.php b/htdocs/comm/contact.php index 68730bccef1..0e0354a5641 100644 --- a/htdocs/comm/contact.php +++ b/htdocs/comm/contact.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index 15e4e226587..c0d2c4703ca 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -79,7 +79,7 @@ if (! empty($conf->fournisseur->enabled)) $supplierorderstatic=new CommandeFourn llxHeader("", $langs->trans("CommercialArea")); -print load_fiche_titre($langs->trans("CommercialArea"), '', 'title_commercial.png'); +print load_fiche_titre($langs->trans("CommercialArea"), '', 'commercial'); print '
    '; diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index a4bba8f7adc..9544a394508 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/mailing/card.php b/htdocs/comm/mailing/card.php index 88dfcef7d7f..33de68f22a1 100644 --- a/htdocs/comm/mailing/card.php +++ b/htdocs/comm/mailing/card.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -51,7 +51,7 @@ $result=$object->fetch($id); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('mailingcard','globalcard')); @@ -73,7 +73,6 @@ $object->substitutionarrayfortest = $substitutionarray; // List of sending methods $listofmethods=array(); $listofmethods['mail']='PHP mail function'; -//$listofmethods['simplemail']='Simplemail class'; $listofmethods['smtps']='SMTP/SMTPS socket library'; @@ -716,10 +715,10 @@ $htmlother = new FormOther($db); $help_url='EN:Module_EMailing|FR:Module_Mailing|ES:Módulo_Mailing'; llxHeader('', $langs->trans("Mailing"), $help_url, '', 0, 0, array( - '/includes/ace/ace.js', - '/includes/ace/ext-statusbar.js', - '/includes/ace/ext-language_tools.js', - //'/includes/ace/ext-chromevox.js' + '/includes/ace/src/ace.js', + '/includes/ace/src/ext-statusbar.js', + '/includes/ace/src/ext-language_tools.js', + //'/includes/ace/src/ext-chromevox.js' ), array()); if ($action == 'create') @@ -742,7 +741,7 @@ if ($action == 'create') // Print mail form - print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'title_generic'); + print load_fiche_titre($langs->trans("NewMailing"), $availablelink, 'generic'); dol_fiche_head(); @@ -896,17 +895,23 @@ else print ''; // Description - print ''; // From - print ''; // Errors to - print ''; @@ -1117,7 +1122,7 @@ else $htmltext.=''; // Print mail content - print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic'); + print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto(''.$langs->trans("AvailableVariables").'', $htmltext, 1, 'helpclickable', '', 0, 2, 'emailsubstitionhelp'), 'generic'); dol_fiche_head('', '', '', -1); @@ -1262,7 +1267,7 @@ else $htmltext.=''; // Print mail content - print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'title_generic'); + print load_fiche_titre($langs->trans("EMail"), $form->textwithpicto($langs->trans("AvailableVariables"), $htmltext, 1, 'help', '', 0, 2, 'emailsubstitionhelp'), 'generic'); dol_fiche_head(null, '', '', -1); diff --git a/htdocs/comm/mailing/cibles.php b/htdocs/comm/mailing/cibles.php index fb3ce1ece70..1e467331d90 100644 --- a/htdocs/comm/mailing/cibles.php +++ b/htdocs/comm/mailing/cibles.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -250,7 +250,7 @@ if ($object->fetch($id) >= 0) // Show email selectors if ($allowaddtarget && $user->rights->mailing->creer) { - print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'title_generic'); + print load_fiche_titre($langs->trans("ToAddRecipientsChooseHere"), ($user->admin?info_admin($langs->trans("YouCanAddYourOwnPredefindedListHere"), 1):''), 'generic'); //print '
    '.$form->editfieldkey("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').''; + print '
    '; + print $form->editfieldkey("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print ''; print $form->editfieldval("MailTitle", 'titre', $object->titre, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); print '
    '.$form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').''; + print '
    '; + print $form->editfieldkey("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print ''; print $form->editfieldval("MailFrom", 'email_from', $object->email_from, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); print '
    '.$form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string').''; + print '
    '; + print $form->editfieldkey("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); + print ''; print $form->editfieldval("MailErrorsTo", 'email_errorsto', $object->email_errorsto, $object, $user->rights->mailing->creer && $object->statut < 3, 'string'); print '
    '; print '
    '; @@ -453,7 +453,7 @@ if ($object->fetch($id) >= 0) if ($allowaddtarget) { $cleartext=$langs->trans("ToClearAllRecipientsClickHere").' '.'id.'" class="button reposition">'.$langs->trans("TargetsReset").''; } - print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'title_generic', 0, '', '', $limit); + print_barre_liste($langs->trans("MailSelectedRecipients"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $cleartext, $num, $nbtotalofrecords, 'generic', 0, '', '', $limit); print ''; diff --git a/htdocs/comm/mailing/class/advtargetemailing.class.php b/htdocs/comm/mailing/class/advtargetemailing.class.php index ed04192d0e9..7346bf87543 100644 --- a/htdocs/comm/mailing/class/advtargetemailing.class.php +++ b/htdocs/comm/mailing/class/advtargetemailing.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** @@ -544,7 +544,7 @@ class AdvanceTargetingMailing extends CommonObject public function query_thirdparty($arrayquery) { // phpcs:enable - global $langs,$conf; + global $langs,$conf,$extrafields; $sql = "SELECT"; $sql.= " t.rowid"; @@ -617,29 +617,29 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { - // fetch optionals attributes and labels - dol_include_once('/core/class/extrafields.class.php'); - $extrafields = new ExtraFields($this->db); - $extralabels=$extrafields->fetch_name_optionals_label('societe'); - foreach($extralabels as $key=>$val) { + $elementtype = Societe::$table_element; - if (($extrafields->attribute_type[$key] == 'varchar') || - ($extrafields->attribute_type[$key] == 'text')) { + $extrafields->fetch_name_optionals_label($elementtype); + + foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { + + if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key])) { $sqlwhere[]= " (te.".$key." LIKE '".$arrayquery['options_'.$key]."')"; } - } elseif (($extrafields->attribute_type[$key] == 'int') || - ($extrafields->attribute_type[$key] == 'double')) { + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { if (!empty($arrayquery['options_'.$key.'_max'])) { $sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'].")"; } - } elseif (($extrafields->attribute_type[$key] == 'date') || - ($extrafields->attribute_type[$key] == 'datetime')) { + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'])){ $sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')"; } - } elseif ($extrafields->attribute_type[$key] == 'boolean') { + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key].")"; } @@ -757,29 +757,33 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { + $elementtype = Contact::$table_element; + // fetch optionals attributes and labels dol_include_once('/core/class/extrafields.class.php'); $extrafields = new ExtraFields($this->db); - $extralabels=$extrafields->fetch_name_optionals_label('socpeople'); + $extrafields->fetch_name_optionals_label($elementtype); - foreach($extralabels as $key=>$val) { + $extrafields->fetch_name_optionals_label($elementtype); - if (($extrafields->attribute_type[$key] == 'varchar') || - ($extrafields->attribute_type[$key] == 'text')) { + foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { + + if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key.'_cnct'])) { $sqlwhere[]= " (te.".$key." LIKE '".$arrayquery['options_'.$key.'_cnct']."')"; } - } elseif (($extrafields->attribute_type[$key] == 'int') || - ($extrafields->attribute_type[$key] == 'double')) { + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { if (!empty($arrayquery['options_'.$key.'_max'.'_cnct'])) { $sqlwhere[]= " (te.".$key." >= ".$arrayquery['options_'.$key.'_max'.'_cnct']." AND te.".$key." <= ".$arrayquery['options_'.$key.'_min'.'_cnct'].")"; } - } elseif (($extrafields->attribute_type[$key] == 'date') || - ($extrafields->attribute_type[$key] == 'datetime')) { + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'.'_cnct'])){ $sqlwhere[]= " (te.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'.'_cnct'])."' AND te.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'.'_cnct'])."')"; } - } elseif ($extrafields->attribute_type[$key] == 'boolean') { + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key.'_cnct']!=''){ if ($arrayquery['options_'.$key.'_cnct']==0) { $sqlwhere[]= " (te.".$key." = ".$arrayquery['options_'.$key.'_cnct']." OR ((te.".$key." IS NULL) AND (te.fk_object IS NOT NULL)))"; @@ -857,29 +861,32 @@ class AdvanceTargetingMailing extends CommonObject //Standard Extrafield feature if (empty($conf->global->MAIN_EXTRAFIELDS_DISABLED)) { + $elementtype = Societe::$table_element; + // fetch optionals attributes and labels dol_include_once('/core/class/extrafields.class.php'); $extrafields = new ExtraFields($this->db); - $extralabels=$extrafields->fetch_name_optionals_label('societe'); - foreach($extralabels as $key=>$val) { + $extrafields->fetch_name_optionals_label($elementtype); - if (($extrafields->attribute_type[$key] == 'varchar') || - ($extrafields->attribute_type[$key] == 'text')) { + foreach($extrafields->attributes[$elementtype]['label'] as $key=>$val) { + + if (($extrafields->attributes[$elementtype]['type'][$key] == 'varchar') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'text')) { if (!empty($arrayquery['options_'.$key])) { $sqlwhere[]= " (tse.".$key." LIKE '".$arrayquery['options_'.$key]."')"; } - } elseif (($extrafields->attribute_type[$key] == 'int') || - ($extrafields->attribute_type[$key] == 'double')) { + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'int') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'double')) { if (!empty($arrayquery['options_'.$key.'_max'])) { $sqlwhere[]= " (tse.".$key." >= ".$arrayquery['options_'.$key.'_max']." AND tse.".$key." <= ".$arrayquery['options_'.$key.'_min'].")"; } - } elseif (($extrafields->attribute_type[$key] == 'date') || - ($extrafields->attribute_type[$key] == 'datetime')) { + } elseif (($extrafields->attributes[$elementtype]['type'][$key] == 'date') || + ($extrafields->attributes[$elementtype]['type'][$key] == 'datetime')) { if (!empty($arrayquery['options_'.$key.'_end_dt'])){ $sqlwhere[]= " (tse.".$key." >= '".$this->db->idate($arrayquery['options_'.$key.'_st_dt'])."' AND tse.".$key." <= '".$this->db->idate($arrayquery['options_'.$key.'_end_dt'])."')"; } - } elseif ($extrafields->attribute_type[$key] == 'boolean') { + } elseif ($extrafields->attributes[$elementtype]['type'][$key] == 'boolean') { if ($arrayquery['options_'.$key]!=''){ $sqlwhere[]= " (tse.".$key." = ".$arrayquery['options_'.$key].")"; } diff --git a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php index 9048d5a46e2..55b7177eb73 100644 --- a/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php +++ b/htdocs/comm/mailing/class/html.formadvtargetemailing.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index a454ac80488..f688808d10e 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index a835ca241a3..d6ade738e3e 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/mailing/info.php b/htdocs/comm/mailing/info.php index 5097b310363..0dbc6fc07ab 100644 --- a/htdocs/comm/mailing/info.php +++ b/htdocs/comm/mailing/info.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index da74efaaf98..ff69bd00c0c 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -53,7 +53,8 @@ $hookmanager->initHooks(array('mailinglist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('mailing'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -172,7 +173,7 @@ if ($result) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'title_generic.png', 0, $newcardbutton); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorder, '', $num, '', 'generic', 0, $newcardbutton); $moreforfilter = ''; diff --git a/htdocs/comm/multiprix.php b/htdocs/comm/multiprix.php index 8a5226d36d2..a176f758d7a 100644 --- a/htdocs/comm/multiprix.php +++ b/htdocs/comm/multiprix.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index 5b9bf0f9eab..92267d97033 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -25,7 +25,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ @@ -93,7 +93,7 @@ $object = new Propal($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) { @@ -410,7 +410,7 @@ if (empty($reshook)) } // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) { $error ++; $action = 'create'; @@ -841,9 +841,8 @@ if (empty($reshook)) if (empty($remise_percent)) $remise_percent=0; // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -1210,9 +1209,8 @@ if (empty($reshook)) $date_end = dol_mktime(GETPOST('date_endhour'), GETPOST('date_endmin'), GETPOST('date_endsec'), GETPOST('date_endmonth'), GETPOST('date_endday'), GETPOST('date_endyear')); // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -1379,8 +1377,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) { @@ -1598,7 +1595,7 @@ if ($action == 'create') if ($socid > 0) { - // Contacts (ask contact only if thirdparty already defined). TODO do this also into order and invoice. + // Contacts (ask contact only if thirdparty already defined). print "
    '; @@ -1903,7 +1900,7 @@ if ($action == 'create') { require_once DOL_DOCUMENT_ROOT . '/core/class/notify.class.php'; $notify = new Notify($db); -$formquestion = array_merge($formquestion, array( + $formquestion = array_merge($formquestion, array( array('type' => 'onecolumn', 'value' => $notify->confirmMessage('PROPAL_CLOSE_SIGNED', $object->socid, $object)), )); } @@ -1983,7 +1980,7 @@ $formquestion = array_merge($formquestion, array( if ($usercancreate) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; @@ -2049,7 +2046,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('Date'); print ''; if ($action != 'editdate' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print ''; + print ''; print '
    " . $langs->trans("DefaultContact") . ''; $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist); print '
    id . '">' . img_edit($langs->trans('SetDate'), 1) . 'id . '">' . img_edit($langs->trans('SetDate'), 1) . '
    '; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdate' && $usercancreate) { @@ -2075,7 +2072,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('DateEndPropal'); print ''; if ($action != 'editecheance' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetConditions'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editecheance' && $usercancreate) { @@ -2103,7 +2100,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('PaymentConditionsShort'); print ''; if ($action != 'editconditions' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetConditions'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editconditions' && $usercancreate) { @@ -2131,7 +2128,7 @@ $formquestion = array_merge($formquestion, array( print ' (' . $langs->trans('AfterOrder') . ')'; print ''; if ($action != 'editavailability' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetAvailability'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editavailability' && $usercancreate) { @@ -2150,7 +2147,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('SendingMethod'); print ''; if ($action != 'editshippingmethod' && $usercancreate) - print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).''; print ''; print ''; if ($action == 'editshippingmethod' && $usercancreate) { @@ -2168,7 +2165,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('Source'); print ''; if ($action != 'editdemandreason' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetDemandReason'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editdemandreason' && $usercancreate) { @@ -2186,7 +2183,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('PaymentMode'); print ''; if ($action != 'editmode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMode'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmode' && $usercancreate) { @@ -2206,7 +2203,7 @@ $formquestion = array_merge($formquestion, array( print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print ''; if ($action != 'editmulticurrencycode' && $object->statut == Propal::STATUS_DRAFT && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && $action == 'editmulticurrencycode' && $usercancreate) { @@ -2223,7 +2220,7 @@ $formquestion = array_merge($formquestion, array( print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print ''; if ($action != 'editmulticurrencyrate' && $object->statut == Propal::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency && $usercancreate) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if ($object->statut == Propal::STATUS_DRAFT && ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') && $usercancreate) { @@ -2263,7 +2260,7 @@ $formquestion = array_merge($formquestion, array( print $langs->trans('BankAccount'); print ''; if ($action != 'editbankaccount' && $usercancreate) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).''; print ''; print ''; if ($action == 'editbankaccount') { @@ -2298,7 +2295,7 @@ $formquestion = array_merge($formquestion, array( print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($usercancreate) print ''.img_edit().''; + if ($usercancreate) print ''.img_edit().''; else print ' '; print '
    '; print ''; @@ -2496,7 +2493,7 @@ $formquestion = array_merge($formquestion, array( } // Send - if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED) { + if ($object->statut == Propal::STATUS_VALIDATED || $object->statut == Propal::STATUS_SIGNED || !empty($conf->global->PROPOSAL_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print ''; } else diff --git a/htdocs/comm/propal/class/api_proposals.class.php b/htdocs/comm/propal/class/api_proposals.class.php index 15badcd75a3..7afb14a8da2 100644 --- a/htdocs/comm/propal/class/api_proposals.class.php +++ b/htdocs/comm/propal/class/api_proposals.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index 49173eff5fd..e9d969e5ab8 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -27,7 +27,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -172,6 +172,7 @@ class Propal extends CommonObject /** * @var int ID + * @deprecated */ public $fk_address; @@ -1124,7 +1125,7 @@ class Propal extends CommonObject } // Set delivery address - if (! $error && $this->fk_delivery_address) + /*if (! $error && $this->fk_delivery_address) { $sql = "UPDATE ".MAIN_DB_PREFIX."propal"; $sql.= " SET fk_delivery_address = ".$this->fk_delivery_address; @@ -1132,7 +1133,7 @@ class Propal extends CommonObject $sql.= " AND entity = ".setEntity($this); $result=$this->db->query($sql); - } + }*/ if (! $error) { diff --git a/htdocs/comm/propal/class/propalestats.class.php b/htdocs/comm/propal/class/propalestats.class.php index a2cd1112e40..bd0f57bc801 100644 --- a/htdocs/comm/propal/class/propalestats.class.php +++ b/htdocs/comm/propal/class/propalestats.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/propal/contact.php b/htdocs/comm/propal/contact.php index 813b91cca0a..96673084580 100644 --- a/htdocs/comm/propal/contact.php +++ b/htdocs/comm/propal/contact.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -171,7 +171,7 @@ if ($object->id > 0) if ($user->rights->propal->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/comm/propal/document.php b/htdocs/comm/propal/document.php index 4c464db4693..14b845a3e8a 100644 --- a/htdocs/comm/propal/document.php +++ b/htdocs/comm/propal/document.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -122,7 +122,7 @@ if ($object->id > 0) if ($user->rights->propal->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 309712ae76b..321cb719f63 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -58,7 +58,7 @@ $help_url="EN:Module_Commercial_Proposals|FR:Module_Propositions_commerciales|ES llxHeader("", $langs->trans("ProspectionArea"), $help_url); -print load_fiche_titre($langs->trans("ProspectionArea")); +print load_fiche_titre($langs->trans("ProspectionArea"), '', 'commercial'); //print ''; //print '\n"; if (! $i) $totalarray['nbfield']++; } @@ -1087,7 +1087,7 @@ if ($resql) print ''; if (! $i) $totalarray['nbfield']++; } - // Date cloture + // Date cloture if (! empty($arrayfields['p.date_cloture']['checked'])) { print ''; // Ligne info remises tiers @@ -2096,7 +2095,7 @@ if ($action == 'create' && $usercancreate) if ($usercancreate) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; @@ -2542,7 +2541,7 @@ if ($action == 'create' && $usercancreate) $reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); if (empty($reshook)) { // Send - if ($object->statut > Commande::STATUS_DRAFT) { + if ($object->statut > Commande::STATUS_DRAFT || !empty($conf->global->COMMANDE_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($usercansend) { print ''; } else diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 56147545f36..fb044b1fafa 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; @@ -312,7 +312,7 @@ class Orders extends DolibarrApi * * @url PUT {id}/lines/{lineid} * - * @return object + * @return array|bool */ public function putLine($id, $lineid, $request_data = null) { diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 02ea14142fc..16d9dcdc3d8 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -23,7 +23,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -1266,7 +1266,7 @@ class Commande extends CommonOrder $object->fetch_optionals($object->id); $e = new ExtraFields($this->db); - $element_extrafields = $e->fetch_name_optionals_label($this->element); + $element_extrafields = $e->fetch_name_optionals_label($this->table_element); foreach($object->array_options as $options_key => $value) { if(array_key_exists(str_replace('options_', '', $options_key), $element_extrafields)){ diff --git a/htdocs/commande/class/commandestats.class.php b/htdocs/commande/class/commandestats.class.php index b1ef33c4bbb..10276e34c0e 100644 --- a/htdocs/commande/class/commandestats.class.php +++ b/htdocs/commande/class/commandestats.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/commande/contact.php b/htdocs/commande/contact.php index f95b9fcf40a..82d24ad3646 100644 --- a/htdocs/commande/contact.php +++ b/htdocs/commande/contact.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -165,7 +165,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/commande/customer.php b/htdocs/commande/customer.php index 3fa3f90774f..2f275adadb9 100644 --- a/htdocs/commande/customer.php +++ b/htdocs/commande/customer.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/commande/document.php b/htdocs/commande/document.php index ec6ed2fd91b..4d784e299fb 100644 --- a/htdocs/commande/document.php +++ b/htdocs/commande/document.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -124,7 +124,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/commande/index.php b/htdocs/commande/index.php index 160b6f70627..33630de2acd 100644 --- a/htdocs/commande/index.php +++ b/htdocs/commande/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -62,7 +62,8 @@ $help_url="EN:Module_Customers_Orders|FR:Module_Commandes_Clients|ES:Módulo_Ped llxHeader("", $langs->trans("Orders"), $help_url); -print load_fiche_titre($langs->trans("OrdersArea")); + +print load_fiche_titre($langs->trans("OrdersArea"), '', 'commercial'); print '
    '; diff --git a/htdocs/commande/info.php b/htdocs/commande/info.php index 683932e3ef7..f42a9fc5b60 100644 --- a/htdocs/commande/info.php +++ b/htdocs/commande/info.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -85,7 +85,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index 59922a02c01..39844ce390f 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -24,7 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -111,7 +111,7 @@ $hookmanager->initHooks(array('orderlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('commande'); +$extrafields->fetch_name_optionals_label('commande'); $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -255,7 +255,8 @@ $sql.= ' c.date_creation as date_creation, c.tms as date_update, c.date_cloture $sql.= " p.rowid as project_id, p.ref as project_ref, p.title as project_label"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; // Add fields from extrafields -foreach ($extrafields->attribute_label as $key => $val) $sql.=($extrafields->attribute_type[$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); +if (! empty($extrafields->attributes[$object->table_element]['label'])) + foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) $sql.=($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? ", ef.".$key.' as options_'.$key : ''); // Add fields from hooks $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook @@ -464,7 +465,7 @@ if ($resql) print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendOrderRef"; $modelmail="order_send"; @@ -759,7 +760,7 @@ if ($resql) if (! empty($arrayfields['c.datec']['checked'])) print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.date_creation", "", $param, '', $sortfield, $sortorder, 'center nowrap '); if (! empty($arrayfields['c.tms']['checked'])) print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap '); if (! empty($arrayfields['c.date_cloture']['checked'])) print_liste_field_titre($arrayfields['c.date_cloture']['label'], $_SERVER["PHP_SELF"], "c.date_cloture", "", $param, '', $sortfield, $sortorder, 'center nowrap '); - if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); + if (! empty($arrayfields['c.fk_statut']['checked'])) print_liste_field_titre($arrayfields['c.fk_statut']['label'], $_SERVER["PHP_SELF"], "c.fk_statut", "", $param, '', $sortfield, $sortorder, 'right '); if (! empty($arrayfields['c.facture']['checked'])) print_liste_field_titre($arrayfields['c.facture']['label'], $_SERVER["PHP_SELF"], 'c.facture', '', $param, '', $sortfield, $sortorder, 'center '); print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', $param, '', $sortfield, $sortorder, 'maxwidthsearch center '); print ''."\n"; @@ -792,7 +793,7 @@ if ($resql) $generic_commande->id=$obj->rowid; $generic_commande->ref=$obj->ref; $generic_commande->statut = $obj->fk_statut; - $generic_commande->date_commande = $db->jdate($obj->date_commande); + $generic_commande->date = $db->jdate($obj->date_commande); $generic_commande->date_livraison = $db->jdate($obj->date_delivery); $generic_commande->ref_client = $obj->ref_client; $generic_commande->total_ht = $obj->total_ht; diff --git a/htdocs/commande/note.php b/htdocs/commande/note.php index 4fb7a060feb..0931067f155 100644 --- a/htdocs/commande/note.php +++ b/htdocs/commande/note.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -98,7 +98,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/commande/orderstoinvoice.php b/htdocs/commande/orderstoinvoice.php index fa983e46f8e..fae23fa8bcd 100644 --- a/htdocs/commande/orderstoinvoice.php +++ b/htdocs/commande/orderstoinvoice.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -72,8 +72,10 @@ $date_endy = dol_mktime(23, 59, 59, $_REQUEST["date_end_delymonth"], $_REQUEST[" $extrafields = new ExtraFields($db); +$object=new Facture($db); + // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label('facture'); +$extrafields->fetch_name_optionals_label($object->table_element); if ($action == 'create') { @@ -141,7 +143,6 @@ if (($action == 'create' || $action == 'add') && !$error) $result = restrictedArea($user, 'facture', $id, '', '', 'fk_soc', $fieldid); $usehm=$conf->global->MAIN_USE_HOURMIN_IN_DATE_RANGE; - $object=new Facture($db); // Insert new invoice in database if ($action == 'add' && $user->rights->facture->creer) @@ -177,7 +178,7 @@ if (($action == 'create' || $action == 'add') && !$error) $object->remise_absolue = $_POST['remise_absolue']; $object->remise_percent = $_POST['remise_percent']; - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if ($_POST['origin'] && $_POST['originid']) diff --git a/htdocs/commande/stats/index.php b/htdocs/commande/stats/index.php index 1d2936263b8..696823f4e41 100644 --- a/htdocs/commande/stats/index.php +++ b/htdocs/commande/stats/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -79,7 +79,7 @@ if ($mode == 'supplier') llxHeader('', $title); -print load_fiche_titre($title, '', 'title_commercial.png'); +print load_fiche_titre($title, '', 'commercial'); dol_mkdir($dir); diff --git a/htdocs/commande/tpl/linkedobjectblock.tpl.php b/htdocs/commande/tpl/linkedobjectblock.tpl.php index c2fed2895a8..03c03378f40 100644 --- a/htdocs/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/commande/tpl/linkedobjectblock.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/compta/accounting-files.php b/htdocs/compta/accounting-files.php index ee6d0d71fc0..17ea98e1eef 100644 --- a/htdocs/compta/accounting-files.php +++ b/htdocs/compta/accounting-files.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** * \file htdocs/compta/accounting-files.php diff --git a/htdocs/compta/ajaxpayment.php b/htdocs/compta/ajaxpayment.php index 82f97913ce5..19d33b0afaf 100644 --- a/htdocs/compta/ajaxpayment.php +++ b/htdocs/compta/ajaxpayment.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/annuel.php b/htdocs/compta/bank/annuel.php index 6643a9f97fb..7dede991eca 100644 --- a/htdocs/compta/bank/annuel.php +++ b/htdocs/compta/bank/annuel.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index da8b110abd2..cd964c7f4f4 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -137,7 +137,7 @@ $hookmanager->initHooks(array('banktransactionlist', $contextpage)); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('banktransaction'); +$extrafields->fetch_name_optionals_label('banktransaction'); $search_array_options=$extrafields->getOptionalsFromPost('banktransaction', '', 'search_'); $arrayfields=array( @@ -481,7 +481,7 @@ $sql.= " FROM "; if ($search_bid>0) $sql.= MAIN_DB_PREFIX."bank_class as l,"; $sql.= " ".MAIN_DB_PREFIX."bank_account as ba,"; $sql.= " ".MAIN_DB_PREFIX."bank as b"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_extrafields as ef on (b.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_url as bu ON bu.fk_bank = b.rowid AND type = 'company'"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON bu.url_id = s.rowid"; $sql.= " WHERE b.fk_account = ba.rowid"; @@ -603,7 +603,7 @@ if ($resql) print $langs->trans("EventualyAddCategory").': '; print Form::selectarray('cat', $options, GETPOST('cat'), 1); } - print '
    '.$langs->trans("ThenCheckLinesAndConciliate").' '; + print '
    '.$langs->trans("ThenCheckLinesAndConciliate").' '; print ''; print ' '.$langs->trans("or").' '; print ''; @@ -909,7 +909,7 @@ if ($resql) } if (! empty($arrayfields['balance']['checked'])) { - print '
    '; diff --git a/htdocs/compta/bank/bilan.php b/htdocs/compta/bank/bilan.php index 99856a2dea2..28607ecca26 100644 --- a/htdocs/compta/bank/bilan.php +++ b/htdocs/compta/bank/bilan.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/budget.php b/htdocs/compta/bank/budget.php index 8b1cba4d574..41275ec2a40 100644 --- a/htdocs/compta/bank/budget.php +++ b/htdocs/compta/bank/budget.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 883018b259b..fd5a2b42723 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -57,8 +57,9 @@ $result=restrictedArea($user, 'banque', $id, 'bank_account&bank_account', '', '' $object = new Account($db); $extrafields = new ExtraFields($db); + // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('bankcard','globalcard')); @@ -136,7 +137,7 @@ if ($action == 'add') } // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if (! $error) { @@ -241,7 +242,7 @@ if ($action == 'update') if (! $error) { // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); } if (! $error) @@ -433,7 +434,7 @@ if ($action == 'create') print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'edit'); } print '
    '; diff --git a/htdocs/comm/propal/info.php b/htdocs/comm/propal/info.php index 30943babaa1..108a09e7d07 100644 --- a/htdocs/comm/propal/info.php +++ b/htdocs/comm/propal/info.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -87,7 +87,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->propal->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index 768ea188174..919ad77168d 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -25,7 +25,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -129,7 +129,8 @@ $hookmanager->initHooks(array('propallist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('propal'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -461,7 +462,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendPropalRef"; $modelmail="proposal_send"; @@ -1012,9 +1013,8 @@ if ($resql) // Author if (! empty($arrayfields['u.login']['checked'])) { - print ''; + print ''; if ($userstatic->id) print $userstatic->getLoginUrl(1); - else print ' '; print "'; diff --git a/htdocs/comm/propal/note.php b/htdocs/comm/propal/note.php index 6e815d3de5e..2a3f0438ad0 100644 --- a/htdocs/comm/propal/note.php +++ b/htdocs/comm/propal/note.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -102,7 +102,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->propal->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ''; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/comm/propal/stats/index.php b/htdocs/comm/propal/stats/index.php index 13b7b5fa2d2..1d81b553f7a 100644 --- a/htdocs/comm/propal/stats/index.php +++ b/htdocs/comm/propal/stats/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -80,7 +80,7 @@ if ($mode == 'supplier') llxHeader('', $title); -print load_fiche_titre($title, '', 'title_commercial.png'); +print load_fiche_titre($title, '', 'commercial'); dol_mkdir($dir); diff --git a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php index 910772d87ca..4cc8768cafe 100644 --- a/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php +++ b/htdocs/comm/propal/tpl/linkedobjectblock.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/prospect/index.php b/htdocs/comm/prospect/index.php index e110dc05b1d..c07bf53007b 100644 --- a/htdocs/comm/prospect/index.php +++ b/htdocs/comm/prospect/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/prospect/recap-prospect.php b/htdocs/comm/prospect/recap-prospect.php index 93cfada8860..c1339f7ebe9 100644 --- a/htdocs/comm/prospect/recap-prospect.php +++ b/htdocs/comm/prospect/recap-prospect.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/recap-client.php b/htdocs/comm/recap-client.php index 86c1bad0521..7f16ce6b8b0 100644 --- a/htdocs/comm/recap-client.php +++ b/htdocs/comm/recap-client.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/remise.php b/htdocs/comm/remise.php index a2d373f339a..a704a4be173 100644 --- a/htdocs/comm/remise.php +++ b/htdocs/comm/remise.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index bd143b551ae..002eb7288e2 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index c7db3c560af..968607ed660 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -25,7 +25,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -70,6 +70,7 @@ $action = GETPOST('action', 'alpha'); $cancel = GETPOST('cancel', 'alpha'); $confirm = GETPOST('confirm', 'alpha'); $lineid = GETPOST('lineid', 'int'); +$contactid = GETPOST('contactid', 'int'); $projectid = GETPOST('projectid', 'int'); $origin = GETPOST('origin', 'alpha'); $originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility @@ -88,7 +89,7 @@ $object = new Commande($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -284,7 +285,7 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form if (! $error) { - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; } @@ -673,9 +674,8 @@ if (empty($reshook)) $remise_percent = (GETPOST('remise_percent'.$predef) != '' ? GETPOST('remise_percent'.$predef) : 0); // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -1037,9 +1037,8 @@ if (empty($reshook)) $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value // Extrafields Lines - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); // Unset extrafield POST Data if (is_array($extralabelsline)) { foreach ($extralabelsline as $key => $value) { @@ -1297,8 +1296,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -1485,7 +1483,7 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } // Mode creation if ($action == 'create' && $usercancreate) { - print load_fiche_titre($langs->trans('CreateOrder'), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans('CreateOrder'), '', 'commercial'); $soc = new Societe($db); if ($socid > 0) @@ -1649,8 +1647,9 @@ if ($action == 'create' && $usercancreate) // Contact of order if ($socid > 0) { + // Contacts (ask contact only if thirdparty already defined). print "
    " . $langs->trans("DefaultContact") . ''; - $form->select_contacts($soc->id, $setcontact, 'contactid', 1, $srccontactslist, '', 1); + $form->select_contacts($soc->id, $contactid, 'contactid', 1, $srccontactslist, '', 1); print '
    '; + print ''; $htmltext=$langs->trans("BalanceVisibilityDependsOnSortAndFilters", $langs->transnoentitiesnoconv("DateValue")); print $form->textwithpicto('', $htmltext, 1); print '
    '; diff --git a/htdocs/compta/bank/categ.php b/htdocs/compta/bank/categ.php index f525a7b7d88..c4b127d02c9 100644 --- a/htdocs/compta/bank/categ.php +++ b/htdocs/compta/bank/categ.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -142,7 +142,8 @@ if ($result) print "".$objp->label.""; print ''; print ''.img_edit().'  '; - print ''.img_delete().''; + print ''.img_delete().''; + print ''; } print ""; $i++; diff --git a/htdocs/compta/bank/class/account.class.php b/htdocs/compta/bank/class/account.class.php index 02b8e01d3bf..4e72c6312e6 100644 --- a/htdocs/compta/bank/class/account.class.php +++ b/htdocs/compta/bank/class/account.class.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/class/api_bankaccounts.class.php b/htdocs/compta/bank/class/api_bankaccounts.class.php index ba21b6c09c1..57aa50f1568 100644 --- a/htdocs/compta/bank/class/api_bankaccounts.class.php +++ b/htdocs/compta/bank/class/api_bankaccounts.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/compta/bank/class/bankcateg.class.php b/htdocs/compta/bank/class/bankcateg.class.php index cb74bf54ca8..92e16211ce0 100644 --- a/htdocs/compta/bank/class/bankcateg.class.php +++ b/htdocs/compta/bank/class/bankcateg.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/class/paymentvarious.class.php b/htdocs/compta/bank/class/paymentvarious.class.php index cc43f9cf830..ed94c8e4700 100644 --- a/htdocs/compta/bank/class/paymentvarious.class.php +++ b/htdocs/compta/bank/class/paymentvarious.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/document.php b/htdocs/compta/bank/document.php index 5b887f0bd8e..0d517a43fec 100644 --- a/htdocs/compta/bank/document.php +++ b/htdocs/compta/bank/document.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/graph.php b/htdocs/compta/bank/graph.php index cdd346c889f..4ad0fe0e261 100644 --- a/htdocs/compta/bank/graph.php +++ b/htdocs/compta/bank/graph.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/info.php b/htdocs/compta/bank/info.php index ce9f2f5c2dc..0ed5b4ff003 100644 --- a/htdocs/compta/bank/info.php +++ b/htdocs/compta/bank/info.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/line.php b/htdocs/compta/bank/line.php index 3345fe6ee3e..389cde747af 100644 --- a/htdocs/compta/bank/line.php +++ b/htdocs/compta/bank/line.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/list.php b/htdocs/compta/bank/list.php index 5968505c540..843b3b0e323 100644 --- a/htdocs/compta/bank/list.php +++ b/htdocs/compta/bank/list.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -73,7 +73,7 @@ $hookmanager->initHooks(array('bankaccountlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('bank_account'); +$extrafields->fetch_name_optionals_label('bank_account'); $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -150,7 +150,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."bank_account as b"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account_extrafields as ef on (b.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (b.rowid = ef.fk_object)"; $sql.= " WHERE b.entity IN (".getEntity('bank_account').")"; if ($search_status == 'opened') $sql.= " AND clos = 0"; if ($search_status == 'closed') $sql.= " AND clos = 1"; @@ -242,7 +242,7 @@ print ''; print ''; print ''; -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_bank.png', 0, $newcardbutton, '', $limit, 1); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'bank', 0, $newcardbutton, '', $limit, 1); $topicmail="Information"; //$modelmail="subscription"; diff --git a/htdocs/compta/bank/releve.php b/htdocs/compta/bank/releve.php index 16b71dddc8f..ae01b761b1b 100644 --- a/htdocs/compta/bank/releve.php +++ b/htdocs/compta/bank/releve.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -182,169 +182,6 @@ if ($action == 'confirm_editbankreceipt' && ! empty($oldbankreceipt) && ! empty( $action='view'; } -// ZIP creation -if ($action=="dl" && $numref > 0) -{ - // TODO Replace this with a standard builddoc action that use a document generation module to build the ZIP - $log = ''; - - $outdir = $conf->bank->dir_temp.'/'.$numref.'-'.$object->label; - $outdirinvoices = $outdir.'/'.$langs->trans("BillsCustomers"); - $outdirsupplierinvoices = $outdir.'/'.$langs->trans("BillsSuppliers"); - - dol_mkdir($outdir); - dol_mkdir($outdirinvoices); - dol_mkdir($outdirsupplierinvoices); - - //$zipname = $object->label.'-'.$numref . '.zip'; - //$zip = new ZipArchive(); - //$zip->open($zipname, ZipArchive::OVERWRITE); - - $sql = $sqlrequestforbankline; - - $facturestatic=new Facture($db); - - $resd = $db->query($sql); - if ($resd) { - $numd = $db->num_rows($resd); - $i = 0; - if ($numd > 0) - { - $objd = $db->fetch_object($resd); - - $log.='Transaction '.$objd->rowid; - $links = $object->get_url($objd->rowid); - - foreach($links as $key=>$val) - { - $link = ''; $upload_dir = ''; - - switch ($val['type']) { - case "payment": - $payment = new Paiement($db); - $payment->fetch($val['url_id']); - $arraybill = $payment->getBillsArray(); - if (is_array($arraybill) && count($arraybill) > 0) - { - foreach ($arraybill as $billid) - { - $facturestatic->fetch($billid); - $subdir = get_exdir($facturestatic->id, 2, 0, 0, $facturestatic, 'invoice'); - - $arrayofinclusion=array(); // TODO Find a way to get doc ODT or other - // TODO Use get_exdir - $arrayofinclusion[]=preg_quote($facturestatic->ref.'.pdf', '/'); - $listoffiles = dol_dir_list($conf->facture->dir_output.$subdir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); - // build list of files with full path - $files = array(); - foreach($listoffiles as $filefound) - { - if (strstr($filefound["name"], $facturestatic->ref)) - { - $files[] = $uploaddir.'/'.$facturestatic->ref.'/'.$filefound["name"]; - break; - } - } - /*var_dump($files);*/ - //var_dump($listoffiles); - foreach($listoffiles as $key => $srcfileobj) - { - $srcfile = $srcfileobj['fullname']; - $destfile = $outdirinvoices.'/'.$srcfileobj['name']; - //var_dump($srcfile.' - '.$destfile); - dol_copy($srcfile, $destfile); - } - } - } - break; - case "payment_supplier": - $payment = new PaiementFourn($db); - $payment->fetch($val['url_id']); - $arraybill = $payment->getBillsArray(); - if (is_array($arraybill) && count($arraybill) > 0) - { - foreach ($arraybill as $billid) - { - $facturestatic->fetch($billid); - $subdir = get_exdir($facturestatic->id, 2, 0, 0, $facturestatic, 'invoice_supplier'); - - $arrayofinclusion=array(); // TODO Find a way to get doc ODT or other - // TODO Use get_exdir - $arrayofinclusion[]=preg_quote($facturestatic->ref.'.pdf', '/'); - $listoffiles = dol_dir_list($conf->fournisseur->facture->dir_output.$subdir, 'all', 1, implode('|', $arrayofinclusion), '\.meta$|\.png', 'date', SORT_DESC, 0, true); - // build list of files with full path - $files = array(); - foreach($listoffiles as $filefound) - { - if (strstr($filefound["name"], $facturestatic->ref)) - { - $files[] = $uploaddir.'/'.$facturestatic->ref.'/'.$filefound["name"]; - break; - } - } - /*var_dump($files);*/ - //var_dump($listoffiles); - foreach($listoffiles as $key => $srcfileobj) - { - $srcfile = $srcfileobj['fullname']; - $destfile = $outdirinvoices.'/'.$srcfileobj['name']; - //var_dump($srcfile.' - '.$destfile); - dol_copy($srcfile, $destfile); - } - } - } - break; - case "payment_expensereport": - /*$subdir = dol_sanitizeFileName($objd->refe); - $upload_dir = $conf->expensereport->dir_output . '/' . $subdir;*/ - break; - case "payment_salary": - /*$subdir = dol_sanitizeFileName($objd->ids); - $upload_dir = $conf->salaries->dir_output . '/' . $subdir;*/ - break; - case "payment_donation": - /*$subdir = get_exdir(null, 2, 0, 1, $objd, 'donation') . '/' . dol_sanitizeFileName($objd->idd); - $upload_dir = $conf->don->dir_output . '/' . $subdir;*/ - break; - default: - break; - } - } - $log.="\n"; - - /*if (! empty($upload_dir)) - { - $files = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', '', SORT_ASC, 1); - - if (is_array($files)) { - foreach ($files as $file) { - $zip->addFile($file["fullname"], $file["name"]); // - $log .= $key . ',' . $file["name"] . "\n"; - } - } else { - $log .= $key . ',' . $langs->trans("Nofile") . "\n"; - } - - }*/ - } - } - - $db->free($resd); - - - //$zip->addFromString('log '.$numref.'.csv', $log); - //$zip->close(); - - // /Then download the zipped file. - /*header('Content-Type: application/zip'); - header('Content-disposition: attachment; filename=' . $zipname); - header('Content-Length: ' . filesize($zipname)); - - readfile($zipname); - - exit;*/ -} - /* * View @@ -431,6 +268,7 @@ if (empty($numref)) print ''; print ''; print ''; + print ''; print ''; print ''; @@ -498,7 +336,7 @@ if (empty($numref)) print ''; @@ -801,16 +639,10 @@ else print '"; print "\n"; print "
    '; if ($user->rights->banque->consolidate && $action != 'editbankreceipt') { - print 'numr.'">'.img_edit().''; + print 'numr.'">'.img_edit().''; } print ''.price(price2num($total, 'MT'))." 
    "; + print "
    "; print "\n"; - - // Add a download button - if ($conf->global->MAIN_FEATURES_LEVEL >= 2) // Started a rewrite to make this feature more Dolibarr compliant. Still need dev to be completed. - { - // TODO Replace this with standard box to generate document. - print ''.$langs->trans('DownloadPackageWithAllDocuments')." \n"; - } } // End of page diff --git a/htdocs/compta/bank/transfer.php b/htdocs/compta/bank/transfer.php index 05c1f3a1515..ad21fe07df4 100644 --- a/htdocs/compta/bank/transfer.php +++ b/htdocs/compta/bank/transfer.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/treso.php b/htdocs/compta/bank/treso.php index ac4c9c767e8..eeea2b72ce5 100644 --- a/htdocs/compta/bank/treso.php +++ b/htdocs/compta/bank/treso.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/bank/various_payment/card.php b/htdocs/compta/bank/various_payment/card.php index aac8f603054..9260ee3f1f9 100644 --- a/htdocs/compta/bank/various_payment/card.php +++ b/htdocs/compta/bank/various_payment/card.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -263,7 +263,7 @@ if ($action == 'create') print ''; print ''; - print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'title_accountancy.png'); + print load_fiche_titre($langs->trans("NewVariousPayment"), '', 'invoicing'); dol_fiche_head('', ''); @@ -428,7 +428,7 @@ if ($id) if ($user->rights->banque->modifier) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.='
    '; diff --git a/htdocs/compta/bank/various_payment/document.php b/htdocs/compta/bank/various_payment/document.php index 3d37b7e7de6..a196540d484 100644 --- a/htdocs/compta/bank/various_payment/document.php +++ b/htdocs/compta/bank/various_payment/document.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -93,7 +93,7 @@ if ($object->id) if ($user->rights->banque->modifier && 0) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/compta/bank/various_payment/info.php b/htdocs/compta/bank/various_payment/info.php index 33fd53b602b..4cc64bb830e 100644 --- a/htdocs/compta/bank/various_payment/info.php +++ b/htdocs/compta/bank/various_payment/info.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -62,7 +62,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->banque->modifier && 0) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/compta/bank/various_payment/list.php b/htdocs/compta/bank/various_payment/list.php index c9aba472dd8..6c15c40ecaa 100644 --- a/htdocs/compta/bank/various_payment/list.php +++ b/htdocs/compta/bank/various_payment/list.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -172,7 +172,7 @@ if ($result) print ''; print ''; - print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'title_accountancy.png', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("VariousPayments"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'invoicing', 0, $newcardbutton, '', $limit); print '
    '; print ''."\n"; diff --git a/htdocs/compta/cashcontrol/cashcontrol_card.php b/htdocs/compta/cashcontrol/cashcontrol_card.php index 3e433b460f1..aef5c0573f9 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_card.php +++ b/htdocs/compta/cashcontrol/cashcontrol_card.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -72,7 +72,7 @@ $object= new CashControl($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('cashcontrolcard','globalcard')); @@ -315,7 +315,7 @@ if ($action=="create" || $action=="start") } } - print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'title_bank.png'); + print load_fiche_titre($langs->trans("CashControl")." - ".$langs->trans("New"), '', 'cash-register'); print ''; if ($action == 'start' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '' && GETPOST('posnumber', 'int') != '-1') diff --git a/htdocs/compta/cashcontrol/cashcontrol_list.php b/htdocs/compta/cashcontrol/cashcontrol_list.php index d18a8c38cfe..6b767bc3949 100644 --- a/htdocs/compta/cashcontrol/cashcontrol_list.php +++ b/htdocs/compta/cashcontrol/cashcontrol_list.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -78,8 +78,10 @@ $object=new CashControl($db); $extrafields = new ExtraFields($db); $diroutputmassaction=$conf->monmodule->dir_output . '/temp/massgeneration/'.$user->id; $hookmanager->initHooks(array('cashcontrol')); // Note that conf->hooks_modules contains array + // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('cashcontrol'); // Load $extrafields->attributes['cashcontrol'] +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // Default sort order (if not yet defined by previous GETPOST) @@ -342,7 +344,7 @@ $newcardbutton.= ''; $newcardbutton.= ''; //} -print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_companies', 0, $newcardbutton, '', $limit); +print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'cash-register', 0, $newcardbutton, '', $limit); // Add code for pre mass action (confirmation or email presend form) $topicmail="SendCashControlRef"; diff --git a/htdocs/compta/cashcontrol/class/cashcontrol.class.php b/htdocs/compta/cashcontrol/class/cashcontrol.class.php index 8bacf61cd82..87db81bf98d 100644 --- a/htdocs/compta/cashcontrol/class/cashcontrol.class.php +++ b/htdocs/compta/cashcontrol/class/cashcontrol.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/cashcontrol/report.php b/htdocs/compta/cashcontrol/report.php index ce0cdeed9fb..8af3495afc8 100644 --- a/htdocs/compta/cashcontrol/report.php +++ b/htdocs/compta/cashcontrol/report.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/charges/index.php b/htdocs/compta/charges/index.php index 38a5f88842a..01cda8871b5 100644 --- a/htdocs/compta/charges/index.php +++ b/htdocs/compta/charges/index.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/clients.php b/htdocs/compta/clients.php index 58631937955..b7652587826 100644 --- a/htdocs/compta/clients.php +++ b/htdocs/compta/clients.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/card.php b/htdocs/compta/deplacement/card.php index 9602216b955..adb5a74425c 100644 --- a/htdocs/compta/deplacement/card.php +++ b/htdocs/compta/deplacement/card.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 243c4b5d110..de32cb9c3eb 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/class/deplacementstats.class.php b/htdocs/compta/deplacement/class/deplacementstats.class.php index c3092e9d1c3..1dfc983c38b 100644 --- a/htdocs/compta/deplacement/class/deplacementstats.class.php +++ b/htdocs/compta/deplacement/class/deplacementstats.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/document.php b/htdocs/compta/deplacement/document.php index 8cba95e283b..3f2faa267ea 100644 --- a/htdocs/compta/deplacement/document.php +++ b/htdocs/compta/deplacement/document.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/index.php b/htdocs/compta/deplacement/index.php index b861e567419..0208f9da89f 100644 --- a/htdocs/compta/deplacement/index.php +++ b/htdocs/compta/deplacement/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/info.php b/htdocs/compta/deplacement/info.php index cc1a518bb81..a0accd11a87 100644 --- a/htdocs/compta/deplacement/info.php +++ b/htdocs/compta/deplacement/info.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/list.php b/htdocs/compta/deplacement/list.php index 58a8fd32ef5..9b5b2b7d9c9 100644 --- a/htdocs/compta/deplacement/list.php +++ b/htdocs/compta/deplacement/list.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/deplacement/stats/index.php b/htdocs/compta/deplacement/stats/index.php index 830a1bc7e4c..54e1cd1524e 100644 --- a/htdocs/compta/deplacement/stats/index.php +++ b/htdocs/compta/deplacement/stats/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/compta/facture/admin/facture_cust_extrafields.php b/htdocs/compta/facture/admin/facture_cust_extrafields.php index 214856de547..127e38a0ddf 100644 --- a/htdocs/compta/facture/admin/facture_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_cust_extrafields.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php index 1a9ef352220..b8fb7ade572 100644 --- a/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facture_rec_cust_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php index 31ed3b263c7..07115733efb 100644 --- a/htdocs/compta/facture/admin/facturedet_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_cust_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php index e2d12384870..cd73063e1e6 100644 --- a/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php +++ b/htdocs/compta/facture/admin/facturedet_rec_cust_extrafields.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . +* along with this program. If not, see . */ /** diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index f08202c1efd..9467cebde59 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -27,7 +27,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -902,8 +902,7 @@ if (empty($reshook)) $error = 0; $originentity = GETPOST('originentity'); // Fill array 'array_options' with data from add form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; // Replacement invoice @@ -1679,8 +1678,8 @@ if (empty($reshook)) $nextSituationInvoice = new Facture($db); $nextSituationInvoice->fetch($id); // create extrafields with data from create form - $extralabels = $extrafields->fetch_name_optionals_label($nextSituationInvoice->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $nextSituationInvoice); + $extrafields->fetch_name_optionals_label($nextSituationInvoice->table_element); + $ret = $extrafields->setOptionalsFromPost(null, $nextSituationInvoice); if ($ret > 0) { $nextSituationInvoice->insertExtraFields(); } @@ -1752,9 +1751,8 @@ if (empty($reshook)) $remise_percent = GETPOST('remise_percent' . $predef); // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -2075,9 +2073,8 @@ if (empty($reshook)) $buyingprice = price2num(GETPOST('buying_price') != '' ? GETPOST('buying_price') : ''); // If buying_price is '0', we muste keep this value // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -2496,8 +2493,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -2585,9 +2581,9 @@ llxHeader('', $title, $helpurl); if ($action == 'create') { $facturestatic = new Facture($db); - $extralabels = $extrafields->fetch_name_optionals_label($facturestatic->table_element); + $extrafields->fetch_name_optionals_label($facturestatic->table_element); - print load_fiche_titre($langs->trans('NewBill')); + print load_fiche_titre($langs->trans('NewBill'), '', 'invoicing'); $soc = new Societe($db); if ($socid > 0) @@ -3050,7 +3046,7 @@ if ($action == 'create') print '
    '; $tmp='global->INVOICE_CREDIT_NOTE_STANDALONE)) $tmp.=' disabled'; $tmp.= '> '; // Show credit note options only if we checked credit note print ' - \ No newline at end of file + diff --git a/htdocs/core/tpl/ajax/fileupload_view.tpl.php b/htdocs/core/tpl/ajax/fileupload_view.tpl.php index 12ef47abc18..2e6a699bee7 100644 --- a/htdocs/core/tpl/ajax/fileupload_view.tpl.php +++ b/htdocs/core/tpl/ajax/fileupload_view.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -138,4 +138,4 @@ if (empty($conf) || ! is_object($conf)) {% } %}
    - \ No newline at end of file + diff --git a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php b/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php index db37eca22ce..a56ca00e702 100644 --- a/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php +++ b/htdocs/core/tpl/ajax/objectlinked_lineimport.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -35,13 +35,13 @@ if($object->element == 'propal') $(document).ready(function(){ $('.objectlinked_importbtn').click(function (e) { - + e.preventDefault(); var page = $(this).attr("href"); var fromelement = $(this).attr("data-element"); var fromelementid = $(this).attr("data-id"); - + if( page != undefined && fromelement != undefined && fromelementid != undefined) { var windowWidth = $(window).width()*0.8; //retrieve current window width @@ -52,13 +52,13 @@ $(document).ready(function(){ htmlLines = $(data).find('#tablelines') ; }); - + var $dialog = $('') .load( page + " #tablelines", function() { $("#" + formId + " #tablelines").prop("id", "ajaxloaded_tablelines"); // change id attribute - $("#" + formId + " .linecheckbox,#" + formId + " .linecheckboxtoggle").prop("checked", true); // checked by default + $("#" + formId + " .linecheckbox,#" + formId + " .linecheckboxtoggle").prop("checked", true); // checked by default // reload checkbox toggle function $("#" + formId + " .linecheckboxtoggle").click(function(){ @@ -88,17 +88,17 @@ $(document).ready(function(){ } } }); - + $dialog.dialog('open'); } else { $.jnotify("trans('ErrorNoUrl'); ?>", "error", true); } - + }); - + }); @@ -109,4 +109,4 @@ $(document).ready(function(){ cursor:pointer; } - \ No newline at end of file + diff --git a/htdocs/core/tpl/ajaxrow.tpl.php b/htdocs/core/tpl/ajaxrow.tpl.php index 0b92df1e519..ad382ec7f1a 100644 --- a/htdocs/core/tpl/ajaxrow.tpl.php +++ b/htdocs/core/tpl/ajaxrow.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Javascript code to activate drag and drop on lines * You can use this if you want to be able to drag and drop rows of a table. @@ -108,4 +108,4 @@ $(document).ready(function(){ }); - \ No newline at end of file + diff --git a/htdocs/core/tpl/bloc_showhide.tpl.php b/htdocs/core/tpl/bloc_showhide.tpl.php index 8a45ab3fc37..929ef7ea6ff 100644 --- a/htdocs/core/tpl/bloc_showhide.tpl.php +++ b/htdocs/core/tpl/bloc_showhide.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/core/tpl/card_presend.tpl.php b/htdocs/core/tpl/card_presend.tpl.php index 06b2a8414c0..1a9a046bf81 100644 --- a/htdocs/core/tpl/card_presend.tpl.php +++ b/htdocs/core/tpl/card_presend.tpl.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /* diff --git a/htdocs/core/tpl/commonfields_add.tpl.php b/htdocs/core/tpl/commonfields_add.tpl.php index c9043a60a6b..ffc18853af7 100644 --- a/htdocs/core/tpl/commonfields_add.tpl.php +++ b/htdocs/core/tpl/commonfields_add.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) diff --git a/htdocs/core/tpl/commonfields_edit.tpl.php b/htdocs/core/tpl/commonfields_edit.tpl.php index 9e7f2b47ffc..e023354952a 100644 --- a/htdocs/core/tpl/commonfields_edit.tpl.php +++ b/htdocs/core/tpl/commonfields_edit.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -62,4 +62,4 @@ foreach($object->fields as $key => $val) } ?> - \ No newline at end of file + diff --git a/htdocs/core/tpl/commonfields_view.tpl.php b/htdocs/core/tpl/commonfields_view.tpl.php index 49b234c651c..dc247816dd2 100644 --- a/htdocs/core/tpl/commonfields_view.tpl.php +++ b/htdocs/core/tpl/commonfields_view.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -104,4 +104,4 @@ foreach($object->fields as $key => $val) } ?> - \ No newline at end of file + diff --git a/htdocs/core/tpl/contacts.tpl.php b/htdocs/core/tpl/contacts.tpl.php index 0f9b733d010..eb93e41827d 100644 --- a/htdocs/core/tpl/contacts.tpl.php +++ b/htdocs/core/tpl/contacts.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * This template needs: * $object diff --git a/htdocs/core/tpl/document_actions_post_headers.tpl.php b/htdocs/core/tpl/document_actions_post_headers.tpl.php index 782385106db..4392d817a66 100644 --- a/htdocs/core/tpl/document_actions_post_headers.tpl.php +++ b/htdocs/core/tpl/document_actions_post_headers.tpl.php @@ -14,8 +14,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ // Following var can be set diff --git a/htdocs/core/tpl/error.tpl.php b/htdocs/core/tpl/error.tpl.php index 6e120851b98..ad2a1cf5cfb 100644 --- a/htdocs/core/tpl/error.tpl.php +++ b/htdocs/core/tpl/error.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ ?> @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/htdocs/core/tpl/extrafields_add.tpl.php b/htdocs/core/tpl/extrafields_add.tpl.php index f4f74d35428..29652f09b88 100644 --- a/htdocs/core/tpl/extrafields_add.tpl.php +++ b/htdocs/core/tpl/extrafields_add.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -41,8 +41,9 @@ $parameters = array(); $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit'); + $params = isset($tpl_context) ? array('tpl_context' => $tpl_context) : array(); // BUG #11554 : Add tpl_context in params + print $object->showOptionals($extrafields, 'edit', $params); // BUG #11554 : Add context in params } ?> - \ No newline at end of file + diff --git a/htdocs/core/tpl/extrafields_edit.tpl.php b/htdocs/core/tpl/extrafields_edit.tpl.php index c6d0cf61043..adca8b50fab 100644 --- a/htdocs/core/tpl/extrafields_edit.tpl.php +++ b/htdocs/core/tpl/extrafields_edit.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -45,4 +45,4 @@ if (empty($reshook)) { } ?> - \ No newline at end of file + diff --git a/htdocs/core/tpl/extrafields_list_search_input.tpl.php b/htdocs/core/tpl/extrafields_list_search_input.tpl.php index 0b9a048f28a..9ee4bd9ce37 100644 --- a/htdocs/core/tpl/extrafields_list_search_input.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_input.tpl.php @@ -41,7 +41,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ { // for the type as 'checkbox', 'chkbxlst', 'sellist' we should use code instead of id (example: I declare a 'chkbxlst' to have a link with dictionnairy, I have to extend it with the 'code' instead 'rowid') $morecss=''; - if ($typeofextrafield == 'sellist') $morecss='maxwidth200'; + if (in_array($typeofextrafield, array('link', 'sellist'))) $morecss='maxwidth200'; echo $extrafields->showInputField($key, $search_array_options[$search_options_pattern.$tmpkey], '', '', $search_options_pattern, $morecss, 0, $extrafieldsobjectkey, 1); } print ''; diff --git a/htdocs/core/tpl/extrafields_list_search_title.tpl.php b/htdocs/core/tpl/extrafields_list_search_title.tpl.php index 5772f3fc989..e8b1e396f1a 100644 --- a/htdocs/core/tpl/extrafields_list_search_title.tpl.php +++ b/htdocs/core/tpl/extrafields_list_search_title.tpl.php @@ -24,7 +24,7 @@ if (! empty($extrafieldsobjectkey)) // $extrafieldsobject is the $object->table_ $sortonfield = $extrafieldsobjectprefix.$key; if (! empty($extrafields->attributes[$extrafieldsobjectkey]['computed'][$key])) $sortonfield=''; if ($extrafields->attributes[$extrafieldsobjectkey]['type'][$key] == 'separate') print '
    '; - else print getTitleFieldOfList($langs->trans($extralabels[$key]), 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'" data-titlekey="'.$key.'"':'data-titlekey="'.$key.'"'), $sortfield, $sortorder)."\n"; + else print getTitleFieldOfList($extrafields->attributes[$extrafieldsobjectkey]['label'][$key], 0, $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'" data-titlekey="'.$key.'"':'data-titlekey="'.$key.'"'), $sortfield, $sortorder)."\n"; } } } diff --git a/htdocs/core/tpl/extrafields_view.tpl.php b/htdocs/core/tpl/extrafields_view.tpl.php index ac54c531b69..6f52cbcab7a 100644 --- a/htdocs/core/tpl/extrafields_view.tpl.php +++ b/htdocs/core/tpl/extrafields_view.tpl.php @@ -13,9 +13,9 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * - * Need to have following variables defined: + * Show extrafields. It also show fields from hook formObjectOptions. Need to have following variables defined: * $object (invoice, order, ...) * $action * $conf @@ -24,6 +24,7 @@ * $parameters * $cols */ + // Protection to avoid direct call of template if (empty($object) || ! is_object($object)) { @@ -109,7 +110,7 @@ if (empty($reshook) && is_array($extrafields->attributes[$object->table_element] { print ''; print ''; diff --git a/htdocs/core/tpl/filemanager.tpl.php b/htdocs/core/tpl/filemanager.tpl.php index a178f6400b8..9494b414b92 100644 --- a/htdocs/core/tpl/filemanager.tpl.php +++ b/htdocs/core/tpl/filemanager.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Output code for the filemanager * $module must be defined ('ecm', 'medias', ...) diff --git a/htdocs/core/tpl/footer.tpl.php b/htdocs/core/tpl/footer.tpl.php index 6e120851b98..ad2a1cf5cfb 100644 --- a/htdocs/core/tpl/footer.tpl.php +++ b/htdocs/core/tpl/footer.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ ?> @@ -21,4 +21,4 @@ - \ No newline at end of file + diff --git a/htdocs/core/tpl/header.tpl.php b/htdocs/core/tpl/header.tpl.php index 63f64441f4c..32668c7919a 100644 --- a/htdocs/core/tpl/header.tpl.php +++ b/htdocs/core/tpl/header.tpl.php @@ -12,13 +12,13 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ ?> - + - \ No newline at end of file + diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php index 764f056ad15..2a0fe46dfdd 100644 --- a/htdocs/core/tpl/login.tpl.php +++ b/htdocs/core/tpl/login.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Need global variable $title to be defined by caller (like dol_loginfunction) diff --git a/htdocs/core/tpl/massactions_pre.tpl.php b/htdocs/core/tpl/massactions_pre.tpl.php index 6537c4d9105..a0c627ac049 100644 --- a/htdocs/core/tpl/massactions_pre.tpl.php +++ b/htdocs/core/tpl/massactions_pre.tpl.php @@ -14,8 +14,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ // Following var must be set: diff --git a/htdocs/core/tpl/notes.tpl.php b/htdocs/core/tpl/notes.tpl.php index 7cf5f6ba5df..14c65c9cbf1 100644 --- a/htdocs/core/tpl/notes.tpl.php +++ b/htdocs/core/tpl/notes.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/core/tpl/object_discounts.tpl.php b/htdocs/core/tpl/object_discounts.tpl.php index 221ac012ec4..31b592817fa 100644 --- a/htdocs/core/tpl/object_discounts.tpl.php +++ b/htdocs/core/tpl/object_discounts.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Needs the following variables defined: * $object Proposal, order, invoice (including supplier versions) diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index 1f0897f7e98..7f860586909 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -63,7 +63,7 @@ if (in_array($object->element, array('propal','commande','order','facture','fact // Lines for extrafield $objectline = null; -if (!empty($extrafieldsline)) +if (!empty($extrafields)) { if ($this->table_element_line=='commandedet') { $objectline = new OrderLine($this->db); @@ -475,7 +475,7 @@ if ($nolinesbefore) { showOptionals($extrafieldsline, 'edit', array('style'=>$bcnd[$var], 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $objectline->showOptionals($extrafields, 'edit', array('colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } if ((! empty($conf->service->enabled) || ($object->element == 'contrat')) && $dateSelector && GETPOST('type') != '0') // We show date field if required @@ -677,7 +677,7 @@ jQuery(document).ready(function() { jQuery('#trlinefordates').show(); global->MAIN_EDIT_PREDEF_PRICEHT)) + if (empty($conf->global->MAIN_DISABLE_EDIT_PREDEF_PRICEHT)) { ?> // get the HT price for the product and display it @@ -850,12 +850,16 @@ function setforpredef() { console.log("Call setforpredef. We hide some fields and show dates"); jQuery("#select_type").val(-1); jQuery("#prod_entry_mode_free").prop('checked',false).change(); - jQuery("#prod_entry_mode_predef").prop('checked',true).change( - global->MAIN_EDIT_PREDEF_PRICEHT)) { ?> + jQuery("#prod_entry_mode_predef").prop('checked',true).change(); + global->MAIN_DISABLE_EDIT_PREDEF_PRICEHT)) { ?> + jQuery("#price_ht").val('').show(); + jQuery("#multicurrency_price_ht").val('').show(); + jQuery("#price_ht").val('').hide(); + jQuery("#multicurrency_price_ht").val('').hide(); - jQuery("#price_ht").val('') - jQuery("#price_ht, #multicurrency_price_ht, #price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide(); + jQuery("#price_ht").val(''); + jQuery("#price_ttc, #fourn_ref, #tva_tx, #title_vat, #title_up_ht, #title_up_ht_currency, #title_up_ttc, #title_up_ttc_currency").hide(); jQuery("#np_marginRate, #np_markRate, .np_marginRate, .np_markRate, #units, #title_units").hide(); jQuery("#buying_price").show(); jQuery('#trlinefordates, .divlinefordates').show(); diff --git a/htdocs/core/tpl/objectline_edit.tpl.php b/htdocs/core/tpl/objectline_edit.tpl.php index 82eb44c3b9b..d734fd7c38c 100644 --- a/htdocs/core/tpl/objectline_edit.tpl.php +++ b/htdocs/core/tpl/objectline_edit.tpl.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -259,9 +259,9 @@ $coldisplay=0; showOptionals($extrafieldsline, 'edit', array('class'=>'tredited', 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $line->showOptionals($extrafields, 'edit', array('class'=>'tredited', 'colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?> diff --git a/htdocs/core/tpl/objectline_title.tpl.php b/htdocs/core/tpl/objectline_title.tpl.php index fd848764721..4acc2a874f4 100644 --- a/htdocs/core/tpl/objectline_title.tpl.php +++ b/htdocs/core/tpl/objectline_title.tpl.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -128,4 +128,4 @@ print "\n"; print "\n"; ?> - \ No newline at end of file + diff --git a/htdocs/core/tpl/objectline_view.tpl.php b/htdocs/core/tpl/objectline_view.tpl.php index 988df55b61c..f2bfd52e781 100644 --- a/htdocs/core/tpl/objectline_view.tpl.php +++ b/htdocs/core/tpl/objectline_view.tpl.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Need to have following variables defined: * $object (invoice, order, ...) @@ -163,7 +163,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; print (! empty($line->description) && $line->description!=$line->product_label)?'
    '.dol_htmlentitiesbr($line->description):''; } } - + if ($user->rights->fournisseur->lire && $line->fk_fournprice > 0) { require_once DOL_DOCUMENT_ROOT.'/fourn/class/fournisseur.product.class.php'; @@ -359,7 +359,7 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; + if ($action == 'selectlines') { ?>
    @@ -367,9 +367,9 @@ $domData .= ' data-product_type="'.$line->product_type.'"'; showOptionals($extrafieldsline, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); + print $line->showOptionals($extrafields, 'view', array('style'=>'class="drag drop oddeven"','colspan'=>$coldisplay), '', '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } ?> diff --git a/htdocs/core/tpl/onlinepaymentlinks.tpl.php b/htdocs/core/tpl/onlinepaymentlinks.tpl.php index 990368d8738..c06772d8bca 100644 --- a/htdocs/core/tpl/onlinepaymentlinks.tpl.php +++ b/htdocs/core/tpl/onlinepaymentlinks.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -28,12 +28,12 @@ print ''; // Url list print ''.$langs->trans("FollowingUrlAreAvailableToMakePayments").':

    '; -print img_picto('', 'object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount", $servicename).':
    '; +print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnFreeAmount", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'free')."

    \n"; if (! empty($conf->commande->enabled)) { print '
    '; - print img_picto('', 'object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder", $servicename).':
    '; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnOrder", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'order')."
    \n"; if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { @@ -56,7 +56,7 @@ if (! empty($conf->commande->enabled)) if (! empty($conf->facture->enabled)) { print '
    '; - print img_picto('', 'object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).':
    '; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnInvoice", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'invoice')."
    \n"; if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { @@ -79,7 +79,7 @@ if (! empty($conf->facture->enabled)) if (! empty($conf->contrat->enabled)) { print '
    '; - print img_picto('', 'object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':
    '; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnContractLine", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'contractline')."
    \n"; if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { @@ -102,7 +102,7 @@ if (! empty($conf->contrat->enabled)) if (! empty($conf->adherent->enabled)) { print '
    '; - print img_picto('', 'object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).':
    '; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnMemberSubscription", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'membersubscription')."
    \n"; if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { @@ -125,7 +125,7 @@ if (! empty($conf->adherent->enabled)) if (! empty($conf->don->enabled)) { print '
    '; - print img_picto('', 'object_globe.png').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':
    '; + print img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForOnlinePaymentOnDonation", $servicename).':
    '; print ''.getOnlinePaymentUrl(1, 'donation')."
    \n"; if (! empty($conf->global->PAYMENT_SECURITY_TOKEN) && ! empty($conf->global->PAYMENT_SECURITY_TOKEN_UNIQUE)) { diff --git a/htdocs/core/tpl/originproductline.tpl.php b/htdocs/core/tpl/originproductline.tpl.php index e29ea678282..2fd33c25cc5 100644 --- a/htdocs/core/tpl/originproductline.tpl.php +++ b/htdocs/core/tpl/originproductline.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/core/tpl/passwordforgotten.tpl.php b/htdocs/core/tpl/passwordforgotten.tpl.php index f1e61100389..1f64b8fbee4 100644 --- a/htdocs/core/tpl/passwordforgotten.tpl.php +++ b/htdocs/core/tpl/passwordforgotten.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/core/triggers/dolibarrtriggers.class.php b/htdocs/core/triggers/dolibarrtriggers.class.php index 235f36acc21..8f863c1c3b2 100644 --- a/htdocs/core/triggers/dolibarrtriggers.class.php +++ b/htdocs/core/triggers/dolibarrtriggers.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_20_all_Logevents.class.php b/htdocs/core/triggers/interface_20_all_Logevents.class.php index 92d93eef10f..6be5e3904ab 100644 --- a/htdocs/core/triggers/interface_20_all_Logevents.class.php +++ b/htdocs/core/triggers/interface_20_all_Logevents.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php index 5fe00b80346..f9d33495764 100644 --- a/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php +++ b/htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php index 0c26718f529..5676bb82cfb 100644 --- a/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php +++ b/htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php index 3f4b81a5457..aa9f358bb92 100644 --- a/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php +++ b/htdocs/core/triggers/interface_50_modBlockedlog_ActionsBlockedLog.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php index daa5ae9a525..ec6d23e2f01 100644 --- a/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modLdap_Ldapsynchro.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php index 6a595cbb77a..8079b9c3fa7 100644 --- a/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php +++ b/htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php index ec195030448..f467040a00d 100644 --- a/htdocs/core/triggers/interface_50_modNotification_Notification.class.php +++ b/htdocs/core/triggers/interface_50_modNotification_Notification.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index f43b64bf54c..75343c84f3f 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php index fb400ecb7be..7fb208b49ad 100644 --- a/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php +++ b/htdocs/core/triggers/interface_80_modStripe_Stripe.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php new file mode 100644 index 00000000000..13eb44d4eee --- /dev/null +++ b/htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php @@ -0,0 +1,112 @@ + + * Copyright (C) 2009-2017 Regis Houssin + * Copyright (C) 2011-2014 Juanjo Menent + * Copyright (C) 2013 Cedric GROSS + * Copyright (C) 2014 Marcos García + * Copyright (C) 2015 Bahfir Abbes + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php + * \ingroup agenda + * \brief Trigger file for agenda module + */ + +require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; + + +/** + * Class of triggered functions for agenda module + */ +class InterfaceContactRoles extends DolibarrTriggers +{ + public $family = 'agenda'; + public $description = "Triggers of this module add actions in agenda according to setup made in agenda setup."; + + /** + * Version of the trigger + * @var string + */ + public $version = self::VERSION_DOLIBARR; + + /** + * @var string Image of the trigger + */ + public $picto = 'action'; + + /** + * Function called when a Dolibarrr business event is done. + * All functions "runTrigger" are triggered if file is inside directory htdocs/core/triggers or htdocs/module/code/triggers (and declared) + * + * Following properties may be set before calling trigger. The may be completed by this trigger to be used for writing the event into database: + * $object->socid or $object->fk_soc(id of thirdparty) + * $object->element (element type of object) + * + * @param string $action Event action code + * @param Object $object Object + * @param User $user Object user + * @param Translate $langs Object langs + * @param conf $conf Object conf + * @return int <0 if KO, 0 if no triggered ran, >0 if OK + */ + public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) + { + + if ($action === 'PROPAL_CREATE' || $action === 'ORDER_CREATE' || $action === 'BILL_CREATE' || $action === 'ORDER_SUPPLIER_CREATE' || $action === 'BILL_SUPPLIER_CREATE' + || $action === 'CONTRACT_CREATE' || $action === 'FICHINTER_CREATE' || $action === 'PROJECT_CREATE' || $action === 'TICKET_CREATE' || $action === 'ACTION_CREATE') { + + dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id); + + $socid=(property_exists($object, 'socid')?$object->socid:$object->fk_soc); + + if (! empty($socid) && $socid > 0) { + global $db, $langs; + require_once DOL_DOCUMENT_ROOT.'/contact/class/contact.class.php'; + $contactdefault = new Contact($this->db); + $contactdefault->socid=$socid; + $TContact = $contactdefault->getContactRoles($object->element); + + $TContactAlreadyLinked = array(); + if ($object->id > 0) + { + $class = get_class($object); + $cloneFrom = new $class($db); + $r = $cloneFrom->fetch($object->id); + + if (!empty($cloneFrom->id)) $TContactAlreadyLinked = array_merge($cloneFrom->liste_contact(-1, 'external'), $cloneFrom->liste_contact(-1, 'internal')); + } + + foreach($TContact as $i => $infos) { + foreach ($TContactAlreadyLinked as $contactData) { + if($contactData['id'] == $infos['fk_socpeople'] && $contactData['fk_c_type_contact'] == $infos['type_contact']) unset($TContact[$i]); + } + } + + $nb = 0; + foreach($TContact as $infos) { + $res = $object->add_contact($infos['fk_socpeople'], $infos['type_contact']); + if($res > 0) $nb++; + } + + if($nb > 0) { + setEventMessages($langs->trans('ContactAddedAutomatically', $nb), null, 'mesgs'); + } + } + } + return 0; + } +} diff --git a/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php b/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php new file mode 100644 index 00000000000..d32b188d029 --- /dev/null +++ b/htdocs/core/triggers/interface_99_modZapier_ZapierTriggers.class.php @@ -0,0 +1,531 @@ + + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file core/triggers/interface_99_modZapier_ZapierTriggers.class.php + * \ingroup zapier + * \brief Example trigger. + * + * + * \remarks You can create other triggers by copying this one. + * - File name should be either: + * - interface_99_modZapier_MyTrigger.class.php + * - interface_99_all_MyTrigger.class.php + * - The file must stay in core/triggers + * - The class name must be InterfaceMytrigger + * - The constructor method must be named InterfaceMytrigger + * - The name property name must be MyTrigger + */ + +require_once DOL_DOCUMENT_ROOT.'/core/triggers/dolibarrtriggers.class.php'; + + +/** + * Class of triggers for Zapier module + */ +class InterfaceZapierTriggers extends DolibarrTriggers +{ + /** + * @var DoliDB Database handler + */ + protected $db; + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + + $this->name = preg_replace('/^Interface/i', '', get_class($this)); + $this->family = "technic"; + $this->description = "Zapier triggers."; + // 'development', 'experimental', 'dolibarr' or version + $this->version = 'development'; + $this->picto = 'zapier'; + } + + /** + * Trigger name + * + * @return string Name of trigger file + */ + public function getName() + { + return $this->name; + } + + /** + * Trigger description + * + * @return string Description of trigger file + */ + public function getDesc() + { + return $this->description; + } + + + /** + * Function called when a Dolibarrr business event is done. + * All functions "runTrigger" are triggered if file + * is inside directory core/triggers + * + * @param string $action Event action code + * @param CommonObject $object Object + * @param User $user Object user + * @param Translate $langs Object langs + * @param Conf $conf Object conf + * @return int <0 if KO, 0 if no triggered ran, >0 if OK + */ + public function runTrigger($action, $object, User $user, Translate $langs, Conf $conf) + { + global $db; + if (empty($conf->zapier->enabled)) { + // Module not active, we do nothing + return 0; + } + $logtriggeraction = false; + $sql = ''; + if ($action!='') { + $actions = explode('_', $action); + $sql = 'SELECT rowid, url FROM '.MAIN_DB_PREFIX.'zapier_hook'; + $sql .= ' WHERE module="'.$db->escape(strtolower($actions[0])).'" AND action="'.$db->escape(strtolower($actions[1])).'"'; + //setEventMessages($sql, null); + } + + switch ($action) { + + // Users + //case 'USER_CREATE': + //case 'USER_MODIFY': + //case 'USER_NEW_PASSWORD': + //case 'USER_ENABLEDISABLE': + //case 'USER_DELETE': + //case 'USER_SETINGROUP': + //case 'USER_REMOVEFROMGROUP': + // case 'USER_LOGIN': + // case 'USER_LOGIN_FAILED': + // case 'USER_LOGOUT': + // Warning: To increase performances, this action is triggered only if constant MAIN_ACTIVATE_UPDATESESSIONTRIGGER is set to 1. + // // case 'USER_UPDATE_SESSION': + + // Actions + case 'ACTION_MODIFY': + //$logtriggeraction = true; + break; + case 'ACTION_CREATE': + $resql = $db->query($sql); + // TODO voir comment regrouper les webhooks en un post + while ($resql && $obj = $db->fetch_array($resql)) { + $cleaned = cleanObjectDatas(dol_clone($object)); + $cleaned = cleanAgendaEventsDatas($cleaned); + $json = json_encode($cleaned); + // call the zapierPostWebhook() function + zapierPostWebhook($obj['url'], $json); + //setEventMessages($obj['url'], null); + } + $logtriggeraction = true; + break; + case 'ACTION_DELETE': + //$logtriggeraction = true; + break; + + // Groups + //case 'GROUP_CREATE': + //case 'GROUP_MODIFY': + //case 'GROUP_DELETE': + + // Companies + case 'COMPANY_CREATE': + $resql = $db->query($sql); + while ($resql && $obj = $db->fetch_array($resql)) { + $cleaned = cleanObjectDatas(dol_clone($object)); + $json = json_encode($cleaned); + // call the zapierPostWebhook() function + zapierPostWebhook($obj['url'], $json); + } + $logtriggeraction = true; + break; + case 'COMPANY_MODIFY': + $resql = $db->query($sql); + while ($resql && $obj = $db->fetch_array($resql)) { + $cleaned = cleanObjectDatas(dol_clone($object)); + $json = json_encode($cleaned); + // call the zapierPostWebhook() function + zapierPostWebhook($obj['url'], $json); + } + $logtriggeraction = true; + break; + case 'COMPANY_DELETE': + //$logtriggeraction = true; + break; + + // Contacts + case 'CONTACT_CREATE': + case 'CONTACT_MODIFY': + case 'CONTACT_DELETE': + case 'CONTACT_ENABLEDISABLE': + + // Products + // case 'PRODUCT_CREATE': + // case 'PRODUCT_MODIFY': + // case 'PRODUCT_DELETE': + // case 'PRODUCT_PRICE_MODIFY': + // case 'PRODUCT_SET_MULTILANGS': + // case 'PRODUCT_DEL_MULTILANGS': + + //Stock mouvement + // case 'STOCK_MOVEMENT': + + //MYECMDIR + // case 'MYECMDIR_DELETE': + // case 'MYECMDIR_CREATE': + // case 'MYECMDIR_MODIFY': + + // Customer orders + case 'ORDER_CREATE': + $resql = $db->query($sql); + while ($resql && $obj = $db->fetch_array($resql)) { + $cleaned = cleanObjectDatas(dol_clone($object)); + $json = json_encode($cleaned); + // call the zapierPostWebhook() function + zapierPostWebhook($obj['url'], $json); + } + $logtriggeraction = true; + break; + case 'ORDER_CLONE': + break; + case 'ORDER_VALIDATE': + break; + case 'ORDER_DELETE': + case 'ORDER_CANCEL': + case 'ORDER_SENTBYMAIL': + case 'ORDER_CLASSIFY_BILLED': + case 'ORDER_SETDRAFT': + case 'LINEORDER_INSERT': + case 'LINEORDER_UPDATE': + case 'LINEORDER_DELETE': + + // Supplier orders + // case 'ORDER_SUPPLIER_CREATE': + // case 'ORDER_SUPPLIER_CLONE': + // case 'ORDER_SUPPLIER_VALIDATE': + // case 'ORDER_SUPPLIER_DELETE': + // case 'ORDER_SUPPLIER_APPROVE': + // case 'ORDER_SUPPLIER_REFUSE': + // case 'ORDER_SUPPLIER_CANCEL': + // case 'ORDER_SUPPLIER_SENTBYMAIL': + // case 'ORDER_SUPPLIER_DISPATCH': + // case 'LINEORDER_SUPPLIER_DISPATCH': + // case 'LINEORDER_SUPPLIER_CREATE': + // case 'LINEORDER_SUPPLIER_UPDATE': + + // Proposals + // case 'PROPAL_CREATE': + // case 'PROPAL_CLONE': + // case 'PROPAL_MODIFY': + // case 'PROPAL_VALIDATE': + // case 'PROPAL_SENTBYMAIL': + // case 'PROPAL_CLOSE_SIGNED': + // case 'PROPAL_CLOSE_REFUSED': + // case 'PROPAL_DELETE': + // case 'LINEPROPAL_INSERT': + // case 'LINEPROPAL_UPDATE': + // case 'LINEPROPAL_DELETE': + + // SupplierProposal + // case 'SUPPLIER_PROPOSAL_CREATE': + // case 'SUPPLIER_PROPOSAL_CLONE': + // case 'SUPPLIER_PROPOSAL_MODIFY': + // case 'SUPPLIER_PROPOSAL_VALIDATE': + // case 'SUPPLIER_PROPOSAL_SENTBYMAIL': + // case 'SUPPLIER_PROPOSAL_CLOSE_SIGNED': + // case 'SUPPLIER_PROPOSAL_CLOSE_REFUSED': + // case 'SUPPLIER_PROPOSAL_DELETE': + // case 'LINESUPPLIER_PROPOSAL_INSERT': + // case 'LINESUPPLIER_PROPOSAL_UPDATE': + // case 'LINESUPPLIER_PROPOSAL_DELETE': + + // Contracts + // case 'CONTRACT_CREATE': + // case 'CONTRACT_ACTIVATE': + // case 'CONTRACT_CANCEL': + // case 'CONTRACT_CLOSE': + // case 'CONTRACT_DELETE': + // case 'LINECONTRACT_INSERT': + // case 'LINECONTRACT_UPDATE': + // case 'LINECONTRACT_DELETE': + + // Bills + // case 'BILL_CREATE': + // case 'BILL_CLONE': + // case 'BILL_MODIFY': + // case 'BILL_VALIDATE': + // case 'BILL_UNVALIDATE': + // case 'BILL_SENTBYMAIL': + // case 'BILL_CANCEL': + // case 'BILL_DELETE': + // case 'BILL_PAYED': + // case 'LINEBILL_INSERT': + // case 'LINEBILL_UPDATE': + // case 'LINEBILL_DELETE': + + //Supplier Bill + // case 'BILL_SUPPLIER_CREATE': + // case 'BILL_SUPPLIER_UPDATE': + // case 'BILL_SUPPLIER_DELETE': + // case 'BILL_SUPPLIER_PAYED': + // case 'BILL_SUPPLIER_UNPAYED': + // case 'BILL_SUPPLIER_VALIDATE': + // case 'BILL_SUPPLIER_UNVALIDATE': + // case 'LINEBILL_SUPPLIER_CREATE': + // case 'LINEBILL_SUPPLIER_UPDATE': + // case 'LINEBILL_SUPPLIER_DELETE': + + // Payments + // case 'PAYMENT_CUSTOMER_CREATE': + // case 'PAYMENT_SUPPLIER_CREATE': + // case 'PAYMENT_ADD_TO_BANK': + // case 'PAYMENT_DELETE': + + // Online + // case 'PAYMENT_PAYBOX_OK': + // case 'PAYMENT_PAYPAL_OK': + // case 'PAYMENT_STRIPE_OK': + + // Donation + // case 'DON_CREATE': + // case 'DON_UPDATE': + // case 'DON_DELETE': + + // Interventions + // case 'FICHINTER_CREATE': + // case 'FICHINTER_MODIFY': + // case 'FICHINTER_VALIDATE': + // case 'FICHINTER_DELETE': + // case 'LINEFICHINTER_CREATE': + // case 'LINEFICHINTER_UPDATE': + // case 'LINEFICHINTER_DELETE': + + // Members + // case 'MEMBER_CREATE': + // case 'MEMBER_VALIDATE': + // case 'MEMBER_SUBSCRIPTION': + // case 'MEMBER_MODIFY': + // case 'MEMBER_NEW_PASSWORD': + // case 'MEMBER_RESILIATE': + // case 'MEMBER_DELETE': + + // Categories + // case 'CATEGORY_CREATE': + // case 'CATEGORY_MODIFY': + // case 'CATEGORY_DELETE': + // case 'CATEGORY_SET_MULTILANGS': + + // Projects + // case 'PROJECT_CREATE': + // case 'PROJECT_MODIFY': + // case 'PROJECT_DELETE': + + // Project tasks + // case 'TASK_CREATE': + // case 'TASK_MODIFY': + // case 'TASK_DELETE': + + // Task time spent + // case 'TASK_TIMESPENT_CREATE': + // case 'TASK_TIMESPENT_MODIFY': + // case 'TASK_TIMESPENT_DELETE': + + // Shipping + // case 'SHIPPING_CREATE': + // case 'SHIPPING_MODIFY': + // case 'SHIPPING_VALIDATE': + // case 'SHIPPING_SENTBYMAIL': + // case 'SHIPPING_BILLED': + // case 'SHIPPING_CLOSED': + // case 'SHIPPING_REOPEN': + // case 'SHIPPING_DELETE': + } + if ($logtriggeraction) { + dol_syslog("Trigger '" . $this->name . "' for action '.$action.' launched by " . __FILE__ . " id=" . $object->id); + } + return 0; + } +} +/** + * Post webhook in zapier with object data + * + * @param string $url url provided by zapier + * @param string $json data to send + * @return void + */ +function zapierPostWebhook($url, $json) +{ + $headers = array('Accept: application/json', 'Content-Type: application/json'); + // TODO supprimer le webhook en cas de mauvaise réponse + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_TIMEOUT, 10); + curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST'); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $json); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + $output = curl_exec($ch); + curl_close($ch); +} + +/** + * Clean sensible object datas + * + * @param object $toclean Object to clean + * @return array Array of cleaned object properties + */ +function cleanObjectDatas($toclean) +{ + // Remove $db object property for object + unset($toclean->db); + + // Remove linkedObjects. We should already have linkedObjectIds that avoid huge responses + unset($toclean->linkedObjects); + + unset($toclean->lines); // should be ->lines + + unset($toclean->fields); + + unset($toclean->oldline); + + unset($toclean->error); + unset($toclean->errors); + + unset($toclean->ref_previous); + unset($toclean->ref_next); + unset($toclean->ref_int); + + unset($toclean->projet); // Should be fk_project + unset($toclean->project); // Should be fk_project + unset($toclean->author); // Should be fk_user_author + unset($toclean->timespent_old_duration); + unset($toclean->timespent_id); + unset($toclean->timespent_duration); + unset($toclean->timespent_date); + unset($toclean->timespent_datehour); + unset($toclean->timespent_withhour); + unset($toclean->timespent_fk_user); + unset($toclean->timespent_note); + + unset($toclean->statuts); + unset($toclean->statuts_short); + unset($toclean->statuts_logo); + unset($toclean->statuts_long); + + unset($toclean->element); + unset($toclean->fk_element); + unset($toclean->table_element); + unset($toclean->table_element_line); + unset($toclean->picto); + + unset($toclean->skip_update_total); + unset($toclean->context); + + // Remove the $oldcopy property because it is not supported by the JSON + // encoder. The following error is generated when trying to serialize + // it: "Error encoding/decoding JSON: Type is not supported" + // Note: Event if this property was correctly handled by the JSON + // encoder, it should be ignored because keeping it would let the API + // have a very strange behavior: calling PUT and then GET on the same + // resource would give different results: + // PUT /objects/{id} -> returns object with oldcopy = previous version of the object + // GET /objects/{id} -> returns object with oldcopy empty + unset($toclean->oldcopy); + + // If object has lines, remove $db property + if (isset($toclean->lines) && count($toclean->lines) > 0) { + $nboflines = count($toclean->lines); + for ($i=0; $i < $nboflines; $i++) { + cleanObjectDatas($toclean->lines[$i]); + } + } + + // If object has linked objects, remove $db property + /* + if(isset($toclean->linkedObjects) && count($toclean->linkedObjects) > 0) { + foreach($toclean->linkedObjects as $type_object => $linked_object) { + foreach($linked_object as $toclean2clean) { + $this->cleanObjectDatas($toclean2clean); + } + } + }*/ + + return $toclean; +} + +/** + * Clean sensible object datas + * + * @param object $toclean Object to clean + * @return array Array of cleaned object properties + */ +function cleanAgendaEventsDatas($toclean) +{ + unset($toclean->usermod); + unset($toclean->libelle); + //unset($toclean->array_options); + unset($toclean->context); + unset($toclean->canvas); + unset($toclean->contact); + unset($toclean->contact_id); + unset($toclean->thirdparty); + unset($toclean->user); + unset($toclean->origin); + unset($toclean->origin_id); + unset($toclean->ref_ext); + unset($toclean->statut); + unset($toclean->country); + unset($toclean->country_id); + unset($toclean->country_code); + unset($toclean->barcode_type); + unset($toclean->barcode_type_code); + unset($toclean->barcode_type_label); + unset($toclean->barcode_type_coder); + unset($toclean->mode_reglement_id); + unset($toclean->cond_reglement_id); + unset($toclean->cond_reglement); + unset($toclean->fk_delivery_address); + unset($toclean->shipping_method_id); + unset($toclean->fk_account); + unset($toclean->total_ht); + unset($toclean->total_tva); + unset($toclean->total_localtax1); + unset($toclean->total_localtax2); + unset($toclean->total_ttc); + unset($toclean->fk_incoterms); + unset($toclean->libelle_incoterms); + unset($toclean->location_incoterms); + unset($toclean->name); + unset($toclean->lastname); + unset($toclean->firstname); + unset($toclean->civility_id); + unset($toclean->contact); + unset($toclean->societe); + + return $toclean; +} diff --git a/htdocs/core/website.inc.php b/htdocs/core/website.inc.php index cf9b76a7be1..f7908844afc 100644 --- a/htdocs/core/website.inc.php +++ b/htdocs/core/website.inc.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License -* along with this program. If not, see . -* or see http://www.gnu.org/ +* along with this program. If not, see . +* or see https://www.gnu.org/ */ /** diff --git a/htdocs/cron/admin/cron.php b/htdocs/cron/admin/cron.php index c4cf1d648d5..4de7296c96d 100644 --- a/htdocs/cron/admin/cron.php +++ b/htdocs/cron/admin/cron.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cron/card.php b/htdocs/cron/card.php index 0c62cd910ba..44d142880dd 100644 --- a/htdocs/cron/card.php +++ b/htdocs/cron/card.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 0e12da80cfc..dbf35be905b 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cron/info.php b/htdocs/cron/info.php index bb00d26dc90..652dee18163 100644 --- a/htdocs/cron/info.php +++ b/htdocs/cron/info.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/cron/list.php b/htdocs/cron/list.php index ba868ed7b5d..14ee77f0146 100644 --- a/htdocs/cron/list.php +++ b/htdocs/cron/list.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -70,7 +70,8 @@ $hookmanager->initHooks(array('cronjoblist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('cronjob'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); diff --git a/htdocs/datapolicy/admin/setup.php b/htdocs/datapolicy/admin/setup.php index ab737f679ca..a4b0a826bd9 100644 --- a/htdocs/datapolicy/admin/setup.php +++ b/htdocs/datapolicy/admin/setup.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/datapolicy/admin/setupmail.php b/htdocs/datapolicy/admin/setupmail.php index f50fa08d31c..790b69847d7 100644 --- a/htdocs/datapolicy/admin/setupmail.php +++ b/htdocs/datapolicy/admin/setupmail.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ require '../../main.inc.php'; diff --git a/htdocs/datapolicy/class/actions_datapolicy.class.php b/htdocs/datapolicy/class/actions_datapolicy.class.php index 1243b5d057e..740598433a5 100644 --- a/htdocs/datapolicy/class/actions_datapolicy.class.php +++ b/htdocs/datapolicy/class/actions_datapolicy.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/datapolicy/class/datapolicy.class.php b/htdocs/datapolicy/class/datapolicy.class.php index c4b3cd2458d..3fd5d3b90d9 100644 --- a/htdocs/datapolicy/class/datapolicy.class.php +++ b/htdocs/datapolicy/class/datapolicy.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/datapolicy/class/datapolicycron.class.php b/htdocs/datapolicy/class/datapolicycron.class.php index 6c1a740bd98..1c3c7361acf 100644 --- a/htdocs/datapolicy/class/datapolicycron.class.php +++ b/htdocs/datapolicy/class/datapolicycron.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/datapolicy/langs/en_US/datapolicy.lang b/htdocs/datapolicy/langs/en_US/datapolicy.lang index ddcd2180cb0..ad5308ce8ce 100644 --- a/htdocs/datapolicy/langs/en_US/datapolicy.lang +++ b/htdocs/datapolicy/langs/en_US/datapolicy.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # Module label 'ModuledatapolicyName' Module4100Name = Data Privacy Policy diff --git a/htdocs/datapolicy/langs/fr_FR/datapolicy.lang b/htdocs/datapolicy/langs/fr_FR/datapolicy.lang index 7ee710aae2e..48b6a88cce3 100644 --- a/htdocs/datapolicy/langs/fr_FR/datapolicy.lang +++ b/htdocs/datapolicy/langs/fr_FR/datapolicy.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Générique diff --git a/htdocs/datapolicy/lib/datapolicy.lib.php b/htdocs/datapolicy/lib/datapolicy.lib.php index 1ea83696a1b..2182128dd8a 100644 --- a/htdocs/datapolicy/lib/datapolicy.lib.php +++ b/htdocs/datapolicy/lib/datapolicy.lib.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/datapolicy/mailing.php b/htdocs/datapolicy/mailing.php index 69da78e00ac..ba9642e5412 100644 --- a/htdocs/datapolicy/mailing.php +++ b/htdocs/datapolicy/mailing.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/datapolicy/public/index.php b/htdocs/datapolicy/public/index.php index 6c78f380b93..3108d0fc8e1 100644 --- a/htdocs/datapolicy/public/index.php +++ b/htdocs/datapolicy/public/index.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/dav/dav.class.php b/htdocs/dav/dav.class.php index eea023951e3..7bb598135f3 100644 --- a/htdocs/dav/dav.class.php +++ b/htdocs/dav/dav.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/dav/dav.lib.php b/htdocs/dav/dav.lib.php index 058fc635fc7..c2c0895c4d8 100644 --- a/htdocs/dav/dav.lib.php +++ b/htdocs/dav/dav.lib.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/dav/fileserver.php b/htdocs/dav/fileserver.php index 24460a1e2c6..81483bdfae1 100644 --- a/htdocs/dav/fileserver.php +++ b/htdocs/dav/fileserver.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * You can test with the WebDav client cadaver: * cadaver http://myurl/dav/fileserver.php diff --git a/htdocs/document.php b/htdocs/document.php index 84fb0492554..ac7d96e0b03 100644 --- a/htdocs/document.php +++ b/htdocs/document.php @@ -17,8 +17,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/don/admin/donation.php b/htdocs/don/admin/donation.php index 0662c367a40..a367ad822ab 100644 --- a/htdocs/don/admin/donation.php +++ b/htdocs/don/admin/donation.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/admin/donation_extrafields.php b/htdocs/don/admin/donation_extrafields.php index b01fc176eae..20d44edbd83 100644 --- a/htdocs/don/admin/donation_extrafields.php +++ b/htdocs/don/admin/donation_extrafields.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/card.php b/htdocs/don/card.php index ef130f931e5..30dd70f04a4 100644 --- a/htdocs/don/card.php +++ b/htdocs/don/card.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -60,7 +60,7 @@ $extrafields = new ExtraFields($db); $result = restrictedArea($user, 'don', $id); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('doncard','globalcard')); @@ -117,7 +117,7 @@ if ($action == 'update') $object->modepaymentid = GETPOST('modepayment', 'int'); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if ($object->update($user) > 0) @@ -172,7 +172,7 @@ if ($action == 'add') $object->modepaymentid = GETPOST('modepayment', 'int'); // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; $res = $object->create($user); @@ -318,7 +318,7 @@ if (! empty($conf->projet->enabled)) { $formproject = new FormProjets($db); } if ($action == 'create') { - print load_fiche_titre($langs->trans("AddDonation")); + print load_fiche_titre($langs->trans("AddDonation"), '', 'invoicing'); print '
    '; print ''; @@ -455,7 +455,7 @@ if ($action == 'create') print $hookmanager->resPrint; if (empty($reshook)) { - print $object->showOptionals($extrafields, 'edit', $parameters); + print $object->showOptionals($extrafields, 'edit'); } print '
    '; @@ -500,7 +500,7 @@ if (! empty($id) && $action == 'edit') print ''; - dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'generic'); + dol_fiche_head($head, $hselected, $langs->trans("Donation"), 0, 'invoicing'); print '
    '; - print ''; + print '
    '; print ''; print ''; + print ''; } print '
    ' . img_edit().'' . img_edit().'
    '; print '
    '; @@ -645,7 +645,7 @@ if (! empty($id) && $action != 'edit') if ($user->rights->don->creer) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/don/class/api_donations.class.php b/htdocs/don/class/api_donations.class.php index ef59743e03f..4adef57e816 100644 --- a/htdocs/don/class/api_donations.class.php +++ b/htdocs/don/class/api_donations.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index 638de5580e4..59eb29b84b2 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/class/donstats.class.php b/htdocs/don/class/donstats.class.php index 8fb7af02983..dc12f5a1d68 100644 --- a/htdocs/don/class/donstats.class.php +++ b/htdocs/don/class/donstats.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/class/paymentdonation.class.php b/htdocs/don/class/paymentdonation.class.php index b96719e01aa..ff42ff31093 100644 --- a/htdocs/don/class/paymentdonation.class.php +++ b/htdocs/don/class/paymentdonation.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/document.php b/htdocs/don/document.php index fcb3c87ad9d..485a457cdce 100644 --- a/htdocs/don/document.php +++ b/htdocs/don/document.php @@ -19,8 +19,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -125,7 +125,7 @@ if ($object->id) if ($user->rights->don->creer) { if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/don/index.php b/htdocs/don/index.php index 4af0f0d81b0..c75cbf5413b 100644 --- a/htdocs/don/index.php +++ b/htdocs/don/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -85,7 +85,7 @@ if ($result) dol_print_error($db); } -print load_fiche_titre($langs->trans("DonationsArea")); +print load_fiche_titre($langs->trans("DonationsArea"), '', 'invoicing'); print '
    '; diff --git a/htdocs/don/info.php b/htdocs/don/info.php index 0f76e4f65ca..1806e1b0ca5 100644 --- a/htdocs/don/info.php +++ b/htdocs/don/info.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -80,7 +80,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->don->creer) { if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/don/list.php b/htdocs/don/list.php index 1af11afca24..c921eba30c8 100644 --- a/htdocs/don/list.php +++ b/htdocs/don/list.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -154,7 +154,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton); + print_barre_liste($langs->trans("Donations"), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton); if ($search_all) { diff --git a/htdocs/don/note.php b/htdocs/don/note.php index 59feada0423..0aae234687f 100644 --- a/htdocs/don/note.php +++ b/htdocs/don/note.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -96,7 +96,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->don->creer) { if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; diff --git a/htdocs/don/payment/card.php b/htdocs/don/payment/card.php index bbf2163b9af..4d3299b6699 100644 --- a/htdocs/don/payment/card.php +++ b/htdocs/don/payment/card.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/payment/payment.php b/htdocs/don/payment/payment.php index 0172765b19c..c0e941b4140 100644 --- a/htdocs/don/payment/payment.php +++ b/htdocs/don/payment/payment.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/stats/index.php b/htdocs/don/stats/index.php index 0f568dbaf7b..8a740ff6941 100644 --- a/htdocs/don/stats/index.php +++ b/htdocs/don/stats/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/don/tpl/linkedobjectblock.tpl.php b/htdocs/don/tpl/linkedobjectblock.tpl.php index 70373c58b28..0b4d4f94574 100644 --- a/htdocs/don/tpl/linkedobjectblock.tpl.php +++ b/htdocs/don/tpl/linkedobjectblock.tpl.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ ?> diff --git a/htdocs/ecm/ajax/ecmdatabase.php b/htdocs/ecm/ajax/ecmdatabase.php index 571a810939a..7841f17c1c9 100644 --- a/htdocs/ecm/ajax/ecmdatabase.php +++ b/htdocs/ecm/ajax/ecmdatabase.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/class/ecmdirectory.class.php b/htdocs/ecm/class/ecmdirectory.class.php index d0f4f3e6567..979ffe416b4 100644 --- a/htdocs/ecm/class/ecmdirectory.class.php +++ b/htdocs/ecm/class/ecmdirectory.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/class/ecmfiles.class.php b/htdocs/ecm/class/ecmfiles.class.php index 57a18f5c339..a88ecd57d7c 100644 --- a/htdocs/ecm/class/ecmfiles.class.php +++ b/htdocs/ecm/class/ecmfiles.class.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/class/htmlecm.form.class.php b/htdocs/ecm/class/htmlecm.form.class.php index c210d0ae2d4..92cee2570bc 100644 --- a/htdocs/ecm/class/htmlecm.form.class.php +++ b/htdocs/ecm/class/htmlecm.form.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/dir_add_card.php b/htdocs/ecm/dir_add_card.php index aec0e39a2df..49074af89db 100644 --- a/htdocs/ecm/dir_add_card.php +++ b/htdocs/ecm/dir_add_card.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/dir_card.php b/htdocs/ecm/dir_card.php index f0992160d09..6bf50ed306d 100644 --- a/htdocs/ecm/dir_card.php +++ b/htdocs/ecm/dir_card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/ecm/file_card.php b/htdocs/ecm/file_card.php index bbf210f631e..38504088068 100644 --- a/htdocs/ecm/file_card.php +++ b/htdocs/ecm/file_card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -318,7 +318,7 @@ if ($forcedownload) $rellink.='&attachment=1'; if (! empty($object->entity)) $rellink.='&entity='.$object->entity; $rellink.='&file='.urlencode($filepath); $fulllink=$urlwithroot.$rellink; -print img_picto('', 'object_globe.png').' '; +print img_picto('', 'globe').' '; if ($action != 'edit') print ''; else print $fulllink; if ($action != 'edit') print ' '.$langs->trans("Download").''; // No target here. @@ -343,7 +343,7 @@ if (! empty($object->share)) //if (! empty($object->ref)) $fulllink.='&hashn='.$object->ref; // Hash of file path //elseif (! empty($object->label)) $fulllink.='&hashc='.$object->label; // Hash of file content - print img_picto('', 'object_globe.png').' '; + print img_picto('', 'globe').' '; if ($action != 'edit') print ''; else print $fulllink; if ($action != 'edit') print ' '.$langs->trans("Download").''; // No target here diff --git a/htdocs/ecm/index.php b/htdocs/ecm/index.php index 8a059ea53a3..8e4d4660768 100644 --- a/htdocs/ecm/index.php +++ b/htdocs/ecm/index.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * You can call this page with param module=medias to get a filemanager for medias. */ diff --git a/htdocs/ecm/index_auto.php b/htdocs/ecm/index_auto.php index f068eed1319..7e8d9232d8f 100644 --- a/htdocs/ecm/index_auto.php +++ b/htdocs/ecm/index_auto.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/search.php b/htdocs/ecm/search.php index a5e296ae1e6..37f6e22798b 100644 --- a/htdocs/ecm/search.php +++ b/htdocs/ecm/search.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php index b0aad845354..3f8b889aaff 100644 --- a/htdocs/ecm/tpl/enablefiletreeajax.tpl.php +++ b/htdocs/ecm/tpl/enablefiletreeajax.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Output javascript for interactions code of ecm module */ diff --git a/htdocs/emailcollector/class/emailcollector.class.php b/htdocs/emailcollector/class/emailcollector.class.php index 9315d773c67..0b4f57c5d6a 100644 --- a/htdocs/emailcollector/class/emailcollector.class.php +++ b/htdocs/emailcollector/class/emailcollector.class.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -263,7 +263,7 @@ class EmailCollector extends CommonObject // Clear extrafields that are unique if (is_array($object->array_options) && count($object->array_options) > 0) { - $extrafields->fetch_name_optionals_label($this->element); + $extrafields->fetch_name_optionals_label($this->table_element); foreach($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); diff --git a/htdocs/emailcollector/class/emailcollectoraction.class.php b/htdocs/emailcollector/class/emailcollectoraction.class.php index e8062497534..0033b615f8a 100644 --- a/htdocs/emailcollector/class/emailcollectoraction.class.php +++ b/htdocs/emailcollector/class/emailcollectoraction.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -226,7 +226,7 @@ class EmailCollectorAction extends CommonObject // Clear extrafields that are unique if (is_array($object->array_options) && count($object->array_options) > 0) { - $extrafields->fetch_name_optionals_label($this->element); + $extrafields->fetch_name_optionals_label($this->table_element); foreach($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); diff --git a/htdocs/emailcollector/class/emailcollectorfilter.class.php b/htdocs/emailcollector/class/emailcollectorfilter.class.php index 69ab957040d..5a8f3003c84 100644 --- a/htdocs/emailcollector/class/emailcollectorfilter.class.php +++ b/htdocs/emailcollector/class/emailcollectorfilter.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -201,7 +201,7 @@ class EmailCollectorFilter extends CommonObject // Clear extrafields that are unique if (is_array($object->array_options) && count($object->array_options) > 0) { - $extrafields->fetch_name_optionals_label($this->element); + $extrafields->fetch_name_optionals_label($this->table_element); foreach($object->array_options as $key => $option) { $shortkey = preg_replace('/options_/', '', $key); diff --git a/htdocs/emailcollector/lib/emailcollector.lib.php b/htdocs/emailcollector/lib/emailcollector.lib.php index e9cb3984819..c15c217ea5c 100644 --- a/htdocs/emailcollector/lib/emailcollector.lib.php +++ b/htdocs/emailcollector/lib/emailcollector.lib.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 132eb650f4e..ce98313d60f 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -24,7 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -88,14 +88,10 @@ $hideref = (GETPOST('hideref', 'int') ? GETPOST('hideref', 'int') : (! empty($ $object = new Expedition($db); $extrafields = new ExtraFields($db); -$extrafieldsline = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - -// fetch optionals attributes lines and labels -$extralabelslines=$extrafieldsline->fetch_name_optionals_label($object->table_element_line); - +$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element_line); // Load object. Make an object->fetch include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -165,8 +161,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -306,8 +301,8 @@ if (empty($reshook)) } // Extrafields - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options[$i] = $extrafieldsline->getOptionalsFromPost($extralabelsline, $i); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options[$i] = $extrafields->getOptionalsFromPost($object->table_element_line, $i); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -379,7 +374,7 @@ if (empty($reshook)) } } // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if (! $error) @@ -630,10 +625,10 @@ if (empty($reshook)) if ($lines[$i]->id == $line_id) // we have found line to update { $line = new ExpeditionLigne($db); + // Extrafields Lines - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $line->array_options = $extrafieldsline->getOptionalsFromPost($extralabelsline); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $line->array_options = $extrafields->getOptionalsFromPost($object->table_element_line); // Unset extrafield POST Data if (is_array($extralabelsline)) { foreach ($extralabelsline as $key => $value) { @@ -1036,8 +1031,7 @@ if ($action == 'create') if (empty($reshook)) { // copy from order - $orderExtrafields = new Extrafields($db); - $orderExtrafieldLabels = $orderExtrafields->fetch_name_optionals_label($object->table_element); + $extrafields->fetch_name_optionals_label($object->table_element); if ($object->fetch_optionals() > 0) { $expe->array_options = array_merge($expe->array_options, $object->array_options); } @@ -1576,21 +1570,21 @@ if ($action == 'create') } } - - //Display lines extrafields - if (is_array($extralabelslines) && count($extralabelslines)>0) + // Line extrafield + if (! empty($extrafields)) { + //var_dump($line); $colspan=5; - $orderLineExtrafields = new Extrafields($db); - $orderLineExtrafieldLabels = $orderLineExtrafields->fetch_name_optionals_label($object->table_element_line); + $extrafields->fetch_name_optionals_label($expe->table_element_line); + $expLine = new ExpeditionLigne($db); + $srcLine = new OrderLine($db); + $extrafields->fetch_name_optionals_label($srcLine->table_element); $srcLine->fetch_optionals($line->id); // fetch extrafields also available in orderline - $line = new ExpeditionLigne($db); //$line->fetch_optionals($line->id); $line->array_options = array_merge($line->array_options, $srcLine->array_options); - print '
    '; - print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked); - print ''; + + print $expLine->showOptionals($extrafields, 'edit', array('style'=>'class="drag drop oddeven"', 'colspan'=>$colspan), $indiceAsked, '', empty($conf->global->MAIN_EXTRAFIELDS_IN_ONE_TD)?0:1); } } @@ -1746,7 +1740,7 @@ elseif ($id || $ref) $morehtmlref .= '
    ' . $langs->trans('Project') . ' '; if (0) { // Do not change on shipment if ($action != 'classify') { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); @@ -1817,7 +1811,7 @@ elseif ($id || $ref) print $langs->trans('DateDeliveryPlanned'); print ''; - if ($action != 'editdate_livraison') print ''; + if ($action != 'editdate_livraison') print ''; print '
    id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'
    '; print ''; if ($action == 'editdate_livraison') @@ -1847,8 +1841,8 @@ elseif ($id || $ref) print ''; print ''; print ''; - print ''; - print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units); + print ''; + print $formproduct->selectMeasuringUnits("weight_units", "weight", $object->weight_units, 0, 2); print ' '; print ' '; print ''; @@ -1856,7 +1850,7 @@ elseif ($id || $ref) else { print $object->trueWeight; - print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string($object->weight_units, "weight"):''; + print ($object->trueWeight && $object->weight_units!='')?' '.measuring_units_string(0, "weight", $object->weight_units):''; } // Calculated @@ -1873,7 +1867,7 @@ elseif ($id || $ref) // Width print ''.$form->editfieldkey("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer).''; print $form->editfieldval("Width", 'trueWidth', $object->trueWidth, $object, $user->rights->expedition->creer); - print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string($object->width_units, "size"):''; + print ($object->trueWidth && $object->width_units!='')?' '.measuring_units_string(0, "size", $object->width_units):''; print ''; // Height @@ -1884,8 +1878,8 @@ elseif ($id || $ref) print ''; print ''; print ''; - print ''; - print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units); + print ''; + print $formproduct->selectMeasuringUnits("size_units", "size", $object->size_units, 0, 2); print ' '; print ' '; print ''; @@ -1893,7 +1887,7 @@ elseif ($id || $ref) else { print $object->trueHeight; - print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string($object->height_units, "size"):''; + print ($object->trueHeight && $object->height_units!='')?' '.measuring_units_string(0, "size", $object->height_units):''; } print ''; @@ -1901,7 +1895,7 @@ elseif ($id || $ref) // Depth print ''.$form->editfieldkey("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer).''; print $form->editfieldval("Depth", 'trueDepth', $object->trueDepth, $object, $user->rights->expedition->creer); - print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string($object->depth_units, "size"):''; + print ($object->trueDepth && $object->depth_units!='')?' '.measuring_units_string(0, "size", $object->depth_units):''; print ''; // Volume @@ -1956,7 +1950,7 @@ elseif ($id || $ref) print $langs->trans('SendingMethod'); print ''; - if ($action != 'editshipping_method_id') print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).''; + if ($action != 'editshipping_method_id') print 'id.'">'.img_edit($langs->trans('SetSendingMethod'), 1).''; print ''; print ''; if ($action == 'editshipping_method_id') @@ -1994,7 +1988,7 @@ elseif ($id || $ref) print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->expedition->creer) print ''.img_edit().''; + if ($user->rights->expedition->creer) print ''.img_edit().''; else print ' '; print '
    '; print ''; @@ -2108,7 +2102,6 @@ elseif ($id || $ref) } print "\n"; print ''; - $var=false; if (! empty($conf->global->MAIN_MULTILANGS) && ! empty($conf->global->PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE)) { @@ -2265,8 +2258,8 @@ elseif ($id || $ref) } } } + print ''; } - print ''; if ($action == 'editline' && $lines[$i]->id == $line_id) { @@ -2416,13 +2409,13 @@ elseif ($id || $ref) // Weight print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->weight_units, "weight"); + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->weight*$lines[$i]->qty_shipped.' '.measuring_units_string(0, "weight", $lines[$i]->weight_units); else print ' '; print ''; // Volume print ''; - if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string($lines[$i]->volume_units, "volume"); + if ($lines[$i]->fk_product_type == Product::TYPE_PRODUCT) print $lines[$i]->volume*$lines[$i]->qty_shipped.' '.measuring_units_string(0, "volume", $lines[$i]->volume_units); else print ' '; print ''; @@ -2434,8 +2427,9 @@ elseif ($id || $ref) print ''; print '
    '; print '
    '; + print ''; } - elseif ($object->statut == 0) + elseif ($object->statut == Expedition::STATUS_DRAFT) { // edit-delete buttons print ''; @@ -2456,18 +2450,24 @@ elseif ($id || $ref) print ""; // Display lines extrafields - if (is_array($extralabelslines) && count($extralabelslines)>0) { - $colspan= empty($conf->productbatch->enabled) ? 5 : 6; - $line = new ExpeditionLigne($db); - $line->fetch_optionals($lines[$i]->id); + if (! empty($extrafields)) { + $colspan=6; + if ($origin && $origin_id > 0) $colspan++; + if (! empty($conf->productbatch->enabled)) $colspan++; + if (! empty($conf->stock->enabled)) $colspan++; + + $lines[$i]->fetch_optionals($lines[$i]->id); + + $extrafields->fetch_name_optionals_label($lines[$i]->table_element); + print ''; if ($action == 'editline' && $lines[$i]->id == $line_id) { - print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked); + print $lines[$i]->showOptionals($extrafields, 'edit', array('colspan'=>$colspan), $indiceAsked); } else { - print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>$colspan), $indiceAsked); + print $lines[$i]->showOptionals($extrafields, 'view', array('colspan'=>$colspan), $indiceAsked); } print ''; } diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 5e4d0d5e00c..d1cb1484688 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 2718a7a698b..b3cab414ccc 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -24,7 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/class/expeditionbatch.class.php b/htdocs/expedition/class/expeditionbatch.class.php index 1cc0f277af6..c0141649076 100644 --- a/htdocs/expedition/class/expeditionbatch.class.php +++ b/htdocs/expedition/class/expeditionbatch.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/class/expeditionstats.class.php b/htdocs/expedition/class/expeditionstats.class.php index fa02397b5bc..9bbaeeda767 100644 --- a/htdocs/expedition/class/expeditionstats.class.php +++ b/htdocs/expedition/class/expeditionstats.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/contact.php b/htdocs/expedition/contact.php index 9310df52ddf..b8e6af1db85 100644 --- a/htdocs/expedition/contact.php +++ b/htdocs/expedition/contact.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -173,7 +173,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref .= '
    ' . $langs->trans('Project') . ' '; if (0) { // Do not change on shipment if ($action != 'classify') { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/expedition/document.php b/htdocs/expedition/document.php index 5c178cbdaf2..9faaaf1f88e 100644 --- a/htdocs/expedition/document.php +++ b/htdocs/expedition/document.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -120,7 +120,7 @@ if ($id > 0 || ! empty($ref)){ $morehtmlref .= '
    ' . $langs->trans('Project') . ' '; if (0) { // Do not change on shipment if ($action != 'classify') { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/expedition/index.php b/htdocs/expedition/index.php index 61838cc321b..217497a962e 100644 --- a/htdocs/expedition/index.php +++ b/htdocs/expedition/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/list.php b/htdocs/expedition/list.php index dd0464c2f80..ebe0bcfd8df 100644 --- a/htdocs/expedition/list.php +++ b/htdocs/expedition/list.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -84,7 +84,8 @@ $hookmanager->initHooks(array('shipmentlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('expedition'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -197,7 +198,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."expedition as e"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."expedition_extrafields as ef on (e.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (e.rowid = ef.fk_object)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s ON s.rowid = e.fk_soc"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s.fk_pays)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; @@ -455,19 +456,7 @@ if ($resql) if (! empty($arrayfields['l.ref']['checked'])) print_liste_field_titre($arrayfields['l.ref']['label'], $_SERVER["PHP_SELF"], "l.ref", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['l.date_delivery']['checked'])) print_liste_field_titre($arrayfields['l.date_delivery']['label'], $_SERVER["PHP_SELF"], "l.date_delivery", "", $param, '', $sortfield, $sortorder, 'center '); // Extra fields - if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) - { - foreach($extrafields->attribute_label as $key => $val) - { - if (! empty($arrayfields["ef.".$key]['checked'])) - { - $align=$extrafields->getAlignFlag($key); - $sortonfield = "ef.".$key; - if (! empty($extrafields->attribute_computed[$key])) $sortonfield=''; - print_liste_field_titre($extralabels[$key], $_SERVER["PHP_SELF"], $sortonfield, "", $param, ($align?'align="'.$align.'"':''), $sortfield, $sortorder); - } - } - } + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_title.tpl.php'; // Hook fields $parameters=array('arrayfields'=>$arrayfields,'param'=>$param,'sortfield'=>$sortfield,'sortorder'=>$sortorder); $reshook=$hookmanager->executeHooks('printFieldListTitle', $parameters); // Note that $action and $object may have been modified by hook diff --git a/htdocs/expedition/note.php b/htdocs/expedition/note.php index 838c25b7eb7..c77bfc98efd 100644 --- a/htdocs/expedition/note.php +++ b/htdocs/expedition/note.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -110,7 +110,7 @@ if ($id > 0 || ! empty($ref)) $morehtmlref .= '
    ' . $langs->trans('Project') . ' '; if (0) { // Do not change on shipment if ($action != 'classify') { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/expedition/shipment.php b/htdocs/expedition/shipment.php index bb1d106e393..34a89233f1e 100644 --- a/htdocs/expedition/shipment.php +++ b/htdocs/expedition/shipment.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -60,7 +60,7 @@ $object = new Commande($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -189,8 +189,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -290,7 +289,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->commande->creer) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.='
    '; @@ -365,7 +364,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('DateDeliveryPlanned'); print ''; - if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).''; + if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).''; print ''; print ''; if ($action == 'editdate_livraison') @@ -397,7 +396,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('SendingMethod'); print ''; if ($action != 'editshippingmethod' && $user->rights->expedition->creer) - print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetShippingMode'), 1).''; print ''; print ''; if ($action == 'editshippingmethod') { @@ -417,7 +416,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('Warehouse'); print ''; if ($action != 'editwarehouse' && $user->rights->commande->creer) - print 'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetWarehouse'), 1).''; print ''; print ''; if ($action == 'editwarehouse') { @@ -436,7 +435,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('PaymentConditionsShort'); print ''; - if ($action != 'editconditions' && $object->statut == Expedition::STATUS_VALIDATED) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).''; + if ($action != 'editconditions' && $object->statut == Expedition::STATUS_VALIDATED) print 'id.'">'.img_edit($langs->trans('SetConditions'),1).''; print ''; print ''; if ($action == 'editconditions') @@ -454,7 +453,7 @@ if ($id > 0 || ! empty($ref)) print ''; - if ($action != 'editmode' && $object->statut == Expedition::STATUS_VALIDATED) print ''; + if ($action != 'editmode' && $object->statut == Expedition::STATUS_VALIDATED) print ''; print '
    '; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'),1).'id.'">'.img_edit($langs->trans('SetMode'),1).'
    '; print ''; if ($action == 'editmode') @@ -473,7 +472,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('AvailabilityPeriod'); print ''; if ($action != 'editavailability') - print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetAvailability'), 1) . ''; print ''; print ''; if ($action == 'editavailability') { @@ -489,7 +488,7 @@ if ($id > 0 || ! empty($ref)) print $langs->trans('Source'); print ''; if ($action != 'editdemandreason') - print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; + print 'id . '">' . img_edit($langs->trans('SetDemandReason'), 1) . ''; print ''; print ''; if ($action == 'editdemandreason') { @@ -522,7 +521,7 @@ if ($id > 0 || ! empty($ref)) print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->commande->creer) print ''.img_edit().''; + if ($user->rights->commande->creer) print ''.img_edit().''; else print ' '; print '
    '; print ''; @@ -538,6 +537,9 @@ if ($id > 0 || ! empty($ref)) print ''; } + $expe = new Expedition($db); + $extrafields->fetch_name_optionals_label($expe->table_element); + // Other attributes $cols = 2; include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_view.tpl.php'; diff --git a/htdocs/expedition/stats/index.php b/htdocs/expedition/stats/index.php index 566b45a16ef..b6c3f7355a9 100644 --- a/htdocs/expedition/stats/index.php +++ b/htdocs/expedition/stats/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/stats/month.php b/htdocs/expedition/stats/month.php index 650bb6f6338..97e11b7f38c 100644 --- a/htdocs/expedition/stats/month.php +++ b/htdocs/expedition/stats/month.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expedition/tpl/linkedobjectblock.tpl.php b/htdocs/expedition/tpl/linkedobjectblock.tpl.php index 5bfc81c642a..a632584a510 100644 --- a/htdocs/expedition/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expedition/tpl/linkedobjectblock.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/expensereport/ajax/ajaxik.php b/htdocs/expensereport/ajax/ajaxik.php index 5ad47285137..19291dacfe8 100644 --- a/htdocs/expensereport/ajax/ajaxik.php +++ b/htdocs/expensereport/ajax/ajaxik.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/ajax/ajaxprojet.php b/htdocs/expensereport/ajax/ajaxprojet.php index 7bdd701b799..e3872577473 100644 --- a/htdocs/expensereport/ajax/ajaxprojet.php +++ b/htdocs/expensereport/ajax/ajaxprojet.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/card.php b/htdocs/expensereport/card.php index dd87485ac56..95b9e0cd1f5 100644 --- a/htdocs/expensereport/card.php +++ b/htdocs/expensereport/card.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -97,7 +97,7 @@ $object=new ExpenseReport($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -238,7 +238,7 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form if (! $error) { - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; } @@ -309,8 +309,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -1492,7 +1491,7 @@ if ($action == 'create') if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateExpenseReport"); else { - $defaultselectuser=$user->fk_user; // Will work only if supervisor has permission to approve so is inside include_users + $defaultselectuser=(empty($user->fk_user_expense_validator) ? $user->fk_user : $user->fk_user_expense_validator); // Will work only if supervisor has permission to approve so is inside include_users if (! empty($conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR)) $defaultselectuser=$conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR; // Can force default approver if (GETPOST('fk_user_validator', 'int') > 0) $defaultselectuser=GETPOST('fk_user_validator', 'int'); $s=$form->select_dolusers($defaultselectuser, "fk_user_validator", 1, "", ((empty($defaultselectuser) || empty($conf->global->EXPENSEREPORT_DEFAULT_VALIDATOR_UNCHANGEABLE))?0:1), $include_users); @@ -1776,7 +1775,7 @@ else if ($user->rights->commande->creer) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; @@ -2062,7 +2061,7 @@ else { $totalpaid = price2num($totalpaid); // Round $totalpaid to fix floating problem after addition into loop } - + $remaintopay = price2num($object->total_ttc - $totalpaid); $resteapayeraffiche = $remaintopay; diff --git a/htdocs/expensereport/class/api_expensereports.class.php b/htdocs/expensereport/class/api_expensereports.class.php index f2177aafc63..0e673ffdf30 100644 --- a/htdocs/expensereport/class/api_expensereports.class.php +++ b/htdocs/expensereport/class/api_expensereports.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 32915339297..5994425ff41 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/class/expensereport_ik.class.php b/htdocs/expensereport/class/expensereport_ik.class.php index 70bc3fd6c26..bac8522ca74 100644 --- a/htdocs/expensereport/class/expensereport_ik.class.php +++ b/htdocs/expensereport/class/expensereport_ik.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/class/expensereport_rule.class.php b/htdocs/expensereport/class/expensereport_rule.class.php index 7fbdd81776f..9726184a94a 100644 --- a/htdocs/expensereport/class/expensereport_rule.class.php +++ b/htdocs/expensereport/class/expensereport_rule.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/class/expensereportstats.class.php b/htdocs/expensereport/class/expensereportstats.class.php index 2ea940dead3..9345e3e42ef 100644 --- a/htdocs/expensereport/class/expensereportstats.class.php +++ b/htdocs/expensereport/class/expensereportstats.class.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/class/paymentexpensereport.class.php b/htdocs/expensereport/class/paymentexpensereport.class.php index deec87887d7..5c72dd18528 100644 --- a/htdocs/expensereport/class/paymentexpensereport.class.php +++ b/htdocs/expensereport/class/paymentexpensereport.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/document.php b/htdocs/expensereport/document.php index f5295118bda..6a8bd90f95f 100644 --- a/htdocs/expensereport/document.php +++ b/htdocs/expensereport/document.php @@ -18,8 +18,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/expensereport/export_csv.php b/htdocs/expensereport/export_csv.php index c3121a4db86..536f21ee4e4 100644 --- a/htdocs/expensereport/export_csv.php +++ b/htdocs/expensereport/export_csv.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/index.php b/htdocs/expensereport/index.php index 461a7aec4fe..cecbae9757a 100644 --- a/htdocs/expensereport/index.php +++ b/htdocs/expensereport/index.php @@ -17,8 +17,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/expensereport/info.php b/htdocs/expensereport/info.php index fff9c6b3321..b9605a92eec 100644 --- a/htdocs/expensereport/info.php +++ b/htdocs/expensereport/info.php @@ -13,8 +13,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/expensereport/list.php b/htdocs/expensereport/list.php index fd53e8af1d1..daadfa913ec 100644 --- a/htdocs/expensereport/list.php +++ b/htdocs/expensereport/list.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -108,7 +108,8 @@ $hookmanager->initHooks(array('expensereportlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('expensereport'); +$extrafields->fetch_name_optionals_label('expensereport'); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); @@ -284,7 +285,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."expensereport as d"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."expensereport_extrafields as ef on (d.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (d.rowid = ef.fk_object)"; $sql.= ", ".MAIN_DB_PREFIX."user as u"; $sql.= " WHERE d.fk_user_author = u.rowid AND d.entity IN (".getEntity('expensereport').")"; // Search all @@ -473,7 +474,7 @@ if ($resql) $newcardbutton.= dolGetButtonTitle($langs->trans('NewTrip'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/expensereport/card.php?action=create'); } - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_generic.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'generic', 0, $newcardbutton, '', $limit); } $topicmail="SendExpenseReport"; diff --git a/htdocs/expensereport/note.php b/htdocs/expensereport/note.php index 25b5f51bdf2..b29e24d4374 100644 --- a/htdocs/expensereport/note.php +++ b/htdocs/expensereport/note.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/payment/card.php b/htdocs/expensereport/payment/card.php index 890884b2e37..e168c1aa5b8 100644 --- a/htdocs/expensereport/payment/card.php +++ b/htdocs/expensereport/payment/card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/payment/info.php b/htdocs/expensereport/payment/info.php index 53d4a26eef4..4471e2be7db 100644 --- a/htdocs/expensereport/payment/info.php +++ b/htdocs/expensereport/payment/info.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/payment/payment.php b/htdocs/expensereport/payment/payment.php index d95edae6450..8d1c568332d 100644 --- a/htdocs/expensereport/payment/payment.php +++ b/htdocs/expensereport/payment/payment.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/stats/index.php b/htdocs/expensereport/stats/index.php index eb3ec563481..670142836cd 100644 --- a/htdocs/expensereport/stats/index.php +++ b/htdocs/expensereport/stats/index.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php index 9c7a418a6cc..f207c0617b9 100644 --- a/htdocs/expensereport/tpl/linkedobjectblock.tpl.php +++ b/htdocs/expensereport/tpl/linkedobjectblock.tpl.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template @@ -58,4 +58,4 @@ foreach($linkedObjectBlock as $key => $objectlink) } ?> - \ No newline at end of file + diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index da184f27574..cd4d70c2518 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/exports/export.php b/htdocs/exports/export.php index df298153062..3bada876d2f 100644 --- a/htdocs/exports/export.php +++ b/htdocs/exports/export.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -33,7 +33,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/export/modules_export.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; // Load translation files required by the page -$langs->loadlangs(array('exports', 'other', 'users', 'companies', 'projects')); +$langs->loadlangs(array('exports', 'other', 'users', 'companies', 'projects', 'banks')); // Everybody should be able to go on this page //if (! $user->admin) diff --git a/htdocs/exports/index.php b/htdocs/exports/index.php index 755c9bc4773..7236a3f45dc 100644 --- a/htdocs/exports/index.php +++ b/htdocs/exports/index.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/externalsite/admin/externalsite.php b/htdocs/externalsite/admin/externalsite.php index d1fcb7ebe6c..f01a3447760 100644 --- a/htdocs/externalsite/admin/externalsite.php +++ b/htdocs/externalsite/admin/externalsite.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/externalsite/frames.php b/htdocs/externalsite/frames.php index 9c232cbe710..259d8b3b50d 100644 --- a/htdocs/externalsite/frames.php +++ b/htdocs/externalsite/frames.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * */ diff --git a/htdocs/externalsite/frametop.php b/htdocs/externalsite/frametop.php index aebaae2eb87..587c733cf34 100644 --- a/htdocs/externalsite/frametop.php +++ b/htdocs/externalsite/frametop.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fichinter/admin/fichinter_extrafields.php b/htdocs/fichinter/admin/fichinter_extrafields.php index f0511722d79..9ccf2cf56f4 100644 --- a/htdocs/fichinter/admin/fichinter_extrafields.php +++ b/htdocs/fichinter/admin/fichinter_extrafields.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fichinter/admin/fichinterdet_extrafields.php b/htdocs/fichinter/admin/fichinterdet_extrafields.php index 2eca7874875..3b8cee24791 100644 --- a/htdocs/fichinter/admin/fichinterdet_extrafields.php +++ b/htdocs/fichinter/admin/fichinterdet_extrafields.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fichinter/card-rec.php b/htdocs/fichinter/card-rec.php index 63183c73d1d..5afe8c79284 100644 --- a/htdocs/fichinter/card-rec.php +++ b/htdocs/fichinter/card-rec.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -70,6 +70,7 @@ if ($sortfield == "") $sortfield="f.datec"; $object = new FichinterRec($db); +$extrafields = new ExtraFields($db); $arrayfields=array( @@ -164,8 +165,9 @@ if ($action == 'add') { $newinter->fk_projet=$object->fk_projet; $newinter->fk_project=$object->fk_projet; $newinter->fk_contrat=$object->fk_contrat; - } else + } else { $newinter->socid=GETPOST("socid"); + } $newinter->entity=$object->entity; $newinter->duree=$object->duree; @@ -175,8 +177,8 @@ if ($action == 'add') { $newinter->note_public=$object->note_public; // on créer un nouvelle intervention - $extrafields = new ExtraFields($db); - $extralabels = $extrafields->fetch_name_optionals_label($newinter->table_element); + $extrafields->fetch_name_optionals_label($newinter->table_element); + $array_options = $extrafields->getOptionalsFromPost($newinter->table_element); $newinter->array_options = $array_options; @@ -184,8 +186,9 @@ if ($action == 'add') { if ($newfichinterid > 0) { // Now we add line of details - foreach ($object->lines as $ficheinterligne) - $newinter->addline($user, $newfichinterid, $ficheinterligne->desc, "", $ficheinterligne->duree, ''); + foreach ($object->lines as $line) { + $newinter->addline($user, $newfichinterid, $line->desc, '', $line->duree, ''); + } // on update le nombre d'inter crée à partir du modèle $object->updateNbGenDone(); @@ -197,7 +200,7 @@ if ($action == 'add') { $action=''; } } elseif ($action == 'delete' && $user->rights->ficheinter->supprimer) { - // delete modele + // delete modele $object->fetch($id); $object->delete(); $id = 0 ; @@ -210,13 +213,10 @@ if ($action == 'add') { } elseif ($action == 'setdate_when' && $user->rights->ficheinter->creer) { // Set next date of execution $object->fetch($id); -$date = dol_mktime( - GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, - GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear') - ); + $date = dol_mktime(GETPOST('date_whenhour'), GETPOST('date_whenmin'), 0, GETPOST('date_whenmonth'), GETPOST('date_whenday'), GETPOST('date_whenyear')); if (!empty($date)) $object->setNextDate($date); } elseif ($action == 'setnb_gen_max' && $user->rights->ficheinter->creer) { -// Set max period + // Set max period $object->fetch($id); $object->setMaxPeriod(GETPOST('nb_gen_max', 'int')); } @@ -230,17 +230,16 @@ llxHeader('', $langs->trans("RepeatableInterventional"), 'ch-fichinter.html#s-fa $form = new Form($db); $companystatic = new Societe($db); -if (! empty($conf->contrat->enabled)) +if (! empty($conf->contrat->enabled)) { $contratstatic = new Contrat($db); -if (! empty($conf->projet->enabled)) +} +if (! empty($conf->projet->enabled)) { $projectstatic = new Project($db); +} $now = dol_now(); $tmparray=dol_getdate($now); -$today = dol_mktime( - 23, 59, 59, - $tmparray['mon'], $tmparray['mday'], $tmparray['year'] -); // Today is last second of current day +$today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day @@ -248,13 +247,13 @@ $today = dol_mktime( * Create mode */ if ($action == 'create') { - print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'fichinter'); $object = new Fichinter($db); // Source invoice //$object = new Managementfichinter($db); // Source invoice if ($object->fetch($id, $ref) > 0) { - print ''; + print ''; print ''; print ''; print ''; @@ -273,7 +272,7 @@ if ($action == 'create') { print ''.$langs->trans("Customer").''; print $form->select_company($object->thirdparty->id, 'socid', '', 0, 1); -// .$object->thirdparty->getNomUrl(1,'customer'). + //.$object->thirdparty->getNomUrl(1,'customer'). print ''; print $langs->trans("Comment"); print ''; @@ -295,10 +294,7 @@ if ($action == 'create') { if (empty($conf->global->FICHINTER_DISABLE_DETAILS)) { // Duration print ''.$langs->trans("TotalDuration").''; -print ''.convertSecondToTime( - $object->duration, 'all', - $conf->global->MAIN_DURATION_OF_WORKDAY - ).''; + print ''.convertSecondToTime($object->duration, 'all', $conf->global->MAIN_DURATION_OF_WORKDAY).''; print ''; } @@ -308,10 +304,7 @@ print ''.convertSecondToTime( print "".$langs->trans("Project").""; $projectid = GETPOST('projectid')?GETPOST('projectid'):$object->fk_project; -$numprojet = $formproject->select_projects( - $object->thirdparty->id, $projectid, 'projectid', - 0, 0, 1, 0, 0, 0, 0, '', 0, 0, '' - ); + $numprojet = $formproject->select_projects($object->thirdparty->id, $projectid, 'projectid', 0, 0, 1, 0, 0, 0, 0, '', 0, 0, ''); print '   '; @@ -342,26 +335,21 @@ $numprojet = $formproject->select_projects( print ''; print $form->textwithpicto($langs->trans("Frequency"), $langs->transnoentitiesnoconv('toolTipFrequency')); print ""; - print " "; -print $form->selectarray( - 'unit_frequency', - array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), - (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m') - ); + print ' '; + print $form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), (GETPOST('unit_frequency')?GETPOST('unit_frequency'):'m')); print ""; // First date of execution for cron print "".$langs->trans('NextDateToExecution').""; - if ($date_next_execution != "") -$date_next_execution = (GETPOST('remonth') ? dol_mktime( - 12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear') - ) : -1); + if ($date_next_execution != "") { + $date_next_execution = (GETPOST('remonth') ? dol_mktime(12, 0, 0, GETPOST('remonth'), GETPOST('reday'), GETPOST('reyear')) : -1); + } print $form->selectDate($date_next_execution, '', 1, 1, '', "add", 1, 1); print ""; // Number max of generation print "".$langs->trans("MaxPeriodNumber").""; - print ''; + print ''; print ""; print ""; @@ -369,29 +357,31 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( print '
    '; $title = $langs->trans("ProductsAndServices"); - if (empty($conf->service->enabled)) + if (empty($conf->service->enabled)) { $title = $langs->trans("Products"); - elseif (empty($conf->product->enabled)) + } elseif (empty($conf->product->enabled)) { $title = $langs->trans("Services"); + } print load_fiche_titre($title, '', ''); /* - * Invoice lines + * Fichinter lines */ print ''; print ''; @@ -436,10 +427,11 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( print ''; print "\n"; } - else - dol_print_error('', "Error, no invoice ".$object->id); + else { + dol_print_error('', "Error, no fichinter ".$object->id); + } } elseif ($action == 'selsocforcreatefrommodel') { - print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'title_commercial.png'); + print load_fiche_titre($langs->trans("CreateRepeatableIntervention"), '', 'commercial'); dol_fiche_head(''); print ''; @@ -488,36 +480,29 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( $morehtmlref.='
    '.$langs->trans('Project') . ' '; if ($user->rights->ficheinter->creer) { if ($action != 'classify') { - $morehtmlref.=''; + $morehtmlref.=''; $morehtmlref.=img_edit($langs->transnoentitiesnoconv('SetProject')).' : '; } if ($action == 'classify') { - - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=''; - $morehtmlref.=$formproject->select_projects( - $object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1 - ); - $morehtmlref.=''; - $morehtmlref.=''; + $morehtmlref.= ''; + $morehtmlref.= ''; + $morehtmlref.= ''; + $morehtmlref.= $formproject->select_projects($object->socid, $object->fk_project, 'projectid', $maxlength, 0, 1, 0, 1, 0, 0, '', 1); + $morehtmlref.= ''; + $morehtmlref.= ''; } else { - $morehtmlref.=$form->form_project( - $_SERVER['PHP_SELF'].'?id='.$object->id, - $object->socid, $object->fk_project, - 'none', 0, 0, 0, 1 - ); + $morehtmlref.= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, 'none', 0, 0, 0, 1); } } else { if (! empty($object->fk_project)) { $proj = new Project($db); $proj->fetch($object->fk_project); - $morehtmlref.='trans('ShowProject').'">'; - $morehtmlref.=$proj->ref; - $morehtmlref.=''; + $morehtmlref.= 'trans('ShowProject').'">'; + $morehtmlref.= $proj->ref; + $morehtmlref.= ''; } else { - $morehtmlref.=''; + $morehtmlref.= ''; } } } @@ -605,12 +590,8 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( print ''; print '
    '; - $sql = 'SELECT l.*'; + $sql = 'SELECT l.rowid, l.description, l.duree'; $sql.= " FROM ".MAIN_DB_PREFIX."fichinterdet as l"; $sql.= " WHERE l.fk_fichinter= ".$object->id; - $sql.= " AND l.fk_product is null "; + //$sql.= " AND l.fk_product is null "; $sql.= " ORDER BY l.rang"; $result = $db->query($sql); if ($result) { $num = $db->num_rows($result); - $i = 0; $total = 0; + $i = 0; + $total = 0; echo ''; if ($num) { @@ -413,15 +403,16 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( print $text.' '.nl2br($objp->description); - // Qty + // Duration print ''; print ""; $i++; } $db->free($result); - } else + } else { print $db->error(); + } print "
    '.convertSecondToTime($objp->duree).'
    "; print '
    '; print ''; print ''; print '
    '; - print " "; - print $form->selectarray( - 'unit_frequency', - array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), - ($object->unit_frequency?$object->unit_frequency:'m') - ); + print ' '; + print $form->selectarray('unit_frequency', array('d'=>$langs->trans('Day'), 'm'=>$langs->trans('Month'), 'y'=>$langs->trans('Year')), ($object->unit_frequency?$object->unit_frequency:'m')); print '
    '; @@ -625,19 +606,13 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( // Date when print ''; if ( $user->rights->ficheinter->creer && ($action == 'date_when' || $object->frequency > 0)) { - print $form->editfieldkey( - $langs->trans("NextDateToExecution"), 'date_when', $object->date_when, - $object, $user->rights->facture->creer, 'day' - ); + print $form->editfieldkey($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } else { print $langs->trans("NextDateToExecution"); } print ''; if ($action == 'date_when' || $object->frequency > 0) { - print $form->editfieldval( - $langs->trans("NextDateToExecution"), 'date_when', $object->date_when, - $object, $user->rights->facture->creer, 'day' - ); + print $form->editfieldval($langs->trans("NextDateToExecution"), 'date_when', $object->date_when, $object, $user->rights->facture->creer, 'day'); } print ''; print ''; @@ -645,19 +620,13 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( // Max period / Rest period print ''; if ($user->rights->ficheinter->creer && ($action == 'nb_gen_max' || $object->frequency > 0)) { - print $form->editfieldkey( - $langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, - $object, $user->rights->facture->creer - ); + print $form->editfieldkey($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max, $object, $user->rights->facture->creer); } else print $langs->trans("MaxPeriodNumber"); print ''; if ($action == 'nb_gen_max' || $object->frequency > 0) { - print $form->editfieldval( - $langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', - $object, $user->rights->facture->creer - ); + print $form->editfieldval($langs->trans("MaxPeriodNumber"), 'nb_gen_max', $object->nb_gen_max?$object->nb_gen_max:'', $object, $user->rights->facture->creer); } else print ''; @@ -671,10 +640,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( if ($object->frequency > 0) { print '
    '; if (empty($conf->cron->enabled)) { - $txtinfoadmin=$langs->trans( - "EnableAndSetupModuleCron", - $langs->transnoentitiesnoconv("Module2300Name") - ); + $txtinfoadmin = $langs->trans("EnableAndSetupModuleCron", $langs->transnoentitiesnoconv("Module2300Name")); print info_admin($txtinfoadmin); } print '
    '; @@ -709,10 +675,11 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( */ $title = $langs->trans("ProductsAndServices"); - if (empty($conf->service->enabled)) + if (empty($conf->service->enabled)) { $title = $langs->trans("Products"); - elseif (empty($conf->product->enabled)) + } elseif (empty($conf->product->enabled)) { $title = $langs->trans("Services"); + } print load_fiche_titre($title); @@ -810,7 +777,7 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( '', $num, '', - 'title_commercial.png' + 'commercial' ); print $langs->trans("ToCreateAPredefinedInterventional").'

    '; @@ -850,8 +817,9 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( $companystatic->id=$objp->socid; $companystatic->name=$objp->name; print ''.$companystatic->getNomUrl(1, 'customer').''; - } else + } else { print ''.$langs->trans("None").''; + } if (! empty($conf->contrat->enabled)) { print ''; @@ -916,13 +884,15 @@ $date_next_execution = (GETPOST('remonth') ? dol_mktime( $i++; } } - } else - print ''.$langs->trans("NoneF").''; + } else { + print ''.$langs->trans("NoneF").''; + } print ""; $db->free($resql); - } else + } else { dol_print_error($db); + } } } llxFooter(); diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index e64b86340f3..f260ec07491 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -20,7 +20,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -82,7 +82,8 @@ $hookmanager->initHooks(array('interventioncard','globalcard')); $object = new Fichinter($db); $extrafields = new ExtraFields($db); -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); + +$extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) @@ -258,7 +259,6 @@ if (empty($reshook)) // Extrafields $extrafields = new ExtraFields($db); - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $array_options = $extrafields->getOptionalsFromPost($object->table_element); $object->array_options = $array_options; @@ -361,11 +361,10 @@ if (empty($reshook)) $predef = ''; // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef); + $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); - $result = $object->addline( + $result = $object->addline( $user, $id, $desc, @@ -397,7 +396,7 @@ if (empty($reshook)) else { // Fill array 'array_options' with data from add form - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) { $error ++; $action = 'create'; @@ -406,7 +405,6 @@ if (empty($reshook)) if (! $error) { // Extrafields - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); $array_options = $extrafields->getOptionalsFromPost($object->table_element); $object->array_options = $array_options; @@ -506,11 +504,10 @@ if (empty($reshook)) // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); - $result=$object->addline( + $result=$object->addline( $user, $id, $desc, @@ -618,9 +615,8 @@ if (empty($reshook)) $objectline->duration = $duration; // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); $objectline->array_options = $array_options; $result = $objectline->update($user); @@ -740,8 +736,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -1202,7 +1197,7 @@ elseif ($id > 0 || ! empty($ref)) if ($user->rights->ficheinter->creer) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.='
    '; @@ -1461,12 +1456,11 @@ elseif ($id > 0 || ! empty($ref)) $line = new FichinterLigne($db); $line->fetch($objp->rowid); - $extrafieldsline = new ExtraFields($db); - $extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element); + $extrafields->fetch_name_optionals_label($line->table_element); $line->fetch_optionals(); - print $line->showOptionals($extrafieldsline, 'view', array('style'=>$bc[$var], 'colspan'=>5)); + print $line->showOptionals($extrafields, 'view', array('colspan'=>5)); } // Line in update mode @@ -1508,11 +1502,10 @@ elseif ($id > 0 || ! empty($ref)) $line = new FichinterLigne($db); $line->fetch($objp->rowid); - $extrafieldsline = new ExtraFields($db); - $extralabelslines=$extrafieldsline->fetch_name_optionals_label($line->table_element); + $extrafields->fetch_name_optionals_label($line->table_element); $line->fetch_optionals(); - print $line->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5)); + print $line->showOptionals($extrafields, 'edit', array('colspan'=>5)); } $i++; @@ -1581,10 +1574,9 @@ elseif ($id > 0 || ! empty($ref)) $lineadd = new FichinterLigne($db); - $extrafieldsline = new ExtraFields($db); - $extralabelslines=$extrafieldsline->fetch_name_optionals_label($lineadd->table_element); + $extrafields->fetch_name_optionals_label($lineadd->table_element); - print $lineadd->showOptionals($extrafieldsline, 'edit', array('style'=>$bc[$var], 'colspan'=>5)); + print $lineadd->showOptionals($extrafields, 'edit', array('colspan'=>5)); if (! $num) print ''; } @@ -1645,11 +1637,10 @@ elseif ($id > 0 || ! empty($ref)) else print ''; } - // create intervention model - if ($conf->global->MAIN_FEATURE_LEVEL >=2 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { + // create intervention model + if ($conf->global->MAIN_FEATURES_LEVEL >=2 && $object->statut == Fichinter::STATUS_DRAFT && $user->rights->ficheinter->creer && (count($object->lines) > 0)) { print '
    '; - // This feature is not yet implemented - print ''.$langs->trans("ChangeIntoRepeatableIntervention").''; + print ''.$langs->trans("ChangeIntoRepeatableIntervention").''; print '
    '; } diff --git a/htdocs/fichinter/class/api_interventions.class.php b/htdocs/fichinter/class/api_interventions.class.php index 12f6824ad4d..ea7a2edd55b 100644 --- a/htdocs/fichinter/class/api_interventions.class.php +++ b/htdocs/fichinter/class/api_interventions.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index 6ff7fac5d08..08bf2c35e53 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php new file mode 100644 index 00000000000..f88653e70eb --- /dev/null +++ b/htdocs/fichinter/class/fichinterrec.class.php @@ -0,0 +1,815 @@ + + * Copyright (C) 2004-2015 Laurent Destailleur + * Copyright (C) 2009-2012 Regis Houssin + * Copyright (C) 2010-2011 Juanjo Menent + * Copyright (C) 2012 Cedric Salvador + * Copyright (C) 2013 Florian Henry + * Copyright (C) 2015 Marcos García + * Copyright (C) 2016-2018 Charlie Benke + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file fichinterrec/class/fichinter-rec.class.php + * \ingroup facture + * \brief Fichier de la classe des factures recurentes + */ + +require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php'; +require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php'; +require_once DOL_DOCUMENT_ROOT.'/fichinter/class/fichinter.class.php'; + + +/** + * Classe de gestion des factures recurrentes/Modeles + */ +class FichinterRec extends Fichinter +{ + public $element = 'fichinterrec'; + public $table_element = 'fichinter_rec'; + public $table_element_line = 'fichinter_rec'; + public $fk_element = 'fk_fichinter'; + public $picto = 'intervention'; + + public $title; + public $number; + public $date; + public $amount; + public $remise; + public $tva; + public $total; + public $db_table; + public $propalid; + + public $date_last_gen; + public $date_when; + public $nb_gen_done; + public $nb_gen_max; + + public $rang; + public $special_code; + + public $usenewprice = 0; + + /** + * Constructor + * + * @param DoliDB $db Database handler + */ + public function __construct($db) + { + $this->db = $db; + + //status dans l'ordre de l'intervention + $this->statuts[0]='Draft'; + $this->statuts[1]='Closed'; + + $this->statuts_short[0]='Draft'; + $this->statuts_short[1]='Closed'; + + $this->statuts_logo[0]='statut0'; + $this->statuts_logo[1]='statut1'; + } + + /** + * Returns the label status + * + * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto + * @return string Label + */ + public function getLibStatut($mode = 0) + { + return $this->LibStatut($this->statut, $mode); + } + + + /** + * Create a predefined fichinter + * + * @param User $user User object + * @param int $notrigger no trigger + * @return int <0 if KO, id of fichinter if OK + */ + public function create($user, $notrigger = 0) + { + global $conf; + + $error=0; + $now=dol_now(); + + // Clean parameters + $this->title = trim($this->title); + $this->description = trim($this->description); + + + $this->db->begin(); + + // Load fichinter model + $fichintsrc = new Fichinter($this->db); + + $result = $fichintsrc->fetch($this->id_origin); + $result = $fichintsrc->fetch_lines(1); // to get all lines + + + if ($result > 0) { + // On positionne en mode brouillon la facture + $this->brouillon = 1; + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinter_rec ("; + $sql.= "titre"; + $sql.= ", fk_soc"; + $sql.= ", entity"; + $sql.= ", datec"; + $sql.= ", duree"; + $sql.= ", description"; + $sql.= ", note_private"; + $sql.= ", note_public"; + $sql.= ", fk_user_author"; + $sql.= ", fk_projet"; + $sql.= ", fk_contrat"; + $sql.= ", modelpdf"; + + $sql.= ", frequency"; + $sql.= ", unit_frequency"; + $sql.= ", date_when"; + $sql.= ", date_last_gen"; + $sql.= ", nb_gen_done"; + $sql.= ", nb_gen_max"; + // $sql.= ", auto_validate"; + + $sql.= ") VALUES ("; + $sql.= "'".$this->db->escape($this->title)."'"; + $sql.= ", ".($this->socid >0 ? $this->socid : 'null'); + $sql.= ", ".$conf->entity; + $sql.= ", '".$this->db->idate($now)."'"; + $sql.= ", ".(!empty($fichintsrc->duration)?$fichintsrc->duration:'0'); + $sql.= ", ".(!empty($this->description)?("'".$this->db->escape($this->description)."'"):"null"); + $sql.= ", ".(!empty($fichintsrc->note_private)?("'".$this->db->escape($fichintsrc->note_private)."'"):"null"); + $sql.= ", ".(!empty($fichintsrc->note_public)?("'".$this->db->escape($fichintsrc->note_public)."'"):"null"); + $sql.= ", '".$user->id."'"; + // si c'est la même société on conserve les liens vers le projet et le contrat + if ($this->socid == $fichintsrc->socid) { + $sql.= ", ".(! empty($fichintsrc->fk_project)?$fichintsrc->fk_project:"null"); + $sql.= ", ".(! empty($fichintsrc->fk_contrat)?$fichintsrc->fk_contrat:"null"); + } else { + $sql.= ", null, null"; + } + + $sql.= ", ".(! empty($fichintsrc->modelpdf)?"'".$this->db->escape($fichintsrc->modelpdf)."'":"''"); + + // récurrence + $sql.= ", ".(! empty($this->frequency)?$this->frequency:"null"); + $sql.= ", '".$this->db->escape($this->unit_frequency)."'"; + $sql.= ", ".(!empty($this->date_when)?"'".$this->db->idate($this->date_when)."'":'null'); + $sql.= ", ".(!empty($this->date_last_gen)?"'".$this->db->idate($this->date_last_gen)."'":'null'); + $sql.= ", 0"; // we start à 0 + $sql.= ", ".$this->nb_gen_max; + // $sql.= ", ".$this->auto_validate; + $sql.= ")"; + + if ($this->db->query($sql)) { + $this->id = $this->db->last_insert_id(MAIN_DB_PREFIX.$this->table_element); + + /* + * Lines + */ + $num=count($fichintsrc->lines); + for ($i = 0; $i < $num; $i++) { + //$result=$fichintlignesrc->fetch($fichintsrc->lines[$i]->id); + + //var_dump($fichintsrc->lines[$i]); + $result_insert = $this->addline( + $fichintsrc->lines[$i]->desc, + $fichintsrc->lines[$i]->duration, + $fichintsrc->lines[$i]->datei, + $fichintsrc->lines[$i]->rang, + $fichintsrc->lines[$i]->subprice, + $fichintsrc->lines[$i]->qty, + $fichintsrc->lines[$i]->tva_tx, + $fichintsrc->lines[$i]->fk_product, + $fichintsrc->lines[$i]->remise_percent, + 'HT', + 0, + '', + 0, + $fichintsrc->lines[$i]->product_type, + $fichintsrc->lines[$i]->special_code, + $fichintsrc->lines[$i]->label, + $fichintsrc->lines[$i]->fk_unit + ); + + if ($result_insert < 0) + $error++; + } + + if ($error) + $this->db->rollback(); + else { + $this->db->commit(); + return $this->id; + } + } else { + $this->error=$this->db->error().' sql='.$sql; + $this->db->rollback(); + return -2; + } + } else { + $this->db->rollback(); + return -1; + } + } + + + /** + * Recupere l'objet facture et ses lignes de factures + * + * @param int $rowid Id of object to load + * @param string $ref Reference of fichinter + * @param string $ref_ext External reference of fichinter + * @param int $ref_int Internal reference of other object + * @return int >0 if OK, <0 if KO, 0 if not found + */ + public function fetch($rowid = 0, $ref = '', $ref_ext = '', $ref_int = '') + { + $sql = 'SELECT f.titre, f.fk_soc'; + $sql.= ', f.datec, f.duree, f.fk_projet, f.fk_contrat, f.description'; + $sql.= ', f.note_private, f.note_public, f.fk_user_author'; + $sql.= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.auto_validate'; + $sql.= ', f.note_private, f.note_public, f.fk_user_author'; + + $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinter_rec as f'; + if ($rowid >0 ) $sql.= ' WHERE f.rowid='.$rowid; + elseif ($ref) $sql.= " WHERE f.titre='".$this->db->escape($ref)."'"; + + /* This field are not used for template fichinter + if ($ref_ext) $sql.= " AND f.ref_ext='".$this->db->escape($ref_ext)."'"; + if ($ref_int) $sql.= " AND f.ref_int='".$this->db->escape($ref_int)."'"; + */ + + dol_syslog(get_class($this)."::fetch rowid=".$rowid, LOG_DEBUG); + + $result = $this->db->query($sql); + if ($result) { + if ($this->db->num_rows($result)) { + $obj = $this->db->fetch_object($result); + + $this->id = $rowid; + $this->titre = $obj->titre; + $this->ref = $obj->titre; + $this->description = $obj->description; + $this->datec = $obj->datec; + $this->duration = $obj->duree; + $this->socid = $obj->fk_soc; + $this->statut = 0; + $this->fk_project = $obj->fk_projet; + $this->fk_contrat = $obj->fk_contrat; + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; + $this->user_author = $obj->fk_user_author; + $this->modelpdf = $obj->model_pdf; + $this->rang = $obj->rang; + $this->special_code = $obj->special_code; + $this->frequency = $obj->frequency; + $this->unit_frequency = $obj->unit_frequency; + $this->date_when = $this->db->jdate($obj->date_when); + $this->date_last_gen = $this->db->jdate($obj->date_last_gen); + $this->nb_gen_done = $obj->nb_gen_done; + $this->nb_gen_max = $obj->nb_gen_max; + $this->auto_validate = $obj->auto_validate; + + $this->brouillon = 1; + + /* + * Lines + */ + $result=$this->fetch_lines(); + if ($result < 0) { + $this->error=$this->db->error(); + return -3; + } + return 1; + } else { + $this->error='Interventional with id '.$rowid.' not found sql='.$sql; + dol_syslog(get_class($this).'::Fetch Error '.$this->error, LOG_ERR); + return -2; + } + } else { + $this->error=$this->db->error(); + return -1; + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Recupere les lignes de factures predefinies dans this->lines + * @param int $sall sall + * + * @return int 1 if OK, < 0 if KO + */ + public function fetch_lines($sall = 0) + { + // phpcs:enable + $sql = 'SELECT l.rowid, l.fk_product, l.product_type, l.label as custom_label, l.description, '; + $sql.= ' l.price, l.qty, l.tva_tx, l.remise, l.remise_percent, l.subprice, l.duree, '; + $sql.= ' l.total_ht, l.total_tva, l.total_ttc,'; + $sql.= ' l.rang, l.special_code,'; + $sql.= ' l.fk_unit, p.ref as product_ref, p.fk_product_type as fk_product_type,'; + $sql.= ' p.label as product_label, p.description as product_desc'; + $sql.= ' FROM '.MAIN_DB_PREFIX.'fichinterdet_rec as l'; + $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'product as p ON l.fk_product = p.rowid'; + $sql.= ' WHERE l.fk_fichinter = '.$this->id; + + dol_syslog('FichInter-rec::fetch_lines', LOG_DEBUG); + $result = $this->db->query($sql); + if ($result) { + $num = $this->db->num_rows($result); + $i = 0; + while ($i < $num) { + $objp = $this->db->fetch_object($result); + $line = new FichinterLigne($this->db); + + $line->rowid = $objp->rowid; + $line->label = $objp->custom_label; // Label line + $line->desc = $objp->description; // Description line + $line->product_type = $objp->product_type; // Type of line + $line->product_ref = $objp->product_ref; // Ref product + $line->libelle = $objp->product_label; // deprecated + $line->product_label = $objp->product_label; // Label product + $line->product_desc = $objp->product_desc; // Description product + $line->fk_product_type = $objp->fk_product_type; // Type of product + $line->qty = $objp->qty; + $line->duree = $objp->duree; + $line->duration = $objp->duree; + $line->datei = $objp->date; + $line->subprice = $objp->subprice; + $line->tva_tx = $objp->tva_tx; + $line->remise_percent = $objp->remise_percent; + $line->fk_remise_except = $objp->fk_remise_except; + $line->fk_product = $objp->fk_product; + $line->date_start = $objp->date_start; + $line->date_end = $objp->date_end; + $line->date_start = $objp->date_start; + $line->date_end = $objp->date_end; + $line->info_bits = $objp->info_bits; + $line->total_ht = $objp->total_ht; + $line->total_tva = $objp->total_tva; + $line->total_ttc = $objp->total_ttc; + $line->code_ventilation = $objp->fk_code_ventilation; + $line->rang = $objp->rang; + $line->special_code = $objp->special_code; + $line->fk_unit = $objp->fk_unit; + + // Ne plus utiliser + $line->price = $objp->price; + $line->remise = $objp->remise; + + $this->lines[$i] = $line; + + $i++; + } + + $this->db->free($result); + return 1; + } else { + $this->error=$this->db->error(); + return -3; + } + } + + + /** + * Delete template fichinter rec + * + * @param int $rowid Id of fichinter rec to delete. If empty, we delete current instance of fichinter rec + * @param int $notrigger 1=Does not execute triggers, 0= execute triggers + * @param int $idwarehouse Id warehouse to use for stock change. + * @return int <0 if KO, >0 if OK + */ + public function delete($rowid = 0, $notrigger = 0, $idwarehouse = -1) + { + if (empty($rowid)) $rowid=$this->id; + + dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG); + + $error=0; + $this->db->begin(); + + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinterdet_rec WHERE fk_fichinter = ".$rowid; + dol_syslog($sql); + if ($this->db->query($sql)) { + $sql = "DELETE FROM ".MAIN_DB_PREFIX."fichinter_rec WHERE rowid = ".$rowid; + dol_syslog($sql); + if (! $this->db->query($sql)) { + $this->error=$this->db->lasterror(); + $error=-1; + } + } else { + $this->error=$this->db->lasterror(); + $error=-2; + } + + if (! $error) { + $this->db->commit(); + return 1; + } else { + $this->db->rollback(); + return $error; + } + } + + + /** + * Add a line to fichinter rec + * + * @param string $desc Description de la ligne + * @param integer $duration Durée + * @param string $datei Date + * @param int $rang Position of line + * @param double $pu_ht Prix unitaire HT (> 0 even for credit note) + * @param double $qty Quantite + * @param double $txtva Taux de tva force, sinon -1 + * @param int $fk_product Id du produit/service predefini + * @param double $remise_percent Pourcentage de remise de la ligne + * @param string $price_base_type HT or TTC + * @param int $info_bits Bits de type de lignes + * @param int $fk_remise_except Id remise + * @param double $pu_ttc Prix unitaire TTC (> 0 even for credit note) + * @param int $type Type of line (0=product, 1=service) + * @param int $special_code Special code + * @param string $label Label of the line + * @param string $fk_unit Unit + * @return int <0 if KO, Id of line if OK + */ + public function addline($desc, $duration, $datei, $rang = -1, $pu_ht = 0, $qty = 0, $txtva = 0, $fk_product = 0, $remise_percent = 0, $price_base_type = 'HT', $info_bits = 0, $fk_remise_except = '', $pu_ttc = 0, $type = 0, $special_code = 0, $label = '', $fk_unit = null) + { + global $mysoc; + + include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; + + // Check parameters + if ($type < 0) return -1; + + if ($this->brouillon) { + // Clean parameters + $remise_percent = price2num($remise_percent); + $qty = price2num($qty); + if (! $qty) $qty=1; + if (! $info_bits) $info_bits=0; + $pu_ht = price2num($pu_ht); + $pu_ttc = price2num($pu_ttc); + $txtva = price2num($txtva); + + if ($price_base_type=='HT') { + $pu=$pu_ht; + } else { + $pu=$pu_ttc; + } + + + // Calcul du total TTC et de la TVA pour la ligne a partir de + // qty, pu, remise_percent et txtva + // TRES IMPORTANT: C'est au moment de l'insertion ligne qu'on doit stocker + // la part ht, tva et ttc, et ce au niveau de la ligne qui a son propre taux tva. + $tabprice = calcul_price_total($qty, $pu, $remise_percent, $txtva, 0, 0, 0, $price_base_type, $info_bits, $type, $mysoc); + + $total_ht = $tabprice[0]; + $total_tva = $tabprice[1]; + $total_ttc = $tabprice[2]; + + $product_type = $type; + if ($fk_product) { + $product = new Product($this->db); + $result = $product->fetch($fk_product); + $product_type = $product->type; + } + + $sql = "INSERT INTO ".MAIN_DB_PREFIX."fichinterdet_rec ("; + $sql.= "fk_fichinter"; + $sql.= ", label"; + $sql.= ", description"; + $sql.= ", date"; + $sql.= ", duree"; + //$sql.= ", price"; + //$sql.= ", qty"; + //$sql.= ", tva_tx"; + $sql.= ", fk_product"; + $sql.= ", product_type"; + $sql.= ", remise_percent"; + //$sql.= ", subprice"; + $sql.= ", remise"; + $sql.= ", total_ht"; + $sql.= ", total_tva"; + $sql.= ", total_ttc"; + $sql.= ", rang"; + //$sql.= ", special_code"; + $sql.= ", fk_unit"; + $sql.= ") VALUES ("; + $sql.= (int) $this->id; + $sql.= ", ".(! empty($label)?"'".$this->db->escape($label)."'":"null"); + $sql.= ", ".(! empty($desc)?"'".$this->db->escape($desc)."'":"null"); + $sql.= ", ".(! empty($datei)?"'".$this->db->idate($datei)."'":"null"); + $sql.= ", ".$duration; + //$sql.= ", ".price2num($pu_ht); + //$sql.= ", ".(!empty($qty)? $qty :(!empty($duration)? $duration :"null")); + //$sql.= ", ".price2num($txtva); + $sql.= ", ".(! empty($fk_product)? $fk_product :"null"); + $sql.= ", ".$product_type; + $sql.= ", ".(! empty($remise_percent)? $remise_percent:"null"); + //$sql.= ", '".price2num($pu_ht)."'"; + $sql.= ", null"; + $sql.= ", '".price2num($total_ht)."'"; + $sql.= ", '".price2num($total_tva)."'"; + $sql.= ", '".price2num($total_ttc)."'"; + $sql.= ", ".(int) $rang; + //$sql.= ", ".$special_code; + $sql.= ", ".(! empty($fk_unit) ? $fk_unit :"null"); + $sql.= ")"; + + dol_syslog(get_class($this)."::addline", LOG_DEBUG); + if ($this->db->query($sql)) { + return 1; + } else { + $this->error=$this->db->lasterror(); + return -1; + } + } + } + + + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps + /** + * Rend la fichinter automatique + * + * @param User $user User object + * @param int $freq Freq + * @param string $courant Courant + * @return int 0 if OK, <0 if KO + */ + public function set_auto($user, $freq, $courant) + { + // phpcs:enable + if ($user->rights->fichinter->creer) { + $sql = "UPDATE ".MAIN_DB_PREFIX."fichinter_rec "; + $sql .= " SET frequency='".$this->db->escape($freq)."'"; + $sql .= ", last_gen='".$this->db->escape($courant)."'"; + $sql .= " WHERE rowid = ".$this->id; + + $resql = $this->db->query($sql); + + if ($resql) { + $this->frequency = $freq; + $this->last_gen = $courant; + return 0; + } else { + dol_print_error($this->db); + return -1; + } + } else { + return -2; + } + } + + /** + * Return clicable name (with picto eventually) + * + * @param int $withpicto Add picto into link + * @param string $option Where point the link + * @param int $max Maxlength of ref + * @param int $short 1=Return just URL + * @param string $moretitle Add more text to title tooltip + * @return string String with URL + */ + public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '') + { + global $langs; + + $result=''; + $label=$langs->trans("ShowInterventionModel").': '.$this->ref; + + $url = DOL_URL_ROOT.'/fichinter/card-rec.php?id='.$this->id; + + if ($short) return $url; + + $picto='intervention'; + + $link = ''; + $linkend=''; + + if ($withpicto) { + $result.= $link.img_object($label, $picto, 'class="classfortooltip"').$linkend; + } + if ($withpicto && $withpicto != 2) { + $result.=' '; + } + if ($withpicto != 2) { + $result.=$link.$this->ref.$linkend; + } + return $result; + } + + + /** + * Initialise an instance with random values. + * Used to build previews or test instances. + * id must be 0 if object instance is a specimen. + * + * @param string $option ''=Create a specimen fichinter with lines, 'nolines'=No lines + * @return void + */ + public function initAsSpecimen($option = '') + { + global $user, $langs, $conf; + + $now=dol_now(); + $arraynow=dol_getdate($now); + $nownotime=dol_mktime(0, 0, 0, $arraynow['mon'], $arraynow['mday'], $arraynow['year']); + + parent::initAsSpecimen($option); + + $this->usenewprice = 1; + } + + /** + * Function used to replace a thirdparty id with another one. + * + * @param DoliDB $db Database handler + * @param int $origin_id Old thirdparty id + * @param int $dest_id New thirdparty id + * @return bool + */ + public static function replaceThirdparty(DoliDB $db, $origin_id, $dest_id) + { + $tables = array( 'fichinter_rec' ); + + return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables); + } + + + /** + * Update frequency and unit + * + * @param int $frequency value of frequency + * @param string $unit unit of frequency (d, m, y) + * @return int <0 if KO, >0 if OK + */ + public function setFrequencyAndUnit($frequency, $unit) + { + if (! $this->table_element) { + dol_syslog(get_class($this)."::setFrequencyAndUnit called with table_element not defined", LOG_ERR); + return -1; + } + + if (!empty($frequency) && empty($unit)) { + dol_syslog(get_class($this)."::setFrequencyAndUnit called with frequency defined but unit not ", LOG_ERR); + return -2; + } + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql.= ' SET frequency = '.($frequency?$this->db->escape($frequency):'null'); + if (!empty($unit)) { + $sql.= ', unit_frequency = "'.$this->db->escape($unit).'"'; + } + $sql.= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setFrequencyAndUnit", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->frequency = $frequency; + if (!empty($unit)) $this->unit_frequency = $unit; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the next date of execution + * + * @param datetime $date date of execution + * @param int $increment_nb_gen_done 0 do nothing more, >0 increment nb_gen_done + * @return int <0 if KO, >0 if OK + */ + public function setNextDate($date, $increment_nb_gen_done = 0) + { + if (! $this->table_element) { + dol_syslog(get_class($this)."::setNextDate was called on objet with property table_element not defined", LOG_ERR); + return -1; + } + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql.= " SET date_when = ".($date ? "'".$this->db->idate($date)."'" : "null"); + if ($increment_nb_gen_done>0) $sql.= ', nb_gen_done = nb_gen_done + 1'; + $sql.= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setNextDate", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->date_when = $date; + if ($increment_nb_gen_done>0) $this->nb_gen_done++; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the maximum period + * + * @param int $nb number of maximum period + * @return int <0 if KO, >0 if OK + */ + public function setMaxPeriod($nb) + { + if (! $this->table_element) { + dol_syslog(get_class($this)."::setMaxPeriod was called on objet with property table_element not defined", LOG_ERR); + return -1; + } + + if (empty($nb)) $nb=0; + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql.= ' SET nb_gen_max = '.$nb; + $sql.= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setMaxPeriod", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->nb_gen_max = $nb; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the auto validate fichinter + * + * @param int $validate 0 to create in draft, 1 to create and validate fichinter + * @return int <0 if KO, >0 if OK + */ + public function setAutoValidate($validate) + { + if (! $this->table_element) { + dol_syslog(get_class($this)."::setAutoValidate called with property table_element not defined", LOG_ERR); + return -1; + } + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql.= ' SET auto_validate = '.$validate; + $sql.= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->auto_validate = $validate; + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } + + /** + * Update the Number of Generation Done + * + * @return int <0 if KO, >0 if OK + */ + public function updateNbGenDone() + { + if (! $this->table_element) { + dol_syslog(get_class($this)."::updateNbGenDone called with property table_element not defined", LOG_ERR); + return -1; + } + + $sql = 'UPDATE '.MAIN_DB_PREFIX.$this->table_element; + $sql.= ' SET nb_gen_done = nb_gen_done + 1'; + $sql.= ' , date_last_gen = now()'; + // si on et arrivé à la fin des génération + if ($this->nb_gen_max == $this->nb_gen_done+1) + $sql.= ' , statut = 1'; + + $sql.= ' WHERE rowid = '.$this->id; + + dol_syslog(get_class($this)."::setAutoValidate", LOG_DEBUG); + if ($this->db->query($sql)) { + $this->nb_gen_done = $this->nb_gen_done+1; + $this->nb_gen_done = dol_now(); + return 1; + } else { + dol_print_error($this->db); + return -1; + } + } +} diff --git a/htdocs/fichinter/class/fichinterstats.class.php b/htdocs/fichinter/class/fichinterstats.class.php index a5d50dedf54..d762657caec 100644 --- a/htdocs/fichinter/class/fichinterstats.class.php +++ b/htdocs/fichinter/class/fichinterstats.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fichinter/contact.php b/htdocs/fichinter/contact.php index d38bb7673b5..494a1156b4f 100644 --- a/htdocs/fichinter/contact.php +++ b/htdocs/fichinter/contact.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -142,7 +142,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->ficheinter->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fichinter/document.php b/htdocs/fichinter/document.php index d5aed88079a..b6d70669cc7 100644 --- a/htdocs/fichinter/document.php +++ b/htdocs/fichinter/document.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -121,7 +121,7 @@ if ($object->id) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fichinter/index.php b/htdocs/fichinter/index.php index f97c99dc839..178a7597626 100644 --- a/htdocs/fichinter/index.php +++ b/htdocs/fichinter/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fichinter/info.php b/htdocs/fichinter/info.php index 3e2866c5c76..30aec089ee6 100644 --- a/htdocs/fichinter/info.php +++ b/htdocs/fichinter/info.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -84,7 +84,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fichinter/list.php b/htdocs/fichinter/list.php index e54aa7940d3..7160eb8152c 100644 --- a/htdocs/fichinter/list.php +++ b/htdocs/fichinter/list.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -83,10 +83,12 @@ if (! $sortfield) // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $object = new Fichinter($db); $hookmanager->initHooks(array('interventionlist')); + $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('fichinter'); +$extrafields->fetch_name_optionals_label('fichinter'); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -219,7 +221,7 @@ if (!empty($conf->projet->enabled)) { if (!empty($conf->contrat->enabled)) { $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."contrat as c on f.fk_contrat = c.rowid"; } -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinter_extrafields as ef on (f.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (f.rowid = ef.fk_object)"; if (empty($conf->global->FICHINTER_DISABLE_DETAILS) && $atleastonefieldinlines) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."fichinterdet as fd ON fd.fk_fichinter = f.rowid"; if (! $user->rights->societe->client->voir && empty($socid)) $sql.= ", ".MAIN_DB_PREFIX."societe_commerciaux as sc"; $sql.= ", ".MAIN_DB_PREFIX."societe as s"; @@ -327,7 +329,7 @@ if ($resql) print ''; print ''; - print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="Information"; $modelmail="intervention"; diff --git a/htdocs/fichinter/note.php b/htdocs/fichinter/note.php index 3641566e598..d7ba3a3c178 100644 --- a/htdocs/fichinter/note.php +++ b/htdocs/fichinter/note.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -87,7 +87,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fichinter/stats/index.php b/htdocs/fichinter/stats/index.php index 096584d8936..326901728da 100644 --- a/htdocs/fichinter/stats/index.php +++ b/htdocs/fichinter/stats/index.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -65,7 +65,7 @@ $dir=$conf->ficheinter->dir_temp; llxHeader('', $title); -print load_fiche_titre($title, '', 'title_commercial.png'); +print load_fiche_titre($title, '', 'commercial'); dol_mkdir($dir); diff --git a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php index cc2bf4cea26..ea69d287880 100644 --- a/htdocs/fichinter/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fichinter/tpl/linkedobjectblock.tpl.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/filefunc.inc.php b/htdocs/filefunc.inc.php index a4ae8c15542..9e6837c093b 100644 --- a/htdocs/filefunc.inc.php +++ b/htdocs/filefunc.inc.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/ajax/getSupplierPrices.php b/htdocs/fourn/ajax/getSupplierPrices.php index 85b0ed37155..24c68a6aced 100644 --- a/htdocs/fourn/ajax/getSupplierPrices.php +++ b/htdocs/fourn/ajax/getSupplierPrices.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php index 5ebe8ffed56..49e305449ac 100644 --- a/htdocs/fourn/card.php +++ b/htdocs/fourn/card.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -59,7 +59,7 @@ $object = new Fournisseur($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('suppliercard','globalcard')); @@ -120,8 +120,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; @@ -232,7 +231,7 @@ if ($object->id > 0) print ''; + if (($action != 'editconditions') && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('PaymentConditions'); print ''; - if (($action != 'editconditions') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
    '; print ''; if ($action == 'editconditions') @@ -251,7 +250,7 @@ if ($object->id > 0) print ''; + if (($action != 'editmode') && $user->rights->societe->creer) print ''; print '
    '; print $langs->trans('PaymentMode'); print ''; - if (($action != 'editmode') && $user->rights->societe->creer) print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; print ''; if ($action == 'editmode') @@ -272,7 +271,7 @@ if ($object->id > 0) print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { - print ''.img_edit($langs->trans("Modify")).''; + print ''.img_edit($langs->trans("Modify")).''; } print ''; print ''.($object->remise_supplier_percent?''.$object->remise_supplier_percent.'%':'').''; @@ -286,7 +285,7 @@ if ($object->id > 0) print ''; if ($user->rights->societe->creer && !$user->societe_id > 0) { - print ''.img_edit($langs->trans("Modify")).''; + print ''.img_edit($langs->trans("Modify")).''; } print ''; print ''; @@ -605,9 +604,16 @@ if ($object->id > 0) $sql2.= ' WHERE c.fk_soc = s.rowid'; $sql2.= " AND c.entity IN (".getEntity('commande_fournisseur').")"; $sql2.= ' AND s.rowid = '.$object->id; - // Show orders with status validated, shipping started and delivered (even if any order we can bill). - //$sql2.= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.", ".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; - $sql2.= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; // Must match filter in htdocs/fourn/orderstoinvoice.php + // Show orders we can bill + if (empty($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)) + { + $sql2.= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; // Must match filter in htdocs/fourn/orderstoinvoice.php + } + else + { + // CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.", ".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY + $sql2.= " AND c.fk_statut IN (".$db->escape($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS).")"; + } $sql2.= " AND c.billed = 0"; // Find order that are not already invoiced // just need to check received status because we have the billed status now diff --git a/htdocs/fourn/class/api_supplier_invoices.class.php b/htdocs/fourn/class/api_supplier_invoices.class.php index 70455ef3625..ca712c456f9 100644 --- a/htdocs/fourn/class/api_supplier_invoices.class.php +++ b/htdocs/fourn/class/api_supplier_invoices.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/fourn/class/api_supplier_orders.class.php b/htdocs/fourn/class/api_supplier_orders.class.php index 323ddf29521..c09c62a4714 100644 --- a/htdocs/fourn/class/api_supplier_orders.class.php +++ b/htdocs/fourn/class/api_supplier_orders.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ use Luracast\Restler\RestException; diff --git a/htdocs/fourn/class/fournisseur.class.php b/htdocs/fourn/class/fournisseur.class.php index 42e9b9153db..c0473759a6d 100644 --- a/htdocs/fourn/class/fournisseur.class.php +++ b/htdocs/fourn/class/fournisseur.class.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 64c7ca73b7b..4536cdc5bbd 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -23,7 +23,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -625,18 +625,17 @@ class CommandeFournisseur extends CommonOrder /** * Return label of a status * - * @param int $statut Id statut + * @param int $status Id statut * @param int $mode 0=Long label, 1=Short label, 2=Picto + Short label, 3=Picto, 4=Picto + Long label, 5=Short label + Picto * @param int $billed 1=Billed * @return string Label of status */ - public function LibStatut($statut, $mode = 0, $billed = 0) + public function LibStatut($status, $mode = 0, $billed = 0) { // phpcs:enable global $conf, $langs; - if (empty($this->statuts) || empty($this->statutshort)) - { + if (empty($this->statuts) || empty($this->statutshort)){ $langs->load('orders'); $this->statuts[0] = 'StatusSupplierOrderDraft'; @@ -662,55 +661,33 @@ class CommandeFournisseur extends CommonOrder $this->statutshort[9] = 'StatusSupplierOrderRefusedShort'; } - $billedtext=''; - //if ($statut==5 && $this->billed == 1) $statut = 8; - if ($billed == 1) $billedtext=$langs->trans("Billed"); + $statustrans = array( + 0 => 'status0', + 1 => 'status1', + 2 => 'status3', + 3 => 'status3', + 4 => 'status3', + 5 => 'status6', + 6 => 'status5', + 7 => 'status5', - if ($mode == 0) - { - return $langs->trans($this->statuts[$statut]); + 9 => 'status5', + ); + + $statusClass = 'status0'; + if(!empty($statustrans[$status])){ + $statusClass = $statustrans[$status]; } - elseif ($mode == 1) - { - return $langs->trans($this->statutshort[$statut]); - } - elseif ($mode == 2) - { - return $langs->trans($this->statuts[$statut]); - } - elseif ($mode == 3) - { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut==3) return img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut==4) return img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut==5) return img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - elseif ($statut==6 || $statut==7) return img_picto($langs->trans($this->statuts[$statut]), 'statut5'); - elseif ($statut==9) return img_picto($langs->trans($this->statuts[$statut]), 'statut5'); - } - elseif ($mode == 4) - { - if ($statut==0) return img_picto($langs->trans($this->statuts[$statut]), 'statut0').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==1) return img_picto($langs->trans($this->statuts[$statut]), 'statut1').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==2) return img_picto($langs->trans($this->statuts[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==3) return img_picto($langs->trans($this->statuts[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==4) return img_picto($langs->trans($this->statuts[$statut]), 'statut3').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==5) return img_picto($langs->trans($this->statuts[$statut]), 'statut6').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==6 || $statut==7) return img_picto($langs->trans($this->statuts[$statut]), 'statut5').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - elseif ($statut==9) return img_picto($langs->trans($this->statuts[$statut]), 'statut5').' '.$langs->trans($this->statuts[$statut]).($billedtext?' - '.$billedtext:''); - } - elseif ($mode == 5) - { - if ($statut==0) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut0'); - elseif ($statut==1) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut1'); - elseif ($statut==2) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut==3) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut==4) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut3'); - elseif ($statut==5) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut6'); - elseif ($statut==6 || $statut==7) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut5'); - elseif ($statut==9) return ''.$langs->trans($this->statutshort[$statut]).' '.img_picto($langs->trans($this->statuts[$statut]), 'statut5'); + + $billedtext = ''; + if($mode == 4 && $billed){ + $billedtext = ' - '.$langs->trans("Billed"); } + + $statusLong = $langs->trans($this->statuts_long[$status]).$billedtext; + $statusShort = $langs->trans($this->statutshort[$status]); + + return dolGetStatus($statusLong, $statusShort, '', $statusClass, $mode); } @@ -2804,9 +2781,10 @@ class CommandeFournisseur extends CommonOrder * Load indicators for dashboard (this->nbtodo and this->nbtodolate) * * @param User $user Objet user + * @param int $mode "opened", "awaiting" for orders awaiting reception * @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK */ - public function load_board($user) + public function load_board($user, $mode = 'opened') { // phpcs:enable global $conf, $langs; @@ -2822,7 +2800,12 @@ class CommandeFournisseur extends CommonOrder $clause = " AND"; } $sql.= $clause." c.entity = ".$conf->entity; - $sql.= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; + if($mode==='awaiting'){ + $sql.= " AND c.fk_statut = ".self::STATUS_ORDERSENT; + } + else{ + $sql.= " AND c.fk_statut IN (".self::STATUS_VALIDATED.", ".self::STATUS_ACCEPTED.")"; + } if ($user->societe_id) $sql.=" AND c.fk_soc = ".$user->societe_id; $resql=$this->db->query($sql); @@ -2834,9 +2817,15 @@ class CommandeFournisseur extends CommonOrder $response->warning_delay=$conf->commande->fournisseur->warning_delay/60/60/24; $response->label=$langs->trans("SuppliersOrdersToProcess"); $response->labelShort=$langs->trans("Opened"); - $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2,3&mainmenu=commercial&leftmenu=orders_suppliers'; + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=1,2&mainmenu=commercial&leftmenu=orders_suppliers'; $response->img=img_object('', "order"); + if($mode==='awaiting'){ + $response->label=$langs->trans("SuppliersOrdersAwaitingReception"); + $response->labelShort=$langs->trans("AwaitingReception"); + $response->url=DOL_URL_ROOT.'/fourn/commande/list.php?statut=3&mainmenu=commercial&leftmenu=orders_suppliers'; + } + while ($obj=$this->db->fetch_object($resql)) { $response->nbtodo++; @@ -3511,6 +3500,8 @@ class CommandeFournisseurLigne extends CommonOrderLine $error=0; + $this->db->begin(); + // Mise a jour ligne en base $sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET"; $sql.= " description='".$this->db->escape($this->desc)."'"; diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php index 14c114efdbf..d31c6fd77cc 100644 --- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php +++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index ac19cac8a34..19a65abdfd9 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -25,7 +25,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/class/fournisseur.product.class.php b/htdocs/fourn/class/fournisseur.product.class.php index 91560fb8bca..5eaafeabad3 100644 --- a/htdocs/fourn/class/fournisseur.product.class.php +++ b/htdocs/fourn/class/fournisseur.product.class.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index 9ba504bb876..dd497888987 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index a014f819d35..7fe73ab425e 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -21,8 +21,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -91,7 +91,7 @@ $object = new CommandeFournisseur($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) @@ -370,9 +370,8 @@ if (empty($reshook)) $price_ht_devise = GETPOST('multicurrency_price_ht'); // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -678,9 +677,8 @@ if (empty($reshook)) $pu_ht_devise = GETPOST('multicurrency_subprice'); // Extrafields Lines - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); // Unset extrafield POST Data if (is_array($extralabelsline)) { foreach ($extralabelsline as $key => $value) { @@ -1042,8 +1040,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form - $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -1100,7 +1097,7 @@ if (empty($reshook)) // Fill array 'array_options' with data from add form if (! $error) { - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; } @@ -1910,7 +1907,7 @@ elseif (! empty($object->id)) } if(empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) || $action != 'edit_thirdparty') { if(! empty($conf->global->MAIN_CAN_EDIT_SUPPLIER_ON_SUPPLIER_ORDER) && $object->statut == CommandeFournisseur::STATUS_DRAFT) { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetThirdParty')) . ''; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetThirdParty')) . ''; } $morehtmlref .= ' : '.$object->thirdparty->getNomUrl(1); if(empty($conf->global->MAIN_DISABLE_OTHER_LINK) && $object->thirdparty->id > 0) $morehtmlref .= ' (' . $langs->trans("OtherOrders") . ')'; @@ -1922,7 +1919,7 @@ elseif (! empty($object->id)) $morehtmlref .= '
    ' . $langs->trans('Project') . ' '; if($user->rights->fournisseur->commande->creer) { if($action != 'classify') - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= ''; @@ -2011,7 +2008,7 @@ elseif (! empty($object->id)) print ''; + if ($action != 'editconditions') print ''; print '
    '; print $langs->trans('PaymentConditions'); print ''; - if ($action != 'editconditions') print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).'id.'">'.img_edit($langs->trans('SetConditions'), 1).'
    '; print ''; if ($action == 'editconditions') @@ -2031,7 +2028,7 @@ elseif (! empty($object->id)) print ''; - if ($action != 'editmode') print ''; + if ($action != 'editmode') print ''; print '
    '; print $langs->trans('PaymentMode'); print 'id.'">'.img_edit($langs->trans('SetMode'), 1).'id.'">'.img_edit($langs->trans('SetMode'), 1).'
    '; print ''; if ($action == 'editmode') @@ -2054,7 +2051,7 @@ elseif (! empty($object->id)) print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print ''; if ($action != 'editmulticurrencycode' && $object->statut == CommandeFournisseur::STATUS_DRAFT) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if ($action == 'editmulticurrencycode') { @@ -2071,7 +2068,7 @@ elseif (! empty($object->id)) print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print ''; if ($action != 'editmulticurrencyrate' && $object->statut == CommandeFournisseur::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { @@ -2098,7 +2095,7 @@ elseif (! empty($object->id)) print $langs->trans('BankAccount'); print ''; if ($action != 'editbankaccount' && $user->rights->fournisseur->commande->creer) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).''; print ''; print ''; if ($action == 'editbankaccount') { @@ -2115,7 +2112,7 @@ elseif (! empty($object->id)) print ''; - if ($action != 'editdate_livraison') print ''; + if ($action != 'editdate_livraison') print ''; print '
    '; print $langs->trans('DateDeliveryPlanned'); print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).'
    '; print ''; if ($action == 'editdate_livraison') @@ -2153,7 +2150,7 @@ elseif (! empty($object->id)) print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->fournisseur->commande->creer) print ''.img_edit().''; + if ($user->rights->fournisseur->commande->creer) print ''.img_edit().''; else print ' '; print '
    '; print ''; @@ -2411,7 +2408,7 @@ elseif (! empty($object->id)) } // Send - if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED, 3, 4, 5))) + if (in_array($object->statut, array(CommandeFournisseur::STATUS_ACCEPTED, 3, 4, 5)) || !empty($conf->global->SUPPLIER_ORDER_SENDBYEMAIL_FOR_ALL_STATUS)) { if ($user->rights->fournisseur->commande->commander) { diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 5f3b87c252f..ca5ad3988fc 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -158,7 +158,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->fournisseur->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 9be757cf87e..ad9f0018412 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -20,8 +20,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** @@ -408,7 +408,7 @@ if ($id > 0 || ! empty($ref)) { if ($user->rights->fournisseur->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index f933ecfdb5f..aece9d02014 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -127,7 +127,7 @@ if ($object->id > 0) if ($user->rights->fournisseur->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index e66054dc750..a5a9a1e47a3 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -54,7 +54,7 @@ $commandestatic = new CommandeFournisseur($db); $userstatic=new User($db); $formfile = new FormFile($db); -print load_fiche_titre($langs->trans("SuppliersOrdersArea")); +print load_fiche_titre($langs->trans("SuppliersOrdersArea"), '', 'commercial'); print '
    '; diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index 171449bc653..45f04b865ea 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -123,7 +123,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->fournisseur->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 7af71f7a344..14ac029bb27 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -115,7 +115,8 @@ $hookmanager->initHooks(array('supplierorderlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('commande_fournisseur'); +$extrafields->fetch_name_optionals_label('commande_fournisseur'); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -501,7 +502,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s. $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as cf"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."commande_fournisseur_extrafields as ef on (cf.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (cf.rowid = ef.fk_object)"; if ($sall || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'commande_fournisseurdet as pd ON cf.rowid=pd.fk_commande'; if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u ON cf.fk_user_author = u.rowid"; @@ -649,7 +650,7 @@ if ($resql) print ''; print ''; print ''; - print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_commercial.png', 0, $newcardbutton, '', $limit); + print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'commercial', 0, $newcardbutton, '', $limit); $topicmail="SendOrderRef"; $modelmail="order_supplier_send"; diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 462c706be76..d2c262d2e7a 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -104,7 +104,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->fournisseur->commande->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/commande/orderstoinvoice.php b/htdocs/fourn/commande/orderstoinvoice.php index d7271318e51..aec6028aa34 100644 --- a/htdocs/fourn/commande/orderstoinvoice.php +++ b/htdocs/fourn/commande/orderstoinvoice.php @@ -21,7 +21,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -73,9 +73,10 @@ $date_endy = dol_mktime(23, 59, 59, $_REQUEST["date_end_delymonth"], $_REQUEST[" $extrafields = new ExtraFields($db); +$object = new FactureFournisseur($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label('facture_fourn'); +$extrafields->fetch_name_optionals_label($object->table_element); if ($action == 'create') { @@ -176,7 +177,7 @@ if (($action == 'create' || $action == 'add') && ! $error) { if (empty($object->date_echeance)) $object->date_echeance = $object->calculate_date_lim_reglement(); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; if ($_POST['origin'] && $_POST['originid']) { @@ -449,8 +450,17 @@ if (($action != 'create' && $action != 'add') && !$error) { $sql .= ' WHERE c.entity = ' . $conf->entity; $sql .= ' AND c.fk_soc = s.rowid'; - // Show orders with status validated, shipping started and delivered (well any order we can bill) - $sql .= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; // Must match filter in htdocs/fourn/card.php + // Show orders we can bill + if (empty($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS)) + { + $sql.= " AND c.fk_statut IN (".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY.")"; // Must match filter in htdocs/fourn/card.php + } + else + { + // CommandeFournisseur::STATUS_ORDERSENT.", ".CommandeFournisseur::STATUS_RECEIVED_PARTIALLY.", ".CommandeFournisseur::STATUS_RECEIVED_COMPLETELY + $sql.= " AND c.fk_statut IN (".$db->escape($conf->global->SUPPLIER_ORDER_TO_INVOICE_STATUS).")"; + } + $sql .= " AND c.billed = 0"; // Find order that are not already invoiced diff --git a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php index f46c5d20b81..10ccf3a08bc 100644 --- a/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/commande/tpl/linkedobjectblock.tpl.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/fourn/contact.php b/htdocs/fourn/contact.php index f476758396e..99a1c85902a 100644 --- a/htdocs/fourn/contact.php +++ b/htdocs/fourn/contact.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index db5b87e590f..369ab812d4e 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -23,7 +23,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -82,7 +82,7 @@ $object=new FactureFournisseur($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels=$extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // Load object if ($id > 0 || ! empty($ref)) @@ -608,8 +608,7 @@ if (empty($reshook)) $error = 0; // Fill array 'array_options' with data from add form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object); + $ret = $extrafields->setOptionalsFromPost(null, $object); if ($ret < 0) $error++; $datefacture=dol_mktime(12, 0, 0, $_POST['remonth'], $_POST['reday'], $_POST['reyear']); @@ -1076,9 +1075,8 @@ if (empty($reshook)) $pu_ht_devise = GETPOST('multicurrency_subprice'); // Extrafields Lines - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line); // Unset extrafield POST Data if (is_array($extralabelsline)) { foreach ($extralabelsline as $key => $value) { @@ -1153,9 +1151,8 @@ if (empty($reshook)) $price_ht_devise = GETPOST('multicurrency_price_ht'); // Extrafields - $extrafieldsline = new ExtraFields($db); - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options = $extrafieldsline->getOptionalsFromPost($object->table_element_line, $predef); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options = $extrafields->getOptionalsFromPost($object->table_element_line, $predef); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -1417,58 +1414,61 @@ if (empty($reshook)) $resteapayer = $object->total_ttc - $totalpaye; // We check that lines of invoices are exported in accountancy - //$ventilExportCompta = $object->getVentilExportCompta(); + $ventilExportCompta = $object->getVentilExportCompta(); - // On verifie si aucun paiement n'a ete effectue - if ($resteapayer == $object->total_ttc && $object->paye == 0 && $ventilExportCompta == 0) - { - $idwarehouse = GETPOST('idwarehouse'); + if (! $ventilExportCompta) + { + // On verifie si aucun paiement n'a ete effectue + if ($resteapayer == price2num($object->total_ttc, 'MT', 1) && $object->statut == FactureFournisseur::STATUS_VALIDATED) + { + $idwarehouse = GETPOST('idwarehouse'); - $object->fetch_thirdparty(); + $object->fetch_thirdparty(); - $qualified_for_stock_change=0; - if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) - { - $qualified_for_stock_change=$object->hasProductsOrServices(2); - } - else - { - $qualified_for_stock_change=$object->hasProductsOrServices(1); - } + $qualified_for_stock_change=0; + if (empty($conf->global->STOCK_SUPPORTS_SERVICES)) + { + $qualified_for_stock_change=$object->hasProductsOrServices(2); + } + else + { + $qualified_for_stock_change=$object->hasProductsOrServices(1); + } - // Check parameters - if (! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) - { - $langs->load("stocks"); - if (! $idwarehouse || $idwarehouse == -1) - { - $error++; - setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); - $action=''; - } - } + // Check parameters + if (! empty($conf->stock->enabled) && ! empty($conf->global->STOCK_CALCULATE_ON_SUPPLIER_BILL) && $qualified_for_stock_change) + { + $langs->load("stocks"); + if (! $idwarehouse || $idwarehouse == -1) + { + $error++; + setEventMessages($langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv("Warehouse")), null, 'errors'); + $action=''; + } + } - $object->setDraft($user, $idwarehouse); + $object->setDraft($user, $idwarehouse); - // Define output language - if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) - { - $outputlangs = $langs; - $newlang = ''; - if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); - if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; - if (! empty($newlang)) { - $outputlangs = new Translate("", $conf); - $outputlangs->setDefaultLang($newlang); + // Define output language + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) + { + $outputlangs = $langs; + $newlang = ''; + if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id', 'aZ09')) $newlang = GETPOST('lang_id', 'aZ09'); + if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang = $object->thirdparty->default_lang; + if (! empty($newlang)) { + $outputlangs = new Translate("", $conf); + $outputlangs->setDefaultLang($newlang); + } + $model=$object->modelpdf; + $ret = $object->fetch($id); // Reload to get new records + + $result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); + if ($result < 0) dol_print_error($db, $result); } - $model=$object->modelpdf; - $ret = $object->fetch($id); // Reload to get new records - $result=$object->generateDocument($model, $outputlangs, $hidedetails, $hidedesc, $hideref); - if ($result < 0) dol_print_error($db, $result); + $action=''; } - - $action=''; } } @@ -1526,8 +1526,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from add form - $extralabels=$extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -1630,7 +1629,6 @@ llxHeader('', $title, $helpurl); if ($action == 'create') { $facturestatic = new FactureFournisseur($db); - $extralabels = $extrafields->fetch_name_optionals_label($facturestatic->table_element); print load_fiche_titre($langs->trans('NewBill')); @@ -2172,9 +2170,6 @@ else $result=$societe->fetch($object->socid); if ($result < 0) dol_print_error($db); - // fetch optionals attributes and labels - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $totalpaye = $object->getSommePaiement(); $totalcreditnotes = $object->getSumCreditNotesUsed(); $totaldeposits = $object->getSumDepositsUsed(); @@ -2383,7 +2378,7 @@ else if ($user->rights->fournisseur->facture->creer) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.=''; @@ -2505,7 +2500,7 @@ else print $langs->trans('PaymentConditions'); print ''; if ($action != 'editconditions' && $user->rights->fournisseur->facture->creer) { - print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetConditions'), 1).''; } print ''; print ''; @@ -2527,7 +2522,7 @@ else print $langs->trans('PaymentMode'); print ''; if ($action != 'editmode' && $user->rights->fournisseur->facture->creer) { - print 'id.'">'.img_edit($langs->trans('SetMode'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetMode'), 1).''; } print ''; print ''; @@ -2551,7 +2546,7 @@ else print $form->editfieldkey('Currency', 'multicurrency_code', '', $object, 0); print ''; if ($action != 'editmulticurrencycode' && $object->statut == FactureFournisseur::STATUS_DRAFT) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if ($action == 'editmulticurrencycode') { @@ -2568,7 +2563,7 @@ else print $form->editfieldkey('CurrencyRate', 'multicurrency_tx', '', $object, 0); print ''; if ($action != 'editmulticurrencyrate' && $object->statut == FactureFournisseur::STATUS_DRAFT && $object->multicurrency_code && $object->multicurrency_code != $conf->currency) - print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; + print 'id . '">' . img_edit($langs->transnoentitiesnoconv('SetMultiCurrencyCode'), 1) . ''; print ''; print ''; if ($action == 'editmulticurrencyrate' || $action == 'actualizemulticurrencyrate') { @@ -2593,7 +2588,7 @@ else print $langs->trans('BankAccount'); print ''; if ($action != 'editbankaccount' && $user->rights->fournisseur->facture->creer) - print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).''; + print 'id.'">'.img_edit($langs->trans('SetBankAccount'), 1).''; print ''; print ''; if ($action == 'editbankaccount') { @@ -2611,7 +2606,7 @@ else print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->fournisseur->facture->creer) print ''.img_edit().''; + if ($user->rights->fournisseur->facture->creer) print ''.img_edit().''; else print ' '; print '
    '; print ''; @@ -3033,11 +3028,20 @@ else // modified by hook if (empty($reshook)) { - // Modify a validated invoice with no payments if ($object->statut == FactureFournisseur::STATUS_VALIDATED && $action != 'confirm_edit' && $object->getSommePaiement() == 0 && $user->rights->fournisseur->facture->creer) { - print ''; + // We check if lines of invoice are not already transfered into accountancy + $ventilExportCompta = $object->getVentilExportCompta(); // Should be 0 since the sum of payments are zero. But we keep the protection. + + if ($ventilExportCompta == 0) + { + print ''; + } + else + { + print '
    ' . $langs->trans('Modify') . '
    '; + } } $discount = new DiscountAbsolute($db); @@ -3046,7 +3050,7 @@ else // Reopen a standard paid invoice if (($object->type == FactureFournisseur::TYPE_STANDARD || $object->type == FactureFournisseur::TYPE_REPLACEMENT || ($object->type == FactureFournisseur::TYPE_CREDIT_NOTE && empty($discount->id))) - && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) + && ($object->statut == FactureFournisseur::STATUS_CLOSED || $object->statut == FactureFournisseur::STATUS_ABANDONED)) // A paid invoice (partially or completely) { if (! $facidnext && $object->close_code != 'replaced' && $user->rights->fournisseur->facture->creer) // Not replaced by another invoice { diff --git a/htdocs/fourn/facture/contact.php b/htdocs/fourn/facture/contact.php index 7619bf08859..2d2f9006632 100644 --- a/htdocs/fourn/facture/contact.php +++ b/htdocs/fourn/facture/contact.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -159,7 +159,7 @@ if ($id > 0 || ! empty($ref)) if ($user->rights->facture->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/facture/document.php b/htdocs/fourn/facture/document.php index 55075a5014f..d8cf1ecda27 100644 --- a/htdocs/fourn/facture/document.php +++ b/htdocs/fourn/facture/document.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -110,7 +110,7 @@ if ($object->id > 0) if ($user->rights->facture->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/facture/impayees.php b/htdocs/fourn/facture/impayees.php index 02c8af6ebc6..78abccdc250 100644 --- a/htdocs/fourn/facture/impayees.php +++ b/htdocs/fourn/facture/impayees.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/facture/info.php b/htdocs/fourn/facture/info.php index d926f7811ad..6b4af5dd290 100644 --- a/htdocs/fourn/facture/info.php +++ b/htdocs/fourn/facture/info.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -84,7 +84,7 @@ if (! empty($conf->projet->enabled)) if ($user->rights->facture->creer) { if ($action != 'classify') - //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + //$morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/facture/list.php b/htdocs/fourn/facture/list.php index 509698d758b..3dcc2880f34 100644 --- a/htdocs/fourn/facture/list.php +++ b/htdocs/fourn/facture/list.php @@ -24,7 +24,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -130,7 +130,8 @@ $hookmanager->initHooks(array('supplierinvoicelist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('facture_fourn'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -286,7 +287,7 @@ $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_country as country on (country.rowid = s. $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_typent as typent on (typent.id = s.fk_typent)"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_departements as state on (state.rowid = s.fk_departement)"; $sql.= ', '.MAIN_DB_PREFIX.'facture_fourn as f'; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."facture_fourn_extrafields as ef on (f.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (f.rowid = ef.fk_object)"; if (! $search_all) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf ON pf.fk_facturefourn = f.rowid'; if ($search_all || $search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'facture_fourn_det as pd ON f.rowid=pd.fk_facture_fourn'; if ($search_product_category > 0) $sql.= ' LEFT JOIN '.MAIN_DB_PREFIX.'categorie_product as cp ON cp.fk_product=pd.fk_product'; @@ -484,7 +485,7 @@ if ($resql) print ''; print ''; - print_barre_liste($langs->trans("BillsSuppliers").($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'title_accountancy', 0, $newcardbutton, '', $limit); + print_barre_liste($langs->trans("BillsSuppliers").($socid?' '.$soc->name:''), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, $massactionbutton, $num, $nbtotalofrecords, 'invoicing', 0, $newcardbutton, '', $limit); $topicmail="SendBillRef"; $modelmail="invoice_supplier_send"; diff --git a/htdocs/fourn/facture/note.php b/htdocs/fourn/facture/note.php index 808b2e28b4f..ba51b4688a9 100644 --- a/htdocs/fourn/facture/note.php +++ b/htdocs/fourn/facture/note.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -103,7 +103,7 @@ if ($object->id > 0) if ($user->rights->fournisseur->commande->creer) { if ($action != 'classify') - // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; $morehtmlref.=' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index 640267e25da..c68dcd98752 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -22,7 +22,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -83,14 +83,16 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } +$object = new PaiementFourn($db); // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context $hookmanager->initHooks(array('paymentsupplierlist')); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('paymentsupplier'); -$search_array_options=$extrafields->getOptionalsFromPost('paymentsupplier', '', 'search_'); +$extrafields->fetch_name_optionals_label($object->table_element); + +$search_array_options = $extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); $arrayfields=array(); @@ -823,19 +825,7 @@ if (empty($action) || $action == 'list') $sql.= " WHERE f.entity = ".$conf->entity; if (!$user->rights->societe->client->voir) $sql .= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id; if ($socid > 0) $sql .= ' AND f.fk_soc = '.$socid; - // Search criteria - if ($month > 0) { - if ($year > 0 && empty($day)) - $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year, $month, false))."' AND '".$db->idate(dol_get_last_day($year, $month, false))."'"; - elseif ($year > 0 && ! empty($day)) - $sql.= " AND p.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."' AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."'"; - else - $sql.= " AND date_format(p.datep, '%m') = '".$month."'"; - } - elseif ($year > 0) - { - $sql.= " AND p.datep BETWEEN '".$db->idate(dol_get_first_day($year, 1, false))."' AND '".$db->idate(dol_get_last_day($year, 12, false))."'"; - } + $sql.= dolSqlDateFilter('p.datep', $day, $month, $year); if ($search_ref) $sql .= natural_search('p.rowid', $search_ref); if ($search_account > 0) $sql .=" AND b.fk_account=".$search_account; if ($search_paymenttype != "") $sql .=" AND c.code='".$db->escape($search_paymenttype)."'"; @@ -885,7 +875,7 @@ if (empty($action) || $action == 'list') $massactionbutton=$form->selectMassAction('', $massaction == 'presend' ? array() : array('presend'=>$langs->trans("SendByMail"), 'builddoc'=>$langs->trans("PDFMerge"))); - print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit); + print_barre_liste($langs->trans('SupplierPayments'), $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'invoicing', 0, '', '', $limit); print ''; if ($optioncss != '') print ''; diff --git a/htdocs/fourn/facture/rapport.php b/htdocs/fourn/facture/rapport.php index ccc92ad2cba..94ef53f2372 100644 --- a/htdocs/fourn/facture/rapport.php +++ b/htdocs/fourn/facture/rapport.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -91,7 +91,7 @@ $titre=($year?$langs->trans("PaymentsReportsForYear", $year):$langs->trans("Paym llxHeader('', $titre); -print load_fiche_titre($titre, '', 'title_accountancy.png'); +print load_fiche_titre($titre, '', 'invoicing'); // Formulaire de generation print ''; diff --git a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php index 745dd231bd0..ed94fdf23d4 100644 --- a/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php +++ b/htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ // Protection to avoid direct call of template diff --git a/htdocs/fourn/index.php b/htdocs/fourn/index.php index cc1ed925b39..d551944ec05 100644 --- a/htdocs/fourn/index.php +++ b/htdocs/fourn/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/js/lib_dispatch.js b/htdocs/fourn/js/lib_dispatch.js index d183aeb4e48..49372d3378c 100644 --- a/htdocs/fourn/js/lib_dispatch.js +++ b/htdocs/fourn/js/lib_dispatch.js @@ -12,8 +12,8 @@ // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License -// along with this program. If not, see . -// or see http://www.gnu.org/ +// along with this program. If not, see . +// or see https://www.gnu.org/ // // \file htdocs/core/js/lib_dispatch.js diff --git a/htdocs/fourn/paiement/card.php b/htdocs/fourn/paiement/card.php index 86683e692d1..8b65d8be7c0 100644 --- a/htdocs/fourn/paiement/card.php +++ b/htdocs/fourn/paiement/card.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/paiement/info.php b/htdocs/fourn/paiement/info.php index 35ac7b3a36d..a1bc919a7d5 100644 --- a/htdocs/fourn/paiement/info.php +++ b/htdocs/fourn/paiement/info.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php index faac5bebfbd..b7119e3ae67 100644 --- a/htdocs/fourn/product/list.php +++ b/htdocs/fourn/product/list.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/fourn/recap-fourn.php b/htdocs/fourn/recap-fourn.php index f5d862f48e5..db2a3bdc38a 100644 --- a/htdocs/fourn/recap-fourn.php +++ b/htdocs/fourn/recap-fourn.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ftp/admin/ftpclient.php b/htdocs/ftp/admin/ftpclient.php index ff344c45809..3dde193d0ac 100644 --- a/htdocs/ftp/admin/ftpclient.php +++ b/htdocs/ftp/admin/ftpclient.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/ftp/index.php b/htdocs/ftp/index.php index 07af448aedd..de1228ab095 100644 --- a/htdocs/ftp/index.php +++ b/htdocs/ftp/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index bc9c10045a8..b464d336fd2 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -68,7 +68,7 @@ $object = new Holiday($db); $extrafields = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); if ($id > 0) { @@ -505,8 +505,7 @@ if (empty($reshook)) $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -1092,7 +1091,7 @@ if ((empty($id) && empty($ref)) || $action == 'add' || $action == 'request' || $ if (empty($include_users)) print img_warning().' '.$langs->trans("NobodyHasPermissionToValidateHolidays"); else { - $defaultselectuser=$user->fk_user; // Will work only if supervisor has permission to approve so is inside include_users + $defaultselectuser=(empty($user->fk_user_holiday_validator) ? $user->fk_user : $user->fk_user_holiday_validator); // Will work only if supervisor has permission to approve so is inside include_users if (! empty($conf->global->HOLIDAY_DEFAULT_VALIDATOR)) $defaultselectuser=$conf->global->HOLIDAY_DEFAULT_VALIDATOR; // Can force default approver if (GETPOST('valideur', 'int') > 0) $defaultselectuser=GETPOST('valideur', 'int'); $s=$form->select_dolusers($defaultselectuser, "valideur", 1, "", 0, $include_users); @@ -1350,7 +1349,7 @@ else $include_users = $object->fetch_users_approver_holiday(); if (is_array($include_users) && in_array($user->id, $include_users) && $object->statut == Holiday::STATUS_VALIDATED) { - print ''.img_edit($langs->trans("Edit")).''; + print ''.img_edit($langs->trans("Edit")).''; } print ''; print ''; diff --git a/htdocs/holiday/class/holiday.class.php b/htdocs/holiday/class/holiday.class.php index 25d1c1d5a2d..756cc7cd5d2 100644 --- a/htdocs/holiday/class/holiday.class.php +++ b/htdocs/holiday/class/holiday.class.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/holiday/common.inc.php b/htdocs/holiday/common.inc.php index cc213007fc0..53ab59012bb 100644 --- a/htdocs/holiday/common.inc.php +++ b/htdocs/holiday/common.inc.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/holiday/define_holiday.php b/htdocs/holiday/define_holiday.php index c0b25e57769..9add71da395 100644 --- a/htdocs/holiday/define_holiday.php +++ b/htdocs/holiday/define_holiday.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/holiday/document.php b/htdocs/holiday/document.php index 6ade6a13e17..05ddf164105 100644 --- a/htdocs/holiday/document.php +++ b/htdocs/holiday/document.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -37,7 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/holiday.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formfile.class.php'; // Load translation files required by the page -$langs->loadLangs(array('other', 'holidays', 'companies')); +$langs->loadLangs(array('other', 'holiday', 'companies')); $id = GETPOST('id', 'int'); $ref = GETPOST('ref', 'alpha'); @@ -48,8 +48,6 @@ $confirm = GETPOST('confirm', 'alpha'); if ($user->societe_id) $socid=$user->societe_id; $result = restrictedArea($user, 'holiday', $id, 'holiday'); -$langs->load("holiday"); - // Get parameters $sortfield = GETPOST('sortfield', 'alpha'); $sortorder = GETPOST('sortorder', 'alpha'); diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php index 072a6aacc45..1854cce2800 100644 --- a/htdocs/holiday/list.php +++ b/htdocs/holiday/list.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -36,7 +36,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/usergroups.lib.php'; // Load translation files required by the page -$langs->loadLangs(array('users', 'holidays', 'hrm')); +$langs->loadLangs(array('users', 'holiday', 'hrm')); // Protection if external user if ($user->societe_id > 0) accessforbidden(); @@ -114,7 +114,8 @@ $extrafields = new ExtraFields($db); $hookmanager->initHooks(array('holidaylist')); // Note that conf->hooks_modules contains array // Fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label('holiday'); +$extrafields->fetch_name_optionals_label($object->table_element); + $search_array_options=$extrafields->getOptionalsFromPost($object->table_element, '', 'search_'); // List of fields to search into when doing a "search in all" @@ -278,7 +279,7 @@ $parameters=array(); $reshook=$hookmanager->executeHooks('printFieldListSelect', $parameters); // Note that $action and $object may have been modified by hook $sql.=$hookmanager->resPrint; $sql.= " FROM ".MAIN_DB_PREFIX."holiday as cp"; -if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."holiday_extrafields as ef on (cp.rowid = ef.fk_object)"; +if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label'])) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX.$object->table_element."_extrafields as ef on (cp.rowid = ef.fk_object)"; $sql.= ", ".MAIN_DB_PREFIX."user as uu, ".MAIN_DB_PREFIX."user as ua"; $sql.= " WHERE cp.entity IN (".getEntity('holiday').")"; $sql.= " AND cp.fk_user = uu.rowid AND cp.fk_validator = ua.rowid "; // Hack pour la recherche sur le tableau diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php index 1823e5f0a93..a7efd8616f0 100644 --- a/htdocs/holiday/month_report.php +++ b/htdocs/holiday/month_report.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -27,6 +27,7 @@ require '../main.inc.php'; require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php'; require_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php'; require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php'; +require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php'; require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; // Load translation files required by the page @@ -47,17 +48,15 @@ $result = restrictedArea($user, 'holiday', $id, ''); * View */ +$html = new Form($db); +$formother = new FormOther($db); $holidaystatic = new Holiday($db); $listhalfday=array('morning'=>$langs->trans("Morning"),"afternoon"=>$langs->trans("Afternoon")); - llxHeader('', $langs->trans('CPTitreMenu')); -print load_fiche_titre($langs->trans('MenuReportMonth')); - -$html = new Form($db); -$formother = new FormOther($db); +print load_fiche_titre($langs->trans('MenuReportMonth'), '', 'title_hrm'); // Selection filter @@ -68,7 +67,6 @@ print '' . "\n"; $search_month = GETPOST("remonth", 'int')?GETPOST("remonth", 'int'):date("m", time()); $search_year = GETPOST("reyear", 'int')?GETPOST("reyear", 'int'):date("Y", time()); -$month_year = sprintf("%02d", $search_month).'-'.sprintf("%04d", $search_year); $year_month = sprintf("%04d", $search_year).'-'.sprintf("%02d", $search_month); print $formother->select_month($search_month, 'remonth'); diff --git a/htdocs/holiday/view_log.php b/htdocs/holiday/view_log.php index a37d3490c97..13d4cb7d23a 100644 --- a/htdocs/holiday/view_log.php +++ b/htdocs/holiday/view_log.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/hrm/admin/admin_establishment.php b/htdocs/hrm/admin/admin_establishment.php index 2918a8d95ab..38cff03e28a 100644 --- a/htdocs/hrm/admin/admin_establishment.php +++ b/htdocs/hrm/admin/admin_establishment.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php index 8c231287892..243a1ce3222 100644 --- a/htdocs/hrm/admin/admin_hrm.php +++ b/htdocs/hrm/admin/admin_hrm.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/hrm/class/establishment.class.php b/htdocs/hrm/class/establishment.class.php index 8d8098642e2..0ea9b5ffba2 100644 --- a/htdocs/hrm/class/establishment.class.php +++ b/htdocs/hrm/class/establishment.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/hrm/establishment/card.php b/htdocs/hrm/establishment/card.php index 071277bd501..a9f156d578f 100644 --- a/htdocs/hrm/establishment/card.php +++ b/htdocs/hrm/establishment/card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/hrm/establishment/info.php b/htdocs/hrm/establishment/info.php index f2ab32f7939..1c5a85ecd50 100644 --- a/htdocs/hrm/establishment/info.php +++ b/htdocs/hrm/establishment/info.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index ece34cf12b5..ef8df639d26 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -77,7 +77,7 @@ $childids[]=$user->id; llxHeader('', $langs->trans('HRMArea')); -print load_fiche_titre($langs->trans("HRMArea"), '', 'title_hrm.png'); +print load_fiche_titre($langs->trans("HRMArea"), '', 'hrm'); if (! empty($setupcompanynotcomplete)) @@ -141,7 +141,7 @@ if (! empty($conf->holiday->enabled)) print '
    '; print ''; print ''; - print ""; + print ''; print '
    '.$langs->trans("Holidays").'
    '; $out=''; @@ -197,8 +197,8 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) $i = 0; - print '
    '; - print ''; + print '
    '; + print '
    '; print ''; print ''; print ''; @@ -244,7 +244,8 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read) { print ''; } - print '
    '.$langs->trans("BoxTitleLastLeaveRequests", min($max, $num)).''.$langs->trans("from").'
    '.$langs->trans("None").'

    '; + print '
    '; + print '
    '; } else dol_print_error($db); } @@ -272,8 +273,8 @@ if (! empty($conf->deplacement->enabled) && $user->rights->deplacement->lire) $i = 0; - print '
    '; - print ''; + print '
    '; + print '
    '; print ''; print ''; print ''; @@ -344,8 +345,8 @@ if (! empty($conf->expensereport->enabled) && $user->rights->expensereport->lire $i = 0; - print '
    '; - print '
    '.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("FeesKilometersOrAmout").'
    '; + print '
    '; + print '
    '; print ''; print ''; print ''; diff --git a/htdocs/imports/class/import.class.php b/htdocs/imports/class/import.class.php index aebf983b541..29c4a0a7b12 100644 --- a/htdocs/imports/class/import.class.php +++ b/htdocs/imports/class/import.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/imports/emptyexample.php b/htdocs/imports/emptyexample.php index 619207ca6f1..16e4cd71693 100644 --- a/htdocs/imports/emptyexample.php +++ b/htdocs/imports/emptyexample.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/imports/import.php b/htdocs/imports/import.php index 2d3882e523e..c09de053ea2 100644 --- a/htdocs/imports/import.php +++ b/htdocs/imports/import.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/imports/index.php b/htdocs/imports/index.php index 8175dd1ca83..f674daddddc 100644 --- a/htdocs/imports/index.php +++ b/htdocs/imports/index.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php index 463afe194db..74d3356faeb 100644 --- a/htdocs/includes/OAuth/Common/Storage/DoliStorage.php +++ b/htdocs/includes/OAuth/Common/Storage/DoliStorage.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/includes/ace/CODE_OF_CONDUCT.md b/htdocs/includes/ace/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..3b64466870c --- /dev/null +++ b/htdocs/includes/ace/CODE_OF_CONDUCT.md @@ -0,0 +1,4 @@ +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. diff --git a/htdocs/includes/ace/CONTRIBUTING.md b/htdocs/includes/ace/CONTRIBUTING.md new file mode 100644 index 00000000000..5ba432468b5 --- /dev/null +++ b/htdocs/includes/ace/CONTRIBUTING.md @@ -0,0 +1,61 @@ +# Contributing Guidelines + +Thank you for your interest in contributing to our project. Whether it's a bug report, new feature, correction, or additional +documentation, we greatly value feedback and contributions from our community. + +Please read through this document before submitting any issues or pull requests to ensure we have all the necessary +information to effectively respond to your bug report or contribution. + + +## Reporting Bugs/Feature Requests + +We welcome you to use the GitHub issue tracker to report bugs or suggest features. + +When filing an issue, please check [existing open](https://github.com/ajaxorg/ace-builds/issues), or [recently closed](https://github.com/ajaxorg/ace-builds/issues?utf8=%E2%9C%93&q=is%3Aissue%20is%3Aclosed%20), issues to make sure somebody else hasn't already +reported the issue. Please try to include as much information as you can. Details like these are incredibly useful: + +* A reproducible test case or series of steps +* The version of our code being used +* Any modifications you've made relevant to the bug +* Anything unusual about your environment or deployment + + +## Contributing via Pull Requests +Contributions via pull requests are much appreciated. Before sending us a pull request, please ensure that: + +1. You are working against the latest source on the *master* branch. +2. You check existing open, and recently merged, pull requests to make sure someone else hasn't addressed the problem already. +3. You open an issue to discuss any significant work - we would hate for your time to be wasted. + +To send us a pull request, please: + +1. Fork the repository. +2. Modify the source; please focus on the specific change you are contributing. If you also reformat all the code, it will be hard for us to focus on your change. +3. Ensure local tests pass. +4. Commit to your fork using clear commit messages. +5. Send us a pull request, answering any default questions in the pull request interface. +6. Pay attention to any automated CI failures reported in the pull request, and stay involved in the conversation. + +GitHub provides additional document on [forking a repository](https://help.github.com/articles/fork-a-repo/) and +[creating a pull request](https://help.github.com/articles/creating-a-pull-request/). + + +## Finding contributions to work on +Looking at the existing issues is a great way to find something to contribute on. As our projects, by default, use the default GitHub issue labels ((enhancement/bug/duplicate/help wanted/invalid/question/wontfix), looking at any ['help wanted'](https://github.com/ajaxorg/ace-builds/labels/help%20wanted) issues is a great place to start. + + +## Code of Conduct +This project has adopted the [Amazon Open Source Code of Conduct](https://aws.github.io/code-of-conduct). +For more information see the [Code of Conduct FAQ](https://aws.github.io/code-of-conduct-faq) or contact +opensource-codeofconduct@amazon.com with any additional questions or comments. + + +## Security issue notifications +If you discover a potential security issue in this project we ask that you notify AWS/Amazon Security via our [vulnerability reporting page](http://aws.amazon.com/security/vulnerability-reporting/). Please do **not** create a public github issue. + + +## Licensing + +See the [LICENSE](https://github.com/ajaxorg/ace-builds/blob/master/LICENSE) file for our project's licensing. We will ask you to confirm the licensing of your contribution. + +We may ask you to sign a [Contributor License Agreement (CLA)](http://en.wikipedia.org/wiki/Contributor_License_Agreement) for larger changes. diff --git a/htdocs/includes/ace/ChangeLog.txt b/htdocs/includes/ace/ChangeLog.txt new file mode 100644 index 00000000000..237a2cdd66f --- /dev/null +++ b/htdocs/includes/ace/ChangeLog.txt @@ -0,0 +1,450 @@ +2019.09.08 Version 1.4.6 +* restore native behavior of ctrl-p on mac (jumptomatching command is moved to cmd-\) +* improve snippet manager +* fix backspace handling on mobile + +2019.06.17 Version 1.4.5 +* improve scrolling and selection on mobile +* improve type definitions + +2019.04.24 Version 1.4.4 +* add experimental command prompt +* add chrystal, nim and nginx highlight rules +* fix regression in vim mode on ios + +2019.02.21 Version 1.4.3 +* add sublime keybindings +* add rtl option +* implement ` and < textobjects in vim mode + +2018.11.21 Version 1.4.2 +* fix regression in vim mode +* improve keyboard input handling on ipad and IE +* add new syntax highlighters + +2018.08.07 Version 1.4.1 +* fix regression in autocomplete + +2018.08.06 Version 1.4.0 + +* remove usage of innerHTML +* improved handling of textinput for IME and mobile +* add support for relative line numbers +* improve autocompletion popup + +2018.03.26 Version 1.3.3 +* fix regession in static-highlight extension +* use css animation for cursor blinking + +2018.03.21 Version 1.3.2 +* add experimental support for using ace-builds with webpack + +2018.02.11 Version 1.3.1 + +* fixed regression with selectionChange event not firing some times +* improved handling of non-ascii characters in vim normal mode + +2018.01.31 Version 1.3.0 + +* added copy copyWithEmptySelection option +* improved undoManager +* improved settings_menu plugin +* improved handling of files with very long lines +* fixed bug with scrolling editor out of view in transformed elements + +2017.10.17 Version 1.2.9 + +* added support for bidirectional text, with monospace font (Alex Shensis) +* added support for emoji 😊 + +* new language modes + - Red (Toomas Vooglaid) + - CSound (Nathan Whetsell) + - JSSM (John Haugeland) + +* New Themes + - Dracula (Austin Schwartz) + +2017.07.02 Version 1.2.8 +* Fixed small bugs in searchbox and autocompleter + +2017.06.18 Version 1.2.7 + +* Added Support for arrow keys on external IPad keyboard (Emanuele Tamponi) +* added match counter to searchbox extension + +- implemented higlighting of multiline strings in yaml mode (Maxim Trushin) +- improved haml syntax highlighter (Andrés Álvarez) + +2016.12.03 Version 1.2.6 + +* Fixed IME handling on new Chrome +* Support for php 7 in the syntax checker + +2016.08.16 Version 1.2.5 + +* Fixed regression in noconflict mode + +2016.07.27 Version 1.2.4 + +* Maintenance release with several new modes and small bugfixes + +2016.01.17 Version 1.2.3 + +* Bugfixes + - fix memory leak in setSession (Tyler Stalder) + - double click not working on linux/mac + +* new language modes + - reStructuredText (Robin Jarry) + - NSIS (Jan T. Sott) + + +2015.10.28 Version 1.2.1 + +* new language modes + - Swift + - JSX + +2015.07.11 Version 1.2.0 + +* New Features + - Indented soft wrap (danyaPostfactum) + - Rounded borders on selections + +* API Changes + - unified delta types `{start, end, action, lines}` (Alden Daniels https://github.com/ajaxorg/ace/pull/1745) + - "change" event listeners on session and editor get delta objects directly + +* new language modes + - SQLServer (Morgan Yarbrough) + +2015.04.03 Version 1.1.9 + + - Small Enhancements and Bugfixes + +2014.11.08 Version 1.1.8 + +* API Changes + - `editor.commands.commandKeyBinding` now contains direct map from keys to commands instead of grouping them by hashid + +* New Features + - Improved autoindent for html and php modes (Adam Jimenez) + - Find All from searchbox (Colton Voege) + +* new language modes + - Elixir, Elm + +2014.09.21 Version 1.1.7 + +* Bugfixes + - fix several bugs in autocompletion + - workaround for inaccurate getBoundingClientRect on chrome 37 + +2014.08.17 Version 1.1.6 + +* Bugfixes + - fix regression in double tap to highlight + - Improved Latex Mode (Daniel Felder) + +* API Changes + - editor.destroy destroys editor.session too (call editor.setSession(null) to prevent that) + +* new language modes + - Praat (José Joaquín Atria) + - Eiffel (Victorien Elvinger) + - G-code (Adam Joseph Cook) + +2014.07.09 Version 1.1.5 + +* Bugfixes + - fix regression in autocomplete popup + +* new language modes + - gitignore (Devon Carew) + +2014.07.01 Version 1.1.4 + +* New Features + - Highlight matching tags (Adam Jimenez) + - Improved jump to matching command (Adam Jimenez) + +* new language modes + - AppleScript (Yaogang Lian) + - Vala + +2014.03.08 Version 1.1.3 + +* New Features + - Allow syntax checkers to be loaded from CDN (Derk-Jan Hartman) + - Add ColdFusion behavior (Abram Adams) + - add showLineNumbers option + - Add html syntax checker (danyaPostfactum) + +* new language modes + - Gherkin (Patrick Nevels) + - Smarty + +2013.12.02 Version 1.1.2 + +* New Features + - Accessibility Theme for Ace (Peter Xiao) + - use snipetManager for expanding emmet snippets + - update jshint to 2.1.4 + - improve php syntax checker (jdalegonzalez) + - add option for autoresizing + - add option for autohiding vertical scrollbar + - improvements to highlighting of xml like languages (danyaPostfactum) + - add support for autocompletion and snippets (gjtorikyan danyaPostfactum and others) + - add option to merge similar changes in undo history + - add scrollPastEnd option + - use html5 dragndrop for text dragging (danyaPostfactum) + +* API Changes + - fixed typo in HashHandler commmandManager + +* new language modes + - Nix (Zef Hemel) + - Protobuf (Zef Hemel) + - Soy + - Handlebars + +2013.06.04 Version 1.1.1 + + - Improved emacs keybindings (Robert Krahn) + - Added markClean, isClean methods to UndoManager (Joonsoo Jeon) + - Do not allow `Toggle comments` command to remove spaces from indentation + - Softer colors for indent guides in dark themes + +* new language modes + - Ada + - Assembly_x86 + - Cobol + - D + - ejs + - MATLAB + - MySQL + - Twig + - Verilog + +2013.05.01, Version 1.1.0 + +* API Changes + - Default position of the editor container is changed to relative. Add `.ace_editor {position: absolute}` css rule to restore old behavior + - Changed default line-height to `normal` to not conflict with bootstrap. Use `line-height: inherit` for old behavior. + - Changed marker types accepted by session.addMarker. It now accepts "text"|"line"|"fullLine"|"screenLine" + - Internal classnames used by editor were made more consistent + - Introduced `editor.setOption/getOption/setOptions/getOptions` methods + - Introduced positionToIndex, indexToPosition methods + +* New Features + - Improved emacs mode (chetstone) + with Incremental search and Occur modes (Robert Krahn) + + - Improved ime handling + - Searchbox (Vlad Zinculescu) + + - Added elastic tabstops lite extension (Garen Torikian) + - Added extension for whitespace manipulation + - Added extension for enabling spellchecking from contextmenu + - Added extension for displaying available keyboard shortcuts (Matthew Christopher Kastor-Inare III) + - Added extension for displaying options panel (Matthew Christopher Kastor-Inare III) + - Added modelist extension (Matthew Christopher Kastor-Inare III) + + - Improved toggleCommentLines and added ToggleCommentBlock command + - `:;` pairing in CSS mode (danyaPostfactum) + + - Added suppoert for Delete and SelectAll from context menu (danyaPostfactum) + + - Make wrapping behavior optional + - Selective bracket insertion/skipping + + - Added commands for increase/decrease numbers, sort lines (Vlad Zinculescu) + - Folding for Markdown, Lua, LaTeX + - Selective bracket insertion/skipping for C-like languages + +* Many new languages + - Scheme (Mu Lei) + - Dot (edwardsp) + - FreeMarker (nguillaumin) + - Tiny Mushcode (h3rb) + - Velocity (Ryan Griffith) + - TOML (Garen Torikian) + - LSL (Nemurimasu Neiro, Builders Brewery) + - Curly (Libo Cannici) + - vbScript (Jan Jongboom) + - R (RStudio) + - ABAP + - Lucene (Graham Scott) + - Haml (Garen Torikian) + - Objective-C (Garen Torikian) + - Makefile (Garen Torikian) + - TypeScript (Garen Torikian) + - Lisp (Garen Torikian) + - Stylus (Garen Torikian) + - Dart (Garen Torikian) + +* Live syntax checks + - PHP (danyaPostfactum) + - Lua + +* New Themes + - Chaos + - Terminal + +2012.09.17, Version 1.0.0 + +* New Features + - Multiple cursors and selections (https://c9.io/site/blog/2012/08/be-an-armenian-warrior-with-block-selection-on-steroids/) + - Fold buttons displayed in the gutter + - Indent Guides + - Completely reworked vim mode (Sergi Mansilla) + - Improved emacs keybindings + - Autoclosing of html tags (danyaPostfactum) + +* 20 New language modes + - Coldfusion (Russ) + - Diff + - GLSL (Ed Mackey) + - Go (Davide Saurino) + - Haxe (Jason O'Neil) + - Jade (Garen Torikian) + - jsx (Syu Kato) + - LaTeX (James Allen) + - Less (John Roepke) + - Liquid (Bernie Telles) + - Lua (Lee Gao) + - LuaPage (Choonster) + - Markdown (Chris Spencer) + - PostgreSQL (John DeSoi) + - Powershell (John Kane) + - Sh (Richo Healey) + - SQL (Jonathan Camile) + - Tcl (Cristoph Hochreiner) + - XQuery (William Candillion) + - Yaml (Meg Sharkey) + + * Live syntax checks + - for XQuery and JSON + +* New Themes + - Ambiance (Irakli Gozalishvili) + - Dreamweaver (Adam Jimenez) + - Github (bootstraponline) + - Tommorrow themes (https://github.com/chriskempson/tomorrow-theme) + - XCode + +* Many Small Enhancements and Bugfixes + +2011.08.02, Version 0.2.0 + +* Split view (Julian Viereck) + - split editor area horizontally or vertivally to show two files at the same + time + +* Code Folding (Julian Viereck) + - Unstructured code folding + - Will be the basis for language aware folding + +* Mode behaviours (Chris Spencer) + - Adds mode specific hooks which allow transformations of entered text + - Autoclosing of braces, paranthesis and quotation marks in C style modes + - Autoclosing of angular brackets in XML style modes + +* New language modes + - Clojure (Carin Meier) + - C# (Rob Conery) + - Groovy (Ben Tilford) + - Scala (Ben Tilford) + - JSON + - OCaml (Sergi Mansilla) + - Perl (Panagiotis Astithas) + - SCSS/SASS (Andreas Madsen) + - SVG + - Textile (Kelley van Evert) + - SCAD (Jacob Hansson) + +* Live syntax checks + - Lint for CSS using CSS Lint + - CoffeeScript + +* New Themes + - Crimson Editor (iebuggy) + - Merbivore (Michael Schwartz) + - Merbivore soft (Michael Schwartz) + - Solarized dark/light (David Alan Hjelle) + - Vibrant Ink (Michael Schwartz) + +* Small Features/Enhancements + - Lots of render performance optimizations (Harutyun Amirjanyan) + - Improved Ruby highlighting (Chris Wanstrath, Trent Ogren) + - Improved PHP highlighting (Thomas Hruska) + - Improved CSS highlighting (Sean Kellogg) + - Clicks which cause the editor to be focused don't reset the selection + - Make padding text layer specific so that print margin and active line + highlight are not affected (Irakli Gozalishvili) + - Added setFontSize method + - Improved vi keybindings (Trent Ogren) + - When unfocused make cursor transparent instead of removing it (Harutyun Amirjanyan) + - Support for matching groups in tokenizer with arrays of tokens (Chris Spencer) + +* Bug fixes + - Add support for the new OSX scroll bars + - Properly highlight JavaScript regexp literals + - Proper handling of unicode characters in JavaScript identifiers + - Fix remove lines command on last line (Harutyun Amirjanyan) + - Fix scroll wheel sluggishness in Safari + - Make keyboard infrastructure route keys like []^$ the right way (Julian Viereck) + +2011.02.14, Version 0.1.6 + +* Floating Anchors + - An Anchor is a floating pointer in the document. + - Whenever text is inserted or deleted before the cursor, the position of + the cursor is updated + - Usesd for the cursor and selection + - Basis for bookmarks, multiple cursors and snippets in the future +* Extensive support for Cocoa style keybindings on the Mac +* New commands: + - center selection in viewport + - remove to end/start of line + - split line + - transpose letters +* Refator markers + - Custom code can be used to render markers + - Markers can be in front or behind the text + - Markers are now stored in the session (was in the renderer) +* Lots of IE8 fixes including copy, cut and selections +* Unit tests can also be run in the browser + +* Soft wrap can adapt to the width of the editor (Mike Ratcliffe, Joe Cheng) +* Add minimal node server server.js to run the Ace demo in Chrome +* The top level editor.html demo has been renamed to index.html +* Bug fixes + - Fixed gotoLine to consider wrapped lines when calculating where to scroll to (James Allen) + - Fixed isues when the editor was scrolled in the web page (Eric Allam) + - Highlighting of Python string literals + - Syntax rule for PHP comments + +2011.02.08, Version 0.1.5 + +* Add Coffeescript Mode (Satoshi Murakami) +* Fix word wrap bug (Julian Viereck) +* Fix packaged version of the Eclipse mode +* Loading of workers is more robust +* Fix "click selection" +* Allow tokizing empty lines (Daniel Krech) +* Make PageUp/Down behavior more consistent with native OS (Joe Cheng) + +2011.02.04, Version 0.1.4 + +* Add C/C++ mode contributed by Gastón Kleiman +* Fix exception in key input + +2011.02.04, Version 0.1.3 + +* Let the packaged version play nice with requireJS +* Add Ruby mode contributed by Shlomo Zalman Heigh +* Add Java mode contributed by Tom Tasche +* Fix annotation bug +* Changing a document added a new empty line at the end diff --git a/htdocs/includes/ace/LICENSE b/htdocs/includes/ace/LICENSE new file mode 100644 index 00000000000..4760be2a622 --- /dev/null +++ b/htdocs/includes/ace/LICENSE @@ -0,0 +1,24 @@ +Copyright (c) 2010, Ajax.org B.V. +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 Ajax.org B.V. 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 COPYRIGHT HOLDERS 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 AJAX.ORG B.V. 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/htdocs/includes/ace/README.md b/htdocs/includes/ace/README.md new file mode 100644 index 00000000000..388ccd3fdef --- /dev/null +++ b/htdocs/includes/ace/README.md @@ -0,0 +1,23 @@ +Ace (Ajax.org Cloud9 Editor) +============================ +[![CDNJS](https://img.shields.io/cdnjs/v/ace.svg)](https://cdnjs.com/libraries/ace) +[![npm](https://img.shields.io/npm/v/ace-builds.svg)](https://www.npmjs.com/package/ace-builds) + +Ace is a code editor written in JavaScript. + +This repository has only generated files. +If you want to work on ace please go to https://github.com/ajaxorg/ace instead. + + +here you can find pre-built files for convenience of embedding. +it contains 4 versions + * [src](https://github.com/ajaxorg/ace-builds/tree/master/src) concatenated but not minified + * [src-min](https://github.com/ajaxorg/ace-builds/tree/master/src-min) concatenated and minified with uglify.js + * [src-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-noconflict) uses ace.require instead of require + * [src-min-noconflict](https://github.com/ajaxorg/ace-builds/tree/master/src-min-noconflict) concatenated, minified with uglify.js, and uses ace.require instead of require + + +For a simple way of embedding ace into webpage see [editor.html](https://github.com/ajaxorg/ace-builds/blob/master/editor.html) or list of other [simple examples](https://github.com/ajaxorg/ace-builds/tree/master/demo) +To see ace in action go to [kitchen-sink-demo](http://ajaxorg.github.com/ace-builds/kitchen-sink.html), [scrollable-page-demo](http://ajaxorg.github.com/ace-builds/demo/scrollable-page.html) or [minimal demo](http://ajaxorg.github.com/ace-builds/editor.html), + + diff --git a/htdocs/includes/ace/ace-modules.d.ts b/htdocs/includes/ace/ace-modules.d.ts new file mode 100644 index 00000000000..a25e20c9c84 --- /dev/null +++ b/htdocs/includes/ace/ace-modules.d.ts @@ -0,0 +1,393 @@ +declare module 'ace-builds/src-noconflict/ext-beautify'; +declare module 'ace-builds/src-noconflict/ext-elastic_tabstops_lite'; +declare module 'ace-builds/src-noconflict/ext-emmet'; +declare module 'ace-builds/src-noconflict/ext-error_marker'; +declare module 'ace-builds/src-noconflict/ext-keybinding_menu'; +declare module 'ace-builds/src-noconflict/ext-language_tools'; +declare module 'ace-builds/src-noconflict/ext-linking'; +declare module 'ace-builds/src-noconflict/ext-modelist'; +declare module 'ace-builds/src-noconflict/ext-options'; +declare module 'ace-builds/src-noconflict/ext-prompt'; +declare module 'ace-builds/src-noconflict/ext-rtl'; +declare module 'ace-builds/src-noconflict/ext-searchbox'; +declare module 'ace-builds/src-noconflict/ext-settings_menu'; +declare module 'ace-builds/src-noconflict/ext-spellcheck'; +declare module 'ace-builds/src-noconflict/ext-split'; +declare module 'ace-builds/src-noconflict/ext-static_highlight'; +declare module 'ace-builds/src-noconflict/ext-statusbar'; +declare module 'ace-builds/src-noconflict/ext-textarea'; +declare module 'ace-builds/src-noconflict/ext-themelist'; +declare module 'ace-builds/src-noconflict/ext-whitespace'; +declare module 'ace-builds/src-noconflict/keybinding-emacs'; +declare module 'ace-builds/src-noconflict/keybinding-sublime'; +declare module 'ace-builds/src-noconflict/keybinding-vim'; +declare module 'ace-builds/src-noconflict/mode-abap'; +declare module 'ace-builds/src-noconflict/mode-abc'; +declare module 'ace-builds/src-noconflict/mode-actionscript'; +declare module 'ace-builds/src-noconflict/mode-ada'; +declare module 'ace-builds/src-noconflict/mode-apache_conf'; +declare module 'ace-builds/src-noconflict/mode-apex'; +declare module 'ace-builds/src-noconflict/mode-applescript'; +declare module 'ace-builds/src-noconflict/mode-aql'; +declare module 'ace-builds/src-noconflict/mode-asciidoc'; +declare module 'ace-builds/src-noconflict/mode-asl'; +declare module 'ace-builds/src-noconflict/mode-assembly_x86'; +declare module 'ace-builds/src-noconflict/mode-autohotkey'; +declare module 'ace-builds/src-noconflict/mode-batchfile'; +declare module 'ace-builds/src-noconflict/mode-bro'; +declare module 'ace-builds/src-noconflict/mode-c9search'; +declare module 'ace-builds/src-noconflict/mode-cirru'; +declare module 'ace-builds/src-noconflict/mode-clojure'; +declare module 'ace-builds/src-noconflict/mode-cobol'; +declare module 'ace-builds/src-noconflict/mode-coffee'; +declare module 'ace-builds/src-noconflict/mode-coldfusion'; +declare module 'ace-builds/src-noconflict/mode-crystal'; +declare module 'ace-builds/src-noconflict/mode-csharp'; +declare module 'ace-builds/src-noconflict/mode-csound_document'; +declare module 'ace-builds/src-noconflict/mode-csound_orchestra'; +declare module 'ace-builds/src-noconflict/mode-csound_score'; +declare module 'ace-builds/src-noconflict/mode-csp'; +declare module 'ace-builds/src-noconflict/mode-css'; +declare module 'ace-builds/src-noconflict/mode-curly'; +declare module 'ace-builds/src-noconflict/mode-c_cpp'; +declare module 'ace-builds/src-noconflict/mode-d'; +declare module 'ace-builds/src-noconflict/mode-dart'; +declare module 'ace-builds/src-noconflict/mode-diff'; +declare module 'ace-builds/src-noconflict/mode-django'; +declare module 'ace-builds/src-noconflict/mode-dockerfile'; +declare module 'ace-builds/src-noconflict/mode-dot'; +declare module 'ace-builds/src-noconflict/mode-drools'; +declare module 'ace-builds/src-noconflict/mode-edifact'; +declare module 'ace-builds/src-noconflict/mode-eiffel'; +declare module 'ace-builds/src-noconflict/mode-ejs'; +declare module 'ace-builds/src-noconflict/mode-elixir'; +declare module 'ace-builds/src-noconflict/mode-elm'; +declare module 'ace-builds/src-noconflict/mode-erlang'; +declare module 'ace-builds/src-noconflict/mode-forth'; +declare module 'ace-builds/src-noconflict/mode-fortran'; +declare module 'ace-builds/src-noconflict/mode-fsharp'; +declare module 'ace-builds/src-noconflict/mode-fsl'; +declare module 'ace-builds/src-noconflict/mode-ftl'; +declare module 'ace-builds/src-noconflict/mode-gcode'; +declare module 'ace-builds/src-noconflict/mode-gherkin'; +declare module 'ace-builds/src-noconflict/mode-gitignore'; +declare module 'ace-builds/src-noconflict/mode-glsl'; +declare module 'ace-builds/src-noconflict/mode-gobstones'; +declare module 'ace-builds/src-noconflict/mode-golang'; +declare module 'ace-builds/src-noconflict/mode-graphqlschema'; +declare module 'ace-builds/src-noconflict/mode-groovy'; +declare module 'ace-builds/src-noconflict/mode-haml'; +declare module 'ace-builds/src-noconflict/mode-handlebars'; +declare module 'ace-builds/src-noconflict/mode-haskell'; +declare module 'ace-builds/src-noconflict/mode-haskell_cabal'; +declare module 'ace-builds/src-noconflict/mode-haxe'; +declare module 'ace-builds/src-noconflict/mode-hjson'; +declare module 'ace-builds/src-noconflict/mode-html'; +declare module 'ace-builds/src-noconflict/mode-html_elixir'; +declare module 'ace-builds/src-noconflict/mode-html_ruby'; +declare module 'ace-builds/src-noconflict/mode-ini'; +declare module 'ace-builds/src-noconflict/mode-io'; +declare module 'ace-builds/src-noconflict/mode-jack'; +declare module 'ace-builds/src-noconflict/mode-jade'; +declare module 'ace-builds/src-noconflict/mode-java'; +declare module 'ace-builds/src-noconflict/mode-javascript'; +declare module 'ace-builds/src-noconflict/mode-json'; +declare module 'ace-builds/src-noconflict/mode-jsoniq'; +declare module 'ace-builds/src-noconflict/mode-jsp'; +declare module 'ace-builds/src-noconflict/mode-jssm'; +declare module 'ace-builds/src-noconflict/mode-jsx'; +declare module 'ace-builds/src-noconflict/mode-julia'; +declare module 'ace-builds/src-noconflict/mode-kotlin'; +declare module 'ace-builds/src-noconflict/mode-latex'; +declare module 'ace-builds/src-noconflict/mode-less'; +declare module 'ace-builds/src-noconflict/mode-liquid'; +declare module 'ace-builds/src-noconflict/mode-lisp'; +declare module 'ace-builds/src-noconflict/mode-livescript'; +declare module 'ace-builds/src-noconflict/mode-logiql'; +declare module 'ace-builds/src-noconflict/mode-logtalk'; +declare module 'ace-builds/src-noconflict/mode-lsl'; +declare module 'ace-builds/src-noconflict/mode-lua'; +declare module 'ace-builds/src-noconflict/mode-luapage'; +declare module 'ace-builds/src-noconflict/mode-lucene'; +declare module 'ace-builds/src-noconflict/mode-makefile'; +declare module 'ace-builds/src-noconflict/mode-markdown'; +declare module 'ace-builds/src-noconflict/mode-mask'; +declare module 'ace-builds/src-noconflict/mode-matlab'; +declare module 'ace-builds/src-noconflict/mode-maze'; +declare module 'ace-builds/src-noconflict/mode-mel'; +declare module 'ace-builds/src-noconflict/mode-mixal'; +declare module 'ace-builds/src-noconflict/mode-mushcode'; +declare module 'ace-builds/src-noconflict/mode-mysql'; +declare module 'ace-builds/src-noconflict/mode-nginx'; +declare module 'ace-builds/src-noconflict/mode-nim'; +declare module 'ace-builds/src-noconflict/mode-nix'; +declare module 'ace-builds/src-noconflict/mode-nsis'; +declare module 'ace-builds/src-noconflict/mode-objectivec'; +declare module 'ace-builds/src-noconflict/mode-ocaml'; +declare module 'ace-builds/src-noconflict/mode-pascal'; +declare module 'ace-builds/src-noconflict/mode-perl'; +declare module 'ace-builds/src-noconflict/mode-perl6'; +declare module 'ace-builds/src-noconflict/mode-pgsql'; +declare module 'ace-builds/src-noconflict/mode-php'; +declare module 'ace-builds/src-noconflict/mode-php_laravel_blade'; +declare module 'ace-builds/src-noconflict/mode-pig'; +declare module 'ace-builds/src-noconflict/mode-plain_text'; +declare module 'ace-builds/src-noconflict/mode-powershell'; +declare module 'ace-builds/src-noconflict/mode-praat'; +declare module 'ace-builds/src-noconflict/mode-prolog'; +declare module 'ace-builds/src-noconflict/mode-properties'; +declare module 'ace-builds/src-noconflict/mode-protobuf'; +declare module 'ace-builds/src-noconflict/mode-puppet'; +declare module 'ace-builds/src-noconflict/mode-python'; +declare module 'ace-builds/src-noconflict/mode-r'; +declare module 'ace-builds/src-noconflict/mode-razor'; +declare module 'ace-builds/src-noconflict/mode-rdoc'; +declare module 'ace-builds/src-noconflict/mode-red'; +declare module 'ace-builds/src-noconflict/mode-redshift'; +declare module 'ace-builds/src-noconflict/mode-rhtml'; +declare module 'ace-builds/src-noconflict/mode-rst'; +declare module 'ace-builds/src-noconflict/mode-ruby'; +declare module 'ace-builds/src-noconflict/mode-rust'; +declare module 'ace-builds/src-noconflict/mode-sass'; +declare module 'ace-builds/src-noconflict/mode-scad'; +declare module 'ace-builds/src-noconflict/mode-scala'; +declare module 'ace-builds/src-noconflict/mode-scheme'; +declare module 'ace-builds/src-noconflict/mode-scss'; +declare module 'ace-builds/src-noconflict/mode-sh'; +declare module 'ace-builds/src-noconflict/mode-sjs'; +declare module 'ace-builds/src-noconflict/mode-slim'; +declare module 'ace-builds/src-noconflict/mode-smarty'; +declare module 'ace-builds/src-noconflict/mode-snippets'; +declare module 'ace-builds/src-noconflict/mode-soy_template'; +declare module 'ace-builds/src-noconflict/mode-space'; +declare module 'ace-builds/src-noconflict/mode-sparql'; +declare module 'ace-builds/src-noconflict/mode-sql'; +declare module 'ace-builds/src-noconflict/mode-sqlserver'; +declare module 'ace-builds/src-noconflict/mode-stylus'; +declare module 'ace-builds/src-noconflict/mode-svg'; +declare module 'ace-builds/src-noconflict/mode-swift'; +declare module 'ace-builds/src-noconflict/mode-tcl'; +declare module 'ace-builds/src-noconflict/mode-terraform'; +declare module 'ace-builds/src-noconflict/mode-tex'; +declare module 'ace-builds/src-noconflict/mode-text'; +declare module 'ace-builds/src-noconflict/mode-textile'; +declare module 'ace-builds/src-noconflict/mode-toml'; +declare module 'ace-builds/src-noconflict/mode-tsx'; +declare module 'ace-builds/src-noconflict/mode-turtle'; +declare module 'ace-builds/src-noconflict/mode-twig'; +declare module 'ace-builds/src-noconflict/mode-typescript'; +declare module 'ace-builds/src-noconflict/mode-vala'; +declare module 'ace-builds/src-noconflict/mode-vbscript'; +declare module 'ace-builds/src-noconflict/mode-velocity'; +declare module 'ace-builds/src-noconflict/mode-verilog'; +declare module 'ace-builds/src-noconflict/mode-vhdl'; +declare module 'ace-builds/src-noconflict/mode-visualforce'; +declare module 'ace-builds/src-noconflict/mode-wollok'; +declare module 'ace-builds/src-noconflict/mode-xml'; +declare module 'ace-builds/src-noconflict/mode-xquery'; +declare module 'ace-builds/src-noconflict/mode-yaml'; +declare module 'ace-builds/src-noconflict/mode-zeek'; +declare module 'ace-builds/src-noconflict/theme-ambiance'; +declare module 'ace-builds/src-noconflict/theme-chaos'; +declare module 'ace-builds/src-noconflict/theme-chrome'; +declare module 'ace-builds/src-noconflict/theme-clouds'; +declare module 'ace-builds/src-noconflict/theme-clouds_midnight'; +declare module 'ace-builds/src-noconflict/theme-cobalt'; +declare module 'ace-builds/src-noconflict/theme-crimson_editor'; +declare module 'ace-builds/src-noconflict/theme-dawn'; +declare module 'ace-builds/src-noconflict/theme-dracula'; +declare module 'ace-builds/src-noconflict/theme-dreamweaver'; +declare module 'ace-builds/src-noconflict/theme-eclipse'; +declare module 'ace-builds/src-noconflict/theme-github'; +declare module 'ace-builds/src-noconflict/theme-gob'; +declare module 'ace-builds/src-noconflict/theme-gruvbox'; +declare module 'ace-builds/src-noconflict/theme-idle_fingers'; +declare module 'ace-builds/src-noconflict/theme-iplastic'; +declare module 'ace-builds/src-noconflict/theme-katzenmilch'; +declare module 'ace-builds/src-noconflict/theme-kr_theme'; +declare module 'ace-builds/src-noconflict/theme-kuroir'; +declare module 'ace-builds/src-noconflict/theme-merbivore'; +declare module 'ace-builds/src-noconflict/theme-merbivore_soft'; +declare module 'ace-builds/src-noconflict/theme-monokai'; +declare module 'ace-builds/src-noconflict/theme-mono_industrial'; +declare module 'ace-builds/src-noconflict/theme-pastel_on_dark'; +declare module 'ace-builds/src-noconflict/theme-solarized_dark'; +declare module 'ace-builds/src-noconflict/theme-solarized_light'; +declare module 'ace-builds/src-noconflict/theme-sqlserver'; +declare module 'ace-builds/src-noconflict/theme-terminal'; +declare module 'ace-builds/src-noconflict/theme-textmate'; +declare module 'ace-builds/src-noconflict/theme-tomorrow'; +declare module 'ace-builds/src-noconflict/theme-tomorrow_night'; +declare module 'ace-builds/src-noconflict/theme-tomorrow_night_blue'; +declare module 'ace-builds/src-noconflict/theme-tomorrow_night_bright'; +declare module 'ace-builds/src-noconflict/theme-tomorrow_night_eighties'; +declare module 'ace-builds/src-noconflict/theme-twilight'; +declare module 'ace-builds/src-noconflict/theme-vibrant_ink'; +declare module 'ace-builds/src-noconflict/theme-xcode'; +declare module 'ace-builds/src-noconflict/snippets/abap'; +declare module 'ace-builds/src-noconflict/snippets/abc'; +declare module 'ace-builds/src-noconflict/snippets/actionscript'; +declare module 'ace-builds/src-noconflict/snippets/ada'; +declare module 'ace-builds/src-noconflict/snippets/apache_conf'; +declare module 'ace-builds/src-noconflict/snippets/apex'; +declare module 'ace-builds/src-noconflict/snippets/applescript'; +declare module 'ace-builds/src-noconflict/snippets/aql'; +declare module 'ace-builds/src-noconflict/snippets/asciidoc'; +declare module 'ace-builds/src-noconflict/snippets/asl'; +declare module 'ace-builds/src-noconflict/snippets/assembly_x86'; +declare module 'ace-builds/src-noconflict/snippets/autohotkey'; +declare module 'ace-builds/src-noconflict/snippets/batchfile'; +declare module 'ace-builds/src-noconflict/snippets/bro'; +declare module 'ace-builds/src-noconflict/snippets/c9search'; +declare module 'ace-builds/src-noconflict/snippets/cirru'; +declare module 'ace-builds/src-noconflict/snippets/clojure'; +declare module 'ace-builds/src-noconflict/snippets/cobol'; +declare module 'ace-builds/src-noconflict/snippets/coffee'; +declare module 'ace-builds/src-noconflict/snippets/coldfusion'; +declare module 'ace-builds/src-noconflict/snippets/crystal'; +declare module 'ace-builds/src-noconflict/snippets/csharp'; +declare module 'ace-builds/src-noconflict/snippets/csound_document'; +declare module 'ace-builds/src-noconflict/snippets/csound_orchestra'; +declare module 'ace-builds/src-noconflict/snippets/csound_score'; +declare module 'ace-builds/src-noconflict/snippets/csp'; +declare module 'ace-builds/src-noconflict/snippets/css'; +declare module 'ace-builds/src-noconflict/snippets/curly'; +declare module 'ace-builds/src-noconflict/snippets/c_cpp'; +declare module 'ace-builds/src-noconflict/snippets/d'; +declare module 'ace-builds/src-noconflict/snippets/dart'; +declare module 'ace-builds/src-noconflict/snippets/diff'; +declare module 'ace-builds/src-noconflict/snippets/django'; +declare module 'ace-builds/src-noconflict/snippets/dockerfile'; +declare module 'ace-builds/src-noconflict/snippets/dot'; +declare module 'ace-builds/src-noconflict/snippets/drools'; +declare module 'ace-builds/src-noconflict/snippets/edifact'; +declare module 'ace-builds/src-noconflict/snippets/eiffel'; +declare module 'ace-builds/src-noconflict/snippets/ejs'; +declare module 'ace-builds/src-noconflict/snippets/elixir'; +declare module 'ace-builds/src-noconflict/snippets/elm'; +declare module 'ace-builds/src-noconflict/snippets/erlang'; +declare module 'ace-builds/src-noconflict/snippets/forth'; +declare module 'ace-builds/src-noconflict/snippets/fortran'; +declare module 'ace-builds/src-noconflict/snippets/fsharp'; +declare module 'ace-builds/src-noconflict/snippets/fsl'; +declare module 'ace-builds/src-noconflict/snippets/ftl'; +declare module 'ace-builds/src-noconflict/snippets/gcode'; +declare module 'ace-builds/src-noconflict/snippets/gherkin'; +declare module 'ace-builds/src-noconflict/snippets/gitignore'; +declare module 'ace-builds/src-noconflict/snippets/glsl'; +declare module 'ace-builds/src-noconflict/snippets/gobstones'; +declare module 'ace-builds/src-noconflict/snippets/golang'; +declare module 'ace-builds/src-noconflict/snippets/graphqlschema'; +declare module 'ace-builds/src-noconflict/snippets/groovy'; +declare module 'ace-builds/src-noconflict/snippets/haml'; +declare module 'ace-builds/src-noconflict/snippets/handlebars'; +declare module 'ace-builds/src-noconflict/snippets/haskell'; +declare module 'ace-builds/src-noconflict/snippets/haskell_cabal'; +declare module 'ace-builds/src-noconflict/snippets/haxe'; +declare module 'ace-builds/src-noconflict/snippets/hjson'; +declare module 'ace-builds/src-noconflict/snippets/html'; +declare module 'ace-builds/src-noconflict/snippets/html_elixir'; +declare module 'ace-builds/src-noconflict/snippets/html_ruby'; +declare module 'ace-builds/src-noconflict/snippets/ini'; +declare module 'ace-builds/src-noconflict/snippets/io'; +declare module 'ace-builds/src-noconflict/snippets/jack'; +declare module 'ace-builds/src-noconflict/snippets/jade'; +declare module 'ace-builds/src-noconflict/snippets/java'; +declare module 'ace-builds/src-noconflict/snippets/javascript'; +declare module 'ace-builds/src-noconflict/snippets/json'; +declare module 'ace-builds/src-noconflict/snippets/jsoniq'; +declare module 'ace-builds/src-noconflict/snippets/jsp'; +declare module 'ace-builds/src-noconflict/snippets/jssm'; +declare module 'ace-builds/src-noconflict/snippets/jsx'; +declare module 'ace-builds/src-noconflict/snippets/julia'; +declare module 'ace-builds/src-noconflict/snippets/kotlin'; +declare module 'ace-builds/src-noconflict/snippets/latex'; +declare module 'ace-builds/src-noconflict/snippets/less'; +declare module 'ace-builds/src-noconflict/snippets/liquid'; +declare module 'ace-builds/src-noconflict/snippets/lisp'; +declare module 'ace-builds/src-noconflict/snippets/livescript'; +declare module 'ace-builds/src-noconflict/snippets/logiql'; +declare module 'ace-builds/src-noconflict/snippets/logtalk'; +declare module 'ace-builds/src-noconflict/snippets/lsl'; +declare module 'ace-builds/src-noconflict/snippets/lua'; +declare module 'ace-builds/src-noconflict/snippets/luapage'; +declare module 'ace-builds/src-noconflict/snippets/lucene'; +declare module 'ace-builds/src-noconflict/snippets/makefile'; +declare module 'ace-builds/src-noconflict/snippets/markdown'; +declare module 'ace-builds/src-noconflict/snippets/mask'; +declare module 'ace-builds/src-noconflict/snippets/matlab'; +declare module 'ace-builds/src-noconflict/snippets/maze'; +declare module 'ace-builds/src-noconflict/snippets/mel'; +declare module 'ace-builds/src-noconflict/snippets/mixal'; +declare module 'ace-builds/src-noconflict/snippets/mushcode'; +declare module 'ace-builds/src-noconflict/snippets/mysql'; +declare module 'ace-builds/src-noconflict/snippets/nginx'; +declare module 'ace-builds/src-noconflict/snippets/nim'; +declare module 'ace-builds/src-noconflict/snippets/nix'; +declare module 'ace-builds/src-noconflict/snippets/nsis'; +declare module 'ace-builds/src-noconflict/snippets/objectivec'; +declare module 'ace-builds/src-noconflict/snippets/ocaml'; +declare module 'ace-builds/src-noconflict/snippets/pascal'; +declare module 'ace-builds/src-noconflict/snippets/perl'; +declare module 'ace-builds/src-noconflict/snippets/perl6'; +declare module 'ace-builds/src-noconflict/snippets/pgsql'; +declare module 'ace-builds/src-noconflict/snippets/php'; +declare module 'ace-builds/src-noconflict/snippets/php_laravel_blade'; +declare module 'ace-builds/src-noconflict/snippets/pig'; +declare module 'ace-builds/src-noconflict/snippets/plain_text'; +declare module 'ace-builds/src-noconflict/snippets/powershell'; +declare module 'ace-builds/src-noconflict/snippets/praat'; +declare module 'ace-builds/src-noconflict/snippets/prolog'; +declare module 'ace-builds/src-noconflict/snippets/properties'; +declare module 'ace-builds/src-noconflict/snippets/protobuf'; +declare module 'ace-builds/src-noconflict/snippets/puppet'; +declare module 'ace-builds/src-noconflict/snippets/python'; +declare module 'ace-builds/src-noconflict/snippets/r'; +declare module 'ace-builds/src-noconflict/snippets/razor'; +declare module 'ace-builds/src-noconflict/snippets/rdoc'; +declare module 'ace-builds/src-noconflict/snippets/red'; +declare module 'ace-builds/src-noconflict/snippets/redshift'; +declare module 'ace-builds/src-noconflict/snippets/rhtml'; +declare module 'ace-builds/src-noconflict/snippets/rst'; +declare module 'ace-builds/src-noconflict/snippets/ruby'; +declare module 'ace-builds/src-noconflict/snippets/rust'; +declare module 'ace-builds/src-noconflict/snippets/sass'; +declare module 'ace-builds/src-noconflict/snippets/scad'; +declare module 'ace-builds/src-noconflict/snippets/scala'; +declare module 'ace-builds/src-noconflict/snippets/scheme'; +declare module 'ace-builds/src-noconflict/snippets/scss'; +declare module 'ace-builds/src-noconflict/snippets/sh'; +declare module 'ace-builds/src-noconflict/snippets/sjs'; +declare module 'ace-builds/src-noconflict/snippets/slim'; +declare module 'ace-builds/src-noconflict/snippets/smarty'; +declare module 'ace-builds/src-noconflict/snippets/snippets'; +declare module 'ace-builds/src-noconflict/snippets/soy_template'; +declare module 'ace-builds/src-noconflict/snippets/space'; +declare module 'ace-builds/src-noconflict/snippets/sparql'; +declare module 'ace-builds/src-noconflict/snippets/sql'; +declare module 'ace-builds/src-noconflict/snippets/sqlserver'; +declare module 'ace-builds/src-noconflict/snippets/stylus'; +declare module 'ace-builds/src-noconflict/snippets/svg'; +declare module 'ace-builds/src-noconflict/snippets/swift'; +declare module 'ace-builds/src-noconflict/snippets/tcl'; +declare module 'ace-builds/src-noconflict/snippets/terraform'; +declare module 'ace-builds/src-noconflict/snippets/tex'; +declare module 'ace-builds/src-noconflict/snippets/text'; +declare module 'ace-builds/src-noconflict/snippets/textile'; +declare module 'ace-builds/src-noconflict/snippets/toml'; +declare module 'ace-builds/src-noconflict/snippets/tsx'; +declare module 'ace-builds/src-noconflict/snippets/turtle'; +declare module 'ace-builds/src-noconflict/snippets/twig'; +declare module 'ace-builds/src-noconflict/snippets/typescript'; +declare module 'ace-builds/src-noconflict/snippets/vala'; +declare module 'ace-builds/src-noconflict/snippets/vbscript'; +declare module 'ace-builds/src-noconflict/snippets/velocity'; +declare module 'ace-builds/src-noconflict/snippets/verilog'; +declare module 'ace-builds/src-noconflict/snippets/vhdl'; +declare module 'ace-builds/src-noconflict/snippets/visualforce'; +declare module 'ace-builds/src-noconflict/snippets/wollok'; +declare module 'ace-builds/src-noconflict/snippets/xml'; +declare module 'ace-builds/src-noconflict/snippets/xquery'; +declare module 'ace-builds/src-noconflict/snippets/yaml'; +declare module 'ace-builds/src-noconflict/snippets/zeek'; +declare module 'ace-builds/webpack-resolver'; diff --git a/htdocs/includes/ace/ace.d.ts b/htdocs/includes/ace/ace.d.ts new file mode 100644 index 00000000000..3d7ce109bb7 --- /dev/null +++ b/htdocs/includes/ace/ace.d.ts @@ -0,0 +1,886 @@ +/// +export namespace Ace { + export type NewLineMode = 'auto' | 'unix' | 'windows'; + + export interface Anchor extends EventEmitter { + getPosition(): Point; + getDocument(): Document; + setPosition(row: number, column: number, noClip?: boolean): void; + detach(): void; + attach(doc: Document): void; + } + + export interface Document extends EventEmitter { + setValue(text: string): void; + getValue(): string; + createAnchor(row: number, column: number): Anchor; + getNewLineCharacter(): string; + setNewLineMode(newLineMode: NewLineMode): void; + getNewLineMode(): NewLineMode; + isNewLine(text: string): boolean; + getLine(row: number): string; + getLines(firstRow: number, lastRow: number): string[]; + getAllLines(): string[]; + getTextRange(range: Range): string; + getLinesForRange(range: Range): string[]; + insert(position: Point, text: string): Point; + insertInLine(position: Point, text: string): Point; + clippedPos(row: number, column: number): Point; + clonePos(pos: Point): Point; + pos(row: number, column: number): Point; + insertFullLines(row: number, lines: string[]): void; + insertMergedLines(position: Point, lines: string[]): Point; + remove(range: Range): Point; + removeInLine(row: number, startColumn: number, endColumn: number): Point; + removeFullLines(firstRow: number, lastRow: number): string[]; + removeNewLine(row: number): void; + replace(range: Range, text: string): Point; + applyDeltas(deltas: Delta[]): void; + revertDeltas(deltas: Delta[]): void; + applyDelta(delta: Delta, doNotValidate?: boolean): void; + revertDelta(delta: Delta): void; + indexToPosition(index: number, startRow: number): Point; + positionToIndex(pos: Point, startRow?: number): number; + } + + export interface FoldLine { + folds: Fold[]; + range: Range; + start: Point; + end: Point; + + shiftRow(shift: number): void; + addFold(fold: Fold): void; + containsRow(row: number): boolean; + walk(callback: Function, endRow?: number, endColumn?: number): void; + getNextFoldTo(row: number, column: number): null | { fold: Fold, kind: string }; + addRemoveChars(row: number, column: number, len: number): void; + split(row: number, column: number): FoldLine; + merge(foldLineNext: FoldLine): void; + idxToPosition(idx: number): Point; + } + + export interface Fold { + range: Range; + start: Point; + end: Point; + foldLine?: FoldLine; + sameRow: boolean; + subFolds: Fold[]; + + setFoldLine(foldLine: FoldLine): void; + clone(): Fold; + addSubFold(fold: Fold): Fold; + restoreRange(range: Range): void; + } + + interface Folding { + getFoldAt(row: number, column: number, side: number): Fold; + getFoldsInRange(range: Range): Fold[]; + getFoldsInRangeList(ranges: Range[]): Fold[]; + getAllFolds(): Fold[]; + getFoldStringAt(row: number, + column: number, + trim?: number, + foldLine?: FoldLine): string | null; + getFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null; + getNextFoldLine(docRow: number, startFoldLine?: FoldLine): FoldLine | null; + getFoldedRowCount(first: number, last: number): number; + addFold(placeholder: string | Fold, range?: Range): Fold; + addFolds(folds: Fold[]): void; + removeFold(fold: Fold): void; + removeFolds(folds: Fold[]): void; + expandFold(fold: Fold): void; + expandFolds(folds: Fold[]): void; + unfold(location: null | number | Point | Range, + expandInner?: boolean): Fold[] | undefined; + isRowFolded(docRow: number, startFoldRow?: FoldLine): boolean; + getFoldRowEnd(docRow: number, startFoldRow?: FoldLine): number; + getFoldRowStart(docRow: number, startFoldRow?: FoldLine): number; + getFoldDisplayLine(foldLine: FoldLine, + endRow: number | null, + endColumn: number | null, + startRow: number | null, + startColumn: number | null): string; + getDisplayLine(row: number, + endColumn: number | null, + startRow: number | null, + startColumn: number | null): string; + toggleFold(tryToUnfold?: boolean): void; + getCommentFoldRange(row: number, + column: number, + dir: number): Range | undefined; + foldAll(startRow?: number, endRow?: number, depth?: number): void; + setFoldStyle(style: string): void; + getParentFoldRangeData(row: number, ignoreCurrent?: boolean): { + range?: Range, + firstRange: Range + }; + toggleFoldWidget(toggleParent?: boolean): void; + updateFoldWidgets(delta: Delta): void; + } + + export interface Range { + start: Point; + end: Point; + + isEqual(range: Range): boolean; + toString(): string; + contains(row: number, column: number): boolean; + compareRange(range: Range): number; + comparePoint(p: Point): number; + containsRange(range: Range): boolean; + intersects(range: Range): boolean; + isEnd(row: number, column: number): boolean; + isStart(row: number, column: number): boolean; + setStart(row: number, column: number): void; + setEnd(row: number, column: number): void; + inside(row: number, column: number): boolean; + insideStart(row: number, column: number): boolean; + insideEnd(row: number, column: number): boolean; + compare(row: number, column: number): number; + compareStart(row: number, column: number): number; + compareEnd(row: number, column: number): number; + compareInside(row: number, column: number): number; + clipRows(firstRow: number, lastRow: number): Range; + extend(row: number, column: number): Range; + isEmpty(): boolean; + isMultiLine(): boolean; + clone(): Range; + collapseRows(): Range; + toScreenRange(session: EditSession): Range; + moveBy(row: number, column: number): void; + } + + export interface EditSessionOptions { + wrap: string | number; + wrapMethod: 'code' | 'text' | 'auto'; + indentedSoftWrap: boolean; + firstLineNumber: number; + useWorker: boolean; + useSoftTabs: boolean; + tabSize: number; + navigateWithinSoftTabs: boolean; + foldStyle: 'markbegin' | 'markbeginend' | 'manual'; + overwrite: boolean; + newLineMode: NewLineMode; + mode: string; + } + + export interface VirtualRendererOptions { + animatedScroll: boolean; + showInvisibles: boolean; + showPrintMargin: boolean; + printMarginColumn: number; + printMargin: boolean | number; + showGutter: boolean; + fadeFoldWidgets: boolean; + showFoldWidgets: boolean; + showLineNumbers: boolean; + displayIndentGuides: boolean; + highlightGutterLine: boolean; + hScrollBarAlwaysVisible: boolean; + vScrollBarAlwaysVisible: boolean; + fontSize: number; + fontFamily: string; + maxLines: number; + minLines: number; + scrollPastEnd: boolean; + fixedWidthGutter: boolean; + theme: string; + hasCssTransforms: boolean; + maxPixelHeight: number; + } + + export interface MouseHandlerOptions { + scrollSpeed: number; + dragDelay: number; + dragEnabled: boolean; + focusTimeout: number; + tooltipFollowsMouse: boolean; + } + + export interface EditorOptions extends EditSessionOptions, + MouseHandlerOptions, + VirtualRendererOptions { + selectionStyle: string; + highlightActiveLine: boolean; + highlightSelectedWord: boolean; + readOnly: boolean; + copyWithEmptySelection: boolean; + cursorStyle: 'ace' | 'slim' | 'smooth' | 'wide'; + mergeUndoDeltas: true | false | 'always'; + behavioursEnabled: boolean; + wrapBehavioursEnabled: boolean; + autoScrollEditorIntoView: boolean; + keyboardHandler: string; + value: string; + session: EditSession; + } + + export interface SearchOptions { + needle: string | RegExp; + preventScroll: boolean; + backwards: boolean; + start: Range; + skipCurrent: boolean; + range: Range; + preserveCase: boolean; + regExp: RegExp; + wholeWord: string; + caseSensitive: boolean; + wrap: boolean; + } + + export interface EventEmitter { + once(name: string, callback: Function): void; + setDefaultHandler(name: string, callback: Function): void; + removeDefaultHandler(name: string, callback: Function): void; + on(name: string, callback: Function, capturing?: boolean): void; + addEventListener(name: string, callback: Function, capturing?: boolean): void; + off(name: string, callback: Function): void; + removeListener(name: string, callback: Function): void; + removeEventListener(name: string, callback: Function): void; + } + + export interface Point { + row: number; + column: number; + } + + export interface Delta { + action: 'insert' | 'remove'; + start: Point; + end: Point; + lines: string[]; + } + + export interface Annotation { + row?: number; + column?: number; + text: string; + type: string; + } + + export interface Command { + name?: string; + bindKey?: string | { mac?: string, win?: string }; + readOnly?: boolean; + exec: (editor: Editor, args?: any) => void; + } + + export type CommandLike = Command | ((editor: Editor) => void); + + export interface KeyboardHandler { + handleKeyboard: Function; + } + + export interface MarkerLike { + range: Range; + type: string; + renderer?: MarkerRenderer; + clazz: string; + inFront: boolean; + id: number; + update?: (html: string[], + // TODO maybe define Marker class + marker: any, + session: EditSession, + config: any) => void; + } + + export type MarkerRenderer = (html: string[], + range: Range, + left: number, + top: number, + config: any) => void; + + export interface Token { + type: string; + value: string; + index?: number; + start?: number; + } + + export interface Completion { + value: string; + score: number; + meta?: string; + name?: string; + caption?: string; + } + + export interface Tokenizer { + removeCapturingGroups(src: string): string; + createSplitterRegexp(src: string, flag?: string): RegExp; + getLineTokens(line: string, startState: string | string[]): Token[]; + } + + interface TokenIterator { + getCurrentToken(): Token; + getCurrentTokenColumn(): number; + getCurrentTokenRow(): number; + getCurrentTokenPosition(): Point; + getCurrentTokenRange(): Range; + stepBackward(): Token; + stepForward(): Token; + } + + export interface SyntaxMode { + getTokenizer(): Tokenizer; + toggleCommentLines(state: any, + session: EditSession, + startRow: number, + endRow: number): void; + toggleBlockComment(state: any, + session: EditSession, + range: Range, + cursor: Point): void; + getNextLineIndent(state: any, line: string, tab: string): string; + checkOutdent(state: any, line: string, input: string): boolean; + autoOutdent(state: any, doc: Document, row: number): void; + // TODO implement WorkerClient types + createWorker(session: EditSession): any; + createModeDelegates(mapping: { [key: string]: string }): void; + transformAction(state: string, + action: string, + editor: Editor, + session: EditSession, + text: string): any; + getKeywords(append?: boolean): Array; + getCompletions(state: string, + session: EditSession, + pos: Point, + prefix: string): Completion[]; + } + + export interface Config { + get(key: string): any; + set(key: string, value: any): void; + all(): { [key: string]: any }; + moduleUrl(name: string, component?: string): string; + setModuleUrl(name: string, subst: string): string; + loadModule(moduleName: string | [string, string], + onLoad: (module: any) => void): void; + init(packaged: any): any; + defineOptions(obj: any, path: string, options: { [key: string]: any }): Config; + resetOptions(obj: any): void; + setDefaultValue(path: string, name: string, value: any): void; + setDefaultValues(path: string, optionHash: { [key: string]: any }): void; + } + + export interface OptionsProvider { + setOptions(optList: { [key: string]: any }): void; + getOptions(optionNames?: string[] | { [key: string]: any }): { [key: string]: any }; + setOption(name: string, value: any): void; + getOption(name: string): any; + } + + export interface UndoManager { + addSession(session: EditSession): void; + add(delta: Delta, allowMerge: boolean, session: EditSession): void; + addSelection(selection: string, rev?: number): void; + startNewGroup(): void; + markIgnored(from: number, to?: number): void; + getSelection(rev: number, after?: boolean): { value: string, rev: number }; + getRevision(): number; + getDeltas(from: number, to?: number): Delta[]; + undo(session: EditSession, dontSelect?: boolean): void; + redo(session: EditSession, dontSelect?: boolean): void; + reset(): void; + canUndo(): boolean; + canRedo(): boolean; + bookmark(rev?: number): void; + isAtBookmark(): boolean; + } + + export interface EditSession extends EventEmitter, OptionsProvider, Folding { + selection: Selection; + + on(name: 'changeFold', + callback: (obj: { data: Fold, action: string }) => void): Function; + on(name: 'changeScrollLeft', callback: (scrollLeft: number) => void): Function; + on(name: 'changeScrollTop', callback: (scrollTop: number) => void): Function; + on(name: 'tokenizerUpdate', + callback: (obj: { data: { first: number, last: number } }) => void): Function; + + + setOption(name: T, value: EditSessionOptions[T]): void; + getOption(name: T): EditSessionOptions[T]; + + setDocument(doc: Document): void; + getDocument(): Document; + resetCaches(): void; + setValue(text: string): void; + getValue(): string; + getSelection(): Selection; + getState(row: number): string; + getTokens(row: number): Token[]; + getTokenAt(row: number, column: number): Token | null; + setUndoManager(undoManager: UndoManager): void; + markUndoGroup(): void; + getUndoManager(): UndoManager; + getTabString(): string; + setUseSoftTabs(val: boolean): void; + getUseSoftTabs(): boolean; + setTabSize(tabSize: number): void; + getTabSize(): number; + isTabStop(position: Point): boolean; + setNavigateWithinSoftTabs(navigateWithinSoftTabs: boolean): void; + getNavigateWithinSoftTabs(): boolean; + setOverwrite(overwrite: boolean): void; + getOverwrite(): boolean; + toggleOverwrite(): void; + addGutterDecoration(row: number, className: string): void; + removeGutterDecoration(row: number, className: string): void; + getBreakpoints(): string[]; + setBreakpoints(rows: number[]): void; + clearBreakpoints(): void; + setBreakpoint(row: number, className: string): void; + clearBreakpoint(row: number): void; + addMarker(range: Range, + className: string, + type: "fullLine" | "screenLine" | "text" | MarkerRenderer, + inFront?: boolean): number; + addDynamicMarker(marker: MarkerLike, inFront: boolean): MarkerLike; + removeMarker(markerId: number): void; + getMarkers(inFront?: boolean): MarkerLike[]; + highlight(re: RegExp): void; + highlightLines(startRow: number, + endRow: number, + className: string, + inFront?: boolean): Range; + setAnnotations(annotations: Annotation[]): void; + getAnnotations(): Annotation[]; + clearAnnotations(): void; + getWordRange(row: number, column: number): Range; + getAWordRange(row: number, column: number): Range; + setNewLineMode(newLineMode: NewLineMode): void; + getNewLineMode(): NewLineMode; + setUseWorker(useWorker: boolean): void; + getUseWorker(): boolean; + setMode(mode: string | SyntaxMode, callback?: () => void): void; + getMode(): SyntaxMode; + setScrollTop(scrollTop: number): void; + getScrollTop(): number; + setScrollLeft(scrollLeft: number): void; + getScrollLeft(): number; + getScreenWidth(): number; + getLineWidgetMaxWidth(): number; + getLine(row: number): string; + getLines(firstRow: number, lastRow: number): string[]; + getLength(): number; + getTextRange(range: Range): string; + insert(position: Point, text: string): void; + remove(range: Range): void; + removeFullLines(firstRow: number, lastRow: number): void; + undoChanges(deltas: Delta[], dontSelect?: boolean): void; + redoChanges(deltas: Delta[], dontSelect?: boolean): void; + setUndoSelect(enable: boolean): void; + replace(range: Range, text: string): void; + moveText(fromRange: Range, toPosition: Point, copy?: boolean): void; + indentRows(startRow: number, endRow: number, indentString: string): void; + outdentRows(range: Range): void; + moveLinesUp(firstRow: number, lastRow: number): void; + moveLinesDown(firstRow: number, lastRow: number): void; + duplicateLines(firstRow: number, lastRow: number): void; + setUseWrapMode(useWrapMode: boolean): void; + getUseWrapMode(): boolean; + setWrapLimitRange(min: number, max: number): void; + adjustWrapLimit(desiredLimit: number): boolean; + getWrapLimit(): number; + setWrapLimit(limit: number): void; + getWrapLimitRange(): { min: number, max: number }; + getRowLineCount(row: number): number; + getRowWrapIndent(screenRow: number): number; + getScreenLastRowColumn(screenRow: number): number; + getDocumentLastRowColumn(docRow: number, docColumn: number): number; + getdocumentLastRowColumnPosition(docRow: number, docColumn: number): Point; + getRowSplitData(row: number): string | undefined; + getScreenTabSize(screenColumn: number): number; + screenToDocumentRow(screenRow: number, screenColumn: number): number; + screenToDocumentColumn(screenRow: number, screenColumn: number): number; + screenToDocumentPosition(screenRow: number, + screenColumn: number, + offsetX?: number): Point; + documentToScreenPosition(docRow: number, docColumn: number): Point; + documentToScreenPosition(position: Point): Point; + documentToScreenColumn(row: number, docColumn: number): number; + documentToScreenRow(docRow: number, docColumn: number): number; + getScreenLength(): number; + destroy(): void; + } + + export interface KeyBinding { + setDefaultHandler(handler: KeyboardHandler): void; + setKeyboardHandler(handler: KeyboardHandler): void; + addKeyboardHandler(handler: KeyboardHandler, pos: number): void; + removeKeyboardHandler(handler: KeyboardHandler): boolean; + getKeyboardHandler(): KeyboardHandler; + getStatusText(): string; + } + + interface CommandMap { + [name: string]: Command; + } + + type execEventHandler = (obj: { + editor: Editor, + command: Command, + args: any[] + }) => void; + + export interface CommandManager extends EventEmitter { + byName: CommandMap, + commands: CommandMap, + on(name: 'exec', callback: execEventHandler): Function; + on(name: 'afterExec', callback: execEventHandler): Function; + once(name: string, callback: Function): void; + setDefaultHandler(name: string, callback: Function): void; + removeDefaultHandler(name: string, callback: Function): void; + on(name: string, callback: Function, capturing?: boolean): Function; + addEventListener(name: string, callback: Function, capturing?: boolean): void; + off(name: string, callback: Function): void; + removeListener(name: string, callback: Function): void; + removeEventListener(name: string, callback: Function): void; + + exec(command: string, editor: Editor, args: any): boolean; + toggleRecording(editor: Editor): void; + replay(editor: Editor): void; + addCommand(command: Command): void; + removeCommand(command: Command, keepCommand?: boolean): void; + bindKey(key: string | { mac?: string, win?: string }, + command: CommandLike, + position?: number): void; + } + + export interface VirtualRenderer extends OptionsProvider, EventEmitter { + container: HTMLElement; + + setOption(name: T, value: VirtualRendererOptions[T]): void; + getOption(name: T): VirtualRendererOptions[T]; + + setSession(session: EditSession): void; + updateLines(firstRow: number, lastRow: number, force?: boolean): void; + updateText(): void; + updateFull(force?: boolean): void; + updateFontSize(): void; + adjustWrapLimit(): boolean; + setAnimatedScroll(shouldAnimate: boolean): void; + getAnimatedScroll(): boolean; + setShowInvisibles(showInvisibles: boolean): void; + getShowInvisibles(): boolean; + setDisplayIndentGuides(display: boolean): void; + getDisplayIndentGuides(): boolean; + setShowPrintMargin(showPrintMargin: boolean): void; + getShowPrintMargin(): boolean; + setPrintMarginColumn(showPrintMargin: boolean): void; + getPrintMarginColumn(): boolean; + setShowGutter(show: boolean): void; + getShowGutter(): boolean; + setFadeFoldWidgets(show: boolean): void; + getFadeFoldWidgets(): boolean; + setHighlightGutterLine(shouldHighlight: boolean): void; + getHighlightGutterLine(): boolean; + getContainerElement(): HTMLElement; + getMouseEventTarget(): HTMLElement; + getTextAreaContainer(): HTMLElement; + getFirstVisibleRow(): number; + getFirstFullyVisibleRow(): number; + getLastFullyVisibleRow(): number; + getLastVisibleRow(): number; + setPadding(padding: number): void; + setScrollMargin(top: number, + bottom: number, + left: number, + right: number): void; + setHScrollBarAlwaysVisible(alwaysVisible: boolean): void; + getHScrollBarAlwaysVisible(): boolean; + setVScrollBarAlwaysVisible(alwaysVisible: boolean): void; + getVScrollBarAlwaysVisible(): boolean; + freeze(): void; + unfreeze(): void; + updateFrontMarkers(): void; + updateBackMarkers(): void; + updateBreakpoints(): void; + setAnnotations(annotations: Annotation[]): void; + updateCursor(): void; + hideCursor(): void; + showCursor(): void; + scrollSelectionIntoView(anchor: Point, + lead: Point, + offset?: number): void; + scrollCursorIntoView(cursor: Point, offset?: number): void; + getScrollTop(): number; + getScrollLeft(): number; + getScrollTopRow(): number; + getScrollBottomRow(): number; + scrollToRow(row: number): void; + alignCursor(cursor: Point | number, alignment: number): number; + scrollToLine(line: number, + center: boolean, + animate: boolean, + callback: () => void): void; + animateScrolling(fromValue: number, callback: () => void): void; + scrollToY(scrollTop: number): void; + scrollToX(scrollLeft: number): void; + scrollTo(x: number, y: number): void; + scrollBy(deltaX: number, deltaY: number): void; + isScrollableBy(deltaX: number, deltaY: number): boolean; + textToScreenCoordinates(row: number, column: number): { pageX: number, pageY: number }; + visualizeFocus(): void; + visualizeBlur(): void; + showComposition(position: number): void; + setCompositionText(text: string): void; + hideComposition(): void; + setTheme(theme: string, callback?: () => void): void; + getTheme(): string; + setStyle(style: string, include?: boolean): void; + unsetStyle(style: string): void; + setCursorStyle(style: string): void; + setMouseCursor(cursorStyle: string): void; + attachToShadowRoot(): void; + destroy(): void; + } + + + export interface Selection extends EventEmitter { + moveCursorWordLeft(): void; + moveCursorWordRight(): void; + fromOrientedRange(range: Range): void; + setSelectionRange(match: any): void; + getAllRanges(): Range[]; + addRange(range: Range): void; + isEmpty(): boolean; + isMultiLine(): boolean; + setCursor(row: number, column: number): void; + setAnchor(row: number, column: number): void; + getAnchor(): Point; + getCursor(): Point; + isBackwards(): boolean; + getRange(): Range; + clearSelection(): void; + selectAll(): void; + setRange(range: Range, reverse?: boolean): void; + selectTo(row: number, column: number): void; + selectToPosition(pos: any): void; + selectUp(): void; + selectDown(): void; + selectRight(): void; + selectLeft(): void; + selectLineStart(): void; + selectLineEnd(): void; + selectFileEnd(): void; + selectFileStart(): void; + selectWordRight(): void; + selectWordLeft(): void; + getWordRange(): void; + selectWord(): void; + selectAWord(): void; + selectLine(): void; + moveCursorUp(): void; + moveCursorDown(): void; + moveCursorLeft(): void; + moveCursorRight(): void; + moveCursorLineStart(): void; + moveCursorLineEnd(): void; + moveCursorFileEnd(): void; + moveCursorFileStart(): void; + moveCursorLongWordRight(): void; + moveCursorLongWordLeft(): void; + moveCursorBy(rows: number, chars: number): void; + moveCursorToPosition(position: any): void; + moveCursorTo(row: number, column: number, keepDesiredColumn?: boolean): void; + moveCursorToScreen(row: number, column: number, keepDesiredColumn: boolean): void; + + toJSON(): SavedSelection | SavedSelection[]; + fromJSON(selection: SavedSelection | SavedSelection[]): void; + } + interface SavedSelection { + start: Point; + end: Point; + isBackwards: boolean; + } + + var Selection: { + new(session: EditSession): Selection; + } + + export interface Editor extends OptionsProvider, EventEmitter { + container: HTMLElement; + renderer: VirtualRenderer; + id: string; + commands: CommandManager; + keyBinding: KeyBinding; + session: EditSession; + selection: Selection; + + on(name: 'blur', callback: (e: Event) => void): Function; + on(name: 'input', callback: () => void): Function; + on(name: 'change', callback: (delta: Delta) => void): Function; + on(name: 'changeSelectionStyle', callback: (obj: { data: string }) => void): Function; + on(name: 'changeSession', + callback: (obj: { session: EditSession, oldSession: EditSession }) => void + ): Function; + on(name: 'copy', callback: (obj: { text: string }) => void): Function; + on(name: 'focus', callback: (e: Event) => void): Function; + on(name: 'paste', callback: (obj: { text: string }) => void): Function; + + setOption(name: T, value: EditorOptions[T]): void; + getOption(name: T): EditorOptions[T]; + + setKeyboardHandler(keyboardHandler: string, callback?: () => void): void; + getKeyboardHandler(): string; + setSession(session: EditSession): void; + getSession(): EditSession; + setValue(val: string, cursorPos?: number): string; + getValue(): string; + getSelection(): Selection; + resize(force?: boolean): void; + setTheme(theme: string, callback?: () => void): void; + getTheme(): string; + setStyle(style: string): void; + unsetStyle(style: string): void; + getFontSize(): string; + setFontSize(size: string): void; + focus(): void; + isFocused(): boolean; + flur(): void; + getSelectedText(): string; + getCopyText(): string; + execCommand(command: string | string[], args?: any): boolean; + insert(text: string, pasted?: boolean): void; + setOverwrite(overwrite: boolean): void; + getOverwrite(): boolean; + toggleOverwrite(): void; + setScrollSpeed(speed: number): void; + getScrollSpeed(): number; + setDragDelay(dragDelay: number): void; + getDragDelay(): number; + setSelectionStyle(val: string): void; + getSelectionStyle(): string; + setHighlightActiveLine(shouldHighlight: boolean): void; + getHighlightActiveLine(): boolean; + setHighlightGutterLine(shouldHighlight: boolean): void; + getHighlightGutterLine(): boolean; + setHighlightSelectedWord(shouldHighlight: boolean): void; + getHighlightSelectedWord(): boolean; + setAnimatedScroll(shouldAnimate: boolean): void; + getAnimatedScroll(): boolean; + setShowInvisibles(showInvisibles: boolean): void; + getShowInvisibles(): boolean; + setDisplayIndentGuides(display: boolean): void; + getDisplayIndentGuides(): boolean; + setShowPrintMargin(showPrintMargin: boolean): void; + getShowPrintMargin(): boolean; + setPrintMarginColumn(showPrintMargin: number): void; + getPrintMarginColumn(): number; + setReadOnly(readOnly: boolean): void; + getReadOnly(): boolean; + setBehavioursEnabled(enabled: boolean): void; + getBehavioursEnabled(): boolean; + setWrapBehavioursEnabled(enabled: boolean): void; + getWrapBehavioursEnabled(): boolean; + setShowFoldWidgets(show: boolean): void; + getShowFoldWidgets(): boolean; + setFadeFoldWidgets(fade: boolean): void; + getFadeFoldWidgets(): boolean; + remove(dir?: 'left' | 'right'): void; + removeWordRight(): void; + removeWordLeft(): void; + removeLineToEnd(): void; + splitLine(): void; + transposeLetters(): void; + toLowerCase(): void; + toUpperCase(): void; + indent(): void; + blockIndent(): void; + blockOutdent(): void; + sortLines(): void; + toggleCommentLines(): void; + toggleBlockComment(): void; + modifyNumber(amount: number): void; + removeLines(): void; + duplicateSelection(): void; + moveLinesDown(): void; + moveLinesUp(): void; + moveText(range: Range, toPosition: Point, copy?: boolean): Range; + copyLinesUp(): void; + copyLinesDown(): void; + getFirstVisibleRow(): number; + getLastVisibleRow(): number; + isRowVisible(row: number): boolean; + isRowFullyVisible(row: number): boolean; + selectPageDown(): void; + selectPageUp(): void; + gotoPageDown(): void; + gotoPageUp(): void; + scrollPageDown(): void; + scrollPageUp(): void; + scrollToRow(row: number): void; + scrollToLine(line: number, center: boolean, animate: boolean, callback: () => void): void; + centerSelection(): void; + getCursorPosition(): Point; + getCursorPositionScreen(): Point; + getSelectionRange(): Range; + selectAll(): void; + clearSelection(): void; + moveCursorTo(row: number, column: number): void; + moveCursorToPosition(pos: Point): void; + jumpToMatching(select: boolean, expand: boolean): void; + gotoLine(lineNumber: number, column: number, animate: boolean): void; + navigateTo(row: number, column: number): void; + navigateUp(): void; + navigateDown(): void; + navigateLeft(): void; + navigateRight(): void; + navigateLineStart(): void; + navigateLineEnd(): void; + navigateFileEnd(): void; + navigateFileStart(): void; + navigateWordRight(): void; + navigateWordLeft(): void; + replace(replacement: string, options?: Partial): number; + replaceAll(replacement: string, options?: Partial): number; + getLastSearchOptions(): Partial; + find(needle: string, options?: Partial, animate?: boolean): void; + findNext(options?: Partial, animate?: boolean): void; + findPrevious(options?: Partial, animate?: boolean): void; + undo(): void; + redo(): void; + destroy(): void; + setAutoScrollEditorIntoView(enable: boolean): void; + completers: Completer[]; + } + + type CompleterCallback = (error: any, completions: Completion[]) => void; + + interface Completer { + getCompletions(editor: Editor, + session: EditSession, + position: Point, + prefix: string, + callback: CompleterCallback): void; + } +} + + +export const version: string; +export const config: Ace.Config; +export function require(name: string): any; +export function edit(el: Element | string, options?: Partial): Ace.Editor; +export function createEditSession(text: Ace.Document | string, mode: Ace.SyntaxMode): Ace.EditSession; +export const VirtualRenderer: { + new(container: HTMLElement, theme?: string): Ace.VirtualRenderer; +}; +export const EditSession: { + new(text: string | Document, mode?: Ace.SyntaxMode): Ace.EditSession; +}; +export const UndoManager: { + new(): Ace.UndoManager; +}; +export const Range: { + new(startRow: number, startColumn: number, endRow: number, endColumn: number): Ace.Range; + fromPoints(start: Ace.Point, end: Ace.Point): Ace.Range; + comparePoints(p1: Ace.Point, p2: Ace.Point): number; +}; diff --git a/htdocs/includes/ace/bower.json b/htdocs/includes/ace/bower.json new file mode 100644 index 00000000000..be9c3184200 --- /dev/null +++ b/htdocs/includes/ace/bower.json @@ -0,0 +1,20 @@ +{ + "name": "ace-builds", + "description": "Ace (Ajax.org Cloud9 Editor)", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "ignore": [ + "demo" + ], + "repository": { + "type": "git", + "url": "https://github.com/ajaxorg/ace-builds.git" + }, + "author": "", + "license": "BSD", + "bugs": { + "url": "https://github.com/ajaxorg/ace-builds/issues" + }, + "homepage": "https://github.com/ajaxorg/ace-builds" +} diff --git a/htdocs/includes/ace/editor.html b/htdocs/includes/ace/editor.html new file mode 100644 index 00000000000..7be6b4d79e4 --- /dev/null +++ b/htdocs/includes/ace/editor.html @@ -0,0 +1,39 @@ + + + + + + Editor + + + + +
    function foo(items) {
    +    var i;
    +    for (i = 0; i < items.length; i++) {
    +        alert("Ace Rocks " + items[i]);
    +    }
    +}
    + + + + + + diff --git a/htdocs/includes/ace/ext-beautify.js b/htdocs/includes/ace/ext-beautify.js deleted file mode 100644 index ba499b776e5..00000000000 --- a/htdocs/includes/ace/ext-beautify.js +++ /dev/null @@ -1,334 +0,0 @@ -ace.define("ace/ext/beautify/php_rules",["require","exports","module","ace/token_iterator"], function(require, exports, module) { -"use strict"; -var TokenIterator = require("ace/token_iterator").TokenIterator; -exports.newLines = [{ - type: 'support.php_tag', - value: '' -}, { - type: 'paren.lparen', - value: '{', - indent: true -}, { - type: 'paren.rparen', - breakBefore: true, - value: '}', - indent: false -}, { - type: 'paren.rparen', - breakBefore: true, - value: '})', - indent: false, - dontBreak: true -}, { - type: 'comment' -}, { - type: 'text', - value: ';' -}, { - type: 'text', - value: ':', - context: 'php' -}, { - type: 'keyword', - value: 'case', - indent: true, - dontBreak: true -}, { - type: 'keyword', - value: 'default', - indent: true, - dontBreak: true -}, { - type: 'keyword', - value: 'break', - indent: false, - dontBreak: true -}, { - type: 'punctuation.doctype.end', - value: '>' -}, { - type: 'meta.tag.punctuation.end', - value: '>' -}, { - type: 'meta.tag.punctuation.begin', - value: '<', - blockTag: true, - indent: true, - dontBreak: true -}, { - type: 'meta.tag.punctuation.begin', - value: '' ){ - context = 'php'; - } - else if( token.type == 'support.php_tag' && token.value == '?>' ){ - context = 'html'; - } - else if( token.type == 'meta.tag.name.style' && context != 'css' ){ - context = 'css'; - } - else if( token.type == 'meta.tag.name.style' && context == 'css' ){ - context = 'html'; - } - else if( token.type == 'meta.tag.name.script' && context != 'js' ){ - context = 'js'; - } - else if( token.type == 'meta.tag.name.script' && context == 'js' ){ - context = 'html'; - } - - nextToken = iterator.stepForward(); - if (nextToken && nextToken.type.indexOf('meta.tag.name') == 0) { - nextTag = nextToken.value; - } - if ( lastToken.type == 'support.php_tag' && lastToken.value == '' ) { - dontBreak = false; - } - lastTag = tag; - - lastToken = token; - - token = nextToken; - - if (token===null) { - break; - } - } - - return code; -}; - - - -}); - -ace.define("ace/ext/beautify",["require","exports","module","ace/token_iterator","ace/ext/beautify/php_rules"], function(require, exports, module) { -"use strict"; -var TokenIterator = require("ace/token_iterator").TokenIterator; - -var phpTransform = require("./beautify/php_rules").transform; - -exports.beautify = function(session) { - var iterator = new TokenIterator(session, 0, 0); - var token = iterator.getCurrentToken(); - - var context = session.$modeId.split("/").pop(); - - var code = phpTransform(iterator, context); - session.doc.setValue(code); -}; - -exports.commands = [{ - name: "beautify", - exec: function(editor) { - exports.beautify(editor.session); - }, - bindKey: "Ctrl-Shift-B" -}] - -}); - (function() { - ace.require(["ace/ext/beautify"], function() {}); - })(); - \ No newline at end of file diff --git a/htdocs/includes/ace/ext-chromevox.js b/htdocs/includes/ace/ext-chromevox.js deleted file mode 100644 index a321335c6c0..00000000000 --- a/htdocs/includes/ace/ext-chromevox.js +++ /dev/null @@ -1,540 +0,0 @@ -ace.define("ace/ext/chromevox",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { -var cvoxAce = {}; -cvoxAce.SpeechProperty; -cvoxAce.Cursor; -cvoxAce.Token; -cvoxAce.Annotation; -var CONSTANT_PROP = { - 'rate': 0.8, - 'pitch': 0.4, - 'volume': 0.9 -}; -var DEFAULT_PROP = { - 'rate': 1, - 'pitch': 0.5, - 'volume': 0.9 -}; -var ENTITY_PROP = { - 'rate': 0.8, - 'pitch': 0.8, - 'volume': 0.9 -}; -var KEYWORD_PROP = { - 'rate': 0.8, - 'pitch': 0.3, - 'volume': 0.9 -}; -var STORAGE_PROP = { - 'rate': 0.8, - 'pitch': 0.7, - 'volume': 0.9 -}; -var VARIABLE_PROP = { - 'rate': 0.8, - 'pitch': 0.8, - 'volume': 0.9 -}; -var DELETED_PROP = { - 'punctuationEcho': 'none', - 'relativePitch': -0.6 -}; -var ERROR_EARCON = 'ALERT_NONMODAL'; -var MODE_SWITCH_EARCON = 'ALERT_MODAL'; -var NO_MATCH_EARCON = 'INVALID_KEYPRESS'; -var INSERT_MODE_STATE = 'insertMode'; -var COMMAND_MODE_STATE = 'start'; - -var REPLACE_LIST = [ - { - substr: ';', - newSubstr: ' semicolon ' - }, - { - substr: ':', - newSubstr: ' colon ' - } -]; -var Command = { - SPEAK_ANNOT: 'annots', - SPEAK_ALL_ANNOTS: 'all_annots', - TOGGLE_LOCATION: 'toggle_location', - SPEAK_MODE: 'mode', - SPEAK_ROW_COL: 'row_col', - TOGGLE_DISPLACEMENT: 'toggle_displacement', - FOCUS_TEXT: 'focus_text' -}; -var KEY_PREFIX = 'CONTROL + SHIFT '; -cvoxAce.editor = null; -var lastCursor = null; -var annotTable = {}; -var shouldSpeakRowLocation = false; -var shouldSpeakDisplacement = false; -var changed = false; -var vimState = null; -var keyCodeToShortcutMap = {}; -var cmdToShortcutMap = {}; -var getKeyShortcutString = function(keyCode) { - return KEY_PREFIX + String.fromCharCode(keyCode); -}; -var isVimMode = function() { - var keyboardHandler = cvoxAce.editor.keyBinding.getKeyboardHandler(); - return keyboardHandler.$id === 'ace/keyboard/vim'; -}; -var getCurrentToken = function(cursor) { - return cvoxAce.editor.getSession().getTokenAt(cursor.row, cursor.column + 1); -}; -var getCurrentLine = function(cursor) { - return cvoxAce.editor.getSession().getLine(cursor.row); -}; -var onRowChange = function(currCursor) { - if (annotTable[currCursor.row]) { - cvox.Api.playEarcon(ERROR_EARCON); - } - if (shouldSpeakRowLocation) { - cvox.Api.stop(); - speakChar(currCursor); - speakTokenQueue(getCurrentToken(currCursor)); - speakLine(currCursor.row, 1); - } else { - speakLine(currCursor.row, 0); - } -}; -var isWord = function(cursor) { - var line = getCurrentLine(cursor); - var lineSuffix = line.substr(cursor.column - 1); - if (cursor.column === 0) { - lineSuffix = ' ' + line; - } - var firstWordRegExp = /^\W(\w+)/; - var words = firstWordRegExp.exec(lineSuffix); - return words !== null; -}; -var rules = { - 'constant': { - prop: CONSTANT_PROP - }, - 'entity': { - prop: ENTITY_PROP - }, - 'keyword': { - prop: KEYWORD_PROP - }, - 'storage': { - prop: STORAGE_PROP - }, - 'variable': { - prop: VARIABLE_PROP - }, - 'meta': { - prop: DEFAULT_PROP, - replace: [ - { - substr: '', - newSubstr: ' close tag ' - }, - { - substr: '<', - newSubstr: ' tag start ' - }, - { - substr: '>', - newSubstr: ' tag end ' - } - ] - } -}; -var DEFAULT_RULE = { - prop: DEFAULT_RULE -}; -var expand = function(value, replaceRules) { - var newValue = value; - for (var i = 0; i < replaceRules.length; i++) { - var replaceRule = replaceRules[i]; - var regexp = new RegExp(replaceRule.substr, 'g'); - newValue = newValue.replace(regexp, replaceRule.newSubstr); - } - return newValue; -}; -var mergeTokens = function(tokens, start, end) { - var newToken = {}; - newToken.value = ''; - newToken.type = tokens[start].type; - for (var j = start; j < end; j++) { - newToken.value += tokens[j].value; - } - return newToken; -}; -var mergeLikeTokens = function(tokens) { - if (tokens.length <= 1) { - return tokens; - } - var newTokens = []; - var lastLikeIndex = 0; - for (var i = 1; i < tokens.length; i++) { - var lastLikeToken = tokens[lastLikeIndex]; - var currToken = tokens[i]; - if (getTokenRule(lastLikeToken) !== getTokenRule(currToken)) { - newTokens.push(mergeTokens(tokens, lastLikeIndex, i)); - lastLikeIndex = i; - } - } - newTokens.push(mergeTokens(tokens, lastLikeIndex, tokens.length)); - return newTokens; -}; -var isRowWhiteSpace = function(row) { - var line = cvoxAce.editor.getSession().getLine(row); - var whiteSpaceRegexp = /^\s*$/; - return whiteSpaceRegexp.exec(line) !== null; -}; -var speakLine = function(row, queue) { - var tokens = cvoxAce.editor.getSession().getTokens(row); - if (tokens.length === 0 || isRowWhiteSpace(row)) { - cvox.Api.playEarcon('EDITABLE_TEXT'); - return; - } - tokens = mergeLikeTokens(tokens); - var firstToken = tokens[0]; - tokens = tokens.filter(function(token) { - return token !== firstToken; - }); - speakToken_(firstToken, queue); - tokens.forEach(speakTokenQueue); -}; -var speakTokenFlush = function(token) { - speakToken_(token, 0); -}; -var speakTokenQueue = function(token) { - speakToken_(token, 1); -}; -var getTokenRule = function(token) { - if (!token || !token.type) { - return; - } - var split = token.type.split('.'); - if (split.length === 0) { - return; - } - var type = split[0]; - var rule = rules[type]; - if (!rule) { - return DEFAULT_RULE; - } - return rule; -}; -var speakToken_ = function(token, queue) { - var rule = getTokenRule(token); - var value = expand(token.value, REPLACE_LIST); - if (rule.replace) { - value = expand(value, rule.replace); - } - cvox.Api.speak(value, queue, rule.prop); -}; -var speakChar = function(cursor) { - var line = getCurrentLine(cursor); - cvox.Api.speak(line[cursor.column], 1); -}; -var speakDisplacement = function(lastCursor, currCursor) { - var line = getCurrentLine(currCursor); - var displace = line.substring(lastCursor.column, currCursor.column); - displace = displace.replace(/ /g, ' space '); - cvox.Api.speak(displace); -}; -var speakCharOrWordOrLine = function(lastCursor, currCursor) { - if (Math.abs(lastCursor.column - currCursor.column) !== 1) { - var currLineLength = getCurrentLine(currCursor).length; - if (currCursor.column === 0 || currCursor.column === currLineLength) { - speakLine(currCursor.row, 0); - return; - } - if (isWord(currCursor)) { - cvox.Api.stop(); - speakTokenQueue(getCurrentToken(currCursor)); - return; - } - } - speakChar(currCursor); -}; -var onColumnChange = function(lastCursor, currCursor) { - if (!cvoxAce.editor.selection.isEmpty()) { - speakDisplacement(lastCursor, currCursor); - cvox.Api.speak('selected', 1); - } - else if (shouldSpeakDisplacement) { - speakDisplacement(lastCursor, currCursor); - } else { - speakCharOrWordOrLine(lastCursor, currCursor); - } -}; -var onCursorChange = function(evt) { - if (changed) { - changed = false; - return; - } - var currCursor = cvoxAce.editor.selection.getCursor(); - if (currCursor.row !== lastCursor.row) { - onRowChange(currCursor); - } else { - onColumnChange(lastCursor, currCursor); - } - lastCursor = currCursor; -}; -var onSelectionChange = function(evt) { - if (cvoxAce.editor.selection.isEmpty()) { - cvox.Api.speak('unselected'); - } -}; -var onChange = function(delta) { - switch (delta.action) { - case 'remove': - cvox.Api.speak(delta.text, 0, DELETED_PROP); - changed = true; - break; - case 'insert': - cvox.Api.speak(delta.text, 0); - changed = true; - break; - } -}; -var isNewAnnotation = function(annot) { - var row = annot.row; - var col = annot.column; - return !annotTable[row] || !annotTable[row][col]; -}; -var populateAnnotations = function(annotations) { - annotTable = {}; - for (var i = 0; i < annotations.length; i++) { - var annotation = annotations[i]; - var row = annotation.row; - var col = annotation.column; - if (!annotTable[row]) { - annotTable[row] = {}; - } - annotTable[row][col] = annotation; - } -}; -var onAnnotationChange = function(evt) { - var annotations = cvoxAce.editor.getSession().getAnnotations(); - var newAnnotations = annotations.filter(isNewAnnotation); - if (newAnnotations.length > 0) { - cvox.Api.playEarcon(ERROR_EARCON); - } - populateAnnotations(annotations); -}; -var speakAnnot = function(annot) { - var annotText = annot.type + ' ' + annot.text + ' on ' + - rowColToString(annot.row, annot.column); - annotText = annotText.replace(';', 'semicolon'); - cvox.Api.speak(annotText, 1); -}; -var speakAnnotsByRow = function(row) { - var annots = annotTable[row]; - for (var col in annots) { - speakAnnot(annots[col]); - } -}; -var rowColToString = function(row, col) { - return 'row ' + (row + 1) + ' column ' + (col + 1); -}; -var speakCurrRowAndCol = function() { - cvox.Api.speak(rowColToString(lastCursor.row, lastCursor.column)); -}; -var speakAllAnnots = function() { - for (var row in annotTable) { - speakAnnotsByRow(row); - } -}; -var speakMode = function() { - if (!isVimMode()) { - return; - } - switch (cvoxAce.editor.keyBinding.$data.state) { - case INSERT_MODE_STATE: - cvox.Api.speak('Insert mode'); - break; - case COMMAND_MODE_STATE: - cvox.Api.speak('Command mode'); - break; - } -}; -var toggleSpeakRowLocation = function() { - shouldSpeakRowLocation = !shouldSpeakRowLocation; - if (shouldSpeakRowLocation) { - cvox.Api.speak('Speak location on row change enabled.'); - } else { - cvox.Api.speak('Speak location on row change disabled.'); - } -}; -var toggleSpeakDisplacement = function() { - shouldSpeakDisplacement = !shouldSpeakDisplacement; - if (shouldSpeakDisplacement) { - cvox.Api.speak('Speak displacement on column changes.'); - } else { - cvox.Api.speak('Speak current character or word on column changes.'); - } -}; -var onKeyDown = function(evt) { - if (evt.ctrlKey && evt.shiftKey) { - var shortcut = keyCodeToShortcutMap[evt.keyCode]; - if (shortcut) { - shortcut.func(); - } - } -}; -var onChangeStatus = function(evt, editor) { - if (!isVimMode()) { - return; - } - var state = editor.keyBinding.$data.state; - if (state === vimState) { - return; - } - switch (state) { - case INSERT_MODE_STATE: - cvox.Api.playEarcon(MODE_SWITCH_EARCON); - cvox.Api.setKeyEcho(true); - break; - case COMMAND_MODE_STATE: - cvox.Api.playEarcon(MODE_SWITCH_EARCON); - cvox.Api.setKeyEcho(false); - break; - } - vimState = state; -}; -var contextMenuHandler = function(evt) { - var cmd = evt.detail['customCommand']; - var shortcut = cmdToShortcutMap[cmd]; - if (shortcut) { - shortcut.func(); - cvoxAce.editor.focus(); - } -}; -var initContextMenu = function() { - var ACTIONS = SHORTCUTS.map(function(shortcut) { - return { - desc: shortcut.desc + getKeyShortcutString(shortcut.keyCode), - cmd: shortcut.cmd - }; - }); - var body = document.querySelector('body'); - body.setAttribute('contextMenuActions', JSON.stringify(ACTIONS)); - body.addEventListener('ATCustomEvent', contextMenuHandler, true); -}; -var onFindSearchbox = function(evt) { - if (evt.match) { - speakLine(lastCursor.row, 0); - } else { - cvox.Api.playEarcon(NO_MATCH_EARCON); - } -}; -var focus = function() { - cvoxAce.editor.focus(); -}; -var SHORTCUTS = [ - { - keyCode: 49, - func: function() { - speakAnnotsByRow(lastCursor.row); - }, - cmd: Command.SPEAK_ANNOT, - desc: 'Speak annotations on line' - }, - { - keyCode: 50, - func: speakAllAnnots, - cmd: Command.SPEAK_ALL_ANNOTS, - desc: 'Speak all annotations' - }, - { - keyCode: 51, - func: speakMode, - cmd: Command.SPEAK_MODE, - desc: 'Speak Vim mode' - }, - { - keyCode: 52, - func: toggleSpeakRowLocation, - cmd: Command.TOGGLE_LOCATION, - desc: 'Toggle speak row location' - }, - { - keyCode: 53, - func: speakCurrRowAndCol, - cmd: Command.SPEAK_ROW_COL, - desc: 'Speak row and column' - }, - { - keyCode: 54, - func: toggleSpeakDisplacement, - cmd: Command.TOGGLE_DISPLACEMENT, - desc: 'Toggle speak displacement' - }, - { - keyCode: 55, - func: focus, - cmd: Command.FOCUS_TEXT, - desc: 'Focus text' - } -]; -var onFocus = function(_, editor) { - cvoxAce.editor = editor; - editor.getSession().selection.on('changeCursor', onCursorChange); - editor.getSession().selection.on('changeSelection', onSelectionChange); - editor.getSession().on('change', onChange); - editor.getSession().on('changeAnnotation', onAnnotationChange); - editor.on('changeStatus', onChangeStatus); - editor.on('findSearchBox', onFindSearchbox); - editor.container.addEventListener('keydown', onKeyDown); - - lastCursor = editor.selection.getCursor(); -}; -var init = function(editor) { - onFocus(null, editor); - SHORTCUTS.forEach(function(shortcut) { - keyCodeToShortcutMap[shortcut.keyCode] = shortcut; - cmdToShortcutMap[shortcut.cmd] = shortcut; - }); - - editor.on('focus', onFocus); - if (isVimMode()) { - cvox.Api.setKeyEcho(false); - } - initContextMenu(); -}; -function cvoxApiExists() { - return (typeof(cvox) !== 'undefined') && cvox && cvox.Api; -} -var tries = 0; -var MAX_TRIES = 15; -function watchForCvoxLoad(editor) { - if (cvoxApiExists()) { - init(editor); - } else { - tries++; - if (tries >= MAX_TRIES) { - return; - } - window.setTimeout(watchForCvoxLoad, 500, editor); - } -} - -var Editor = require('../editor').Editor; -require('../config').defineOptions(Editor.prototype, 'editor', { - enableChromevoxEnhancements: { - set: function(val) { - if (val) { - watchForCvoxLoad(this); - } - }, - value: true // turn it on by default or check for window.cvox - } -}); - -}); - (function() { - ace.require(["ace/ext/chromevox"], function() {}); - })(); - \ No newline at end of file diff --git a/htdocs/includes/ace/ext-error_marker.js b/htdocs/includes/ace/ext-error_marker.js deleted file mode 100644 index d4c9eb9131b..00000000000 --- a/htdocs/includes/ace/ext-error_marker.js +++ /dev/null @@ -1,6 +0,0 @@ - -; - (function() { - ace.require(["ace/ext/error_marker"], function() {}); - })(); - \ No newline at end of file diff --git a/htdocs/includes/ace/ext-old_ie.js b/htdocs/includes/ace/ext-old_ie.js deleted file mode 100644 index f0f225c8b64..00000000000 --- a/htdocs/includes/ace/ext-old_ie.js +++ /dev/null @@ -1,502 +0,0 @@ -ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var lang = require("../lib/lang"); -var event = require("../lib/event"); -var searchboxCss = "\ -.ace_search {\ -background-color: #ddd;\ -border: 1px solid #cbcbcb;\ -border-top: 0 none;\ -max-width: 325px;\ -overflow: hidden;\ -margin: 0;\ -padding: 4px;\ -padding-right: 6px;\ -padding-bottom: 0;\ -position: absolute;\ -top: 0px;\ -z-index: 99;\ -white-space: normal;\ -}\ -.ace_search.left {\ -border-left: 0 none;\ -border-radius: 0px 0px 5px 0px;\ -left: 0;\ -}\ -.ace_search.right {\ -border-radius: 0px 0px 0px 5px;\ -border-right: 0 none;\ -right: 0;\ -}\ -.ace_search_form, .ace_replace_form {\ -border-radius: 3px;\ -border: 1px solid #cbcbcb;\ -float: left;\ -margin-bottom: 4px;\ -overflow: hidden;\ -}\ -.ace_search_form.ace_nomatch {\ -outline: 1px solid red;\ -}\ -.ace_search_field {\ -background-color: white;\ -color: black;\ -border-right: 1px solid #cbcbcb;\ -border: 0 none;\ --webkit-box-sizing: border-box;\ --moz-box-sizing: border-box;\ -box-sizing: border-box;\ -float: left;\ -height: 22px;\ -outline: 0;\ -padding: 0 7px;\ -width: 214px;\ -margin: 0;\ -}\ -.ace_searchbtn,\ -.ace_replacebtn {\ -background: #fff;\ -border: 0 none;\ -border-left: 1px solid #dcdcdc;\ -cursor: pointer;\ -float: left;\ -height: 22px;\ -margin: 0;\ -position: relative;\ -}\ -.ace_searchbtn:last-child,\ -.ace_replacebtn:last-child {\ -border-top-right-radius: 3px;\ -border-bottom-right-radius: 3px;\ -}\ -.ace_searchbtn:disabled {\ -background: none;\ -cursor: default;\ -}\ -.ace_searchbtn {\ -background-position: 50% 50%;\ -background-repeat: no-repeat;\ -width: 27px;\ -}\ -.ace_searchbtn.prev {\ -background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADFJREFUeNpiSU1NZUAC/6E0I0yACYskCpsJiySKIiY0SUZk40FyTEgCjGgKwTRAgAEAQJUIPCE+qfkAAAAASUVORK5CYII=); \ -}\ -.ace_searchbtn.next {\ -background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAYAAAB4ka1VAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAADRJREFUeNpiTE1NZQCC/0DMyIAKwGJMUAYDEo3M/s+EpvM/mkKwCQxYjIeLMaELoLMBAgwAU7UJObTKsvAAAAAASUVORK5CYII=); \ -}\ -.ace_searchbtn_close {\ -background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAcCAYAAABRVo5BAAAAZ0lEQVR42u2SUQrAMAhDvazn8OjZBilCkYVVxiis8H4CT0VrAJb4WHT3C5xU2a2IQZXJjiQIRMdkEoJ5Q2yMqpfDIo+XY4k6h+YXOyKqTIj5REaxloNAd0xiKmAtsTHqW8sR2W5f7gCu5nWFUpVjZwAAAABJRU5ErkJggg==) no-repeat 50% 0;\ -border-radius: 50%;\ -border: 0 none;\ -color: #656565;\ -cursor: pointer;\ -float: right;\ -font: 16px/16px Arial;\ -height: 14px;\ -margin: 5px 1px 9px 5px;\ -padding: 0;\ -text-align: center;\ -width: 14px;\ -}\ -.ace_searchbtn_close:hover {\ -background-color: #656565;\ -background-position: 50% 100%;\ -color: white;\ -}\ -.ace_replacebtn.prev {\ -width: 54px\ -}\ -.ace_replacebtn.next {\ -width: 27px\ -}\ -.ace_button {\ -margin-left: 2px;\ -cursor: pointer;\ --webkit-user-select: none;\ --moz-user-select: none;\ --o-user-select: none;\ --ms-user-select: none;\ -user-select: none;\ -overflow: hidden;\ -opacity: 0.7;\ -border: 1px solid rgba(100,100,100,0.23);\ -padding: 1px;\ --moz-box-sizing: border-box;\ -box-sizing: border-box;\ -color: black;\ -}\ -.ace_button:hover {\ -background-color: #eee;\ -opacity:1;\ -}\ -.ace_button:active {\ -background-color: #ddd;\ -}\ -.ace_button.checked {\ -border-color: #3399ff;\ -opacity:1;\ -}\ -.ace_search_options{\ -margin-bottom: 3px;\ -text-align: right;\ --webkit-user-select: none;\ --moz-user-select: none;\ --o-user-select: none;\ --ms-user-select: none;\ -user-select: none;\ -}"; -var HashHandler = require("../keyboard/hash_handler").HashHandler; -var keyUtil = require("../lib/keys"); - -dom.importCssString(searchboxCss, "ace_searchbox"); - -var html = ''.replace(/>\s+/g, ">"); - -var SearchBox = function(editor, range, showReplaceForm) { - var div = dom.createElement("div"); - div.innerHTML = html; - this.element = div.firstChild; - - this.$init(); - this.setEditor(editor); -}; - -(function() { - this.setEditor = function(editor) { - editor.searchBox = this; - editor.container.appendChild(this.element); - this.editor = editor; - }; - - this.$initElements = function(sb) { - this.searchBox = sb.querySelector(".ace_search_form"); - this.replaceBox = sb.querySelector(".ace_replace_form"); - this.searchOptions = sb.querySelector(".ace_search_options"); - this.regExpOption = sb.querySelector("[action=toggleRegexpMode]"); - this.caseSensitiveOption = sb.querySelector("[action=toggleCaseSensitive]"); - this.wholeWordOption = sb.querySelector("[action=toggleWholeWords]"); - this.searchInput = this.searchBox.querySelector(".ace_search_field"); - this.replaceInput = this.replaceBox.querySelector(".ace_search_field"); - }; - - this.$init = function() { - var sb = this.element; - - this.$initElements(sb); - - var _this = this; - event.addListener(sb, "mousedown", function(e) { - setTimeout(function(){ - _this.activeInput.focus(); - }, 0); - event.stopPropagation(e); - }); - event.addListener(sb, "click", function(e) { - var t = e.target || e.srcElement; - var action = t.getAttribute("action"); - if (action && _this[action]) - _this[action](); - else if (_this.$searchBarKb.commands[action]) - _this.$searchBarKb.commands[action].exec(_this); - event.stopPropagation(e); - }); - - event.addCommandKeyListener(sb, function(e, hashId, keyCode) { - var keyString = keyUtil.keyCodeToString(keyCode); - var command = _this.$searchBarKb.findKeyCommand(hashId, keyString); - if (command && command.exec) { - command.exec(_this); - event.stopEvent(e); - } - }); - - this.$onChange = lang.delayedCall(function() { - _this.find(false, false); - }); - - event.addListener(this.searchInput, "input", function() { - _this.$onChange.schedule(20); - }); - event.addListener(this.searchInput, "focus", function() { - _this.activeInput = _this.searchInput; - _this.searchInput.value && _this.highlight(); - }); - event.addListener(this.replaceInput, "focus", function() { - _this.activeInput = _this.replaceInput; - _this.searchInput.value && _this.highlight(); - }); - }; - this.$closeSearchBarKb = new HashHandler([{ - bindKey: "Esc", - name: "closeSearchBar", - exec: function(editor) { - editor.searchBox.hide(); - } - }]); - this.$searchBarKb = new HashHandler(); - this.$searchBarKb.bindKeys({ - "Ctrl-f|Command-f": function(sb) { - var isReplace = sb.isReplace = !sb.isReplace; - sb.replaceBox.style.display = isReplace ? "" : "none"; - sb.searchInput.focus(); - }, - "Ctrl-H|Command-Option-F": function(sb) { - sb.replaceBox.style.display = ""; - sb.replaceInput.focus(); - }, - "Ctrl-G|Command-G": function(sb) { - sb.findNext(); - }, - "Ctrl-Shift-G|Command-Shift-G": function(sb) { - sb.findPrev(); - }, - "esc": function(sb) { - setTimeout(function() { sb.hide();}); - }, - "Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replace(); - sb.findNext(); - }, - "Shift-Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replace(); - sb.findPrev(); - }, - "Alt-Return": function(sb) { - if (sb.activeInput == sb.replaceInput) - sb.replaceAll(); - sb.findAll(); - }, - "Tab": function(sb) { - (sb.activeInput == sb.replaceInput ? sb.searchInput : sb.replaceInput).focus(); - } - }); - - this.$searchBarKb.addCommands([{ - name: "toggleRegexpMode", - bindKey: {win: "Alt-R|Alt-/", mac: "Ctrl-Alt-R|Ctrl-Alt-/"}, - exec: function(sb) { - sb.regExpOption.checked = !sb.regExpOption.checked; - sb.$syncOptions(); - } - }, { - name: "toggleCaseSensitive", - bindKey: {win: "Alt-C|Alt-I", mac: "Ctrl-Alt-R|Ctrl-Alt-I"}, - exec: function(sb) { - sb.caseSensitiveOption.checked = !sb.caseSensitiveOption.checked; - sb.$syncOptions(); - } - }, { - name: "toggleWholeWords", - bindKey: {win: "Alt-B|Alt-W", mac: "Ctrl-Alt-B|Ctrl-Alt-W"}, - exec: function(sb) { - sb.wholeWordOption.checked = !sb.wholeWordOption.checked; - sb.$syncOptions(); - } - }]); - - this.$syncOptions = function() { - dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); - dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); - dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); - this.find(false, false); - }; - - this.highlight = function(re) { - this.editor.session.highlight(re || this.editor.$search.$options.re); - this.editor.renderer.updateBackMarkers() - }; - this.find = function(skipCurrent, backwards, preventScroll) { - var range = this.editor.find(this.searchInput.value, { - skipCurrent: skipCurrent, - backwards: backwards, - wrap: true, - regExp: this.regExpOption.checked, - caseSensitive: this.caseSensitiveOption.checked, - wholeWord: this.wholeWordOption.checked, - preventScroll: preventScroll - }); - var noMatch = !range && this.searchInput.value; - dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); - this.editor._emit("findSearchBox", { match: !noMatch }); - this.highlight(); - }; - this.findNext = function() { - this.find(true, false); - }; - this.findPrev = function() { - this.find(true, true); - }; - this.findAll = function(){ - var range = this.editor.findAll(this.searchInput.value, { - regExp: this.regExpOption.checked, - caseSensitive: this.caseSensitiveOption.checked, - wholeWord: this.wholeWordOption.checked - }); - var noMatch = !range && this.searchInput.value; - dom.setCssClass(this.searchBox, "ace_nomatch", noMatch); - this.editor._emit("findSearchBox", { match: !noMatch }); - this.highlight(); - this.hide(); - }; - this.replace = function() { - if (!this.editor.getReadOnly()) - this.editor.replace(this.replaceInput.value); - }; - this.replaceAndFindNext = function() { - if (!this.editor.getReadOnly()) { - this.editor.replace(this.replaceInput.value); - this.findNext() - } - }; - this.replaceAll = function() { - if (!this.editor.getReadOnly()) - this.editor.replaceAll(this.replaceInput.value); - }; - - this.hide = function() { - this.element.style.display = "none"; - this.editor.keyBinding.removeKeyboardHandler(this.$closeSearchBarKb); - this.editor.focus(); - }; - this.show = function(value, isReplace) { - this.element.style.display = ""; - this.replaceBox.style.display = isReplace ? "" : "none"; - - this.isReplace = isReplace; - - if (value) - this.searchInput.value = value; - - this.find(false, false, true); - - this.searchInput.focus(); - this.searchInput.select(); - - this.editor.keyBinding.addKeyboardHandler(this.$closeSearchBarKb); - }; - - this.isFocused = function() { - var el = document.activeElement; - return el == this.searchInput || el == this.replaceInput; - } -}).call(SearchBox.prototype); - -exports.SearchBox = SearchBox; - -exports.Search = function(editor, isReplace) { - var sb = editor.searchBox || new SearchBox(editor); - sb.show(editor.session.getTextRange(), isReplace); -}; - -}); - -ace.define("ace/ext/old_ie",["require","exports","module","ace/lib/useragent","ace/tokenizer","ace/ext/searchbox","ace/mode/text"], function(require, exports, module) { -"use strict"; -var MAX_TOKEN_COUNT = 1000; -var useragent = require("../lib/useragent"); -var TokenizerModule = require("../tokenizer"); - -function patch(obj, name, regexp, replacement) { - eval("obj['" + name + "']=" + obj[name].toString().replace( - regexp, replacement - )); -} - -if (useragent.isIE && useragent.isIE < 10 && window.top.document.compatMode === "BackCompat") - useragent.isOldIE = true; - -if (typeof document != "undefined" && !document.documentElement.querySelector) { - useragent.isOldIE = true; - var qs = function(el, selector) { - if (selector.charAt(0) == ".") { - var classNeme = selector.slice(1); - } else { - var m = selector.match(/(\w+)=(\w+)/); - var attr = m && m[1]; - var attrVal = m && m[2]; - } - for (var i = 0; i < el.all.length; i++) { - var ch = el.all[i]; - if (classNeme) { - if (ch.className.indexOf(classNeme) != -1) - return ch; - } else if (attr) { - if (ch.getAttribute(attr) == attrVal) - return ch; - } - } - }; - var sb = require("./searchbox").SearchBox.prototype; - patch( - sb, "$initElements", - /([^\s=]*).querySelector\((".*?")\)/g, - "qs($1, $2)" - ); -} - -var compliantExecNpcg = /()??/.exec("")[1] === undefined; -if (compliantExecNpcg) - return; -var proto = TokenizerModule.Tokenizer.prototype; -TokenizerModule.Tokenizer_orig = TokenizerModule.Tokenizer; -proto.getLineTokens_orig = proto.getLineTokens; - -patch( - TokenizerModule, "Tokenizer", - "ruleRegExps.push(adjustedregex);\n", - function(m) { - return m + '\ - if (state[i].next && RegExp(adjustedregex).test(""))\n\ - rule._qre = RegExp(adjustedregex, "g");\n\ - '; - } -); -TokenizerModule.Tokenizer.prototype = proto; -patch( - proto, "getLineTokens", - /if \(match\[i \+ 1\] === undefined\)\s*continue;/, - "if (!match[i + 1]) {\n\ - if (value)continue;\n\ - var qre = state[mapping[i]]._qre;\n\ - if (!qre) continue;\n\ - qre.lastIndex = lastIndex;\n\ - if (!qre.exec(line) || qre.lastIndex != lastIndex)\n\ - continue;\n\ - }" -); - -patch( - require("../mode/text").Mode.prototype, "getTokenizer", - /Tokenizer/, - "TokenizerModule.Tokenizer" -); - -useragent.isOldIE = true; - -}); - (function() { - ace.require(["ace/ext/old_ie"], function() {}); - })(); - \ No newline at end of file diff --git a/htdocs/includes/ace/ext-settings_menu.js b/htdocs/includes/ace/ext-settings_menu.js deleted file mode 100644 index a00b28f88a1..00000000000 --- a/htdocs/includes/ace/ext-settings_menu.js +++ /dev/null @@ -1,663 +0,0 @@ -ace.define("ace/ext/menu_tools/element_generator",["require","exports","module"], function(require, exports, module) { -'use strict'; -module.exports.createOption = function createOption (obj) { - var attribute; - var el = document.createElement('option'); - for(attribute in obj) { - if(obj.hasOwnProperty(attribute)) { - if(attribute === 'selected') { - el.setAttribute(attribute, obj[attribute]); - } else { - el[attribute] = obj[attribute]; - } - } - } - return el; -}; -module.exports.createCheckbox = function createCheckbox (id, checked, clss) { - var el = document.createElement('input'); - el.setAttribute('type', 'checkbox'); - el.setAttribute('id', id); - el.setAttribute('name', id); - el.setAttribute('value', checked); - el.setAttribute('class', clss); - if(checked) { - el.setAttribute('checked', 'checked'); - } - return el; -}; -module.exports.createInput = function createInput (id, value, clss) { - var el = document.createElement('input'); - el.setAttribute('type', 'text'); - el.setAttribute('id', id); - el.setAttribute('name', id); - el.setAttribute('value', value); - el.setAttribute('class', clss); - return el; -}; -module.exports.createLabel = function createLabel (text, labelFor) { - var el = document.createElement('label'); - el.setAttribute('for', labelFor); - el.textContent = text; - return el; -}; -module.exports.createSelection = function createSelection (id, values, clss) { - var el = document.createElement('select'); - el.setAttribute('id', id); - el.setAttribute('name', id); - el.setAttribute('class', clss); - values.forEach(function(item) { - el.appendChild(module.exports.createOption(item)); - }); - return el; -}; - -}); - -ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var modes = []; -function getModeForPath(path) { - var mode = modesByName.text; - var fileName = path.split(/[\/\\]/).pop(); - for (var i = 0; i < modes.length; i++) { - if (modes[i].supportsFile(fileName)) { - mode = modes[i]; - break; - } - } - return mode; -} - -var Mode = function(name, caption, extensions) { - this.name = name; - this.caption = caption; - this.mode = "ace/mode/" + name; - this.extensions = extensions; - var re; - if (/\^/.test(extensions)) { - re = extensions.replace(/\|(\^)?/g, function(a, b){ - return "$|" + (b ? "^" : "^.*\\."); - }) + "$"; - } else { - re = "^.*\\.(" + extensions + ")$"; - } - - this.extRe = new RegExp(re, "gi"); -}; - -Mode.prototype.supportsFile = function(filename) { - return filename.match(this.extRe); -}; -var supportedModes = { - ABAP: ["abap"], - ABC: ["abc"], - ActionScript:["as"], - ADA: ["ada|adb"], - Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], - AsciiDoc: ["asciidoc|adoc"], - Assembly_x86:["asm|a"], - AutoHotKey: ["ahk"], - BatchFile: ["bat|cmd"], - Bro: ["bro"], - C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], - C9Search: ["c9search_results"], - Cirru: ["cirru|cr"], - Clojure: ["clj|cljs"], - Cobol: ["CBL|COB"], - coffee: ["coffee|cf|cson|^Cakefile"], - ColdFusion: ["cfm"], - CSharp: ["cs"], - CSS: ["css"], - Curly: ["curly"], - D: ["d|di"], - Dart: ["dart"], - Diff: ["diff|patch"], - Dockerfile: ["^Dockerfile"], - Dot: ["dot"], - Drools: ["drl"], - Dummy: ["dummy"], - DummySyntax: ["dummy"], - Eiffel: ["e|ge"], - EJS: ["ejs"], - Elixir: ["ex|exs"], - Elm: ["elm"], - Erlang: ["erl|hrl"], - Forth: ["frt|fs|ldr|fth|4th"], - Fortran: ["f|f90"], - FTL: ["ftl"], - Gcode: ["gcode"], - Gherkin: ["feature"], - Gitignore: ["^.gitignore"], - Glsl: ["glsl|frag|vert"], - Gobstones: ["gbs"], - golang: ["go"], - GraphQLSchema: ["gql"], - Groovy: ["groovy"], - HAML: ["haml"], - Handlebars: ["hbs|handlebars|tpl|mustache"], - Haskell: ["hs"], - Haskell_Cabal: ["cabal"], - haXe: ["hx"], - Hjson: ["hjson"], - HTML: ["html|htm|xhtml"], - HTML_Elixir: ["eex|html.eex"], - HTML_Ruby: ["erb|rhtml|html.erb"], - INI: ["ini|conf|cfg|prefs"], - Io: ["io"], - Jack: ["jack"], - Jade: ["jade|pug"], - Java: ["java"], - JavaScript: ["js|jsm|jsx"], - JSON: ["json"], - JSONiq: ["jq"], - JSP: ["jsp"], - JSX: ["jsx"], - Julia: ["jl"], - Kotlin: ["kt|kts"], - LaTeX: ["tex|latex|ltx|bib"], - LESS: ["less"], - Liquid: ["liquid"], - Lisp: ["lisp"], - LiveScript: ["ls"], - LogiQL: ["logic|lql"], - LSL: ["lsl"], - Lua: ["lua"], - LuaPage: ["lp"], - Lucene: ["lucene"], - Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], - Markdown: ["md|markdown"], - Mask: ["mask"], - MATLAB: ["matlab"], - Maze: ["mz"], - MEL: ["mel"], - MUSHCode: ["mc|mush"], - MySQL: ["mysql"], - Nix: ["nix"], - NSIS: ["nsi|nsh"], - ObjectiveC: ["m|mm"], - OCaml: ["ml|mli"], - Pascal: ["pas|p"], - Perl: ["pl|pm"], - pgSQL: ["pgsql"], - PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], - Pig: ["pig"], - Powershell: ["ps1"], - Praat: ["praat|praatscript|psc|proc"], - Prolog: ["plg|prolog"], - Properties: ["properties"], - Protobuf: ["proto"], - Python: ["py"], - R: ["r"], - Razor: ["cshtml|asp"], - RDoc: ["Rd"], - RHTML: ["Rhtml"], - RST: ["rst"], - Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], - Rust: ["rs"], - SASS: ["sass"], - SCAD: ["scad"], - Scala: ["scala"], - Scheme: ["scm|sm|rkt|oak|scheme"], - SCSS: ["scss"], - SH: ["sh|bash|^.bashrc"], - SJS: ["sjs"], - Smarty: ["smarty|tpl"], - snippets: ["snippets"], - Soy_Template:["soy"], - Space: ["space"], - SQL: ["sql"], - SQLServer: ["sqlserver"], - Stylus: ["styl|stylus"], - SVG: ["svg"], - Swift: ["swift"], - Tcl: ["tcl"], - Tex: ["tex"], - Text: ["txt"], - Textile: ["textile"], - Toml: ["toml"], - TSX: ["tsx"], - Twig: ["twig|swig"], - Typescript: ["ts|typescript|str"], - Vala: ["vala"], - VBScript: ["vbs|vb"], - Velocity: ["vm"], - Verilog: ["v|vh|sv|svh"], - VHDL: ["vhd|vhdl"], - Wollok: ["wlk|wpgm|wtest"], - XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], - XQuery: ["xq"], - YAML: ["yaml|yml"], - Django: ["html"] -}; - -var nameOverrides = { - ObjectiveC: "Objective-C", - CSharp: "C#", - golang: "Go", - C_Cpp: "C and C++", - coffee: "CoffeeScript", - HTML_Ruby: "HTML (Ruby)", - HTML_Elixir: "HTML (Elixir)", - FTL: "FreeMarker" -}; -var modesByName = {}; -for (var name in supportedModes) { - var data = supportedModes[name]; - var displayName = (nameOverrides[name] || name).replace(/_/g, " "); - var filename = name.toLowerCase(); - var mode = new Mode(filename, displayName, data[0]); - modesByName[filename] = mode; - modes.push(mode); -} - -module.exports = { - getModeForPath: getModeForPath, - modes: modes, - modesByName: modesByName -}; - -}); - -ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) { -"use strict"; -require("ace/lib/fixoldbrowsers"); - -var themeData = [ - ["Chrome" ], - ["Clouds" ], - ["Crimson Editor" ], - ["Dawn" ], - ["Dreamweaver" ], - ["Eclipse" ], - ["GitHub" ], - ["IPlastic" ], - ["Solarized Light"], - ["TextMate" ], - ["Tomorrow" ], - ["XCode" ], - ["Kuroir"], - ["KatzenMilch"], - ["SQL Server" ,"sqlserver" , "light"], - ["Ambiance" ,"ambiance" , "dark"], - ["Chaos" ,"chaos" , "dark"], - ["Clouds Midnight" ,"clouds_midnight" , "dark"], - ["Cobalt" ,"cobalt" , "dark"], - ["Gruvbox" ,"gruvbox" , "dark"], - ["Green on Black" ,"gob" , "dark"], - ["idle Fingers" ,"idle_fingers" , "dark"], - ["krTheme" ,"kr_theme" , "dark"], - ["Merbivore" ,"merbivore" , "dark"], - ["Merbivore Soft" ,"merbivore_soft" , "dark"], - ["Mono Industrial" ,"mono_industrial" , "dark"], - ["Monokai" ,"monokai" , "dark"], - ["Pastel on dark" ,"pastel_on_dark" , "dark"], - ["Solarized Dark" ,"solarized_dark" , "dark"], - ["Terminal" ,"terminal" , "dark"], - ["Tomorrow Night" ,"tomorrow_night" , "dark"], - ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"], - ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"], - ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"], - ["Twilight" ,"twilight" , "dark"], - ["Vibrant Ink" ,"vibrant_ink" , "dark"] -]; - - -exports.themesByName = {}; -exports.themes = themeData.map(function(data) { - var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); - var theme = { - caption: data[0], - theme: "ace/theme/" + name, - isDark: data[2] == "dark", - name: name - }; - exports.themesByName[name] = theme; - return theme; -}); - -}); - -ace.define("ace/ext/menu_tools/add_editor_menu_options",["require","exports","module","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) { -'use strict'; -module.exports.addEditorMenuOptions = function addEditorMenuOptions (editor) { - var modelist = require('../modelist'); - var themelist = require('../themelist'); - editor.menuOptions = { - setNewLineMode: [{ - textContent: "unix", - value: "unix" - }, { - textContent: "windows", - value: "windows" - }, { - textContent: "auto", - value: "auto" - }], - setTheme: [], - setMode: [], - setKeyboardHandler: [{ - textContent: "ace", - value: "" - }, { - textContent: "vim", - value: "ace/keyboard/vim" - }, { - textContent: "emacs", - value: "ace/keyboard/emacs" - }, { - textContent: "textarea", - value: "ace/keyboard/textarea" - }, { - textContent: "sublime", - value: "ace/keyboard/sublime" - }] - }; - - editor.menuOptions.setTheme = themelist.themes.map(function(theme) { - return { - textContent: theme.caption, - value: theme.theme - }; - }); - - editor.menuOptions.setMode = modelist.modes.map(function(mode) { - return { - textContent: mode.name, - value: mode.mode - }; - }); -}; - - -}); - -ace.define("ace/ext/menu_tools/get_set_functions",["require","exports","module"], function(require, exports, module) { -'use strict'; -module.exports.getSetFunctions = function getSetFunctions (editor) { - var out = []; - var my = { - 'editor' : editor, - 'session' : editor.session, - 'renderer' : editor.renderer - }; - var opts = []; - var skip = [ - 'setOption', - 'setUndoManager', - 'setDocument', - 'setValue', - 'setBreakpoints', - 'setScrollTop', - 'setScrollLeft', - 'setSelectionStyle', - 'setWrapLimitRange' - ]; - ['renderer', 'session', 'editor'].forEach(function(esra) { - var esr = my[esra]; - var clss = esra; - for(var fn in esr) { - if(skip.indexOf(fn) === -1) { - if(/^set/.test(fn) && opts.indexOf(fn) === -1) { - opts.push(fn); - out.push({ - 'functionName' : fn, - 'parentObj' : esr, - 'parentName' : clss - }); - } - } - } - }); - return out; -}; - -}); - -ace.define("ace/ext/menu_tools/generate_settings_menu",["require","exports","module","ace/ext/menu_tools/element_generator","ace/ext/menu_tools/add_editor_menu_options","ace/ext/menu_tools/get_set_functions","ace/ace"], function(require, exports, module) { -'use strict'; -var egen = require('./element_generator'); -var addEditorMenuOptions = require('./add_editor_menu_options').addEditorMenuOptions; -var getSetFunctions = require('./get_set_functions').getSetFunctions; -module.exports.generateSettingsMenu = function generateSettingsMenu (editor) { - var elements = []; - function cleanupElementsList() { - elements.sort(function(a, b) { - var x = a.getAttribute('contains'); - var y = b.getAttribute('contains'); - return x.localeCompare(y); - }); - } - function wrapElements() { - var topmenu = document.createElement('div'); - topmenu.setAttribute('id', 'ace_settingsmenu'); - elements.forEach(function(element) { - topmenu.appendChild(element); - }); - - var el = topmenu.appendChild(document.createElement('div')); - var version = require("../../ace").version; - el.style.padding = "1em"; - el.textContent = "Ace version " + version; - - return topmenu; - } - function createNewEntry(obj, clss, item, val) { - var el; - var div = document.createElement('div'); - div.setAttribute('contains', item); - div.setAttribute('class', 'ace_optionsMenuEntry'); - div.setAttribute('style', 'clear: both;'); - - div.appendChild(egen.createLabel( - item.replace(/^set/, '').replace(/([A-Z])/g, ' $1').trim(), - item - )); - - if (Array.isArray(val)) { - el = egen.createSelection(item, val, clss); - el.addEventListener('change', function(e) { - try{ - editor.menuOptions[e.target.id].forEach(function(x) { - if(x.textContent !== e.target.textContent) { - delete x.selected; - } - }); - obj[e.target.id](e.target.value); - } catch (err) { - throw new Error(err); - } - }); - } else if(typeof val === 'boolean') { - el = egen.createCheckbox(item, val, clss); - el.addEventListener('change', function(e) { - try{ - obj[e.target.id](!!e.target.checked); - } catch (err) { - throw new Error(err); - } - }); - } else { - el = egen.createInput(item, val, clss); - el.addEventListener('change', function(e) { - try{ - if(e.target.value === 'true') { - obj[e.target.id](true); - } else if(e.target.value === 'false') { - obj[e.target.id](false); - } else { - obj[e.target.id](e.target.value); - } - } catch (err) { - throw new Error(err); - } - }); - } - el.style.cssText = 'float:right;'; - div.appendChild(el); - return div; - } - function makeDropdown(item, esr, clss, fn) { - var val = editor.menuOptions[item]; - var currentVal = esr[fn](); - if (typeof currentVal == 'object') - currentVal = currentVal.$id; - val.forEach(function(valuex) { - if (valuex.value === currentVal) - valuex.selected = 'selected'; - }); - return createNewEntry(esr, clss, item, val); - } - function handleSet(setObj) { - var item = setObj.functionName; - var esr = setObj.parentObj; - var clss = setObj.parentName; - var val; - var fn = item.replace(/^set/, 'get'); - if(editor.menuOptions[item] !== undefined) { - elements.push(makeDropdown(item, esr, clss, fn)); - } else if(typeof esr[fn] === 'function') { - try { - val = esr[fn](); - if(typeof val === 'object') { - val = val.$id; - } - elements.push( - createNewEntry(esr, clss, item, val) - ); - } catch (e) { - } - } - } - addEditorMenuOptions(editor); - getSetFunctions(editor).forEach(function(setObj) { - handleSet(setObj); - }); - cleanupElementsList(); - return wrapElements(); -}; - -}); - -ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -'use strict'; -var dom = require("../../lib/dom"); -var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ -background-color: #F7F7F7;\ -color: black;\ -box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ -padding: 1em 0.5em 2em 1em;\ -overflow: auto;\ -position: absolute;\ -margin: 0;\ -bottom: 0;\ -right: 0;\ -top: 0;\ -z-index: 9991;\ -cursor: default;\ -}\ -.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ -box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ -background-color: rgba(255, 255, 255, 0.6);\ -color: black;\ -}\ -.ace_optionsMenuEntry:hover {\ -background-color: rgba(100, 100, 100, 0.1);\ --webkit-transition: all 0.5s;\ -transition: all 0.3s\ -}\ -.ace_closeButton {\ -background: rgba(245, 146, 146, 0.5);\ -border: 1px solid #F48A8A;\ -border-radius: 50%;\ -padding: 7px;\ -position: absolute;\ -right: -8px;\ -top: -8px;\ -z-index: 1000;\ -}\ -.ace_closeButton{\ -background: rgba(245, 146, 146, 0.9);\ -}\ -.ace_optionsMenuKey {\ -color: darkslateblue;\ -font-weight: bold;\ -}\ -.ace_optionsMenuCommand {\ -color: darkcyan;\ -font-weight: normal;\ -}"; -dom.importCssString(cssText); -module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) { - top = top ? 'top: ' + top + ';' : ''; - bottom = bottom ? 'bottom: ' + bottom + ';' : ''; - right = right ? 'right: ' + right + ';' : ''; - left = left ? 'left: ' + left + ';' : ''; - - var closer = document.createElement('div'); - var contentContainer = document.createElement('div'); - - function documentEscListener(e) { - if (e.keyCode === 27) { - closer.click(); - } - } - - closer.style.cssText = 'margin: 0; padding: 0; ' + - 'position: fixed; top:0; bottom:0; left:0; right:0;' + - 'z-index: 9990; ' + - 'background-color: rgba(0, 0, 0, 0.3);'; - closer.addEventListener('click', function() { - document.removeEventListener('keydown', documentEscListener); - closer.parentNode.removeChild(closer); - editor.focus(); - closer = null; - }); - document.addEventListener('keydown', documentEscListener); - - contentContainer.style.cssText = top + right + bottom + left; - contentContainer.addEventListener('click', function(e) { - e.stopPropagation(); - }); - - var wrapper = dom.createElement("div"); - wrapper.style.position = "relative"; - - var closeButton = dom.createElement("div"); - closeButton.className = "ace_closeButton"; - closeButton.addEventListener('click', function() { - closer.click(); - }); - - wrapper.appendChild(closeButton); - contentContainer.appendChild(wrapper); - - contentContainer.appendChild(contentElement); - closer.appendChild(contentContainer); - document.body.appendChild(closer); - editor.blur(); -}; - -}); - -ace.define("ace/ext/settings_menu",["require","exports","module","ace/ext/menu_tools/generate_settings_menu","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module) { -"use strict"; -var generateSettingsMenu = require('./menu_tools/generate_settings_menu').generateSettingsMenu; -var overlayPage = require('./menu_tools/overlay_page').overlayPage; -function showSettingsMenu(editor) { - var sm = document.getElementById('ace_settingsmenu'); - if (!sm) - overlayPage(editor, generateSettingsMenu(editor), '0', '0', '0'); -} -module.exports.init = function(editor) { - var Editor = require("ace/editor").Editor; - Editor.prototype.showSettingsMenu = function() { - showSettingsMenu(this); - }; -}; -}); - (function() { - ace.require(["ace/ext/settings_menu"], function() {}); - })(); - \ No newline at end of file diff --git a/htdocs/includes/ace/kitchen-sink.html b/htdocs/includes/ace/kitchen-sink.html new file mode 100644 index 00000000000..e4bab25a335 --- /dev/null +++ b/htdocs/includes/ace/kitchen-sink.html @@ -0,0 +1,56 @@ + + + + + + + Ace Kitchen Sink + + + + + + + + + + + +
    +
    +
    +
    + + + +
    +
    + + + + + + +
    +
    +
    +
    + + + + + + + + + + + + + diff --git a/htdocs/includes/ace/mode-lean.js b/htdocs/includes/ace/mode-lean.js deleted file mode 100644 index 00d95f80d29..00000000000 --- a/htdocs/includes/ace/mode-lean.js +++ /dev/null @@ -1,281 +0,0 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -ace.define("ace/mode/lean_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var leanHighlightRules = function() { - - var keywordControls = ( - [ "add_rewrite", "alias", "as", "assume", "attribute", - "begin", "by", "calc", "calc_refl", "calc_subst", "calc_trans", "check", - "classes", "coercions", "conjecture", "constants", "context", - "corollary", "else", "end", "environment", "eval", "example", - "exists", "exit", "export", "exposing", "extends", "fields", "find_decl", - "forall", "from", "fun", "have", "help", "hiding", "if", - "import", "in", "infix", "infixl", "infixr", "instances", - "let", "local", "match", "namespace", "notation", "obtain", "obtains", - "omit", "opaque", "open", "options", "parameter", "parameters", "postfix", - "precedence", "prefix", "premise", "premises", "print", "private", "proof", - "protected", "qed", "raw", "renaming", "section", "set_option", - "show", "tactic_hint", "take", "then", "universe", - "universes", "using", "variable", "variables", "with"].join("|") - ); - - var nameProviders = ( - ["inductive", "structure", "record", "theorem", "axiom", - "axioms", "lemma", "hypothesis", "definition", "constant"].join("|") - ); - - var storageType = ( - ["Prop", "Type", "Type'", "Type₊", "Type₁", "Type₂", "Type₃"].join("|") - ); - - var storageModifiers = ( - "\\[(" + - ["abbreviations", "all-transparent", "begin-end-hints", "class", "classes", "coercion", - "coercions", "declarations", "decls", "instance", "irreducible", - "multiple-instances", "notation", "notations", "parsing-only", "persistent", - "reduce-hints", "reducible", "tactic-hints", "visible", "wf", "whnf" - ].join("|") + - ")\\]" - ); - - var keywordOperators = ( - [].join("|") - ); - - var keywordMapper = this.$keywords = this.createKeywordMapper({ - "keyword.control" : keywordControls, - "storage.type" : storageType, - "keyword.operator" : keywordOperators, - "variable.language": "sorry" - }, "identifier"); - - var identifierRe = "[A-Za-z_\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2100-\u214f][A-Za-z0-9_'\u03b1-\u03ba\u03bc-\u03fb\u1f00-\u1ffe\u2070-\u2079\u207f-\u2089\u2090-\u209c\u2100-\u214f]*"; - var operatorRe = new RegExp(["#", "@", "->", "∼", "↔", "/", "==", "=", ":=", "<->", - "/\\", "\\/", "∧", "∨", "≠", "<", ">", "≤", "≥", "¬", - "<=", ">=", "⁻¹", "⬝", "▸", "\\+", "\\*", "-", "/", - "λ", "→", "∃", "∀", ":="].join("|")); - - this.$rules = { - "start" : [ - { - token : "comment", // single line comment "--" - regex : "--.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment "/-" - regex : "\\/-", - next : "comment" - }, { - stateName: "qqstring", - token : "string.start", regex : '"', next : [ - {token : "string.end", regex : '"', next : "start"}, - {token : "constant.language.escape", regex : /\\[n"\\]/}, - {defaultToken: "string"} - ] - }, { - token : "keyword.control", regex : nameProviders, next : [ - {token : "variable.language", regex : identifierRe, next : "start"} ] - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b" - }, { - token : "storage.modifier", - regex : storageModifiers - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "operator", - regex : operatorRe - }, { - token : "punctuation.operator", - regex : "\\?|\\:|\\,|\\;|\\." - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ {token: "comment", regex: "-/", next: "start"}, - {defaultToken: "comment"} ] - }; - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); - this.normalizeRules(); -}; - -oop.inherits(leanHighlightRules, TextHighlightRules); - -exports.leanHighlightRules = leanHighlightRules; -}); - -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -ace.define("ace/mode/lean",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lean_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var leanHighlightRules = require("./lean_highlight_rules").leanHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = leanHighlightRules; - - this.$outdent = new MatchingBraceOutdent(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "--"; - this.blockComment = {start: "/-", end: "-/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } else if (state == "doc-start") { - if (endState == "start") { - return ""; - } - var match = line.match(/^\s*(\/?)\*/); - if (match) { - if (match[1]) { - indent += " "; - } - indent += "- "; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/lean"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-liquid.js b/htdocs/includes/ace/mode-liquid.js deleted file mode 100644 index 925ef305f24..00000000000 --- a/htdocs/includes/ace/mode-liquid.js +++ /dev/null @@ -1,1184 +0,0 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - include : ["strings", "url", "comments"] - }, { - token: "paren.lparen", - regex: "\\{", - next: "ruleset" - }, { - token: "paren.rparen", - regex: "\\}" - }, { - token: "string", - regex: "@", - next: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "keyword", - regex: "%" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token : "constant.numeric", - regex : numRe - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media": [{ - include : ["strings", "url", "comments"] - }, { - token: "paren.lparen", - regex: "\\{", - next: "start" - }, { - token: "paren.rparen", - regex: "\\}", - next: "start" - }, { - token: "string", - regex: ";", - next: "start" - }, { - token: "keyword", - regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" - + "|page|font|keyframes|viewport|counter-style|font-feature-values" - + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" - }], - - "comments" : [{ - token: "comment", // multi line comment - regex: "\\/\\*", - push: [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }] - }], - - "ruleset" : [{ - regex : "-(webkit|ms|moz|o)-", - token : "text" - }, { - token : "paren.rparen", - regex : "\\}", - next : "start" - }, { - include : ["strings", "url", "comments"] - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - include: "url" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }], - - url: [{ - token : "support.function", - regex : "(?:url(:?-prefix)?|domain|regexp)\\(", - push: [{ - token : "support.function", - regex : "\\)", - next : "pop" - }, { - defaultToken: "string" - }] - }], - - strings: [{ - token : "string.start", - regex : "'", - push : [{ - token : "string.end", - regex : "'|$", - next: "pop" - }, { - include : "escapes" - }, { - token : "constant.language.escape", - regex : /\\$/, - consumeLineEnd: true - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : '"', - push : [{ - token : "string.end", - regex : '"|$', - next: "pop" - }, { - include : "escapes" - }, { - token : "constant.language.escape", - regex : /\\$/, - consumeLineEnd: true - }, { - defaultToken: "string" - }] - }], - escapes: [{ - token : "constant.language.escape", - regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ - }] - - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|async|await|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-7][0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("no_regex"), - { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hexadecimal, octal and binary - regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ - }, { - token : "constant.numeric", // decimal integers and floats - regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "from(?=\\s*('|\"))" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "punctuation.operator", - regex : /[.](?![.])/, - next : "property" - }, { - token : "storage.type", - regex : /=>/ - }, { - token : "keyword.operator", - regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - property: [{ - token : "text", - regex : "\\s+" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - token : "support.function", - regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : "support.function.dom", - regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : "support.constant", - regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : "identifier", - regex : identifierRe - }, { - regex: "", - token: "empty", - next: "no_regex" - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - comments("start"), - { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - consumeLineEnd : true - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - consumeLineEnd : true - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - } - else if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - - if (!options || options.jsx != false) - JSX.call(this); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -function JSX() { - var tagRegex = identifierRe.replace("\\d", "\\d\\-"); - var jsxTag = { - onMatch : function(val, state, stack) { - var offset = val.charAt(1) == "/" ? 2 : 1; - if (offset == 1) { - if (state != this.nextState) - stack.unshift(this.next, this.nextState, 0); - else - stack.unshift(this.next); - stack[2]++; - } else if (offset == 2) { - if (state == this.nextState) { - stack[1]--; - if (!stack[1] || stack[1] < 0) { - stack.shift(); - stack.shift(); - } - } - } - return [{ - type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", - value: val.slice(0, offset) - }, { - type: "meta.tag.tag-name.xml", - value: val.substr(offset) - }]; - }, - regex : "", - onMatch : function(value, currentState, stack) { - if (currentState == stack[0]) - stack.shift(); - if (value.length == 2) { - if (stack[0] == this.nextState) - stack[1]--; - if (!stack[1] || stack[1] < 0) { - stack.splice(0, 2); - } - } - this.next = stack[0] || "start"; - return [{type: this.token, value: value}]; - }, - nextState: "jsx" - }, - jsxJsRule, - comments("jsxAttributes"), - { - token : "entity.other.attribute-name.xml", - regex : tagRegex - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - token : "text.tag-whitespace.xml", - regex : "\\s+" - }, { - token : "string.attribute-value.xml", - regex : "'", - stateName : "jsx_attr_q", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - stateName : "jsx_attr_qq", - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, - jsxTag - ]; - this.$rules.reference = [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }]; -} - -function comments(next) { - return [ - { - token : "comment", // multi line comment - regex : /\/\*/, - next: [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : next || "pop"}, - {defaultToken : "comment", caseInsensitive: true} - ] - }, { - token : "comment", - regex : "\\/\\/", - next: [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : next || "pop"}, - {defaultToken : "comment", caseInsensitive: true} - ] - } - ]; -} -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; - - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction" - }, - {token : "comment.start.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)(" + tagRegex + ")", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.end.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : tagRegex - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:.]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ] - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -ace.define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; - -var LiquidHighlightRules = function() { - HtmlHighlightRules.call(this); - var functions = ( - "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" + - "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" + - "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split" - ); - - var keywords = ( - "capture|endcapture|case|endcase|when|comment|endcomment|" + - "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" + - "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow" - ); - - var builtinVariables = 'forloop|tablerowloop'; - - var definitions = ("assign"); - - var keywordMapper = this.createKeywordMapper({ - "variable.language": builtinVariables, - "keyword": keywords, - "support.function": functions, - "keyword.definition": definitions - }, "identifier"); - for (var rule in this.$rules) { - this.$rules[rule].unshift({ - token : "variable", - regex : "{%", - push : "liquid-start" - }, { - token : "variable", - regex : "{{", - push : "liquid-start" - }); - } - - this.addRules({ - "liquid-start" : [{ - token: "variable", - regex: "}}", - next: "pop" - }, { - token: "variable", - regex: "%}", - next: "pop" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "/|\\*|\\-|\\+|=|!=|\\?\\:" - }, { - token : "paren.lparen", - regex : /[\[\({]/ - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token : "text", - regex : "\\s+" - }] - }); - - this.normalizeRules(); -}; -oop.inherits(LiquidHighlightRules, TextHighlightRules); - -exports.LiquidHighlightRules = LiquidHighlightRules; -}); - -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -ace.define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; - -var Mode = function() { - this.HighlightRules = LiquidHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = this.$defaultBehaviour; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.blockComment = {start: ""}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - var endState = tokenizedLine.state; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/liquid"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-live_script.js b/htdocs/includes/ace/mode-live_script.js deleted file mode 100644 index a5d36ebe220..00000000000 --- a/htdocs/includes/ace/mode-live_script.js +++ /dev/null @@ -1,481 +0,0 @@ -ace.define("ace/mode/live_script_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LiveScriptHighlightRules = function() { - - this.$rules = { start: - [ { token: 'punctuation.definition.comment.livescript', - regex: '\\/\\*', - push: - [ { token: 'punctuation.definition.comment.livescript', - regex: '\\*\\/', - next: 'pop' }, - { token: 'storage.type.annotation.livescriptscript', - regex: '@\\w*' }, - { defaultToken: 'comment.block.livescript' } ] }, - { token: - [ 'punctuation.definition.comment.livescript', - 'comment.line.number-sign.livescript' ], - regex: '(#)(?!\\{)(.*$)' }, - { token: - [ 'variable.parameter.function.livescript', - 'meta.inline.function.livescript', - 'storage.type.function.livescript', - 'meta.inline.function.livescript', - 'variable.parameter.function.livescript', - 'meta.inline.function.livescript', - 'storage.type.function.livescript' ], - regex: '(\\s*\\!?\\(\\s*[^()]*?\\))(\\s*)(!?[~-]{1,2}>)|(\\s*\\!?)(\\(?[^()]*?\\)?)(\\s*)(<[~-]{1,2}!?)', - comment: 'match stuff like: a -> … ' }, - { token: - [ 'keyword.operator.new.livescript', - 'meta.class.instance.constructor', - 'entity.name.type.instance.livescript' ], - regex: '(new)(\\s+)(\\w+(?:\\.\\w*)*)' }, - { token: 'keyword.illegal.livescript', - regex: '\\bp(?:ackage|r(?:ivate|otected)|ublic)|interface|enum|static|yield\\b' }, - { token: 'punctuation.definition.string.begin.livescript', - regex: '\'\'\'', - push: - [ { token: 'punctuation.definition.string.end.livescript', - regex: '\'\'\'', - next: 'pop' }, - { defaultToken: 'string.quoted.heredoc.livescript' } ] }, - { token: 'punctuation.definition.string.begin.livescript', - regex: '"""', - push: - [ { token: 'punctuation.definition.string.end.livescript', - regex: '"""', - next: 'pop' }, - { token: 'constant.character.escape.livescript', - regex: '\\\\.' }, - { include: '#interpolated_livescript' }, - { defaultToken: 'string.quoted.double.heredoc.livescript' } ] }, - { token: 'punctuation.definition.string.begin.livescript', - regex: '``', - push: - [ { token: 'punctuation.definition.string.end.livescript', - regex: '``', - next: 'pop' }, - { token: 'constant.character.escape.livescript', - regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' }, - { defaultToken: 'string.quoted.script.livescript' } ] }, - { token: 'string.array-literal.livescript', - regex: '<\\[', - push: - [ { token: 'string.array-literal.livescript', - regex: '\\]>', - next: 'pop' }, - { defaultToken: 'string.array-literal.livescript' } ] }, - { token: 'string.regexp.livescript', - regex: '/{2}(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])/{2}' }, - { token: 'string.regexp.livescript', - regex: '/{2}$', - push: - [ { token: 'string.regexp.livescript', - regex: '/{2}[imgy]{0,4}', - next: 'pop' }, - { include: '#embedded_spaced_comment' }, - { include: '#interpolated_livescript' }, - { defaultToken: 'string.regexp.livescript' } ] }, - { token: 'string.regexp.livescript', - regex: '/{2}', - push: - [ { token: 'string.regexp.livescript', - regex: '/{2}[imgy]{0,4}', - next: 'pop' }, - { token: 'constant.character.escape.livescript', - regex: '\\\\(?:x[\\da-fA-F]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]|37[0-7]?|[4-7][0-7]?|.)' }, - { include: '#interpolated_livescript' }, - { defaultToken: 'string.regexp.livescript' } ] }, - { token: 'string.regexp.livescript', - regex: '/(?![\\s=/*+{}?]).*?[^\\\\]/[igmy]{0,4}(?![a-zA-Z0-9])' }, - { token: 'keyword.control.livescript', - regex: '\\b(?)|\\+\\+|\\+|~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<(?!\\[)|(?|(?)|&&|\\.\\.(?:\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?)|\\+\\+|\\+|\n\t\t\t\t~(?!~?>)|==|=|!=|<=|>=|<<=|>>=|\n\t\t\t\t>>>=|<>|<(?!\\[)|(?|(?)|&&|\\.\\.(\\.)?|\\s\\.\\s|\\?|\\||\\|\\||\\:|\\*=|(?)' }, - { token: 'keyword.operator.livescript', - regex: '(?<=\\s|^)[\\[\\{](?=.*?[\\]\\}]\\s+[:=])', - TODO: 'FIXME: regexp doesn\'t have js equivalent', - originalRegex: '(?<=\\s|^)([\\[\\{])(?=.*?[\\]\\}]\\s+[:=])', - push: - [ { token: 'keyword.operator.livescript', - regex: '[\\]\\}]\\s*[:=]', - next: 'pop' }, - { include: '#variable_name' }, - { include: '#instance_variable' }, - { include: '#single_quoted_string' }, - { include: '#double_quoted_string' }, - { include: '#numeric' }, - { defaultToken: 'meta.variable.assignment.destructured.livescript' } ] }, - { token: - [ 'meta.function.livescript', - 'entity.name.function.livescript', - 'entity.name.function.livescript', - 'entity.name.function.livescript', - 'entity.name.function.livescript', - 'variable.parameter.function.livescript', - 'entity.name.function.livescript', - 'storage.type.function.livescript' ], - regex: '(\\s*)(?=[a-zA-Z\\$_])([a-zA-Z\\$_])((?:[\\w$.:-])*)(\\s*)([:=])((?:\\s*!?\\s*\\(.*\\))?)(\\s*)(!?[~-]{1,2}>)' }, - { token: 'storage.type.function.livescript', - regex: '!?[~-]{1,2}>' }, - { token: 'constant.language.boolean.true.livescript', - regex: '\\b(?|=>)\\s*$|.*[\\[{]\\s*$', - foldingStopMarker: '^\\s*$|^\\s*[}\\]]\\s*$', - keyEquivalent: '^~C', - name: 'LiveScript', - scopeName: 'source.livescript' } - - -oop.inherits(LiveScriptHighlightRules, TextHighlightRules); - -exports.LiveScriptHighlightRules = LiveScriptHighlightRules; -}); - -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/live_script",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/live_script_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LiveScriptHighlightRules = require("./live_script_highlight_rules").LiveScriptHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = LiveScriptHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/live_script" -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-lucene.js b/htdocs/includes/ace/mode-lucene.js deleted file mode 100644 index b830b7ae32e..00000000000 --- a/htdocs/includes/ace/mode-lucene.js +++ /dev/null @@ -1,70 +0,0 @@ -ace.define("ace/mode/lucene_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var LuceneHighlightRules = function() { - this.$rules = { - "start" : [ - { - token : "constant.character.negation", - regex : "[\\-]" - }, { - token : "constant.character.interro", - regex : "[\\?]" - }, { - token : "constant.character.asterisk", - regex : "[\\*]" - }, { - token: 'constant.character.proximity', - regex: '~[0-9]+\\b' - }, { - token : 'keyword.operator', - regex: '(?:AND|OR|NOT)\\b' - }, { - token : "paren.lparen", - regex : "[\\(]" - }, { - token : "paren.rparen", - regex : "[\\)]" - }, { - token : "keyword", - regex : "[\\S]+:" - }, { - token : "string", // " string - regex : '".*?"' - }, { - token : "text", - regex : "\\s+" - } - ] - }; -}; - -oop.inherits(LuceneHighlightRules, TextHighlightRules); - -exports.LuceneHighlightRules = LuceneHighlightRules; -}); - -ace.define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) { -'use strict'; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; - -var Mode = function() { - this.HighlightRules = LuceneHighlightRules; - this.$behaviour = this.$defaultBehaviour; -}; - -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/lucene"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-mavens_mate_log.js b/htdocs/includes/ace/mode-mavens_mate_log.js deleted file mode 100644 index 8f73e66e1e1..00000000000 --- a/htdocs/includes/ace/mode-mavens_mate_log.js +++ /dev/null @@ -1,160 +0,0 @@ -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/mavens_mate_log",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mavens_mate_log_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MavensMateLogHighlightRules = require("./mavens_mate_log_highlight_rules").MavensMateLogHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = MavensMateLogHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/mavens_mate_log" -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-mips_assembler.js b/htdocs/includes/ace/mode-mips_assembler.js deleted file mode 100644 index 94da6f36f12..00000000000 --- a/htdocs/includes/ace/mode-mips_assembler.js +++ /dev/null @@ -1,235 +0,0 @@ -ace.define("ace/mode/mips_assembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var MIPSAssemblerHighlightRules = function() { - - this.$rules = { start: - [ { token: 'support.function.pseudo.mips', - regex: '\\b(?:mul|abs|div|divu|mulo|mulou|neg|negu|not|rem|remu|rol|ror|li|seq|sge|sgeu|sgt|sgtu|sle|sleu|sne|b|beqz|bge|bgeu|bgt|bgtu|ble|bleu|blt|bltu|bnez|la|ld|ulh|ulhu|ulw|sd|ush|usw|move|mfc1\\.d|l\\.d|l\\.s|s\\.d|s\\.s)\\b', - comment: 'ok actually this are instructions, but one also could call them funtions…' }, - { token: 'support.function.mips', - regex: '\\b(?:abs\\.d|abs\\.s|add|add\\.d|add\\.s|addi|addiu|addu|and|andi|bc1f|bc1t|beq|bgez|bgezal|bgtz|blez|bltz|bltzal|bne|break|c\\.eq\\.d|c\\.eq\\.s|c\\.le\\.d|c\\.le\\.s|c\\.lt\\.d|c\\.lt\\.s|ceil\\.w\\.d|ceil\\.w\\.s|clo|clz|cvt\\.d\\.s|cvt\\.d\\.w|cvt\\.s\\.d|cvt\\.s\\.w|cvt\\.w\\.d|cvt\\.w\\.s|div|div\\.d|div\\.s|divu|eret|floor\\.w\\.d|floor\\.w\\.s|j|jal|jalr|jr|lb|lbu|lh|lhu|ll|lui|lw|lwc1|lwl|lwr|madd|maddu|mfc0|mfc1|mfhi|mflo|mov\\.d|mov\\.s|movf|movf\\.d|movf\\.s|movn|movn\\.d|movn\\.s|movt|movt\\.d|movt\\.s|movz|movz\\.d|movz\\.s|msub|mtc0|mtc1|mthi|mtlo|mul|mul\\.d|mul\\.s|mult|multu|neg\\.d|neg\\.s|nop|nor|or|ori|round\\.w\\.d|round\\.w\\.s|sb|sc|sdc1|sh|sll|sllv|slt|slti|sltiu|sltu|sqrt\\.d|sqrt\\.s|sra|srav|srl|srlv|sub|sub\\.d|sub\\.s|subu|sw|swc1|swl|swr|syscall|teq|teqi|tge|tgei|tgeiu|tgeu|tlt|tlti|tltiu|tltu|trunc\\.w\\.d|trunc\\.w\\.s|xor|xori)\\b' }, - { token: 'storage.type.mips', - regex: '\\.(?:ascii|asciiz|byte|data|double|float|half|kdata|ktext|space|text|word|set\\s*(?:noat|at))\\b' }, - { token: 'storage.modifier.mips', - regex: '\\.(?:align|extern||globl)\\b' }, - { token: - [ 'entity.name.function.label.mips', - 'meta.function.label.mips' ], - regex: '\\b([A-Za-z0-9_]+)(:)' }, - { token: - [ 'punctuation.definition.variable.mips', - 'variable.other.register.usable.by-number.mips' ], - regex: '(\\$)(0|[2-9]|1[0-9]|2[0-5]|2[89]|3[0-1])\\b' }, - { token: - [ 'punctuation.definition.variable.mips', - 'variable.other.register.usable.by-name.mips' ], - regex: '(\\$)(zero|v[01]|a[0-3]|t[0-9]|s[0-7]|gp|sp|fp|ra)\\b' }, - { token: - [ 'punctuation.definition.variable.mips', - 'variable.other.register.reserved.mips' ], - regex: '(\\$)(at|k[01]|1|2[67])\\b' }, - { token: - [ 'punctuation.definition.variable.mips', - 'variable.other.register.usable.floating-point.mips', - 'variable.other.register.usable.floating-point.mips' ], - regex: '(\\$)(f)([0-9]|1[0-9]|2[0-9]|3[0-1])\\b' }, - { token: 'constant.numeric.float.mips', - regex: '\\b\\d+\\.\\d+\\b' }, - { token: 'constant.numeric.integer.mips', - regex: '\\b(?:\\d+|0(?:x|X)[a-fA-F0-9]+)\\b' }, - { token: 'punctuation.definition.string.begin.mips', - regex: '"', - push: - [ { token: 'punctuation.definition.string.end.mips', - regex: '"', - next: 'pop' }, - { token: 'constant.character.escape.mips', - regex: '\\\\[rnt\\\\"]' }, - { defaultToken: 'string.quoted.double.mips' } ] }, - { token: 'punctuation.definition.comment.mips', - regex: '#', - push: - [ { token: 'comment.line.number-sign.mips', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.number-sign.mips' } ] } ] } - - this.normalizeRules(); -}; - -MIPSAssemblerHighlightRules.metaData = { fileTypes: [ 's', 'mips', 'spim', 'asm' ], - keyEquivalent: '^~M', - name: 'MIPS Assembler', - scopeName: 'source.mips' } - - -oop.inherits(MIPSAssemblerHighlightRules, TextHighlightRules); - -exports.MIPSAssemblerHighlightRules = MIPSAssemblerHighlightRules; -}); - -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/mips_assembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mips_assembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var MIPSAssemblerHighlightRules = require("./mips_assembler_highlight_rules").MIPSAssemblerHighlightRules; -var FoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = MIPSAssemblerHighlightRules; - this.foldingRules = new FoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - this.$id = "ace/mode/mips_assembler" -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-pascal.js b/htdocs/includes/ace/mode-pascal.js deleted file mode 100644 index 9ccd1ed5e0c..00000000000 --- a/htdocs/includes/ace/mode-pascal.js +++ /dev/null @@ -1,198 +0,0 @@ -ace.define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PascalHighlightRules = function() { - - this.$rules = { start: - [ { caseInsensitive: true, - token: 'keyword.control.pascal', - regex: '\\b(?:(absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor))\\b' }, - { caseInsensitive: true, - token: - [ 'variable.pascal', "text", - 'storage.type.prototype.pascal', - 'entity.name.function.prototype.pascal' ], - regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' }, - { caseInsensitive: true, - token: - [ 'variable.pascal', "text", - 'storage.type.function.pascal', - 'entity.name.function.pascal' ], - regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' }, - { token: 'constant.numeric.pascal', - regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' }, - { token: 'punctuation.definition.comment.pascal', - regex: '--.*$', - push_: - [ { token: 'comment.line.double-dash.pascal.one', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-dash.pascal.one' } ] }, - { token: 'punctuation.definition.comment.pascal', - regex: '//.*$', - push_: - [ { token: 'comment.line.double-slash.pascal.two', - regex: '$', - next: 'pop' }, - { defaultToken: 'comment.line.double-slash.pascal.two' } ] }, - { token: 'punctuation.definition.comment.pascal', - regex: '\\(\\*', - push: - [ { token: 'punctuation.definition.comment.pascal', - regex: '\\*\\)', - next: 'pop' }, - { defaultToken: 'comment.block.pascal.one' } ] }, - { token: 'punctuation.definition.comment.pascal', - regex: '\\{', - push: - [ { token: 'punctuation.definition.comment.pascal', - regex: '\\}', - next: 'pop' }, - { defaultToken: 'comment.block.pascal.two' } ] }, - { token: 'punctuation.definition.string.begin.pascal', - regex: '"', - push: - [ { token: 'constant.character.escape.pascal', regex: '\\\\.' }, - { token: 'punctuation.definition.string.end.pascal', - regex: '"', - next: 'pop' }, - { defaultToken: 'string.quoted.double.pascal' } ] - }, - { token: 'punctuation.definition.string.begin.pascal', - regex: '\'', - push: - [ { token: 'constant.character.escape.apostrophe.pascal', - regex: '\'\'' }, - { token: 'punctuation.definition.string.end.pascal', - regex: '\'', - next: 'pop' }, - { defaultToken: 'string.quoted.single.pascal' } ] }, - { token: 'keyword.operator', - regex: '[+\\-;,/*%]|:=|=' } ] } - - this.normalizeRules(); -}; - -oop.inherits(PascalHighlightRules, TextHighlightRules); - -exports.PascalHighlightRules = PascalHighlightRules; -}); - -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = PascalHighlightRules; - this.foldingRules = new FoldMode(); - this.$behaviour = this.$defaultBehaviour; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = ["--", "//"]; - this.blockComment = [ - {start: "(*", end: "*)"}, - {start: "{", end: "}"} - ]; - - this.$id = "ace/mode/pascal"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-python.js b/htdocs/includes/ace/mode-python.js deleted file mode 100644 index 19efccb6500..00000000000 --- a/htdocs/includes/ace/mode-python.js +++ /dev/null @@ -1,265 +0,0 @@ -ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var PythonHighlightRules = function() { - - var keywords = ( - "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + - "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + - "raise|return|try|while|with|yield" - ); - - var builtinConstants = ( - "True|False|None|NotImplemented|Ellipsis|__debug__" - ); - - var builtinFunctions = ( - "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + - "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + - "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + - "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + - "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + - "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + - "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + - "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" - ); - var keywordMapper = this.createKeywordMapper({ - "invalid.deprecated": "debugger", - "support.function": builtinFunctions, - "constant.language": builtinConstants, - "keyword": keywords - }, "identifier"); - - var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; - - var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; - var octInteger = "(?:0[oO]?[0-7]+)"; - var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; - var binInteger = "(?:0[bB][01]+)"; - var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; - - var exponent = "(?:[eE][+-]?\\d+)"; - var fraction = "(?:\\.\\d+)"; - var intPart = "(?:\\d+)"; - var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; - var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - - var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; - - this.$rules = { - "start" : [ { - token : "comment", - regex : "#.*$" - }, { - token : "string", // multi line """ string start - regex : strPre + '"{3}', - next : "qqstring3" - }, { - token : "string", // " string - regex : strPre + '"(?=.)', - next : "qqstring" - }, { - token : "string", // multi line ''' string start - regex : strPre + "'{3}", - next : "qstring3" - }, { - token : "string", // ' string - regex : strPre + "'(?=.)", - next : "qstring" - }, { - token : "constant.numeric", // imaginary - regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" - }, { - token : "constant.numeric", // float - regex : floatNumber - }, { - token : "constant.numeric", // long integer - regex : integer + "[lL]\\b" - }, { - token : "constant.numeric", // integer - regex : integer + "\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" - }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" - }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" - }, { - token : "text", - regex : "\\s+" - } ], - "qqstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line """ string end - regex : '"{3}', - next : "start" - }, { - defaultToken : "string" - } ], - "qstring3" : [ { - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", // multi line ''' string end - regex : "'{3}", - next : "start" - }, { - defaultToken : "string" - } ], - "qqstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "start" - }, { - defaultToken: "string" - }], - "qstring" : [{ - token : "constant.language.escape", - regex : stringEscape - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "start" - }, { - defaultToken: "string" - }] - }; -}; - -oop.inherits(PythonHighlightRules, TextHighlightRules); - -exports.PythonHighlightRules = PythonHighlightRules; -}); - -ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(markers) { - this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var line = session.getLine(row); - var match = line.match(this.foldingStartMarker); - if (match) { - if (match[1]) - return this.openingBracketBlock(session, match[1], row, match.index); - if (match[2]) - return this.indentationBlock(session, row, match.index + match[2].length); - return this.indentationBlock(session, row); - } - } - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; -var PythonFoldMode = require("./folding/pythonic").FoldMode; -var Range = require("../range").Range; - -var Mode = function() { - this.HighlightRules = PythonHighlightRules; - this.foldingRules = new PythonFoldMode("\\:"); - this.$behaviour = this.$defaultBehaviour; -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "#"; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - - var tokenizedLine = this.getTokenizer().getLineTokens(line, state); - var tokens = tokenizedLine.tokens; - - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - if (state == "start") { - var match = line.match(/^.*[\{\(\[:]\s*$/); - if (match) { - indent += tab; - } - } - - return indent; - }; - - var outdents = { - "pass": 1, - "return": 1, - "raise": 1, - "break": 1, - "continue": 1 - }; - - this.checkOutdent = function(state, line, input) { - if (input !== "\r\n" && input !== "\r" && input !== "\n") - return false; - - var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; - - if (!tokens) - return false; - do { - var last = tokens.pop(); - } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); - - if (!last) - return false; - - return (last.type == "keyword" && outdents[last.value]); - }; - - this.autoOutdent = function(state, doc, row) { - - row += 1; - var indent = this.$getIndent(doc.getLine(row)); - var tab = doc.getTabString(); - if (indent.slice(-tab.length) == tab) - doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); - }; - - this.$id = "ace/mode/python"; -}).call(Mode.prototype); - -exports.Mode = Mode; -}); diff --git a/htdocs/includes/ace/mode-sass.js b/htdocs/includes/ace/mode-sass.js deleted file mode 100644 index bd1817051cf..00000000000 --- a/htdocs/includes/ace/mode-sass.js +++ /dev/null @@ -1,434 +0,0 @@ -ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ScssHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|bottom|" + - "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; -}; - -oop.inherits(ScssHighlightRules, TextHighlightRules); - -exports.ScssHighlightRules = ScssHighlightRules; - -}); - -ace.define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; - -var SassHighlightRules = function() { - ScssHighlightRules.call(this); - var start = this.$rules.start; - if (start[1].token == "comment") { - start.splice(1, 1, { - onMatch: function(value, currentState, stack) { - stack.unshift(this.next, -1, value.length - 2, currentState); - return "comment"; - }, - regex: /^\s*\/\*/, - next: "comment" - }, { - token: "error.invalid", - regex: "/\\*|[{;}]" - }, { - token: "support.type", - regex: /^\s*:[\w\-]+\s/ - }); - - this.$rules.comment = [ - {regex: /^\s*/, onMatch: function(value, currentState, stack) { - if (stack[1] === -1) - stack[1] = Math.max(stack[2], value.length - 1); - if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); - this.next = stack.shift(); - return "text"; - } else { - this.next = ""; - return "comment"; - } - }, next: "start"}, - {defaultToken: "comment"} - ] - } -}; - -oop.inherits(SassHighlightRules, ScssHighlightRules); - -exports.SassHighlightRules = SassHighlightRules; - -}); - -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var BaseFoldMode = require("./fold_mode").FoldMode; -var Range = require("../../range").Range; - -var FoldMode = exports.FoldMode = function() {}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.getFoldWidgetRange = function(session, foldStyle, row) { - var range = this.indentationBlock(session, row); - if (range) - return range; - - var re = /\S/; - var line = session.getLine(row); - var startLevel = line.search(re); - if (startLevel == -1 || line[startLevel] != "#") - return; - - var startColumn = line.length; - var maxRow = session.getLength(); - var startRow = row; - var endRow = row; - - while (++row < maxRow) { - line = session.getLine(row); - var level = line.search(re); - - if (level == -1) - continue; - - if (line[level] != "#") - break; - - endRow = row; - } - - if (endRow > startRow) { - var endColumn = session.getLine(endRow).length; - return new Range(startRow, startColumn, endRow, endColumn); - } - }; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - var indent = line.search(/\S/); - var next = session.getLine(row + 1); - var prev = session.getLine(row - 1); - var prevIndent = prev.search(/\S/); - var nextIndent = next.search(/\S/); - - if (indent == -1) { - session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; - return ""; - } - if (prevIndent == -1) { - if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { - session.foldWidgets[row - 1] = ""; - session.foldWidgets[row + 1] = ""; - return "start"; - } - } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { - if (session.getLine(row - 2).search(/\S/) == -1) { - session.foldWidgets[row - 1] = "start"; - session.foldWidgets[row + 1] = ""; - return ""; - } - } - - if (prevIndent!= -1 && prevIndent < indent) - session.foldWidgets[row - 1] = "start"; - else - session.foldWidgets[row - 1] = ""; - - if (indent < nextIndent) - return "start"; - else - return ""; - }; - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; -var FoldMode = require("./folding/coffee").FoldMode; - -var Mode = function() { - this.HighlightRules = SassHighlightRules; - this.foldingRules = new FoldMode(); - this.$behaviour = this.$defaultBehaviour; -}; -oop.inherits(Mode, TextMode); - -(function() { - this.lineCommentStart = "//"; - this.$id = "ace/mode/sass"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); diff --git a/htdocs/includes/ace/mode-scss.js b/htdocs/includes/ace/mode-scss.js deleted file mode 100644 index 4785dc3672c..00000000000 --- a/htdocs/includes/ace/mode-scss.js +++ /dev/null @@ -1,586 +0,0 @@ -ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var ScssHighlightRules = function() { - - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|bottom|" + - "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" - }, { - token : "paren.lparen", - regex : "[[({]" - }, { - token : "paren.rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - }, { - caseInsensitive: true - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ], - "qqstring" : [ - { - token : "string", - regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', - next : "start" - }, { - token : "string", - regex : '.+' - } - ], - "qstring" : [ - { - token : "string", - regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", - next : "start" - }, { - token : "string", - regex : '.+' - } - ] - }; -}; - -oop.inherits(ScssHighlightRules, TextHighlightRules); - -exports.ScssHighlightRules = ScssHighlightRules; - -}); - -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { -"use strict"; - -var Range = require("../range").Range; - -var MatchingBraceOutdent = function() {}; - -(function() { - - this.checkOutdent = function(line, input) { - if (! /^\s+$/.test(line)) - return false; - - return /^\s*\}/.test(input); - }; - - this.autoOutdent = function(doc, row) { - var line = doc.getLine(row); - var match = line.match(/^(\s*\})/); - - if (!match) return 0; - - var column = match[1].length; - var openBracePos = doc.findMatchingBracket({row: row, column: column}); - - if (!openBracePos || openBracePos.row == row) return 0; - - var indent = this.$getIndent(doc.getLine(openBracePos.row)); - doc.replace(new Range(row, 0, row, column-1), indent); - }; - - this.$getIndent = function(line) { - return line.match(/^\s*/)[0]; - }; - -}).call(MatchingBraceOutdent.prototype); - -exports.MatchingBraceOutdent = MatchingBraceOutdent; -}); - -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Behaviour = require("../behaviour").Behaviour; -var CstyleBehaviour = require("./cstyle").CstyleBehaviour; -var TokenIterator = require("../../token_iterator").TokenIterator; - -var CssBehaviour = function () { - - this.inherit(CstyleBehaviour); - - this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ':') { - return { - text: '', - selection: [1, 1] - } - } - if (!line.substring(cursor.column).match(/^\s*;/)) { - return { - text: ':;', - selection: [1, 1] - } - } - } - } - }); - - this.add("colon", "deletion", function (state, action, editor, session, range) { - var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && selected === ':') { - var cursor = editor.getCursorPosition(); - var iterator = new TokenIterator(session, cursor.row, cursor.column); - var token = iterator.getCurrentToken(); - if (token && token.value.match(/\s+/)) { - token = iterator.stepBackward(); - } - if (token && token.type === 'support.type') { - var line = session.doc.getLine(range.start.row); - var rightChar = line.substring(range.end.column, range.end.column + 1); - if (rightChar === ';') { - range.end.column ++; - return range; - } - } - } - }); - - this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { - var cursor = editor.getCursorPosition(); - var line = session.doc.getLine(cursor.row); - var rightChar = line.substring(cursor.column, cursor.column + 1); - if (rightChar === ';') { - return { - text: '', - selection: [1, 1] - } - } - } - }); - -} -oop.inherits(CssBehaviour, CstyleBehaviour); - -exports.CssBehaviour = CssBehaviour; -}); - -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { -"use strict"; - -var oop = require("../../lib/oop"); -var Range = require("../../range").Range; -var BaseFoldMode = require("./fold_mode").FoldMode; - -var FoldMode = exports.FoldMode = function(commentRegex) { - if (commentRegex) { - this.foldingStartMarker = new RegExp( - this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) - ); - this.foldingStopMarker = new RegExp( - this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) - ); - } -}; -oop.inherits(FoldMode, BaseFoldMode); - -(function() { - - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; - this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; - this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; - this._getFoldWidgetBase = this.getFoldWidget; - this.getFoldWidget = function(session, foldStyle, row) { - var line = session.getLine(row); - - if (this.singleLineBlockCommentRe.test(line)) { - if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) - return ""; - } - - var fw = this._getFoldWidgetBase(session, foldStyle, row); - - if (!fw && this.startRegionRe.test(line)) - return "start"; // lineCommentRegionStart - - return fw; - }; - - this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { - var line = session.getLine(row); - - if (this.startRegionRe.test(line)) - return this.getCommentRegionBlock(session, line, row); - - var match = line.match(this.foldingStartMarker); - if (match) { - var i = match.index; - - if (match[1]) - return this.openingBracketBlock(session, match[1], row, i); - - var range = session.getCommentFoldRange(row, i + match[0].length, 1); - - if (range && !range.isMultiLine()) { - if (forceMultiline) { - range = this.getSectionRange(session, row); - } else if (foldStyle != "all") - range = null; - } - - return range; - } - - if (foldStyle === "markbegin") - return; - - var match = line.match(this.foldingStopMarker); - if (match) { - var i = match.index + match[0].length; - - if (match[1]) - return this.closingBracketBlock(session, match[1], row, i); - - return session.getCommentFoldRange(row, i, -1); - } - }; - - this.getSectionRange = function(session, row) { - var line = session.getLine(row); - var startIndent = line.search(/\S/); - var startRow = row; - var startColumn = line.length; - row = row + 1; - var endRow = row; - var maxRow = session.getLength(); - while (++row < maxRow) { - line = session.getLine(row); - var indent = line.search(/\S/); - if (indent === -1) - continue; - if (startIndent > indent) - break; - var subRange = this.getFoldWidgetRange(session, "all", row); - - if (subRange) { - if (subRange.start.row <= startRow) { - break; - } else if (subRange.isMultiLine()) { - row = subRange.end.row; - } else if (startIndent == indent) { - break; - } - } - endRow = row; - } - - return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); - }; - this.getCommentRegionBlock = function(session, line, row) { - var startColumn = line.search(/\s*$/); - var maxRow = session.getLength(); - var startRow = row; - - var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; - var depth = 1; - while (++row < maxRow) { - line = session.getLine(row); - var m = re.exec(line); - if (!m) continue; - if (m[1]) depth--; - else depth++; - - if (!depth) break; - } - - var endRow = row; - if (endRow > startRow) { - return new Range(startRow, startColumn, endRow, line.length); - } - }; - -}).call(FoldMode.prototype); - -}); - -ace.define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextMode = require("./text").Mode; -var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; -var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; -var CssBehaviour = require("./behaviour/css").CssBehaviour; -var CStyleFoldMode = require("./folding/cstyle").FoldMode; - -var Mode = function() { - this.HighlightRules = ScssHighlightRules; - this.$outdent = new MatchingBraceOutdent(); - this.$behaviour = new CssBehaviour(); - this.foldingRules = new CStyleFoldMode(); -}; -oop.inherits(Mode, TextMode); - -(function() { - - this.lineCommentStart = "//"; - this.blockComment = {start: "/*", end: "*/"}; - - this.getNextLineIndent = function(state, line, tab) { - var indent = this.$getIndent(line); - var tokens = this.getTokenizer().getLineTokens(line, state).tokens; - if (tokens.length && tokens[tokens.length-1].type == "comment") { - return indent; - } - - var match = line.match(/^.*\{\s*$/); - if (match) { - indent += tab; - } - - return indent; - }; - - this.checkOutdent = function(state, line, input) { - return this.$outdent.checkOutdent(line, input); - }; - - this.autoOutdent = function(state, doc, row) { - this.$outdent.autoOutdent(doc, row); - }; - - this.$id = "ace/mode/scss"; -}).call(Mode.prototype); - -exports.Mode = Mode; - -}); diff --git a/htdocs/includes/ace/mode-swig.js b/htdocs/includes/ace/mode-swig.js deleted file mode 100644 index 2b2061777cd..00000000000 --- a/htdocs/includes/ace/mode-swig.js +++ /dev/null @@ -1,1099 +0,0 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "animation-fill-mode|alignment-adjust|alignment-baseline|animation-delay|animation-direction|animation-duration|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|animation|appearance|azimuth|backface-visibility|background-attachment|background-break|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|background|baseline-shift|binding|bleed|bookmark-label|bookmark-level|bookmark-state|bookmark-target|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|border|bottom|box-align|box-decoration-break|box-direction|box-flex-group|box-flex|box-lines|box-ordinal-group|box-orient|box-pack|box-shadow|box-sizing|break-after|break-before|break-inside|caption-side|clear|clip|color-profile|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|crop|cue-after|cue-before|cue|cursor|direction|display|dominant-baseline|drop-initial-after-adjust|drop-initial-after-align|drop-initial-before-adjust|drop-initial-before-align|drop-initial-size|drop-initial-value|elevation|empty-cells|fit|fit-position|float-offset|float|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|font|grid-columns|grid-rows|hanging-punctuation|height|hyphenate-after|hyphenate-before|hyphenate-character|hyphenate-lines|hyphenate-resource|hyphens|icon|image-orientation|image-rendering|image-resolution|inline-box-align|left|letter-spacing|line-height|line-stacking-ruby|line-stacking-shift|line-stacking-strategy|line-stacking|list-style-image|list-style-position|list-style-type|list-style|margin-bottom|margin-left|margin-right|margin-top|margin|mark-after|mark-before|mark|marks|marquee-direction|marquee-play-count|marquee-speed|marquee-style|max-height|max-width|min-height|min-width|move-to|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|orphans|outline-color|outline-offset|outline-style|outline-width|outline|overflow-style|overflow-x|overflow-y|overflow|padding-bottom|padding-left|padding-right|padding-top|padding|page-break-after|page-break-before|page-break-inside|page-policy|page|pause-after|pause-before|pause|perspective-origin|perspective|phonemes|pitch-range|pitch|play-during|pointer-events|position|presentation-level|punctuation-trim|quotes|rendering-intent|resize|rest-after|rest-before|rest|richness|right|rotation-point|rotation|ruby-align|ruby-overhang|ruby-position|ruby-span|size|speak-header|speak-numeral|speak-punctuation|speak|speech-rate|stress|string-set|table-layout|target-name|target-new|target-position|target|text-align-last|text-align|text-decoration|text-emphasis|text-height|text-indent|text-justify|text-outline|text-shadow|text-transform|text-wrap|top|transform-origin|transform-style|transform|transition-delay|transition-duration|transition-property|transition-timing-function|transition|unicode-bidi|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch-range|voice-pitch|voice-rate|voice-stress|voice-volume|volume|white-space-collapse|white-space|widows|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aqua|black|blue|fuchsia|gray|green|lime|maroon|navy|olive|orange|purple|red|silver|teal|white|yellow"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "@.*?{", - push: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media" : [{ - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token: "paren.lparen", - regex: "\\{", - push: "ruleset" - }, { - token: "string", - regex: "\\}", - next: "pop" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "comment" : [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }], - - "ruleset" : [ - { - token : "paren.rparen", - regex : "\\}", - next: "pop" - }, { - token : "comment", // multi line comment - regex : "\\/\\*", - push : "comment" - }, { - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - token : ["support.function", "string", "support.function"], - regex : "(url\\()(.*)(\\))" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }] - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var DocCommentHighlightRules = function() { - this.$rules = { - "start" : [ { - token : "comment.doc.tag", - regex : "@[\\w\\d_]+" // TODO: fix email addresses - }, - DocCommentHighlightRules.getTagRule(), - { - defaultToken : "comment.doc", - caseInsensitive: true - }] - }; -}; - -oop.inherits(DocCommentHighlightRules, TextHighlightRules); - -DocCommentHighlightRules.getTagRule = function(start) { - return { - token : "comment.doc.tag.storage.type", - regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" - }; -} - -DocCommentHighlightRules.getStartRule = function(start) { - return { - token : "comment.doc", // doc comment - regex : "\\/\\*(?=\\*)", - next : start - }; -}; - -DocCommentHighlightRules.getEndRule = function (start) { - return { - token : "comment.doc", // closing comment - regex : "\\*\\/", - next : start - }; -}; - - -exports.DocCommentHighlightRules = DocCommentHighlightRules; - -}); - -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; - -var JavaScriptHighlightRules = function(options) { - var keywordMapper = this.createKeywordMapper({ - "variable.language": - "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors - "Namespace|QName|XML|XMLList|" + // E4X - "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + - "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + - "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors - "SyntaxError|TypeError|URIError|" + - "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions - "isNaN|parseFloat|parseInt|" + - "JSON|Math|" + // Other - "this|arguments|prototype|window|document" , // Pseudo - "keyword": - "const|yield|import|get|set|" + - "break|case|catch|continue|default|delete|do|else|finally|for|function|" + - "if|in|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + - "__parent__|__count__|escape|unescape|with|__proto__|" + - "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", - "storage.type": - "const|let|var|function", - "constant.language": - "null|Infinity|NaN|undefined", - "support.function": - "alert", - "constant.language.boolean": "true|false" - }, "identifier"); - var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; - - var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex - "u[0-9a-fA-F]{4}|" + // unicode - "[0-2][0-7]{0,2}|" + // oct - "3[0-6][0-7]?|" + // oct - "37[0-7]?|" + // oct - "[4-7][0-7]?|" + //oct - ".)"; - - this.$rules = { - "no_regex" : [ - { - token : "comment", - regex : "\\/\\/", - next : "line_comment" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : /\/\*/, - next : "comment" - }, { - token : "string", - regex : "'(?=.)", - next : "qstring" - }, { - token : "string", - regex : '"(?=.)', - next : "qqstring" - }, { - token : "constant.numeric", // hex - regex : /0[xX][0-9a-fA-F]+\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ - }, { - token : [ - "storage.type", "punctuation.operator", "support.function", - "punctuation.operator", "entity.name.function", "text","keyword.operator" - ], - regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "keyword.operator", "text", "storage.type", - "text", "paren.lparen" - ], - regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "entity.name.function", "text", "punctuation.operator", - "text", "storage.type", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : [ - "text", "text", "storage.type", "text", "paren.lparen" - ], - regex : "(:)(\\s*)(function)(\\s*)(\\()", - next: "function_arguments" - }, { - token : "keyword", - regex : "(?:" + kwBeforeRe + ")\\b", - next : "start" - }, { - token : ["support.constant"], - regex : /that\b/ - }, { - token : ["storage.type", "punctuation.operator", "support.function.firebug"], - regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ - }, { - token : keywordMapper, - regex : identifierRe - }, { - token : "punctuation.operator", - regex : /[.](?![.])/, - next : "property" - }, { - token : "keyword.operator", - regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, - next : "start" - }, { - token : "punctuation.operator", - regex : /[?:,;.]/, - next : "start" - }, { - token : "paren.lparen", - regex : /[\[({]/, - next : "start" - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token: "comment", - regex: /^#!.*$/ - } - ], - property: [{ - token : "text", - regex : "\\s+" - }, { - token : [ - "storage.type", "punctuation.operator", "entity.name.function", "text", - "keyword.operator", "text", - "storage.type", "text", "entity.name.function", "text", "paren.lparen" - ], - regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", - next: "function_arguments" - }, { - token : "punctuation.operator", - regex : /[.](?![.])/ - }, { - token : "support.function", - regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ - }, { - token : "support.function.dom", - regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ - }, { - token : "support.constant", - regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ - }, { - token : "identifier", - regex : identifierRe - }, { - regex: "", - token: "empty", - next: "no_regex" - } - ], - "start": [ - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment_regex_allowed" - }, { - token : "comment", - regex : "\\/\\/", - next : "line_comment_regex_allowed" - }, { - token: "string.regexp", - regex: "\\/", - next: "regex" - }, { - token : "text", - regex : "\\s+|^$", - next : "start" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "regex": [ - { - token: "regexp.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "string.regexp", - regex: "/[sxngimy]*", - next: "no_regex" - }, { - token : "invalid", - regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ - }, { - token : "constant.language.escape", - regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ - }, { - token : "constant.language.delimiter", - regex: /\|/ - }, { - token: "constant.language.escape", - regex: /\[\^?/, - next: "regex_character_class" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp" - } - ], - "regex_character_class": [ - { - token: "regexp.charclass.keyword.operator", - regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" - }, { - token: "constant.language.escape", - regex: "]", - next: "regex" - }, { - token: "constant.language.escape", - regex: "-" - }, { - token: "empty", - regex: "$", - next: "no_regex" - }, { - defaultToken: "string.regexp.charachterclass" - } - ], - "function_arguments": [ - { - token: "variable.parameter", - regex: identifierRe - }, { - token: "punctuation.operator", - regex: "[, ]+" - }, { - token: "punctuation.operator", - regex: "$" - }, { - token: "empty", - regex: "", - next: "no_regex" - } - ], - "comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "\\*\\/", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment_regex_allowed" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "start"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "line_comment" : [ - DocCommentHighlightRules.getTagRule(), - {token : "comment", regex : "$|^", next : "no_regex"}, - {defaultToken : "comment", caseInsensitive: true} - ], - "qqstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qqstring" - }, { - token : "string", - regex : '"|$', - next : "no_regex" - }, { - defaultToken: "string" - } - ], - "qstring" : [ - { - token : "constant.language.escape", - regex : escapedRe - }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "no_regex" - }, { - defaultToken: "string" - } - ] - }; - - - if (!options || !options.noES6) { - this.$rules.no_regex.unshift({ - regex: "[{}]", onMatch: function(val, state, stack) { - this.next = val == "{" ? this.nextState : ""; - if (val == "{" && stack.length) { - stack.unshift("start", state); - return "paren"; - } - if (val == "}" && stack.length) { - stack.shift(); - this.next = stack.shift(); - if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) - return "paren.quasi.end"; - } - return val == "{" ? "paren.lparen" : "paren.rparen"; - }, - nextState: "start" - }, { - token : "string.quasi.start", - regex : /`/, - push : [{ - token : "constant.language.escape", - regex : escapedRe - }, { - token : "paren.quasi.start", - regex : /\${/, - push : "start" - }, { - token : "string.quasi.end", - regex : /`/, - next : "pop" - }, { - defaultToken: "string.quasi" - }] - }); - - if (!options || !options.noJSX) - JSX.call(this); - } - - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("no_regex") ]); - - this.normalizeRules(); -}; - -oop.inherits(JavaScriptHighlightRules, TextHighlightRules); - -function JSX() { - var tagRegex = identifierRe.replace("\\d", "\\d\\-"); - var jsxTag = { - onMatch : function(val, state, stack) { - var offset = val.charAt(1) == "/" ? 2 : 1; - if (offset == 1) { - if (state != this.nextState) - stack.unshift(this.next, this.nextState, 0); - else - stack.unshift(this.next); - stack[2]++; - } else if (offset == 2) { - if (state == this.nextState) { - stack[1]--; - if (!stack[1] || stack[1] < 0) { - stack.shift(); - stack.shift(); - } - } - } - return [{ - type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", - value: val.slice(0, offset) - }, { - type: "meta.tag.tag-name.xml", - value: val.substr(offset) - }]; - }, - regex : "", - onMatch : function(value, currentState, stack) { - if (currentState == stack[0]) - stack.shift(); - if (value.length == 2) { - if (stack[0] == this.nextState) - stack[1]--; - if (!stack[1] || stack[1] < 0) { - stack.splice(0, 2); - } - } - this.next = stack[0] || "start"; - return [{type: this.token, value: value}]; - }, - nextState: "jsx" - }, - jsxJsRule, - { - token : "entity.other.attribute-name.xml", - regex : tagRegex - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - token : "text.tag-whitespace.xml", - regex : "\\s+" - }, { - token : "string.attribute-value.xml", - regex : "'", - stateName : "jsx_attr_q", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - jsxJsRule, - {include : "reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - stateName : "jsx_attr_qq", - push : [ - jsxJsRule, - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }]; - this.$rules.reference = [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }]; -} - -exports.JavaScriptHighlightRules = JavaScriptHighlightRules; -}); - -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var XmlHighlightRules = function(normalize) { - var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; - - this.$rules = { - start : [ - {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, - { - token : ["punctuation.xml-decl.xml", "keyword.xml-decl.xml"], - regex : "(<\\?)(xml)(?=[\\s])", next : "xml_decl", caseInsensitive: true - }, - { - token : ["punctuation.instruction.xml", "keyword.instruction.xml"], - regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction", - }, - {token : "comment.xml", regex : "<\\!--", next : "comment"}, - { - token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], - regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true - }, - {include : "tag"}, - {token : "text.end-tag-open.xml", regex: "", - next : "start" - }], - - processing_instruction : [ - {token : "punctuation.instruction.xml", regex : "\\?>", next : "start"}, - {defaultToken : "instruction.xml"} - ], - - doctype : [ - {include : "whitespace"}, - {include : "string"}, - {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, - {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, - {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} - ], - - int_subset : [{ - token : "text.xml", - regex : "\\s+" - }, { - token: "punctuation.int-subset.xml", - regex: "]", - next: "pop" - }, { - token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], - regex : "(<\\!)(" + tagRegex + ")", - push : [{ - token : "text", - regex : "\\s+" - }, - { - token : "punctuation.markup-decl.xml", - regex : ">", - next : "pop" - }, - {include : "string"}] - }], - - cdata : [ - {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, - {token : "text.xml", regex : "\\s+"}, - {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} - ], - - comment : [ - {token : "comment.xml", regex : "-->", next : "start"}, - {defaultToken : "comment.xml"} - ], - - reference : [{ - token : "constant.language.escape.reference.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - attr_reference : [{ - token : "constant.language.escape.reference.attribute-value.xml", - regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" - }], - - tag : [{ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], - regex : "(?:(<)|(", next : "start"} - ] - }], - - tag_whitespace : [ - {token : "text.tag-whitespace.xml", regex : "\\s+"} - ], - whitespace : [ - {token : "text.whitespace.xml", regex : "\\s+"} - ], - string: [{ - token : "string.xml", - regex : "'", - push : [ - {token : "string.xml", regex: "'", next: "pop"}, - {defaultToken : "string.xml"} - ] - }, { - token : "string.xml", - regex : '"', - push : [ - {token : "string.xml", regex: '"', next: "pop"}, - {defaultToken : "string.xml"} - ] - }], - - attributes: [{ - token : "entity.other.attribute-name.xml", - regex : "(?:" + tagRegex + ":)?" + tagRegex + "" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=" - }, { - include: "tag_whitespace" - }, { - include: "attribute_value" - }], - - attribute_value: [{ - token : "string.attribute-value.xml", - regex : "'", - push : [ - {token : "string.attribute-value.xml", regex: "'", next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }, { - token : "string.attribute-value.xml", - regex : '"', - push : [ - {token : "string.attribute-value.xml", regex: '"', next: "pop"}, - {include : "attr_reference"}, - {defaultToken : "string.attribute-value.xml"} - ] - }] - }; - - if (this.constructor === XmlHighlightRules) - this.normalizeRules(); -}; - - -(function() { - - this.embedTagRules = function(HighlightRules, prefix, tag){ - this.$rules.tag.unshift({ - token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(<)(" + tag + "(?=\\s|>|$))", - next: [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} - ] - }); - - this.$rules[tag + "-end"] = [ - {include : "attributes"}, - {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", - onMatch : function(value, currentState, stack) { - stack.splice(0); - return this.token; - }} - ] - - this.embedRules(HighlightRules, prefix, [{ - token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], - regex : "(|$))", - next: tag + "-end" - }, { - token: "string.cdata.xml", - regex : "<\\!\\[CDATA\\[" - }, { - token: "string.cdata.xml", - regex : "\\]\\]>" - }]); - }; - -}).call(TextHighlightRules.prototype); - -oop.inherits(XmlHighlightRules, TextHighlightRules); - -exports.XmlHighlightRules = XmlHighlightRules; -}); - -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; - -var tagMap = lang.createMap({ - a : 'anchor', - button : 'form', - form : 'form', - img : 'image', - input : 'form', - label : 'form', - option : 'form', - script : 'script', - select : 'form', - textarea : 'form', - style : 'style', - table : 'table', - tbody : 'table', - td : 'table', - tfoot : 'table', - th : 'table', - tr : 'table' -}); - -var HtmlHighlightRules = function() { - XmlHighlightRules.call(this); - - this.addRules({ - attributes: [{ - include : "tag_whitespace" - }, { - token : "entity.other.attribute-name.xml", - regex : "[-_a-zA-Z0-9:.]+" - }, { - token : "keyword.operator.attribute-equals.xml", - regex : "=", - push : [{ - include: "tag_whitespace" - }, { - token : "string.unquoted.attribute-value.html", - regex : "[^<>='\"`\\s]+", - next : "pop" - }, { - token : "empty", - regex : "", - next : "pop" - }] - }, { - include : "attribute_value" - }], - tag: [{ - token : function(start, tag) { - var group = tagMap[tag]; - return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", - "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; - }, - regex : "(", next : "start"} - ], - }); - - this.embedTagRules(CssHighlightRules, "css-", "style"); - this.embedTagRules(new JavaScriptHighlightRules({noJSX: true}).getRules(), "js-", "script"); - - if (this.constructor === HtmlHighlightRules) - this.normalizeRules(); -}; - -oop.inherits(HtmlHighlightRules, XmlHighlightRules); - -exports.HtmlHighlightRules = HtmlHighlightRules; -}); - -ace.define("ace/mode/swig",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; - -var SwigHighlightRules = function() { - HtmlHighlightRules.call(this); - - var tags = "autoescape|block|else|elif|extends|filter|for|if|import|include|macro|parent|raw|set|spaceless"; - tags = tags + "|end" + tags.replace(/\|/g, "|end"); - var filters = "addslashes|capitalize|date|default|escape|first|groupBy|join|json|last|lower|raw|replace|reverse|safe|sort|striptags|title|uniq|upper|url_encode|url_decode"; - var special = "first|last|index|index0|revindex|revindex0|key" - var constants = "null|none|true|false|loop"; - var operators = "in|is|and|or|not|as|with|only"; - - var keywordMapper = this.createKeywordMapper({ - "keyword.control.swig": tags, - "support.function.swig": filters+"|"+special, - "keyword.operator.swig": operators, - "constant.language.swig": constants, - }, "identifier"); - for (var rule in this.$rules) { - this.$rules[rule].unshift({ - token : "variable.other.readwrite.local.swig", - regex : "\\{\\{-?", - push : "swig-start" - }, { - token : "meta.tag.swig", - regex : "\\{%-?", - push : "swig-start" - }, { - token : "comment.block.swig", - regex : "\\{#-?", - push : "swig-comment" - }); - } - this.$rules["swig-comment"] = [{ - token : "comment.block.swig", - regex : ".*-?#}", - next : "pop" - }]; - - this.$rules["swig-start"] = [{ - token : "variable.other.readwrite.local.swig", - regex : "-?\\}\\}", - next : "pop" - }, { - token : "meta.tag.swig", - regex : "-?%\\}", - next : "pop" - }, { - token : "string", - regex : "'", - next : "swig-qstring" - }, { - token : "string", - regex : '"', - next : "swig-qqstring" - }, { - token : "constant.numeric", // hex - regex : "0[xX][0-9a-fA-F]+\\b" - }, { - token : "constant.numeric", // float - regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" - }, { - token : "constant.language.boolean", - regex : "(?:true|false)\\b" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "keyword.operator.assignment", - regex : "=|~" - }, { - token : "keyword.operator.comparison", - regex : "==|!=|<|>|>=|<=|===" - }, { - token : "keyword.operator.arithmetic", - regex : "\\+|-|/|%|//|\\*|\\*\\*" - }, { - token : "keyword.operator.other", - regex : "\\.\\.|\\|" - }, { - token : "punctuation.operator", - regex : /\?|\:|\,|\;|\./ - }, { - token : "paren.lparen", - regex : /[\[\({]/ - }, { - token : "paren.rparen", - regex : /[\])}]/ - }, { - token : "text", - regex : "\\s+" - } ]; - - this.$rules["swig-qqstring"] = [{ - token : "constant.language.escape", - regex : /\\[\\"$#ntr]|#{[^"}]*}/ - }, { - token : "string", - regex : '"', - next : "swig-start" - }, { - defaultToken : "string" - } - ]; - - this.$rules["swig-qstring"] = [{ - token : "constant.language.escape", - regex : /\\[\\'ntr]}/ - }, { - token : "string", - regex : "'", - next : "swig-start" - }, { - defaultToken : "string" - } - ]; - - this.normalizeRules(); -}; - -oop.inherits(SwigHighlightRules, TextHighlightRules); - -exports.SwigHighlightRules = SwigHighlightRules; -}); diff --git a/htdocs/includes/ace/mode-text.js b/htdocs/includes/ace/mode-text.js deleted file mode 100644 index 8b137891791..00000000000 --- a/htdocs/includes/ace/mode-text.js +++ /dev/null @@ -1 +0,0 @@ - diff --git a/htdocs/includes/ace/package.json b/htdocs/includes/ace/package.json new file mode 100644 index 00000000000..16587d65d90 --- /dev/null +++ b/htdocs/includes/ace/package.json @@ -0,0 +1,20 @@ +{ + "name": "ace-builds", + "main": "./src-noconflict/ace.js", + "typings": "ace.d.ts", + "version": "1.4.6", + "description": "Ace (Ajax.org Cloud9 Editor)", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "repository": { + "type": "git", + "url": "https://github.com/ajaxorg/ace-builds.git" + }, + "author": "", + "license": "BSD-3-Clause", + "bugs": { + "url": "https://github.com/ajaxorg/ace-builds/issues" + }, + "homepage": "https://github.com/ajaxorg/ace-builds" +} diff --git a/htdocs/includes/ace/snippets/abap.js b/htdocs/includes/ace/snippets/abap.js deleted file mode 100644 index 0ef29119029..00000000000 --- a/htdocs/includes/ace/snippets/abap.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/abap",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "abap"; - -}); diff --git a/htdocs/includes/ace/snippets/ada.js b/htdocs/includes/ace/snippets/ada.js deleted file mode 100644 index 656608aaa9e..00000000000 --- a/htdocs/includes/ace/snippets/ada.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/ada",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "ada"; - -}); diff --git a/htdocs/includes/ace/snippets/apache_conf.js b/htdocs/includes/ace/snippets/apache_conf.js deleted file mode 100644 index 0f38e54c62b..00000000000 --- a/htdocs/includes/ace/snippets/apache_conf.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/apache_conf",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "apache_conf"; - -}); diff --git a/htdocs/includes/ace/snippets/applescript.js b/htdocs/includes/ace/snippets/applescript.js deleted file mode 100644 index 6b59011a368..00000000000 --- a/htdocs/includes/ace/snippets/applescript.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/applescript",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "applescript"; - -}); diff --git a/htdocs/includes/ace/snippets/asciidoc.js b/htdocs/includes/ace/snippets/asciidoc.js deleted file mode 100644 index ef22c020b5a..00000000000 --- a/htdocs/includes/ace/snippets/asciidoc.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/asciidoc",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "asciidoc"; - -}); diff --git a/htdocs/includes/ace/snippets/assembly_x86.js b/htdocs/includes/ace/snippets/assembly_x86.js deleted file mode 100644 index b3c3cd3dc45..00000000000 --- a/htdocs/includes/ace/snippets/assembly_x86.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/assembly_x86",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "assembly_x86"; - -}); diff --git a/htdocs/includes/ace/snippets/autohotkey.js b/htdocs/includes/ace/snippets/autohotkey.js deleted file mode 100644 index 61c8ad4e793..00000000000 --- a/htdocs/includes/ace/snippets/autohotkey.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/autohotkey",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "autohotkey"; - -}); diff --git a/htdocs/includes/ace/snippets/batchfile.js b/htdocs/includes/ace/snippets/batchfile.js deleted file mode 100644 index 619f57daf53..00000000000 --- a/htdocs/includes/ace/snippets/batchfile.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/batchfile",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "batchfile"; - -}); diff --git a/htdocs/includes/ace/snippets/bro.js b/htdocs/includes/ace/snippets/bro.js deleted file mode 100644 index 2f2e2e12325..00000000000 --- a/htdocs/includes/ace/snippets/bro.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/bro",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/c9search.js b/htdocs/includes/ace/snippets/c9search.js deleted file mode 100644 index 78ea3dabfdc..00000000000 --- a/htdocs/includes/ace/snippets/c9search.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/c9search",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "c9search"; - -}); diff --git a/htdocs/includes/ace/snippets/cirru.js b/htdocs/includes/ace/snippets/cirru.js deleted file mode 100644 index 02ef1f30f51..00000000000 --- a/htdocs/includes/ace/snippets/cirru.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/cirru",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "cirru"; - -}); diff --git a/htdocs/includes/ace/snippets/cobol.js b/htdocs/includes/ace/snippets/cobol.js deleted file mode 100644 index 760727ce6d5..00000000000 --- a/htdocs/includes/ace/snippets/cobol.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/cobol",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "cobol"; - -}); diff --git a/htdocs/includes/ace/snippets/coldfusion.js b/htdocs/includes/ace/snippets/coldfusion.js deleted file mode 100644 index 1a91f9670a9..00000000000 --- a/htdocs/includes/ace/snippets/coldfusion.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/coldfusion",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "coldfusion"; - -}); diff --git a/htdocs/includes/ace/snippets/csharp.js b/htdocs/includes/ace/snippets/csharp.js deleted file mode 100644 index 96b9174a3ac..00000000000 --- a/htdocs/includes/ace/snippets/csharp.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/csharp",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "csharp"; - -}); diff --git a/htdocs/includes/ace/snippets/curly.js b/htdocs/includes/ace/snippets/curly.js deleted file mode 100644 index 1b2b68734c5..00000000000 --- a/htdocs/includes/ace/snippets/curly.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/curly",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "curly"; - -}); diff --git a/htdocs/includes/ace/snippets/d.js b/htdocs/includes/ace/snippets/d.js deleted file mode 100644 index 729741cc25c..00000000000 --- a/htdocs/includes/ace/snippets/d.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/d",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "d"; - -}); diff --git a/htdocs/includes/ace/snippets/dockerfile.js b/htdocs/includes/ace/snippets/dockerfile.js deleted file mode 100644 index 981cee8ab6d..00000000000 --- a/htdocs/includes/ace/snippets/dockerfile.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/dockerfile",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "dockerfile"; - -}); diff --git a/htdocs/includes/ace/snippets/dot.js b/htdocs/includes/ace/snippets/dot.js deleted file mode 100644 index 3a09fc7727c..00000000000 --- a/htdocs/includes/ace/snippets/dot.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/dot",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "dot"; - -}); diff --git a/htdocs/includes/ace/snippets/drools.js b/htdocs/includes/ace/snippets/drools.js deleted file mode 100644 index a8dd859a404..00000000000 --- a/htdocs/includes/ace/snippets/drools.js +++ /dev/null @@ -1,26 +0,0 @@ -ace.define("ace/snippets/drools",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "\n\ -snippet rule\n\ - rule \"${1?:rule_name}\"\n\ - when\n\ - ${2:// when...} \n\ - then\n\ - ${3:// then...}\n\ - end\n\ -\n\ -snippet query\n\ - query ${1?:query_name}\n\ - ${2:// find} \n\ - end\n\ - \n\ -snippet declare\n\ - declare ${1?:type_name}\n\ - ${2:// attributes} \n\ - end\n\ -\n\ -"; -exports.scope = "drools"; - -}); diff --git a/htdocs/includes/ace/snippets/eiffel.js b/htdocs/includes/ace/snippets/eiffel.js deleted file mode 100644 index 25672785c5a..00000000000 --- a/htdocs/includes/ace/snippets/eiffel.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/eiffel",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "eiffel"; - -}); diff --git a/htdocs/includes/ace/snippets/ejs.js b/htdocs/includes/ace/snippets/ejs.js deleted file mode 100644 index fd38fa09dce..00000000000 --- a/htdocs/includes/ace/snippets/ejs.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/ejs",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "ejs"; - -}); diff --git a/htdocs/includes/ace/snippets/elixir.js b/htdocs/includes/ace/snippets/elixir.js deleted file mode 100644 index d9326275222..00000000000 --- a/htdocs/includes/ace/snippets/elixir.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/elixir",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/elm.js b/htdocs/includes/ace/snippets/elm.js deleted file mode 100644 index a9d06b59bc5..00000000000 --- a/htdocs/includes/ace/snippets/elm.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/elm",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "elm"; - -}); diff --git a/htdocs/includes/ace/snippets/forth.js b/htdocs/includes/ace/snippets/forth.js deleted file mode 100644 index afb1f8a44ea..00000000000 --- a/htdocs/includes/ace/snippets/forth.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/forth",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "forth"; - -}); diff --git a/htdocs/includes/ace/snippets/fortran.js b/htdocs/includes/ace/snippets/fortran.js deleted file mode 100644 index b4605929bcb..00000000000 --- a/htdocs/includes/ace/snippets/fortran.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/fortran",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "fortran"; - -}); diff --git a/htdocs/includes/ace/snippets/ftl.js b/htdocs/includes/ace/snippets/ftl.js deleted file mode 100644 index 3b53ad417a6..00000000000 --- a/htdocs/includes/ace/snippets/ftl.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "ftl"; - -}); diff --git a/htdocs/includes/ace/snippets/gcode.js b/htdocs/includes/ace/snippets/gcode.js deleted file mode 100644 index 0ed4a102777..00000000000 --- a/htdocs/includes/ace/snippets/gcode.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "gcode"; - -}); diff --git a/htdocs/includes/ace/snippets/gherkin.js b/htdocs/includes/ace/snippets/gherkin.js deleted file mode 100644 index 2044647138d..00000000000 --- a/htdocs/includes/ace/snippets/gherkin.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "gherkin"; - -}); diff --git a/htdocs/includes/ace/snippets/gitignore.js b/htdocs/includes/ace/snippets/gitignore.js deleted file mode 100644 index 6da54aa5b2e..00000000000 --- a/htdocs/includes/ace/snippets/gitignore.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "gitignore"; - -}); diff --git a/htdocs/includes/ace/snippets/glsl.js b/htdocs/includes/ace/snippets/glsl.js deleted file mode 100644 index bb8e40d8460..00000000000 --- a/htdocs/includes/ace/snippets/glsl.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "glsl"; - -}); diff --git a/htdocs/includes/ace/snippets/gobstones.js b/htdocs/includes/ace/snippets/gobstones.js deleted file mode 100644 index 4e36e5319c1..00000000000 --- a/htdocs/includes/ace/snippets/gobstones.js +++ /dev/null @@ -1,41 +0,0 @@ -ace.define("ace/snippets/gobstones",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# Procedure\n\ -snippet proc\n\ - procedure ${1?:name}(${2:argument}) {\n\ - ${3:// body...}\n\ - }\n\ -\n\ -# Function\n\ -snippet fun\n\ - function ${1?:name}(${2:argument}) {\n\ - return ${3:// body...}\n\ - }\n\ -\n\ -# Repeat\n\ -snippet rep\n\ - repeat ${1?:times} {\n\ - ${2:// body...}\n\ - }\n\ -\n\ -# For\n\ -snippet for\n\ - foreach ${1?:e} in ${2?:list} {\n\ - ${3:// body...} \n\ - }\n\ -\n\ -# If\n\ -snippet if\n\ - if (${1?:condition}) {\n\ - ${3:// body...} \n\ - }\n\ -\n\ -# While\n\ - while (${1?:condition}) {\n\ - ${2:// body...} \n\ - }\n\ -"; -exports.scope = "gobstones"; - -}); diff --git a/htdocs/includes/ace/snippets/golang.js b/htdocs/includes/ace/snippets/golang.js deleted file mode 100644 index 0a2411d5373..00000000000 --- a/htdocs/includes/ace/snippets/golang.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/golang",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "golang"; - -}); diff --git a/htdocs/includes/ace/snippets/groovy.js b/htdocs/includes/ace/snippets/groovy.js deleted file mode 100644 index ddeab2c8175..00000000000 --- a/htdocs/includes/ace/snippets/groovy.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "groovy"; - -}); diff --git a/htdocs/includes/ace/snippets/handlebars.js b/htdocs/includes/ace/snippets/handlebars.js deleted file mode 100644 index 1764b754cc9..00000000000 --- a/htdocs/includes/ace/snippets/handlebars.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "handlebars"; - -}); diff --git a/htdocs/includes/ace/snippets/haskell_cabal.js b/htdocs/includes/ace/snippets/haskell_cabal.js deleted file mode 100644 index 56d6e875e0e..00000000000 --- a/htdocs/includes/ace/snippets/haskell_cabal.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/haskell_cabal",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "haskell_cabal"; - -}); diff --git a/htdocs/includes/ace/snippets/haxe.js b/htdocs/includes/ace/snippets/haxe.js deleted file mode 100644 index 3769547132a..00000000000 --- a/htdocs/includes/ace/snippets/haxe.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "haxe"; - -}); diff --git a/htdocs/includes/ace/snippets/hjson.js b/htdocs/includes/ace/snippets/hjson.js deleted file mode 100644 index b31e556360d..00000000000 --- a/htdocs/includes/ace/snippets/hjson.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/hjson",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/html_elixir.js b/htdocs/includes/ace/snippets/html_elixir.js deleted file mode 100644 index 66d9eb384de..00000000000 --- a/htdocs/includes/ace/snippets/html_elixir.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/html_elixir",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "html_elixir"; - -}); diff --git a/htdocs/includes/ace/snippets/html_ruby.js b/htdocs/includes/ace/snippets/html_ruby.js deleted file mode 100644 index 83676f79234..00000000000 --- a/htdocs/includes/ace/snippets/html_ruby.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "html_ruby"; - -}); diff --git a/htdocs/includes/ace/snippets/ini.js b/htdocs/includes/ace/snippets/ini.js deleted file mode 100644 index ad9bf52ff6d..00000000000 --- a/htdocs/includes/ace/snippets/ini.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/ini",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "ini"; - -}); diff --git a/htdocs/includes/ace/snippets/jack.js b/htdocs/includes/ace/snippets/jack.js deleted file mode 100644 index eca7f2937b8..00000000000 --- a/htdocs/includes/ace/snippets/jack.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/jack",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "jack"; - -}); diff --git a/htdocs/includes/ace/snippets/jade.js b/htdocs/includes/ace/snippets/jade.js deleted file mode 100644 index f516d0c040a..00000000000 --- a/htdocs/includes/ace/snippets/jade.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/jade",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "jade"; - -}); diff --git a/htdocs/includes/ace/snippets/json.js b/htdocs/includes/ace/snippets/json.js deleted file mode 100644 index cc02e651367..00000000000 --- a/htdocs/includes/ace/snippets/json.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/json",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "json"; - -}); diff --git a/htdocs/includes/ace/snippets/jsx.js b/htdocs/includes/ace/snippets/jsx.js deleted file mode 100644 index 9f39a9431d5..00000000000 --- a/htdocs/includes/ace/snippets/jsx.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "jsx"; - -}); diff --git a/htdocs/includes/ace/snippets/julia.js b/htdocs/includes/ace/snippets/julia.js deleted file mode 100644 index e81370f75da..00000000000 --- a/htdocs/includes/ace/snippets/julia.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/julia",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "julia"; - -}); diff --git a/htdocs/includes/ace/snippets/kotlin.js b/htdocs/includes/ace/snippets/kotlin.js deleted file mode 100644 index d78bd46332b..00000000000 --- a/htdocs/includes/ace/snippets/kotlin.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/kotlin",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/latex.js b/htdocs/includes/ace/snippets/latex.js deleted file mode 100644 index e6fe7612498..00000000000 --- a/htdocs/includes/ace/snippets/latex.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/latex",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "latex"; - -}); diff --git a/htdocs/includes/ace/snippets/lean.js b/htdocs/includes/ace/snippets/lean.js deleted file mode 100644 index cff1657099a..00000000000 --- a/htdocs/includes/ace/snippets/lean.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/lean",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "lean"; - -}); diff --git a/htdocs/includes/ace/snippets/less.js b/htdocs/includes/ace/snippets/less.js deleted file mode 100644 index 148aa0cd3d5..00000000000 --- a/htdocs/includes/ace/snippets/less.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/less",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "less"; - -}); diff --git a/htdocs/includes/ace/snippets/liquid.js b/htdocs/includes/ace/snippets/liquid.js deleted file mode 100644 index c7f708dc628..00000000000 --- a/htdocs/includes/ace/snippets/liquid.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "liquid"; - -}); diff --git a/htdocs/includes/ace/snippets/lisp.js b/htdocs/includes/ace/snippets/lisp.js deleted file mode 100644 index 410b807fd3a..00000000000 --- a/htdocs/includes/ace/snippets/lisp.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "lisp"; - -}); diff --git a/htdocs/includes/ace/snippets/live_script.js b/htdocs/includes/ace/snippets/live_script.js deleted file mode 100644 index 80a9da89393..00000000000 --- a/htdocs/includes/ace/snippets/live_script.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/live_script",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/livescript.js b/htdocs/includes/ace/snippets/livescript.js deleted file mode 100644 index 37ea1c14af4..00000000000 --- a/htdocs/includes/ace/snippets/livescript.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "livescript"; - -}); diff --git a/htdocs/includes/ace/snippets/logiql.js b/htdocs/includes/ace/snippets/logiql.js deleted file mode 100644 index 77943f3a99d..00000000000 --- a/htdocs/includes/ace/snippets/logiql.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "logiql"; - -}); diff --git a/htdocs/includes/ace/snippets/luapage.js b/htdocs/includes/ace/snippets/luapage.js deleted file mode 100644 index f1bcf0919d0..00000000000 --- a/htdocs/includes/ace/snippets/luapage.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "luapage"; - -}); diff --git a/htdocs/includes/ace/snippets/lucene.js b/htdocs/includes/ace/snippets/lucene.js deleted file mode 100644 index 8795919e42e..00000000000 --- a/htdocs/includes/ace/snippets/lucene.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "lucene"; - -}); diff --git a/htdocs/includes/ace/snippets/makefile.js b/htdocs/includes/ace/snippets/makefile.js deleted file mode 100644 index 6c02e0d657a..00000000000 --- a/htdocs/includes/ace/snippets/makefile.js +++ /dev/null @@ -1,11 +0,0 @@ -ace.define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet ifeq\n\ - ifeq (${1:cond0},${2:cond1})\n\ - ${3:code}\n\ - endif\n\ -"; -exports.scope = "makefile"; - -}); diff --git a/htdocs/includes/ace/snippets/mask.js b/htdocs/includes/ace/snippets/mask.js deleted file mode 100644 index 2811ad2a090..00000000000 --- a/htdocs/includes/ace/snippets/mask.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/mask",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "mask"; - -}); diff --git a/htdocs/includes/ace/snippets/matlab.js b/htdocs/includes/ace/snippets/matlab.js deleted file mode 100644 index ce298c3f519..00000000000 --- a/htdocs/includes/ace/snippets/matlab.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "matlab"; - -}); diff --git a/htdocs/includes/ace/snippets/maze.js b/htdocs/includes/ace/snippets/maze.js deleted file mode 100644 index c12d5668d27..00000000000 --- a/htdocs/includes/ace/snippets/maze.js +++ /dev/null @@ -1,16 +0,0 @@ -ace.define("ace/snippets/maze",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet >\n\ -description assignment\n\ -scope maze\n\ - -> ${1}= ${2}\n\ -\n\ -snippet >\n\ -description if\n\ -scope maze\n\ - -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n\ -"; -exports.scope = "maze"; - -}); diff --git a/htdocs/includes/ace/snippets/mel.js b/htdocs/includes/ace/snippets/mel.js deleted file mode 100644 index 537cc25b1d8..00000000000 --- a/htdocs/includes/ace/snippets/mel.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/mel",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "mel"; - -}); diff --git a/htdocs/includes/ace/snippets/mips_assembler.js b/htdocs/includes/ace/snippets/mips_assembler.js deleted file mode 100644 index 08fbb817226..00000000000 --- a/htdocs/includes/ace/snippets/mips_assembler.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/mips_assembler",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "mips_assembler"; - -}); diff --git a/htdocs/includes/ace/snippets/mipsassembler.js b/htdocs/includes/ace/snippets/mipsassembler.js deleted file mode 100644 index 3e997aa8bde..00000000000 --- a/htdocs/includes/ace/snippets/mipsassembler.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/mipsassembler",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/mushcode.js b/htdocs/includes/ace/snippets/mushcode.js deleted file mode 100644 index 1f0fe24e328..00000000000 --- a/htdocs/includes/ace/snippets/mushcode.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "mushcode"; - -}); diff --git a/htdocs/includes/ace/snippets/mysql.js b/htdocs/includes/ace/snippets/mysql.js deleted file mode 100644 index bfb3a42c7ba..00000000000 --- a/htdocs/includes/ace/snippets/mysql.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "mysql"; - -}); diff --git a/htdocs/includes/ace/snippets/nix.js b/htdocs/includes/ace/snippets/nix.js deleted file mode 100644 index 4fb6e7043c2..00000000000 --- a/htdocs/includes/ace/snippets/nix.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/nix",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "nix"; - -}); diff --git a/htdocs/includes/ace/snippets/nsis.js b/htdocs/includes/ace/snippets/nsis.js deleted file mode 100644 index 81b5726da2f..00000000000 --- a/htdocs/includes/ace/snippets/nsis.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/nsis",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/objectivec.js b/htdocs/includes/ace/snippets/objectivec.js deleted file mode 100644 index f93e6ae99a1..00000000000 --- a/htdocs/includes/ace/snippets/objectivec.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "objectivec"; - -}); diff --git a/htdocs/includes/ace/snippets/ocaml.js b/htdocs/includes/ace/snippets/ocaml.js deleted file mode 100644 index 06e0940dbe6..00000000000 --- a/htdocs/includes/ace/snippets/ocaml.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "ocaml"; - -}); diff --git a/htdocs/includes/ace/snippets/pascal.js b/htdocs/includes/ace/snippets/pascal.js deleted file mode 100644 index 70aa2ee781e..00000000000 --- a/htdocs/includes/ace/snippets/pascal.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/pascal",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "pascal"; - -}); diff --git a/htdocs/includes/ace/snippets/pgsql.js b/htdocs/includes/ace/snippets/pgsql.js deleted file mode 100644 index 5914fe1db90..00000000000 --- a/htdocs/includes/ace/snippets/pgsql.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/pgsql",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "pgsql"; - -}); diff --git a/htdocs/includes/ace/snippets/pig.js b/htdocs/includes/ace/snippets/pig.js deleted file mode 100644 index 479a03bc937..00000000000 --- a/htdocs/includes/ace/snippets/pig.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/pig",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "pig"; - -}); diff --git a/htdocs/includes/ace/snippets/plain_text.js b/htdocs/includes/ace/snippets/plain_text.js deleted file mode 100644 index 24223a66255..00000000000 --- a/htdocs/includes/ace/snippets/plain_text.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/plain_text",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "plain_text"; - -}); diff --git a/htdocs/includes/ace/snippets/powershell.js b/htdocs/includes/ace/snippets/powershell.js deleted file mode 100644 index a8e7310a15a..00000000000 --- a/htdocs/includes/ace/snippets/powershell.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/powershell",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "powershell"; - -}); diff --git a/htdocs/includes/ace/snippets/praat.js b/htdocs/includes/ace/snippets/praat.js deleted file mode 100644 index dcf6826774c..00000000000 --- a/htdocs/includes/ace/snippets/praat.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/praat",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "praat"; - -}); diff --git a/htdocs/includes/ace/snippets/prolog.js b/htdocs/includes/ace/snippets/prolog.js deleted file mode 100644 index 2d63cb83aa7..00000000000 --- a/htdocs/includes/ace/snippets/prolog.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/prolog",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "prolog"; - -}); diff --git a/htdocs/includes/ace/snippets/properties.js b/htdocs/includes/ace/snippets/properties.js deleted file mode 100644 index 44c1ada78e8..00000000000 --- a/htdocs/includes/ace/snippets/properties.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/properties",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "properties"; - -}); diff --git a/htdocs/includes/ace/snippets/protobuf.js b/htdocs/includes/ace/snippets/protobuf.js deleted file mode 100644 index d00d57afd1d..00000000000 --- a/htdocs/includes/ace/snippets/protobuf.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/protobuf",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = ""; -exports.scope = "protobuf"; - -}); diff --git a/htdocs/includes/ace/snippets/razor.js b/htdocs/includes/ace/snippets/razor.js deleted file mode 100644 index 78fdf8c3eca..00000000000 --- a/htdocs/includes/ace/snippets/razor.js +++ /dev/null @@ -1,10 +0,0 @@ -ace.define("ace/snippets/razor",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "snippet if\n\ -(${1} == ${2}) {\n\ - ${3}\n\ -}"; -exports.scope = "razor"; - -}); diff --git a/htdocs/includes/ace/snippets/rdoc.js b/htdocs/includes/ace/snippets/rdoc.js deleted file mode 100644 index 956de47aa29..00000000000 --- a/htdocs/includes/ace/snippets/rdoc.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/rdoc",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "rdoc"; - -}); diff --git a/htdocs/includes/ace/snippets/rhtml.js b/htdocs/includes/ace/snippets/rhtml.js deleted file mode 100644 index e62ce87f741..00000000000 --- a/htdocs/includes/ace/snippets/rhtml.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/rhtml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "rhtml"; - -}); diff --git a/htdocs/includes/ace/snippets/rust.js b/htdocs/includes/ace/snippets/rust.js deleted file mode 100644 index 0411c63e152..00000000000 --- a/htdocs/includes/ace/snippets/rust.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/rust",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "rust"; - -}); diff --git a/htdocs/includes/ace/snippets/sass.js b/htdocs/includes/ace/snippets/sass.js deleted file mode 100644 index b9adc9d8c36..00000000000 --- a/htdocs/includes/ace/snippets/sass.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/sass",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "sass"; - -}); diff --git a/htdocs/includes/ace/snippets/scad.js b/htdocs/includes/ace/snippets/scad.js deleted file mode 100644 index 998a98ac67d..00000000000 --- a/htdocs/includes/ace/snippets/scad.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/scad",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "scad"; - -}); diff --git a/htdocs/includes/ace/snippets/scala.js b/htdocs/includes/ace/snippets/scala.js deleted file mode 100644 index 4051d988833..00000000000 --- a/htdocs/includes/ace/snippets/scala.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/scala",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "scala"; - -}); diff --git a/htdocs/includes/ace/snippets/scheme.js b/htdocs/includes/ace/snippets/scheme.js deleted file mode 100644 index 202d0741506..00000000000 --- a/htdocs/includes/ace/snippets/scheme.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/scheme",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "scheme"; - -}); diff --git a/htdocs/includes/ace/snippets/scss.js b/htdocs/includes/ace/snippets/scss.js deleted file mode 100644 index fbd98f74cae..00000000000 --- a/htdocs/includes/ace/snippets/scss.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/scss",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "scss"; - -}); diff --git a/htdocs/includes/ace/snippets/sjs.js b/htdocs/includes/ace/snippets/sjs.js deleted file mode 100644 index cf39a34ecd6..00000000000 --- a/htdocs/includes/ace/snippets/sjs.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "sjs"; - -}); diff --git a/htdocs/includes/ace/snippets/smarty.js b/htdocs/includes/ace/snippets/smarty.js deleted file mode 100644 index 47319a25992..00000000000 --- a/htdocs/includes/ace/snippets/smarty.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "smarty"; - -}); diff --git a/htdocs/includes/ace/snippets/snippets.js b/htdocs/includes/ace/snippets/snippets.js deleted file mode 100644 index b81605ccdfe..00000000000 --- a/htdocs/includes/ace/snippets/snippets.js +++ /dev/null @@ -1,16 +0,0 @@ -ace.define("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText = "# snippets for making snippets :)\n\ -snippet snip\n\ - snippet ${1:trigger}\n\ - ${2}\n\ -snippet msnip\n\ - snippet ${1:trigger} ${2:description}\n\ - ${3}\n\ -snippet v\n\ - {VISUAL}\n\ -"; -exports.scope = "snippets"; - -}); diff --git a/htdocs/includes/ace/snippets/soy_template.js b/htdocs/includes/ace/snippets/soy_template.js deleted file mode 100644 index 908f5fdf65e..00000000000 --- a/htdocs/includes/ace/snippets/soy_template.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "soy_template"; - -}); diff --git a/htdocs/includes/ace/snippets/space.js b/htdocs/includes/ace/snippets/space.js deleted file mode 100644 index 302b84e00be..00000000000 --- a/htdocs/includes/ace/snippets/space.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/space",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "space"; - -}); diff --git a/htdocs/includes/ace/snippets/sparql.js b/htdocs/includes/ace/snippets/sparql.js deleted file mode 100644 index 2c87bbfe950..00000000000 --- a/htdocs/includes/ace/snippets/sparql.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/sparql",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/stylus.js b/htdocs/includes/ace/snippets/stylus.js deleted file mode 100644 index 5f700bae337..00000000000 --- a/htdocs/includes/ace/snippets/stylus.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "stylus"; - -}); diff --git a/htdocs/includes/ace/snippets/svg.js b/htdocs/includes/ace/snippets/svg.js deleted file mode 100644 index 69a3408ec96..00000000000 --- a/htdocs/includes/ace/snippets/svg.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/svg",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "svg"; - -}); diff --git a/htdocs/includes/ace/snippets/swift.js b/htdocs/includes/ace/snippets/swift.js deleted file mode 100644 index 55226ba0cc7..00000000000 --- a/htdocs/includes/ace/snippets/swift.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/swift",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "swift"; - -}); diff --git a/htdocs/includes/ace/snippets/swig.js b/htdocs/includes/ace/snippets/swig.js deleted file mode 100644 index 1eee033478a..00000000000 --- a/htdocs/includes/ace/snippets/swig.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/swig",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "swig"; - -}); diff --git a/htdocs/includes/ace/snippets/text.js b/htdocs/includes/ace/snippets/text.js deleted file mode 100644 index 57b897bf67d..00000000000 --- a/htdocs/includes/ace/snippets/text.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/text",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "text"; - -}); diff --git a/htdocs/includes/ace/snippets/toml.js b/htdocs/includes/ace/snippets/toml.js deleted file mode 100644 index 0c1a857bb1a..00000000000 --- a/htdocs/includes/ace/snippets/toml.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/toml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "toml"; - -}); diff --git a/htdocs/includes/ace/snippets/tsx.js b/htdocs/includes/ace/snippets/tsx.js deleted file mode 100644 index 7946297ead3..00000000000 --- a/htdocs/includes/ace/snippets/tsx.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/tsx",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "tsx"; - -}); diff --git a/htdocs/includes/ace/snippets/turtle.js b/htdocs/includes/ace/snippets/turtle.js deleted file mode 100644 index 5e104b22f22..00000000000 --- a/htdocs/includes/ace/snippets/turtle.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/turtle",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = ""; - -}); diff --git a/htdocs/includes/ace/snippets/twig.js b/htdocs/includes/ace/snippets/twig.js deleted file mode 100644 index ccc6073cfda..00000000000 --- a/htdocs/includes/ace/snippets/twig.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/twig",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "twig"; - -}); diff --git a/htdocs/includes/ace/snippets/typescript.js b/htdocs/includes/ace/snippets/typescript.js deleted file mode 100644 index 5f6217d01b1..00000000000 --- a/htdocs/includes/ace/snippets/typescript.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "typescript"; - -}); diff --git a/htdocs/includes/ace/snippets/vbscript.js b/htdocs/includes/ace/snippets/vbscript.js deleted file mode 100644 index 38ca68fb2c4..00000000000 --- a/htdocs/includes/ace/snippets/vbscript.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "vbscript"; - -}); diff --git a/htdocs/includes/ace/snippets/verilog.js b/htdocs/includes/ace/snippets/verilog.js deleted file mode 100644 index 8103ff6f262..00000000000 --- a/htdocs/includes/ace/snippets/verilog.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "verilog"; - -}); diff --git a/htdocs/includes/ace/snippets/vhdl.js b/htdocs/includes/ace/snippets/vhdl.js deleted file mode 100644 index 10d8ca09ce8..00000000000 --- a/htdocs/includes/ace/snippets/vhdl.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "vhdl"; - -}); diff --git a/htdocs/includes/ace/snippets/xml.js b/htdocs/includes/ace/snippets/xml.js deleted file mode 100644 index ee4b688a7c3..00000000000 --- a/htdocs/includes/ace/snippets/xml.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/xml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "xml"; - -}); diff --git a/htdocs/includes/ace/snippets/yaml.js b/htdocs/includes/ace/snippets/yaml.js deleted file mode 100644 index 1adceabee15..00000000000 --- a/htdocs/includes/ace/snippets/yaml.js +++ /dev/null @@ -1,7 +0,0 @@ -ace.define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.snippetText =undefined; -exports.scope = "yaml"; - -}); diff --git a/htdocs/includes/ace/ace.js b/htdocs/includes/ace/src/ace.js similarity index 79% rename from htdocs/includes/ace/ace.js rename to htdocs/includes/ace/src/ace.js index d93cddc1fd5..378ba7cf463 100644 --- a/htdocs/includes/ace/ace.js +++ b/htdocs/includes/ace/src/ace.js @@ -36,7 +36,7 @@ (function() { -var ACE_NAMESPACE = "ace"; +var ACE_NAMESPACE = ""; var global = (function() { return this; })(); if (!global && typeof window != "undefined") global = window; // strict mode @@ -173,7 +173,7 @@ exportAce(ACE_NAMESPACE); })(); -ace.define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) { +define("ace/lib/regexp",["require","exports","module"], function(require, exports, module) { "use strict"; var real = { @@ -246,7 +246,7 @@ ace.define("ace/lib/regexp",["require","exports","module"], function(require, ex }); -ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { +define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { function Empty() {} @@ -943,24 +943,131 @@ var toObject = function (o) { }); -ace.define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) { +define("ace/lib/fixoldbrowsers",["require","exports","module","ace/lib/regexp","ace/lib/es5-shim"], function(require, exports, module) { "use strict"; require("./regexp"); require("./es5-shim"); +if (typeof Element != "undefined" && !Element.prototype.remove) { + Object.defineProperty(Element.prototype, "remove", { + enumerable: false, + writable: true, + configurable: true, + value: function() { this.parentNode && this.parentNode.removeChild(this); } + }); +} + }); -ace.define("ace/lib/dom",["require","exports","module"], function(require, exports, module) { +define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) { +"use strict"; +exports.OS = { + LINUX: "LINUX", + MAC: "MAC", + WINDOWS: "WINDOWS" +}; +exports.getOS = function() { + if (exports.isMac) { + return exports.OS.MAC; + } else if (exports.isLinux) { + return exports.OS.LINUX; + } else { + return exports.OS.WINDOWS; + } +}; +var _navigator = typeof navigator == "object" ? navigator : {}; + +var os = (/mac|win|linux/i.exec(_navigator.platform) || ["other"])[0].toLowerCase(); +var ua = _navigator.userAgent || ""; +var appName = _navigator.appName || ""; +exports.isWin = (os == "win"); +exports.isMac = (os == "mac"); +exports.isLinux = (os == "linux"); +exports.isIE = + (appName == "Microsoft Internet Explorer" || appName.indexOf("MSAppHost") >= 0) + ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) + : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie + +exports.isOldIE = exports.isIE && exports.isIE < 9; +exports.isGecko = exports.isMozilla = ua.match(/ Gecko\/\d+/); +exports.isOpera = typeof opera == "object" && Object.prototype.toString.call(window.opera) == "[object Opera]"; +exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; + +exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; + +exports.isEdge = parseFloat(ua.split(" Edge/")[1]) || undefined; + +exports.isAIR = ua.indexOf("AdobeAIR") >= 0; + +exports.isAndroid = ua.indexOf("Android") >= 0; + +exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; + +exports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream; + +if (exports.isIOS) exports.isMac = true; + +exports.isMobile = exports.isIOS || exports.isAndroid; + +}); + +define("ace/lib/dom",["require","exports","module","ace/lib/useragent"], function(require, exports, module) { "use strict"; +var useragent = require("./useragent"); var XHTML_NS = "http://www.w3.org/1999/xhtml"; +exports.buildDom = function buildDom(arr, parent, refs) { + if (typeof arr == "string" && arr) { + var txt = document.createTextNode(arr); + if (parent) + parent.appendChild(txt); + return txt; + } + + if (!Array.isArray(arr)) + return arr; + if (typeof arr[0] != "string" || !arr[0]) { + var els = []; + for (var i = 0; i < arr.length; i++) { + var ch = buildDom(arr[i], parent, refs); + ch && els.push(ch); + } + return els; + } + + var el = document.createElement(arr[0]); + var options = arr[1]; + var childIndex = 1; + if (options && typeof options == "object" && !Array.isArray(options)) + childIndex = 2; + for (var i = childIndex; i < arr.length; i++) + buildDom(arr[i], el, refs); + if (childIndex == 2) { + Object.keys(options).forEach(function(n) { + var val = options[n]; + if (n === "class") { + el.className = Array.isArray(val) ? val.join(" ") : val; + } else if (typeof val == "function" || n == "value") { + el[n] = val; + } else if (n === "ref") { + if (refs) refs[val] = el; + } else if (val != null) { + el.setAttribute(n, val); + } + }); + } + if (parent) + parent.appendChild(el); + return el; +}; + exports.getDocumentHead = function(doc) { if (!doc) doc = document; return doc.head || doc.getElementsByTagName("head")[0] || doc.documentElement; -} +}; exports.createElement = function(tag, ns) { return document.createElementNS ? @@ -968,6 +1075,20 @@ exports.createElement = function(tag, ns) { document.createElement(tag); }; +exports.removeChildren = function(element) { + element.innerHTML = ""; +}; + +exports.createTextNode = function(textContent, element) { + var doc = element ? element.ownerDocument : document; + return doc.createTextNode(textContent); +}; + +exports.createFragment = function(element) { + var doc = element ? element.ownerDocument : document; + return doc.createDocumentFragment(); +}; + exports.hasCssClass = function(el, name) { var classes = (el.className + "").split(/\s+/g); return classes.indexOf(name) !== -1; @@ -1016,71 +1137,43 @@ exports.setCssClass = function(node, className, include) { exports.hasCssString = function(id, doc) { var index = 0, sheets; doc = doc || document; - - if (doc.createStyleSheet && (sheets = doc.styleSheets)) { + if ((sheets = doc.querySelectorAll("style"))) { while (index < sheets.length) - if (sheets[index++].owningElement.id === id) return true; - } else if ((sheets = doc.getElementsByTagName("style"))) { - while (index < sheets.length) - if (sheets[index++].id === id) return true; + if (sheets[index++].id === id) + return true; } - - return false; }; -exports.importCssString = function importCssString(cssText, id, doc) { - doc = doc || document; - if (id && exports.hasCssString(id, doc)) - return null; +exports.importCssString = function importCssString(cssText, id, target) { + var container = target; + if (!target || !target.getRootNode) { + container = document; + } else { + container = target.getRootNode(); + if (!container || container == target) + container = document; + } - var style; + var doc = container.ownerDocument || container; + if (id && exports.hasCssString(id, container)) + return null; if (id) cssText += "\n/*# sourceURL=ace/css/" + id + " */"; - if (doc.createStyleSheet) { - style = doc.createStyleSheet(); - style.cssText = cssText; - if (id) - style.owningElement.id = id; - } else { - style = exports.createElement("style"); - style.appendChild(doc.createTextNode(cssText)); - if (id) - style.id = id; + var style = exports.createElement("style"); + style.appendChild(doc.createTextNode(cssText)); + if (id) + style.id = id; - exports.getDocumentHead(doc).appendChild(style); - } + if (container == doc) + container = exports.getDocumentHead(doc); + container.insertBefore(style, container.firstChild); }; exports.importCssStylsheet = function(uri, doc) { - if (doc.createStyleSheet) { - doc.createStyleSheet(uri); - } else { - var link = exports.createElement('link'); - link.rel = 'stylesheet'; - link.href = uri; - - exports.getDocumentHead(doc).appendChild(link); - } + exports.buildDom(["link", {rel: "stylesheet", href: uri}], exports.getDocumentHead(doc)); }; - -exports.getInnerWidth = function(element) { - return ( - parseInt(exports.computedStyle(element, "paddingLeft"), 10) + - parseInt(exports.computedStyle(element, "paddingRight"), 10) + - element.clientWidth - ); -}; - -exports.getInnerHeight = function(element) { - return ( - parseInt(exports.computedStyle(element, "paddingTop"), 10) + - parseInt(exports.computedStyle(element, "paddingBottom"), 10) + - element.clientHeight - ); -}; - exports.scrollbarWidth = function(document) { var inner = exports.createElement("ace_inner"); inner.style.width = "100%"; @@ -1120,73 +1213,47 @@ exports.scrollbarWidth = function(document) { if (typeof document == "undefined") { exports.importCssString = function() {}; - return; } -if (window.pageYOffset !== undefined) { - exports.getPageScrollTop = function() { - return window.pageYOffset; - }; - - exports.getPageScrollLeft = function() { - return window.pageXOffset; - }; -} -else { - exports.getPageScrollTop = function() { - return document.body.scrollTop; - }; - - exports.getPageScrollLeft = function() { - return document.body.scrollLeft; - }; -} - -if (window.getComputedStyle) - exports.computedStyle = function(element, style) { - if (style) - return (window.getComputedStyle(element, "") || {})[style] || ""; - return window.getComputedStyle(element, "") || {}; - }; -else - exports.computedStyle = function(element, style) { - if (style) - return element.currentStyle[style]; - return element.currentStyle; - }; -exports.setInnerHtml = function(el, innerHtml) { - var element = el.cloneNode(false);//document.createElement("div"); - element.innerHTML = innerHtml; - el.parentNode.replaceChild(element, el); - return element; +exports.computedStyle = function(element, style) { + return window.getComputedStyle(element, "") || {}; }; -if ("textContent" in document.documentElement) { - exports.setInnerText = function(el, innerText) { - el.textContent = innerText; - }; - - exports.getInnerText = function(el) { - return el.textContent; - }; -} -else { - exports.setInnerText = function(el, innerText) { - el.innerText = innerText; - }; - - exports.getInnerText = function(el) { - return el.innerText; - }; -} - -exports.getParentWindow = function(document) { - return document.defaultView || document.parentWindow; +exports.setStyle = function(styles, property, value) { + if (styles[property] !== value) { + styles[property] = value; + } }; +exports.HAS_CSS_ANIMATION = false; +exports.HAS_CSS_TRANSFORMS = false; +exports.HI_DPI = useragent.isWin + ? typeof window !== "undefined" && window.devicePixelRatio >= 1.5 + : true; + +if (typeof document !== "undefined") { + var div = document.createElement("div"); + if (exports.HI_DPI && div.style.transform !== undefined) + exports.HAS_CSS_TRANSFORMS = true; + if (!useragent.isEdge && typeof div.style.animationName !== "undefined") + exports.HAS_CSS_ANIMATION = true; + div = null; +} + +if (exports.HAS_CSS_TRANSFORMS) { + exports.translate = function(element, tx, ty) { + element.style.transform = "translate(" + Math.round(tx) + "px, " + Math.round(ty) +"px)"; + }; +} else { + exports.translate = function(element, tx, ty) { + element.style.top = Math.round(ty) + "px"; + element.style.left = Math.round(tx) + "px"; + }; +} + }); -ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { @@ -1214,16 +1281,15 @@ exports.implement = function(proto, mixin) { }); -ace.define("ace/lib/keys",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop"], function(require, exports, module) { +define("ace/lib/keys",["require","exports","module","ace/lib/oop"], function(require, exports, module) { "use strict"; -require("./fixoldbrowsers"); - var oop = require("./oop"); var Keys = (function() { var ret = { MODIFIER_KEYS: { - 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' + 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta', + 91: 'MetaLeft', 92: 'MetaRight', 93: 'ContextMenu' }, KEY_MODS: { @@ -1329,56 +1395,7 @@ exports.keyCodeToString = function(keyCode) { }); -ace.define("ace/lib/useragent",["require","exports","module"], function(require, exports, module) { -"use strict"; -exports.OS = { - LINUX: "LINUX", - MAC: "MAC", - WINDOWS: "WINDOWS" -}; -exports.getOS = function() { - if (exports.isMac) { - return exports.OS.MAC; - } else if (exports.isLinux) { - return exports.OS.LINUX; - } else { - return exports.OS.WINDOWS; - } -}; -if (typeof navigator != "object") - return; - -var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); -var ua = navigator.userAgent; -exports.isWin = (os == "win"); -exports.isMac = (os == "mac"); -exports.isLinux = (os == "linux"); -exports.isIE = - (navigator.appName == "Microsoft Internet Explorer" || navigator.appName.indexOf("MSAppHost") >= 0) - ? parseFloat((ua.match(/(?:MSIE |Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]) - : parseFloat((ua.match(/(?:Trident\/[0-9]+[\.0-9]+;.*rv:)([0-9]+[\.0-9]+)/)||[])[1]); // for ie - -exports.isOldIE = exports.isIE && exports.isIE < 9; -exports.isGecko = exports.isMozilla = (window.Controllers || window.controllers) && window.navigator.product === "Gecko"; -exports.isOldGecko = exports.isGecko && parseInt((ua.match(/rv:(\d+)/)||[])[1], 10) < 4; -exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; -exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; - -exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; - -exports.isAIR = ua.indexOf("AdobeAIR") >= 0; - -exports.isIPad = ua.indexOf("iPad") >= 0; - -exports.isChromeOS = ua.indexOf(" CrOS ") >= 0; - -exports.isIOS = /iPad|iPhone|iPod/.test(ua) && !window.MSStream; - -if (exports.isIOS) exports.isMac = true; - -}); - -ace.define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { +define("ace/lib/event",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keys = require("./keys"); @@ -1457,29 +1474,6 @@ exports.capture = function(el, eventHandler, releaseCaptureHandler) { return onMouseUp; }; -exports.addTouchMoveListener = function (el, callback) { - if ("ontouchmove" in el) { - var startx, starty; - exports.addListener(el, "touchstart", function (e) { - var touchObj = e.changedTouches[0]; - startx = touchObj.clientX; - starty = touchObj.clientY; - }); - exports.addListener(el, "touchmove", function (e) { - var factor = 1, - touchObj = e.changedTouches[0]; - - e.wheelX = -(touchObj.clientX - startx) / factor; - e.wheelY = -(touchObj.clientY - starty) / factor; - - startx = touchObj.clientX; - starty = touchObj.clientY; - - callback(e); - }); - } -}; - exports.addMouseWheelListener = function(el, callback) { if ("onmousewheel" in el) { exports.addListener(el, "mousewheel", function(e) { @@ -1549,7 +1543,7 @@ exports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, c clicks = 1; if (timer) clearTimeout(timer); - timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); + timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600); if (clicks == 1) { startX = e.clientX; @@ -1570,7 +1564,7 @@ exports.addMultiMouseDownListener = function(elements, timeouts, eventHandler, c clicks = 2; if (timer) clearTimeout(timer); - timer = setTimeout(function() {timer = null}, timeouts[clicks - 1] || 600); + timer = setTimeout(function() {timer = null;}, timeouts[clicks - 1] || 600); eventHandler[callbackName]("mousedown", e); eventHandler[callbackName](eventNames[clicks], e); } @@ -1623,9 +1617,6 @@ function normalizeCommandKeys(callback, e, keyCode) { if (keyCode in keys.MODIFIER_KEYS) { keyCode = -1; } - if (hashId & 8 && (keyCode >= 91 && keyCode <= 93)) { - keyCode = -1; - } if (!hashId && keyCode === 13) { var location = "location" in e ? e.location : e.keyLocation; @@ -1696,18 +1687,42 @@ if (typeof window == "object" && window.postMessage && !useragent.isOldIE) { var postMessageId = 1; exports.nextTick = function(callback, win) { win = win || window; - var messageName = "zero-timeout-message-" + postMessageId; - exports.addListener(win, "message", function listener(e) { + var messageName = "zero-timeout-message-" + (postMessageId++); + + var listener = function(e) { if (e.data == messageName) { exports.stopPropagation(e); exports.removeListener(win, "message", listener); callback(); } - }); + }; + + exports.addListener(win, "message", listener); win.postMessage(messageName, "*"); }; } +exports.$idleBlocked = false; +exports.onIdle = function(cb, timeout) { + return setTimeout(function handler() { + if (!exports.$idleBlocked) { + cb(); + } else { + setTimeout(handler, 100); + } + }, timeout); +}; + +exports.$idleBlockId = null; +exports.blockIdle = function(delay) { + if (exports.$idleBlockId) + clearTimeout(exports.$idleBlockId); + + exports.$idleBlocked = true; + exports.$idleBlockId = setTimeout(function() { + exports.$idleBlocked = false; + }, delay || 100); +}; exports.nextFrame = typeof window == "object" && (window.requestAnimationFrame || window.mozRequestAnimationFrame @@ -1723,2845 +1738,7 @@ else }; }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.last = function(a) { - return a[a.length - 1]; -}; - -exports.stringReverse = function(string) { - return string.split("").reverse().join(""); -}; - -exports.stringRepeat = function (string, count) { - var result = ''; - while (count > 0) { - if (count & 1) - result += string; - - if (count >>= 1) - string += string; - } - return result; -}; - -var trimBeginRegexp = /^\s\s*/; -var trimEndRegexp = /\s\s*$/; - -exports.stringTrimLeft = function (string) { - return string.replace(trimBeginRegexp, ''); -}; - -exports.stringTrimRight = function (string) { - return string.replace(trimEndRegexp, ''); -}; - -exports.copyObject = function(obj) { - var copy = {}; - for (var key in obj) { - copy[key] = obj[key]; - } - return copy; -}; - -exports.copyArray = function(array){ - var copy = []; - for (var i=0, l=array.length; i PLACEHOLDER.length) - data = data.substr(9); - else if (data.substr(0, 4) == PLACEHOLDER.substr(0, 4)) - data = data.substr(4, data.length - PLACEHOLDER.length + 1); - else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0)) - data = data.slice(0, -1); - if (data == PLACEHOLDER.charAt(0)) { - } else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0)) - data = data.slice(0, -1); - - if (data) - host.onTextInput(data); - } - if (copied) { - copied = false; - } - if (afterContextMenu) - afterContextMenu = false; - }; - var onInput = function(e) { - if (inComposition) - return; - var data = text.value; - sendText(data); - resetValue(); - }; - - var handleClipboardData = function(e, data, forceIEMime) { - var clipboardData = e.clipboardData || window.clipboardData; - if (!clipboardData || BROKEN_SETDATA) - return; - var mime = USE_IE_MIME_TYPE || forceIEMime ? "Text" : "text/plain"; - try { - if (data) { - return clipboardData.setData(mime, data) !== false; - } else { - return clipboardData.getData(mime); - } - } catch(e) { - if (!forceIEMime) - return handleClipboardData(e, data, true); - } - }; - - var doCopy = function(e, isCut) { - var data = host.getCopyText(); - if (!data) - return event.preventDefault(e); - - if (handleClipboardData(e, data)) { - if (useragent.isIOS) { - cut = isCut; - text.value = "\n aa" + data + "a a\n"; - text.setSelectionRange(4, 4 + data.length); - copied = { - value: data - }; - } - isCut ? host.onCut() : host.onCopy(); - if (!useragent.isIOS) event.preventDefault(e); - } else { - copied = true; - text.value = data; - text.select(); - setTimeout(function(){ - copied = false; - resetValue(); - resetSelection(); - isCut ? host.onCut() : host.onCopy(); - }); - } - }; - - var onCut = function(e) { - doCopy(e, true); - }; - - var onCopy = function(e) { - doCopy(e, false); - }; - - var onPaste = function(e) { - var data = handleClipboardData(e); - if (typeof data == "string") { - if (data) - host.onPaste(data, e); - if (useragent.isIE) - setTimeout(resetSelection); - event.preventDefault(e); - } - else { - text.value = ""; - pasted = true; - } - }; - - event.addCommandKeyListener(text, host.onCommandKey.bind(host)); - - event.addListener(text, "select", onSelect); - - event.addListener(text, "input", onInput); - - event.addListener(text, "cut", onCut); - event.addListener(text, "copy", onCopy); - event.addListener(text, "paste", onPaste); - var onCompositionStart = function(e) { - if (inComposition || !host.onCompositionStart || host.$readOnly) - return; - inComposition = {}; - inComposition.canUndo = host.session.$undoManager; - host.onCompositionStart(); - setTimeout(onCompositionUpdate, 0); - host.on("mousedown", onCompositionEnd); - if (inComposition.canUndo && !host.selection.isEmpty()) { - host.insert(""); - host.session.markUndoGroup(); - host.selection.clearSelection(); - } - host.session.markUndoGroup(); - }; - - var onCompositionUpdate = function() { - if (!inComposition || !host.onCompositionUpdate || host.$readOnly) - return; - var val = text.value.replace(/\x01/g, ""); - if (inComposition.lastValue === val) return; - - host.onCompositionUpdate(val); - if (inComposition.lastValue) - host.undo(); - if (inComposition.canUndo) - inComposition.lastValue = val; - if (inComposition.lastValue) { - var r = host.selection.getRange(); - host.insert(inComposition.lastValue); - host.session.markUndoGroup(); - inComposition.range = host.selection.getRange(); - host.selection.setRange(r); - host.selection.clearSelection(); - } - }; - - var onCompositionEnd = function(e) { - if (!host.onCompositionEnd || host.$readOnly) return; - var c = inComposition; - inComposition = false; - var timer = setTimeout(function() { - timer = null; - var str = text.value.replace(/\x01/g, ""); - if (inComposition) - return; - else if (str == c.lastValue) - resetValue(); - else if (!c.lastValue && str) { - resetValue(); - sendText(str); - } - }); - inputHandler = function compositionInputHandler(str) { - if (timer) - clearTimeout(timer); - str = str.replace(/\x01/g, ""); - if (str == c.lastValue) - return ""; - if (c.lastValue && timer) - host.undo(); - return str; - }; - host.onCompositionEnd(); - host.removeListener("mousedown", onCompositionEnd); - if (e.type == "compositionend" && c.range) { - host.selection.setRange(c.range); - } - var needsOnInput = - (!!useragent.isChrome && useragent.isChrome >= 53) || - (!!useragent.isWebKit && useragent.isWebKit >= 603); - - if (needsOnInput) { - onInput(); - } - }; - - - - var syncComposition = lang.delayedCall(onCompositionUpdate, 50); - - event.addListener(text, "compositionstart", onCompositionStart); - if (useragent.isGecko) { - event.addListener(text, "text", function(){syncComposition.schedule()}); - } else { - event.addListener(text, "keyup", function(){syncComposition.schedule()}); - event.addListener(text, "keydown", function(){syncComposition.schedule()}); - } - event.addListener(text, "compositionend", onCompositionEnd); - - this.getElement = function() { - return text; - }; - - this.setReadOnly = function(readOnly) { - text.readOnly = readOnly; - }; - - this.onContextMenu = function(e) { - afterContextMenu = true; - resetSelection(host.selection.isEmpty()); - host._emit("nativecontextmenu", {target: host, domEvent: e}); - this.moveToMouse(e, true); - }; - - this.moveToMouse = function(e, bringToFront) { - if (!tempStyle) - tempStyle = text.style.cssText; - text.style.cssText = (bringToFront ? "z-index:100000;" : "") - + "height:" + text.style.height + ";" - + (useragent.isIE ? "opacity:0.1;" : ""); - - var rect = host.container.getBoundingClientRect(); - var style = dom.computedStyle(host.container); - var top = rect.top + (parseInt(style.borderTopWidth) || 0); - var left = rect.left + (parseInt(rect.borderLeftWidth) || 0); - var maxTop = rect.bottom - top - text.clientHeight -2; - var move = function(e) { - text.style.left = e.clientX - left - 2 + "px"; - text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px"; - }; - move(e); - - if (e.type != "mousedown") - return; - - if (host.renderer.$keepTextAreaAtCursor) - host.renderer.$keepTextAreaAtCursor = null; - - clearTimeout(closeTimeout); - if (useragent.isWin) - event.capture(host.container, move, onContextMenuClose); - }; - - this.onContextMenuClose = onContextMenuClose; - var closeTimeout; - function onContextMenuClose() { - clearTimeout(closeTimeout); - closeTimeout = setTimeout(function () { - if (tempStyle) { - text.style.cssText = tempStyle; - tempStyle = ''; - } - if (host.renderer.$keepTextAreaAtCursor == null) { - host.renderer.$keepTextAreaAtCursor = true; - host.renderer.$moveTextAreaToCursor(); - } - }, 0); - } - - var onContextMenu = function(e) { - host.textInput.onContextMenu(e); - onContextMenuClose(); - }; - event.addListener(text, "mouseup", onContextMenu); - event.addListener(text, "mousedown", function(e) { - e.preventDefault(); - onContextMenuClose(); - }); - event.addListener(host.renderer.scroller, "contextmenu", onContextMenu); - event.addListener(text, "contextmenu", onContextMenu); - - if (useragent.isIOS) { - var typingResetTimeout = null; - var typing = false; - - parentNode.addEventListener("keydown", function (e) { - if (typingResetTimeout) clearTimeout(typingResetTimeout); - typing = true; - }); - - parentNode.addEventListener("keyup", function (e) { - typingResetTimeout = setTimeout(function () { - typing = false; - }, 100); - }); - var detectArrowKeys = function(e) { - if (document.activeElement !== text) return; - if (typing) return; - - if (cut) { - return setTimeout(function () { - cut = false; - }, 100); - } - var selectionStart = text.selectionStart; - var selectionEnd = text.selectionEnd; - text.setSelectionRange(4, 5); - if (selectionStart == selectionEnd) { - switch (selectionStart) { - case 0: host.onCommandKey(null, 0, KEYS.up); break; - case 1: host.onCommandKey(null, 0, KEYS.home); break; - case 2: host.onCommandKey(null, MODS.option, KEYS.left); break; - case 4: host.onCommandKey(null, 0, KEYS.left); break; - case 5: host.onCommandKey(null, 0, KEYS.right); break; - case 7: host.onCommandKey(null, MODS.option, KEYS.right); break; - case 8: host.onCommandKey(null, 0, KEYS.end); break; - case 9: host.onCommandKey(null, 0, KEYS.down); break; - } - } else { - switch (selectionEnd) { - case 6: host.onCommandKey(null, MODS.shift, KEYS.right); break; - case 7: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.right); break; - case 8: host.onCommandKey(null, MODS.shift, KEYS.end); break; - case 9: host.onCommandKey(null, MODS.shift, KEYS.down); break; - } - switch (selectionStart) { - case 0: host.onCommandKey(null, MODS.shift, KEYS.up); break; - case 1: host.onCommandKey(null, MODS.shift, KEYS.home); break; - case 2: host.onCommandKey(null, MODS.shift | MODS.option, KEYS.left); break; - case 3: host.onCommandKey(null, MODS.shift, KEYS.left); break; - } - } - } - document.addEventListener("selectionchange", detectArrowKeys); - host.on("destroy", function() { - document.removeEventListener("selectionchange", detectArrowKeys); - }) - } -}; - -exports.TextInput = TextInput; -}); - -ace.define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/keyboard/textinput_ios"], function(require, exports, module) { -"use strict"; - -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); -var dom = require("../lib/dom"); -var lang = require("../lib/lang"); -var BROKEN_SETDATA = useragent.isChrome < 18; -var USE_IE_MIME_TYPE = useragent.isIE; - -var TextInputIOS = require("./textinput_ios").TextInput -var TextInput = function(parentNode, host) { - if (useragent.isIOS) - return TextInputIOS.call(this, parentNode, host); - - var text = dom.createElement("textarea"); - text.className = "ace_text-input"; - - text.setAttribute("wrap", "off"); - text.setAttribute("autocorrect", "off"); - text.setAttribute("autocapitalize", "off"); - text.setAttribute("spellcheck", false); - - text.style.opacity = "0"; - parentNode.insertBefore(text, parentNode.firstChild); - - var PLACEHOLDER = "\u2028\u2028"; - - var copied = false; - var pasted = false; - var inComposition = false; - var tempStyle = ''; - var isSelectionEmpty = true; - try { var isFocused = document.activeElement === text; } catch(e) {} - - event.addListener(text, "blur", function(e) { - host.onBlur(e); - isFocused = false; - }); - event.addListener(text, "focus", function(e) { - isFocused = true; - host.onFocus(e); - resetSelection(); - }); - this.focus = function() { - if (tempStyle) return text.focus(); - var top = text.style.top; - text.style.position = "fixed"; - text.style.top = "0px"; - text.focus(); - setTimeout(function() { - text.style.position = ""; - if (text.style.top == "0px") - text.style.top = top; - }, 0); - }; - this.blur = function() { - text.blur(); - }; - this.isFocused = function() { - return isFocused; - }; - var syncSelection = lang.delayedCall(function() { - isFocused && resetSelection(isSelectionEmpty); - }); - var syncValue = lang.delayedCall(function() { - if (!inComposition) { - text.value = PLACEHOLDER; - isFocused && resetSelection(); - } - }); - - function resetSelection(isEmpty) { - if (inComposition) - return; - inComposition = true; - - if (inputHandler) { - selectionStart = 0; - selectionEnd = isEmpty ? 0 : text.value.length - 1; - } else { - var selectionStart = isEmpty ? 2 : 1; - var selectionEnd = 2; - } - try { - text.setSelectionRange(selectionStart, selectionEnd); - } catch(e){} - - inComposition = false; - } - - function resetValue() { - if (inComposition) - return; - text.value = PLACEHOLDER; - if (useragent.isWebKit) - syncValue.schedule(); - } - - useragent.isWebKit || host.addEventListener('changeSelection', function() { - if (host.selection.isEmpty() != isSelectionEmpty) { - isSelectionEmpty = !isSelectionEmpty; - syncSelection.schedule(); - } - }); - - resetValue(); - if (isFocused) - host.onFocus(); - - - var isAllSelected = function(text) { - return text.selectionStart === 0 && text.selectionEnd === text.value.length; - }; - - var onSelect = function(e) { - if (copied) { - copied = false; - } else if (isAllSelected(text)) { - host.selectAll(); - resetSelection(); - } else if (inputHandler) { - resetSelection(host.selection.isEmpty()); - } - }; - - var inputHandler = null; - this.setInputHandler = function(cb) {inputHandler = cb}; - this.getInputHandler = function() {return inputHandler}; - var afterContextMenu = false; - - var sendText = function(data) { - if (inputHandler) { - data = inputHandler(data); - inputHandler = null; - } - if (pasted) { - resetSelection(); - if (data) - host.onPaste(data); - pasted = false; - } else if (data == PLACEHOLDER.charAt(0)) { - if (afterContextMenu) - host.execCommand("del", {source: "ace"}); - else // some versions of android do not fire keydown when pressing backspace - host.execCommand("backspace", {source: "ace"}); - } else { - if (data.substring(0, 2) == PLACEHOLDER) - data = data.substr(2); - else if (data.charAt(0) == PLACEHOLDER.charAt(0)) - data = data.substr(1); - else if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0)) - data = data.slice(0, -1); - if (data.charAt(data.length - 1) == PLACEHOLDER.charAt(0)) - data = data.slice(0, -1); - - if (data) - host.onTextInput(data); - } - if (afterContextMenu) - afterContextMenu = false; - }; - var onInput = function(e) { - if (inComposition) - return; - var data = text.value; - sendText(data); - resetValue(); - }; - - var handleClipboardData = function(e, data, forceIEMime) { - var clipboardData = e.clipboardData || window.clipboardData; - if (!clipboardData || BROKEN_SETDATA) - return; - var mime = USE_IE_MIME_TYPE || forceIEMime ? "Text" : "text/plain"; - try { - if (data) { - return clipboardData.setData(mime, data) !== false; - } else { - return clipboardData.getData(mime); - } - } catch(e) { - if (!forceIEMime) - return handleClipboardData(e, data, true); - } - }; - - var doCopy = function(e, isCut) { - var data = host.getCopyText(); - if (!data) - return event.preventDefault(e); - - if (handleClipboardData(e, data)) { - isCut ? host.onCut() : host.onCopy(); - event.preventDefault(e); - } else { - copied = true; - text.value = data; - text.select(); - setTimeout(function(){ - copied = false; - resetValue(); - resetSelection(); - isCut ? host.onCut() : host.onCopy(); - }); - } - }; - - var onCut = function(e) { - doCopy(e, true); - }; - - var onCopy = function(e) { - doCopy(e, false); - }; - - var onPaste = function(e) { - var data = handleClipboardData(e); - if (typeof data == "string") { - if (data) - host.onPaste(data, e); - if (useragent.isIE) - setTimeout(resetSelection); - event.preventDefault(e); - } - else { - text.value = ""; - pasted = true; - } - }; - - event.addCommandKeyListener(text, host.onCommandKey.bind(host)); - - event.addListener(text, "select", onSelect); - - event.addListener(text, "input", onInput); - - event.addListener(text, "cut", onCut); - event.addListener(text, "copy", onCopy); - event.addListener(text, "paste", onPaste); - if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) { - event.addListener(parentNode, "keydown", function(e) { - if ((useragent.isMac && !e.metaKey) || !e.ctrlKey) - return; - - switch (e.keyCode) { - case 67: - onCopy(e); - break; - case 86: - onPaste(e); - break; - case 88: - onCut(e); - break; - } - }); - } - var onCompositionStart = function(e) { - if (inComposition || !host.onCompositionStart || host.$readOnly) - return; - inComposition = {}; - inComposition.canUndo = host.session.$undoManager; - host.onCompositionStart(); - setTimeout(onCompositionUpdate, 0); - host.on("mousedown", onCompositionEnd); - if (inComposition.canUndo && !host.selection.isEmpty()) { - host.insert(""); - host.session.markUndoGroup(); - host.selection.clearSelection(); - } - host.session.markUndoGroup(); - }; - - var onCompositionUpdate = function() { - if (!inComposition || !host.onCompositionUpdate || host.$readOnly) - return; - var val = text.value.replace(/\u2028/g, ""); - if (inComposition.lastValue === val) return; - - host.onCompositionUpdate(val); - if (inComposition.lastValue) - host.undo(); - if (inComposition.canUndo) - inComposition.lastValue = val; - if (inComposition.lastValue) { - var r = host.selection.getRange(); - host.insert(inComposition.lastValue); - host.session.markUndoGroup(); - inComposition.range = host.selection.getRange(); - host.selection.setRange(r); - host.selection.clearSelection(); - } - }; - - var onCompositionEnd = function(e) { - if (!host.onCompositionEnd || host.$readOnly) return; - var c = inComposition; - inComposition = false; - var timer = setTimeout(function() { - timer = null; - var str = text.value.replace(/\u2028/g, ""); - if (inComposition) - return; - else if (str == c.lastValue) - resetValue(); - else if (!c.lastValue && str) { - resetValue(); - sendText(str); - } - }); - inputHandler = function compositionInputHandler(str) { - if (timer) - clearTimeout(timer); - str = str.replace(/\u2028/g, ""); - if (str == c.lastValue) - return ""; - if (c.lastValue && timer) - host.undo(); - return str; - }; - host.onCompositionEnd(); - host.removeListener("mousedown", onCompositionEnd); - if (e.type == "compositionend" && c.range) { - host.selection.setRange(c.range); - } - var needsOnInput = - (!!useragent.isChrome && useragent.isChrome >= 53) || - (!!useragent.isWebKit && useragent.isWebKit >= 603); - - if (needsOnInput) { - onInput(); - } - }; - - - - var syncComposition = lang.delayedCall(onCompositionUpdate, 50); - - event.addListener(text, "compositionstart", onCompositionStart); - if (useragent.isGecko) { - event.addListener(text, "text", function(){syncComposition.schedule()}); - } else { - event.addListener(text, "keyup", function(){syncComposition.schedule()}); - event.addListener(text, "keydown", function(){syncComposition.schedule()}); - } - event.addListener(text, "compositionend", onCompositionEnd); - - this.getElement = function() { - return text; - }; - - this.setReadOnly = function(readOnly) { - text.readOnly = readOnly; - }; - - this.onContextMenu = function(e) { - afterContextMenu = true; - resetSelection(host.selection.isEmpty()); - host._emit("nativecontextmenu", {target: host, domEvent: e}); - this.moveToMouse(e, true); - }; - - this.moveToMouse = function(e, bringToFront) { - if (!tempStyle) - tempStyle = text.style.cssText; - text.style.cssText = (bringToFront ? "z-index:100000;" : "") - + "height:" + text.style.height + ";" - + (useragent.isIE ? "opacity:0.1;" : ""); - - var rect = host.container.getBoundingClientRect(); - var style = dom.computedStyle(host.container); - var top = rect.top + (parseInt(style.borderTopWidth) || 0); - var left = rect.left + (parseInt(rect.borderLeftWidth) || 0); - var maxTop = rect.bottom - top - text.clientHeight -2; - var move = function(e) { - text.style.left = e.clientX - left - 2 + "px"; - text.style.top = Math.min(e.clientY - top - 2, maxTop) + "px"; - }; - move(e); - - if (e.type != "mousedown") - return; - - if (host.renderer.$keepTextAreaAtCursor) - host.renderer.$keepTextAreaAtCursor = null; - - clearTimeout(closeTimeout); - if (useragent.isWin) - event.capture(host.container, move, onContextMenuClose); - }; - - this.onContextMenuClose = onContextMenuClose; - var closeTimeout; - function onContextMenuClose() { - clearTimeout(closeTimeout); - closeTimeout = setTimeout(function () { - if (tempStyle) { - text.style.cssText = tempStyle; - tempStyle = ''; - } - if (host.renderer.$keepTextAreaAtCursor == null) { - host.renderer.$keepTextAreaAtCursor = true; - host.renderer.$moveTextAreaToCursor(); - } - }, 0); - } - - var onContextMenu = function(e) { - host.textInput.onContextMenu(e); - onContextMenuClose(); - }; - event.addListener(text, "mouseup", onContextMenu); - event.addListener(text, "mousedown", function(e) { - e.preventDefault(); - onContextMenuClose(); - }); - event.addListener(host.renderer.scroller, "contextmenu", onContextMenu); - event.addListener(text, "contextmenu", onContextMenu); -}; - -exports.TextInput = TextInput; -}); - -ace.define("ace/mouse/default_handlers",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); - -var DRAG_OFFSET = 0; // pixels - -function DefaultHandlers(mouseHandler) { - mouseHandler.$clickSelection = null; - - var editor = mouseHandler.editor; - editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler)); - editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler)); - editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler)); - editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler)); - editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler)); - editor.setDefaultHandler("touchmove", this.onTouchMove.bind(mouseHandler)); - - var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd", - "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"]; - - exports.forEach(function(x) { - mouseHandler[x] = this[x]; - }, this); - - mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange"); - mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange"); -} - -(function() { - - this.onMouseDown = function(ev) { - var inSelection = ev.inSelection(); - var pos = ev.getDocumentPosition(); - this.mousedownEvent = ev; - var editor = this.editor; - - var button = ev.getButton(); - if (button !== 0) { - var selectionRange = editor.getSelectionRange(); - var selectionEmpty = selectionRange.isEmpty(); - editor.$blockScrolling++; - if (selectionEmpty || button == 1) - editor.selection.moveToPosition(pos); - editor.$blockScrolling--; - if (button == 2) { - editor.textInput.onContextMenu(ev.domEvent); - if (!useragent.isMozilla) - ev.preventDefault(); - } - return; - } - - this.mousedownEvent.time = Date.now(); - if (inSelection && !editor.isFocused()) { - editor.focus(); - if (this.$focusTimout && !this.$clickSelection && !editor.inMultiSelectMode) { - this.setState("focusWait"); - this.captureMouse(ev); - return; - } - } - - this.captureMouse(ev); - this.startSelect(pos, ev.domEvent._clicks > 1); - return ev.preventDefault(); - }; - - this.startSelect = function(pos, waitForClickSelection) { - pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); - var editor = this.editor; - editor.$blockScrolling++; - if (this.mousedownEvent.getShiftKey()) - editor.selection.selectToPosition(pos); - else if (!waitForClickSelection) - editor.selection.moveToPosition(pos); - if (!waitForClickSelection) - this.select(); - if (editor.renderer.scroller.setCapture) { - editor.renderer.scroller.setCapture(); - } - editor.setStyle("ace_selecting"); - this.setState("select"); - editor.$blockScrolling--; - }; - - this.select = function() { - var anchor, editor = this.editor; - var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); - editor.$blockScrolling++; - if (this.$clickSelection) { - var cmp = this.$clickSelection.comparePoint(cursor); - - if (cmp == -1) { - anchor = this.$clickSelection.end; - } else if (cmp == 1) { - anchor = this.$clickSelection.start; - } else { - var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); - cursor = orientedRange.cursor; - anchor = orientedRange.anchor; - } - editor.selection.setSelectionAnchor(anchor.row, anchor.column); - } - editor.selection.selectToPosition(cursor); - editor.$blockScrolling--; - editor.renderer.scrollCursorIntoView(); - }; - - this.extendSelectionBy = function(unitName) { - var anchor, editor = this.editor; - var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); - var range = editor.selection[unitName](cursor.row, cursor.column); - editor.$blockScrolling++; - if (this.$clickSelection) { - var cmpStart = this.$clickSelection.comparePoint(range.start); - var cmpEnd = this.$clickSelection.comparePoint(range.end); - - if (cmpStart == -1 && cmpEnd <= 0) { - anchor = this.$clickSelection.end; - if (range.end.row != cursor.row || range.end.column != cursor.column) - cursor = range.start; - } else if (cmpEnd == 1 && cmpStart >= 0) { - anchor = this.$clickSelection.start; - if (range.start.row != cursor.row || range.start.column != cursor.column) - cursor = range.end; - } else if (cmpStart == -1 && cmpEnd == 1) { - cursor = range.end; - anchor = range.start; - } else { - var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); - cursor = orientedRange.cursor; - anchor = orientedRange.anchor; - } - editor.selection.setSelectionAnchor(anchor.row, anchor.column); - } - editor.selection.selectToPosition(cursor); - editor.$blockScrolling--; - editor.renderer.scrollCursorIntoView(); - }; - - this.selectEnd = - this.selectAllEnd = - this.selectByWordsEnd = - this.selectByLinesEnd = function() { - this.$clickSelection = null; - this.editor.unsetStyle("ace_selecting"); - if (this.editor.renderer.scroller.releaseCapture) { - this.editor.renderer.scroller.releaseCapture(); - } - }; - - this.focusWait = function() { - var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); - var time = Date.now(); - - if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimout) - this.startSelect(this.mousedownEvent.getDocumentPosition()); - }; - - this.onDoubleClick = function(ev) { - var pos = ev.getDocumentPosition(); - var editor = this.editor; - var session = editor.session; - - var range = session.getBracketRange(pos); - if (range) { - if (range.isEmpty()) { - range.start.column--; - range.end.column++; - } - this.setState("select"); - } else { - range = editor.selection.getWordRange(pos.row, pos.column); - this.setState("selectByWords"); - } - this.$clickSelection = range; - this.select(); - }; - - this.onTripleClick = function(ev) { - var pos = ev.getDocumentPosition(); - var editor = this.editor; - - this.setState("selectByLines"); - var range = editor.getSelectionRange(); - if (range.isMultiLine() && range.contains(pos.row, pos.column)) { - this.$clickSelection = editor.selection.getLineRange(range.start.row); - this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; - } else { - this.$clickSelection = editor.selection.getLineRange(pos.row); - } - this.select(); - }; - - this.onQuadClick = function(ev) { - var editor = this.editor; - - editor.selectAll(); - this.$clickSelection = editor.getSelectionRange(); - this.setState("selectAll"); - }; - - this.onMouseWheel = function(ev) { - if (ev.getAccelKey()) - return; - if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { - ev.wheelX = ev.wheelY; - ev.wheelY = 0; - } - - var t = ev.domEvent.timeStamp; - var dt = t - (this.$lastScrollTime||0); - - var editor = this.editor; - var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); - if (isScrolable || dt < 200) { - this.$lastScrollTime = t; - editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); - return ev.stop(); - } - }; - - this.onTouchMove = function (ev) { - var t = ev.domEvent.timeStamp; - var dt = t - (this.$lastScrollTime || 0); - - var editor = this.editor; - var isScrolable = editor.renderer.isScrollableBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); - if (isScrolable || dt < 200) { - this.$lastScrollTime = t; - editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); - return ev.stop(); - } - }; - -}).call(DefaultHandlers.prototype); - -exports.DefaultHandlers = DefaultHandlers; - -function calcDistance(ax, ay, bx, by) { - return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); -} - -function calcRangeOrientation(range, cursor) { - if (range.start.row == range.end.row) - var cmp = 2 * cursor.column - range.start.column - range.end.column; - else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) - var cmp = cursor.column - 4; - else - var cmp = 2 * cursor.row - range.start.row - range.end.row; - - if (cmp < 0) - return {cursor: range.start, anchor: range.end}; - else - return {cursor: range.end, anchor: range.start}; -} - -}); - -ace.define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var dom = require("./lib/dom"); -function Tooltip (parentNode) { - this.isOpen = false; - this.$element = null; - this.$parentNode = parentNode; -} - -(function() { - this.$init = function() { - this.$element = dom.createElement("div"); - this.$element.className = "ace_tooltip"; - this.$element.style.display = "none"; - this.$parentNode.appendChild(this.$element); - return this.$element; - }; - this.getElement = function() { - return this.$element || this.$init(); - }; - this.setText = function(text) { - dom.setInnerText(this.getElement(), text); - }; - this.setHtml = function(html) { - this.getElement().innerHTML = html; - }; - this.setPosition = function(x, y) { - this.getElement().style.left = x + "px"; - this.getElement().style.top = y + "px"; - }; - this.setClassName = function(className) { - dom.addCssClass(this.getElement(), className); - }; - this.show = function(text, x, y) { - if (text != null) - this.setText(text); - if (x != null && y != null) - this.setPosition(x, y); - if (!this.isOpen) { - this.getElement().style.display = "block"; - this.isOpen = true; - } - }; - - this.hide = function() { - if (this.isOpen) { - this.getElement().style.display = "none"; - this.isOpen = false; - } - }; - this.getHeight = function() { - return this.getElement().offsetHeight; - }; - this.getWidth = function() { - return this.getElement().offsetWidth; - }; - - this.destroy = function() { - this.isOpen = false; - if (this.$element && this.$element.parentNode) { - this.$element.parentNode.removeChild(this.$element); - } - }; - -}).call(Tooltip.prototype); - -exports.Tooltip = Tooltip; -}); - -ace.define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) { -"use strict"; -var dom = require("../lib/dom"); -var oop = require("../lib/oop"); -var event = require("../lib/event"); -var Tooltip = require("../tooltip").Tooltip; - -function GutterHandler(mouseHandler) { - var editor = mouseHandler.editor; - var gutter = editor.renderer.$gutterLayer; - var tooltip = new GutterTooltip(editor.container); - - mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { - if (!editor.isFocused() || e.getButton() != 0) - return; - var gutterRegion = gutter.getRegion(e); - - if (gutterRegion == "foldWidgets") - return; - - var row = e.getDocumentPosition().row; - var selection = editor.session.selection; - - if (e.getShiftKey()) - selection.selectTo(row, 0); - else { - if (e.domEvent.detail == 2) { - editor.selectAll(); - return e.preventDefault(); - } - mouseHandler.$clickSelection = editor.selection.getLineRange(row); - } - mouseHandler.setState("selectByLines"); - mouseHandler.captureMouse(e); - return e.preventDefault(); - }); - - - var tooltipTimeout, mouseEvent, tooltipAnnotation; - - function showTooltip() { - var row = mouseEvent.getDocumentPosition().row; - var annotation = gutter.$annotations[row]; - if (!annotation) - return hideTooltip(); - - var maxRow = editor.session.getLength(); - if (row == maxRow) { - var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; - var pos = mouseEvent.$pos; - if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) - return hideTooltip(); - } - - if (tooltipAnnotation == annotation) - return; - tooltipAnnotation = annotation.text.join("
    "); - - tooltip.setHtml(tooltipAnnotation); - tooltip.show(); - editor._signal("showGutterTooltip", tooltip); - editor.on("mousewheel", hideTooltip); - - if (mouseHandler.$tooltipFollowsMouse) { - moveTooltip(mouseEvent); - } else { - var gutterElement = mouseEvent.domEvent.target; - var rect = gutterElement.getBoundingClientRect(); - var style = tooltip.getElement().style; - style.left = rect.right + "px"; - style.top = rect.bottom + "px"; - } - } - - function hideTooltip() { - if (tooltipTimeout) - tooltipTimeout = clearTimeout(tooltipTimeout); - if (tooltipAnnotation) { - tooltip.hide(); - tooltipAnnotation = null; - editor._signal("hideGutterTooltip", tooltip); - editor.removeEventListener("mousewheel", hideTooltip); - } - } - - function moveTooltip(e) { - tooltip.setPosition(e.x, e.y); - } - - mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { - var target = e.domEvent.target || e.domEvent.srcElement; - if (dom.hasCssClass(target, "ace_fold-widget")) - return hideTooltip(); - - if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) - moveTooltip(e); - - mouseEvent = e; - if (tooltipTimeout) - return; - tooltipTimeout = setTimeout(function() { - tooltipTimeout = null; - if (mouseEvent && !mouseHandler.isMousePressed) - showTooltip(); - else - hideTooltip(); - }, 50); - }); - - event.addListener(editor.renderer.$gutter, "mouseout", function(e) { - mouseEvent = null; - if (!tooltipAnnotation || tooltipTimeout) - return; - - tooltipTimeout = setTimeout(function() { - tooltipTimeout = null; - hideTooltip(); - }, 50); - }); - - editor.on("changeSession", hideTooltip); -} - -function GutterTooltip(parentNode) { - Tooltip.call(this, parentNode); -} - -oop.inherits(GutterTooltip, Tooltip); - -(function(){ - this.setPosition = function(x, y) { - var windowWidth = window.innerWidth || document.documentElement.clientWidth; - var windowHeight = window.innerHeight || document.documentElement.clientHeight; - var width = this.getWidth(); - var height = this.getHeight(); - x += 15; - y += 15; - if (x + width > windowWidth) { - x -= (x + width) - windowWidth; - } - if (y + height > windowHeight) { - y -= 20 + height; - } - Tooltip.prototype.setPosition.call(this, x, y); - }; - -}).call(GutterTooltip.prototype); - - - -exports.GutterHandler = GutterHandler; - -}); - -ace.define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); -var MouseEvent = exports.MouseEvent = function(domEvent, editor) { - this.domEvent = domEvent; - this.editor = editor; - - this.x = this.clientX = domEvent.clientX; - this.y = this.clientY = domEvent.clientY; - - this.$pos = null; - this.$inSelection = null; - - this.propagationStopped = false; - this.defaultPrevented = false; -}; - -(function() { - - this.stopPropagation = function() { - event.stopPropagation(this.domEvent); - this.propagationStopped = true; - }; - - this.preventDefault = function() { - event.preventDefault(this.domEvent); - this.defaultPrevented = true; - }; - - this.stop = function() { - this.stopPropagation(); - this.preventDefault(); - }; - this.getDocumentPosition = function() { - if (this.$pos) - return this.$pos; - - this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); - return this.$pos; - }; - this.inSelection = function() { - if (this.$inSelection !== null) - return this.$inSelection; - - var editor = this.editor; - - - var selectionRange = editor.getSelectionRange(); - if (selectionRange.isEmpty()) - this.$inSelection = false; - else { - var pos = this.getDocumentPosition(); - this.$inSelection = selectionRange.contains(pos.row, pos.column); - } - - return this.$inSelection; - }; - this.getButton = function() { - return event.getButton(this.domEvent); - }; - this.getShiftKey = function() { - return this.domEvent.shiftKey; - }; - - this.getAccelKey = useragent.isMac - ? function() { return this.domEvent.metaKey; } - : function() { return this.domEvent.ctrlKey; }; - -}).call(MouseEvent.prototype); - -}); - -ace.define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { -"use strict"; - -var dom = require("../lib/dom"); -var event = require("../lib/event"); -var useragent = require("../lib/useragent"); - -var AUTOSCROLL_DELAY = 200; -var SCROLL_CURSOR_DELAY = 200; -var SCROLL_CURSOR_HYSTERESIS = 5; - -function DragdropHandler(mouseHandler) { - - var editor = mouseHandler.editor; - - var blankImage = dom.createElement("img"); - blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; - if (useragent.isOpera) - blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; - - var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; - - exports.forEach(function(x) { - mouseHandler[x] = this[x]; - }, this); - editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); - - - var mouseTarget = editor.container; - var dragSelectionMarker, x, y; - var timerId, range; - var dragCursor, counter = 0; - var dragOperation; - var isInternal; - var autoScrollStartTime; - var cursorMovedTime; - var cursorPointOnCaretMoved; - - this.onDragStart = function(e) { - if (this.cancelDrag || !mouseTarget.draggable) { - var self = this; - setTimeout(function(){ - self.startSelect(); - self.captureMouse(e); - }, 0); - return e.preventDefault(); - } - range = editor.getSelectionRange(); - - var dataTransfer = e.dataTransfer; - dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; - if (useragent.isOpera) { - editor.container.appendChild(blankImage); - blankImage.scrollTop = 0; - } - dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); - if (useragent.isOpera) { - editor.container.removeChild(blankImage); - } - dataTransfer.clearData(); - dataTransfer.setData("Text", editor.session.getTextRange()); - - isInternal = true; - this.setState("drag"); - }; - - this.onDragEnd = function(e) { - mouseTarget.draggable = false; - isInternal = false; - this.setState(null); - if (!editor.getReadOnly()) { - var dropEffect = e.dataTransfer.dropEffect; - if (!dragOperation && dropEffect == "move") - editor.session.remove(editor.getSelectionRange()); - editor.renderer.$cursorLayer.setBlinking(true); - } - this.editor.unsetStyle("ace_dragging"); - this.editor.renderer.setCursorStyle(""); - }; - - this.onDragEnter = function(e) { - if (editor.getReadOnly() || !canAccept(e.dataTransfer)) - return; - x = e.clientX; - y = e.clientY; - if (!dragSelectionMarker) - addDragMarker(); - counter++; - e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); - return event.preventDefault(e); - }; - - this.onDragOver = function(e) { - if (editor.getReadOnly() || !canAccept(e.dataTransfer)) - return; - x = e.clientX; - y = e.clientY; - if (!dragSelectionMarker) { - addDragMarker(); - counter++; - } - if (onMouseMoveTimer !== null) - onMouseMoveTimer = null; - - e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); - return event.preventDefault(e); - }; - - this.onDragLeave = function(e) { - counter--; - if (counter <= 0 && dragSelectionMarker) { - clearDragMarker(); - dragOperation = null; - return event.preventDefault(e); - } - }; - - this.onDrop = function(e) { - if (!dragCursor) - return; - var dataTransfer = e.dataTransfer; - if (isInternal) { - switch (dragOperation) { - case "move": - if (range.contains(dragCursor.row, dragCursor.column)) { - range = { - start: dragCursor, - end: dragCursor - }; - } else { - range = editor.moveText(range, dragCursor); - } - break; - case "copy": - range = editor.moveText(range, dragCursor, true); - break; - } - } else { - var dropData = dataTransfer.getData('Text'); - range = { - start: dragCursor, - end: editor.session.insert(dragCursor, dropData) - }; - editor.focus(); - dragOperation = null; - } - clearDragMarker(); - return event.preventDefault(e); - }; - - event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); - event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); - event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); - event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); - event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); - event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); - - function scrollCursorIntoView(cursor, prevCursor) { - var now = Date.now(); - var vMovement = !prevCursor || cursor.row != prevCursor.row; - var hMovement = !prevCursor || cursor.column != prevCursor.column; - if (!cursorMovedTime || vMovement || hMovement) { - editor.$blockScrolling += 1; - editor.moveCursorToPosition(cursor); - editor.$blockScrolling -= 1; - cursorMovedTime = now; - cursorPointOnCaretMoved = {x: x, y: y}; - } else { - var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); - if (distance > SCROLL_CURSOR_HYSTERESIS) { - cursorMovedTime = null; - } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { - editor.renderer.scrollCursorIntoView(); - cursorMovedTime = null; - } - } - } - - function autoScroll(cursor, prevCursor) { - var now = Date.now(); - var lineHeight = editor.renderer.layerConfig.lineHeight; - var characterWidth = editor.renderer.layerConfig.characterWidth; - var editorRect = editor.renderer.scroller.getBoundingClientRect(); - var offsets = { - x: { - left: x - editorRect.left, - right: editorRect.right - x - }, - y: { - top: y - editorRect.top, - bottom: editorRect.bottom - y - } - }; - var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); - var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); - var scrollCursor = {row: cursor.row, column: cursor.column}; - if (nearestXOffset / characterWidth <= 2) { - scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); - } - if (nearestYOffset / lineHeight <= 1) { - scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); - } - var vScroll = cursor.row != scrollCursor.row; - var hScroll = cursor.column != scrollCursor.column; - var vMovement = !prevCursor || cursor.row != prevCursor.row; - if (vScroll || (hScroll && !vMovement)) { - if (!autoScrollStartTime) - autoScrollStartTime = now; - else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) - editor.renderer.scrollCursorIntoView(scrollCursor); - } else { - autoScrollStartTime = null; - } - } - - function onDragInterval() { - var prevCursor = dragCursor; - dragCursor = editor.renderer.screenToTextCoordinates(x, y); - scrollCursorIntoView(dragCursor, prevCursor); - autoScroll(dragCursor, prevCursor); - } - - function addDragMarker() { - range = editor.selection.toOrientedRange(); - dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); - editor.clearSelection(); - if (editor.isFocused()) - editor.renderer.$cursorLayer.setBlinking(false); - clearInterval(timerId); - onDragInterval(); - timerId = setInterval(onDragInterval, 20); - counter = 0; - event.addListener(document, "mousemove", onMouseMove); - } - - function clearDragMarker() { - clearInterval(timerId); - editor.session.removeMarker(dragSelectionMarker); - dragSelectionMarker = null; - editor.$blockScrolling += 1; - editor.selection.fromOrientedRange(range); - editor.$blockScrolling -= 1; - if (editor.isFocused() && !isInternal) - editor.renderer.$cursorLayer.setBlinking(!editor.getReadOnly()); - range = null; - dragCursor = null; - counter = 0; - autoScrollStartTime = null; - cursorMovedTime = null; - event.removeListener(document, "mousemove", onMouseMove); - } - var onMouseMoveTimer = null; - function onMouseMove() { - if (onMouseMoveTimer == null) { - onMouseMoveTimer = setTimeout(function() { - if (onMouseMoveTimer != null && dragSelectionMarker) - clearDragMarker(); - }, 20); - } - } - - function canAccept(dataTransfer) { - var types = dataTransfer.types; - return !types || Array.prototype.some.call(types, function(type) { - return type == 'text/plain' || type == 'Text'; - }); - } - - function getDropEffect(e) { - var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; - var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; - - var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; - var effectAllowed = "uninitialized"; - try { - effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); - } catch (e) {} - var dropEffect = "none"; - - if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) - dropEffect = "copy"; - else if (moveAllowed.indexOf(effectAllowed) >= 0) - dropEffect = "move"; - else if (copyAllowed.indexOf(effectAllowed) >= 0) - dropEffect = "copy"; - - return dropEffect; - } -} - -(function() { - - this.dragWait = function() { - var interval = Date.now() - this.mousedownEvent.time; - if (interval > this.editor.getDragDelay()) - this.startDrag(); - }; - - this.dragWaitEnd = function() { - var target = this.editor.container; - target.draggable = false; - this.startSelect(this.mousedownEvent.getDocumentPosition()); - this.selectEnd(); - }; - - this.dragReadyEnd = function(e) { - this.editor.renderer.$cursorLayer.setBlinking(!this.editor.getReadOnly()); - this.editor.unsetStyle("ace_dragging"); - this.editor.renderer.setCursorStyle(""); - this.dragWaitEnd(); - }; - - this.startDrag = function(){ - this.cancelDrag = false; - var editor = this.editor; - var target = editor.container; - target.draggable = true; - editor.renderer.$cursorLayer.setBlinking(false); - editor.setStyle("ace_dragging"); - var cursorStyle = useragent.isWin ? "default" : "move"; - editor.renderer.setCursorStyle(cursorStyle); - this.setState("dragReady"); - }; - - this.onMouseDrag = function(e) { - var target = this.editor.container; - if (useragent.isIE && this.state == "dragReady") { - var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); - if (distance > 3) - target.dragDrop(); - } - if (this.state === "dragWait") { - var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); - if (distance > 0) { - target.draggable = false; - this.startSelect(this.mousedownEvent.getDocumentPosition()); - } - } - }; - - this.onMouseDown = function(e) { - if (!this.$dragEnabled) - return; - this.mousedownEvent = e; - var editor = this.editor; - - var inSelection = e.inSelection(); - var button = e.getButton(); - var clickCount = e.domEvent.detail || 1; - if (clickCount === 1 && button === 0 && inSelection) { - if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) - return; - this.mousedownEvent.time = Date.now(); - var eventTarget = e.domEvent.target || e.domEvent.srcElement; - if ("unselectable" in eventTarget) - eventTarget.unselectable = "on"; - if (editor.getDragDelay()) { - if (useragent.isWebKit) { - this.cancelDrag = true; - var mouseTarget = editor.container; - mouseTarget.draggable = true; - } - this.setState("dragWait"); - } else { - this.startDrag(); - } - this.captureMouse(e, this.onMouseDrag.bind(this)); - e.defaultPrevented = true; - } - }; - -}).call(DragdropHandler.prototype); - - -function calcDistance(ax, ay, bx, by) { - return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); -} - -exports.DragdropHandler = DragdropHandler; - -}); - -ace.define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) { -"use strict"; -var dom = require("./dom"); - -exports.get = function (url, callback) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onreadystatechange = function () { - if (xhr.readyState === 4) { - callback(xhr.responseText); - } - }; - xhr.send(null); -}; - -exports.loadScript = function(path, callback) { - var head = dom.getDocumentHead(); - var s = document.createElement('script'); - - s.src = path; - head.appendChild(s); - - s.onload = s.onreadystatechange = function(_, isAbort) { - if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { - s = s.onload = s.onreadystatechange = null; - if (!isAbort) - callback(); - } - }; -}; -exports.qualifyURL = function(url) { - var a = document.createElement('a'); - a.href = url; - return a.href; -} - -}); - -ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var EventEmitter = {}; -var stopPropagation = function() { this.propagationStopped = true; }; -var preventDefault = function() { this.defaultPrevented = true; }; - -EventEmitter._emit = -EventEmitter._dispatchEvent = function(eventName, e) { - this._eventRegistry || (this._eventRegistry = {}); - this._defaultHandlers || (this._defaultHandlers = {}); - - var listeners = this._eventRegistry[eventName] || []; - var defaultHandler = this._defaultHandlers[eventName]; - if (!listeners.length && !defaultHandler) - return; - - if (typeof e != "object" || !e) - e = {}; - - if (!e.type) - e.type = eventName; - if (!e.stopPropagation) - e.stopPropagation = stopPropagation; - if (!e.preventDefault) - e.preventDefault = preventDefault; - - listeners = listeners.slice(); - for (var i=0; i 1) - base = parts[parts.length - 2]; - var path = options[component + "Path"]; - if (path == null) { - path = options.basePath; - } else if (sep == "/") { - component = sep = ""; - } - if (path && path.slice(-1) != "/") - path += "/"; - return path + component + sep + base + this.get("suffix"); -}; - -exports.setModuleUrl = function(name, subst) { - return options.$moduleUrls[name] = subst; -}; - -exports.$loading = {}; -exports.loadModule = function(moduleName, onLoad) { - var module, moduleType; - if (Array.isArray(moduleName)) { - moduleType = moduleName[0]; - moduleName = moduleName[1]; - } - - try { - module = require(moduleName); - } catch (e) {} - if (module && !exports.$loading[moduleName]) - return onLoad && onLoad(module); - - if (!exports.$loading[moduleName]) - exports.$loading[moduleName] = []; - - exports.$loading[moduleName].push(onLoad); - - if (exports.$loading[moduleName].length > 1) - return; - - var afterLoad = function() { - require([moduleName], function(module) { - exports._emit("load.module", {name: moduleName, module: module}); - var listeners = exports.$loading[moduleName]; - exports.$loading[moduleName] = null; - listeners.forEach(function(onLoad) { - onLoad && onLoad(module); - }); - }); - }; - - if (!exports.get("packaged")) - return afterLoad(); - net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); -}; -init(true);function init(packaged) { - - if (!global || !global.document) - return; - - options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged); - - var scriptOptions = {}; - var scriptUrl = ""; - var currentScript = (document.currentScript || document._currentScript ); // native or polyfill - var currentDocument = currentScript && currentScript.ownerDocument || document; - - var scripts = currentDocument.getElementsByTagName("script"); - for (var i=0; i 0) { + if (count & 1) + result += string; + + if (count >>= 1) + string += string; + } + return result; +}; + +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; + +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; + +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; + +exports.copyObject = function(obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; + +exports.copyArray = function(array){ + var copy = []; + for (var i=0, l=array.length; i Date.now() - 50) + return true; + return $cancelT = false; + }, + cancel: function() { + $cancelT = Date.now(); + } +}; + +}); + +define("ace/keyboard/textinput",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/dom","ace/lib/lang","ace/clipboard","ace/lib/keys"], function(require, exports, module) { +"use strict"; + +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); +var clipboard = require("../clipboard"); +var BROKEN_SETDATA = useragent.isChrome < 18; +var USE_IE_MIME_TYPE = useragent.isIE; +var HAS_FOCUS_ARGS = useragent.isChrome > 63; +var MAX_LINE_LENGTH = 400; + +var KEYS = require("../lib/keys"); +var MODS = KEYS.KEY_MODS; +var isIOS = useragent.isIOS; +var valueResetRegex = isIOS ? /\s/ : /\n/; + +var TextInput = function(parentNode, host) { + var text = dom.createElement("textarea"); + text.className = "ace_text-input"; + + text.setAttribute("wrap", "off"); + text.setAttribute("autocorrect", "off"); + text.setAttribute("autocapitalize", "off"); + text.setAttribute("spellcheck", false); + + text.style.opacity = "0"; + parentNode.insertBefore(text, parentNode.firstChild); + + var copied = false; + var pasted = false; + var inComposition = false; + var sendingText = false; + var tempStyle = ''; + + if (!useragent.isMobile) + text.style.fontSize = "1px"; + + var commandMode = false; + var ignoreFocusEvents = false; + + var lastValue = ""; + var lastSelectionStart = 0; + var lastSelectionEnd = 0; + try { var isFocused = document.activeElement === text; } catch(e) {} + + event.addListener(text, "blur", function(e) { + if (ignoreFocusEvents) return; + host.onBlur(e); + isFocused = false; + }); + event.addListener(text, "focus", function(e) { + if (ignoreFocusEvents) return; + isFocused = true; + if (useragent.isEdge) { + try { + if (!document.hasFocus()) + return; + } catch(e) {} + } + host.onFocus(e); + if (useragent.isEdge) + setTimeout(resetSelection); + else + resetSelection(); + }); + this.$focusScroll = false; + this.focus = function() { + if (tempStyle || HAS_FOCUS_ARGS || this.$focusScroll == "browser") + return text.focus({ preventScroll: true }); + + var top = text.style.top; + text.style.position = "fixed"; + text.style.top = "0px"; + try { + var isTransformed = text.getBoundingClientRect().top != 0; + } catch(e) { + return; + } + var ancestors = []; + if (isTransformed) { + var t = text.parentElement; + while (t && t.nodeType == 1) { + ancestors.push(t); + t.setAttribute("ace_nocontext", true); + if (!t.parentElement && t.getRootNode) + t = t.getRootNode().host; + else + t = t.parentElement; + } + } + text.focus({ preventScroll: true }); + if (isTransformed) { + ancestors.forEach(function(p) { + p.removeAttribute("ace_nocontext"); + }); + } + setTimeout(function() { + text.style.position = ""; + if (text.style.top == "0px") + text.style.top = top; + }, 0); + }; + this.blur = function() { + text.blur(); + }; + this.isFocused = function() { + return isFocused; + }; + + host.on("beforeEndOperation", function() { + if (host.curOp && host.curOp.command.name == "insertstring") + return; + if (inComposition) { + lastValue = text.value = ""; + onCompositionEnd(); + } + resetSelection(); + }); + + var resetSelection = isIOS + ? function(value) { + if (!isFocused || (copied && !value) || sendingText) return; + if (!value) + value = ""; + var newValue = "\n ab" + value + "cde fg\n"; + if (newValue != text.value) + text.value = lastValue = newValue; + + var selectionStart = 4; + var selectionEnd = 4 + (value.length || (host.selection.isEmpty() ? 0 : 1)); + + if (lastSelectionStart != selectionStart || lastSelectionEnd != selectionEnd) { + text.setSelectionRange(selectionStart, selectionEnd); + } + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + } + : function() { + if (inComposition || sendingText) + return; + if (!isFocused && !afterContextMenu) + return; + inComposition = true; + + var selection = host.selection; + var range = selection.getRange(); + var row = selection.cursor.row; + var selectionStart = range.start.column; + var selectionEnd = range.end.column; + var line = host.session.getLine(row); + + if (range.start.row != row) { + var prevLine = host.session.getLine(row - 1); + selectionStart = range.start.row < row - 1 ? 0 : selectionStart; + selectionEnd += prevLine.length + 1; + line = prevLine + "\n" + line; + } + else if (range.end.row != row) { + var nextLine = host.session.getLine(row + 1); + selectionEnd = range.end.row > row + 1 ? nextLine.length : selectionEnd; + selectionEnd += line.length + 1; + line = line + "\n" + nextLine; + } + + if (line.length > MAX_LINE_LENGTH) { + if (selectionStart < MAX_LINE_LENGTH && selectionEnd < MAX_LINE_LENGTH) { + line = line.slice(0, MAX_LINE_LENGTH); + } else { + line = "\n"; + selectionStart = 0; + selectionEnd = 1; + } + } + + var newValue = line + "\n\n"; + if (newValue != lastValue) { + text.value = lastValue = newValue; + lastSelectionStart = lastSelectionEnd = newValue.length; + } + if (afterContextMenu) { + lastSelectionStart = text.selectionStart; + lastSelectionEnd = text.selectionEnd; + } + if ( + lastSelectionEnd != selectionEnd + || lastSelectionStart != selectionStart + || text.selectionEnd != lastSelectionEnd // on ie edge selectionEnd changes silently after the initialization + ) { + try { + text.setSelectionRange(selectionStart, selectionEnd); + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + } catch(e){} + } + inComposition = false; + }; + + if (isFocused) + host.onFocus(); + + + var isAllSelected = function(text) { + return text.selectionStart === 0 && text.selectionEnd >= lastValue.length + && text.value === lastValue && lastValue + && text.selectionEnd !== lastSelectionEnd; + }; + + var onSelect = function(e) { + if (inComposition) + return; + if (copied) { + copied = false; + } else if (isAllSelected(text)) { + host.selectAll(); + resetSelection(); + } + }; + + var inputHandler = null; + this.setInputHandler = function(cb) {inputHandler = cb;}; + this.getInputHandler = function() {return inputHandler;}; + var afterContextMenu = false; + + var sendText = function(value, fromInput) { + if (afterContextMenu) + afterContextMenu = false; + if (pasted) { + resetSelection(); + if (value) + host.onPaste(value); + pasted = false; + return ""; + } else { + var selectionStart = text.selectionStart; + var selectionEnd = text.selectionEnd; + + var extendLeft = lastSelectionStart; + var extendRight = lastValue.length - lastSelectionEnd; + + var inserted = value; + var restoreStart = value.length - selectionStart; + var restoreEnd = value.length - selectionEnd; + + var i = 0; + while (extendLeft > 0 && lastValue[i] == value[i]) { + i++; + extendLeft--; + } + inserted = inserted.slice(i); + i = 1; + while (extendRight > 0 && lastValue.length - i > lastSelectionStart - 1 && lastValue[lastValue.length - i] == value[value.length - i]) { + i++; + extendRight--; + } + restoreStart -= i-1; + restoreEnd -= i-1; + var endIndex = inserted.length - i + 1; + if (endIndex < 0) { + extendLeft = -endIndex; + endIndex = 0; + } + inserted = inserted.slice(0, endIndex); + if (!fromInput && restoreStart == inserted.length && !extendLeft && !extendRight && !restoreEnd) + return ""; + + sendingText = true; + if (inserted && !extendLeft && !extendRight && !restoreStart && !restoreEnd || commandMode) { + host.onTextInput(inserted); + } else { + host.onTextInput(inserted, { + extendLeft: extendLeft, + extendRight: extendRight, + restoreStart: restoreStart, + restoreEnd: restoreEnd + }); + } + sendingText = false; + + lastValue = value; + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + return inserted; + } + }; + var onInput = function(e) { + if (inComposition) + return onCompositionUpdate(); + if (e && e.inputType) { + if (e.inputType == "historyUndo") return host.execCommand("undo"); + if (e.inputType == "historyRedo") return host.execCommand("redo"); + } + var data = text.value; + var inserted = sendText(data, true); + if (data.length > MAX_LINE_LENGTH + 100 || valueResetRegex.test(inserted)) + resetSelection(); + }; + + var handleClipboardData = function(e, data, forceIEMime) { + var clipboardData = e.clipboardData || window.clipboardData; + if (!clipboardData || BROKEN_SETDATA) + return; + var mime = USE_IE_MIME_TYPE || forceIEMime ? "Text" : "text/plain"; + try { + if (data) { + return clipboardData.setData(mime, data) !== false; + } else { + return clipboardData.getData(mime); + } + } catch(e) { + if (!forceIEMime) + return handleClipboardData(e, data, true); + } + }; + + var doCopy = function(e, isCut) { + var data = host.getCopyText(); + if (!data) + return event.preventDefault(e); + + if (handleClipboardData(e, data)) { + if (isIOS) { + resetSelection(data); + copied = data; + setTimeout(function () { + copied = false; + }, 10); + } + isCut ? host.onCut() : host.onCopy(); + event.preventDefault(e); + } else { + copied = true; + text.value = data; + text.select(); + setTimeout(function(){ + copied = false; + resetSelection(); + isCut ? host.onCut() : host.onCopy(); + }); + } + }; + + var onCut = function(e) { + doCopy(e, true); + }; + + var onCopy = function(e) { + doCopy(e, false); + }; + + var onPaste = function(e) { + var data = handleClipboardData(e); + if (clipboard.pasteCancelled()) + return; + if (typeof data == "string") { + if (data) + host.onPaste(data, e); + if (useragent.isIE) + setTimeout(resetSelection); + event.preventDefault(e); + } + else { + text.value = ""; + pasted = true; + } + }; + + event.addCommandKeyListener(text, host.onCommandKey.bind(host)); + + event.addListener(text, "select", onSelect); + event.addListener(text, "input", onInput); + + event.addListener(text, "cut", onCut); + event.addListener(text, "copy", onCopy); + event.addListener(text, "paste", onPaste); + if (!('oncut' in text) || !('oncopy' in text) || !('onpaste' in text)) { + event.addListener(parentNode, "keydown", function(e) { + if ((useragent.isMac && !e.metaKey) || !e.ctrlKey) + return; + + switch (e.keyCode) { + case 67: + onCopy(e); + break; + case 86: + onPaste(e); + break; + case 88: + onCut(e); + break; + } + }); + } + var onCompositionStart = function(e) { + if (inComposition || !host.onCompositionStart || host.$readOnly) + return; + + inComposition = {}; + + if (commandMode) + return; + + setTimeout(onCompositionUpdate, 0); + host.on("mousedown", cancelComposition); + + var range = host.getSelectionRange(); + range.end.row = range.start.row; + range.end.column = range.start.column; + inComposition.markerRange = range; + inComposition.selectionStart = lastSelectionStart; + host.onCompositionStart(inComposition); + + if (inComposition.useTextareaForIME) { + text.value = ""; + lastValue = ""; + lastSelectionStart = 0; + lastSelectionEnd = 0; + } + else { + if (text.msGetInputContext) + inComposition.context = text.msGetInputContext(); + if (text.getInputContext) + inComposition.context = text.getInputContext(); + } + }; + + var onCompositionUpdate = function() { + if (!inComposition || !host.onCompositionUpdate || host.$readOnly) + return; + if (commandMode) + return cancelComposition(); + + if (inComposition.useTextareaForIME) { + host.onCompositionUpdate(text.value); + } + else { + var data = text.value; + sendText(data); + if (inComposition.markerRange) { + if (inComposition.context) { + inComposition.markerRange.start.column = inComposition.selectionStart + = inComposition.context.compositionStartOffset; + } + inComposition.markerRange.end.column = inComposition.markerRange.start.column + + lastSelectionEnd - inComposition.selectionStart; + } + } + }; + + var onCompositionEnd = function(e) { + if (!host.onCompositionEnd || host.$readOnly) return; + inComposition = false; + host.onCompositionEnd(); + host.off("mousedown", cancelComposition); + if (e) onInput(); + }; + + + function cancelComposition() { + ignoreFocusEvents = true; + text.blur(); + text.focus(); + ignoreFocusEvents = false; + } + + var syncComposition = lang.delayedCall(onCompositionUpdate, 50).schedule.bind(null, null); + + function onKeyup(e) { + if (e.keyCode == 27 && text.value.length < text.selectionStart) { + if (!inComposition) + lastValue = text.value; + lastSelectionStart = lastSelectionEnd = -1; + resetSelection(); + } + syncComposition(); + } + + event.addListener(text, "compositionstart", onCompositionStart); + event.addListener(text, "compositionupdate", onCompositionUpdate); + event.addListener(text, "keyup", onKeyup); + event.addListener(text, "keydown", syncComposition); + event.addListener(text, "compositionend", onCompositionEnd); + + this.getElement = function() { + return text; + }; + this.setCommandMode = function(value) { + commandMode = value; + text.readOnly = false; + }; + + this.setReadOnly = function(readOnly) { + if (!commandMode) + text.readOnly = readOnly; + }; + + this.setCopyWithEmptySelection = function(value) { + }; + + this.onContextMenu = function(e) { + afterContextMenu = true; + resetSelection(); + host._emit("nativecontextmenu", {target: host, domEvent: e}); + this.moveToMouse(e, true); + }; + + this.moveToMouse = function(e, bringToFront) { + if (!tempStyle) + tempStyle = text.style.cssText; + text.style.cssText = (bringToFront ? "z-index:100000;" : "") + + (useragent.isIE ? "opacity:0.1;" : "") + + "text-indent: -" + (lastSelectionStart + lastSelectionEnd) * host.renderer.characterWidth * 0.5 + "px;"; + + var rect = host.container.getBoundingClientRect(); + var style = dom.computedStyle(host.container); + var top = rect.top + (parseInt(style.borderTopWidth) || 0); + var left = rect.left + (parseInt(rect.borderLeftWidth) || 0); + var maxTop = rect.bottom - top - text.clientHeight -2; + var move = function(e) { + dom.translate(text, e.clientX - left - 2, Math.min(e.clientY - top - 2, maxTop)); + }; + move(e); + + if (e.type != "mousedown") + return; + + host.renderer.$isMousePressed = true; + + clearTimeout(closeTimeout); + if (useragent.isWin) + event.capture(host.container, move, onContextMenuClose); + }; + + this.onContextMenuClose = onContextMenuClose; + var closeTimeout; + function onContextMenuClose() { + clearTimeout(closeTimeout); + closeTimeout = setTimeout(function () { + if (tempStyle) { + text.style.cssText = tempStyle; + tempStyle = ''; + } + host.renderer.$isMousePressed = false; + if (host.renderer.$keepTextAreaAtCursor) + host.renderer.$moveTextAreaToCursor(); + }, 0); + } + + var onContextMenu = function(e) { + host.textInput.onContextMenu(e); + onContextMenuClose(); + }; + event.addListener(text, "mouseup", onContextMenu); + event.addListener(text, "mousedown", function(e) { + e.preventDefault(); + onContextMenuClose(); + }); + event.addListener(host.renderer.scroller, "contextmenu", onContextMenu); + event.addListener(text, "contextmenu", onContextMenu); + + if (isIOS) + addIosSelectionHandler(parentNode, host, text); + + function addIosSelectionHandler(parentNode, host, text) { + var typingResetTimeout = null; + var typing = false; + + text.addEventListener("keydown", function (e) { + if (typingResetTimeout) clearTimeout(typingResetTimeout); + typing = true; + }, true); + + text.addEventListener("keyup", function (e) { + typingResetTimeout = setTimeout(function () { + typing = false; + }, 100); + }, true); + var detectArrowKeys = function(e) { + if (document.activeElement !== text) return; + if (typing || inComposition || host.$mouseHandler.isMousePressed) return; + + if (copied) { + return; + } + var selectionStart = text.selectionStart; + var selectionEnd = text.selectionEnd; + + var key = null; + var modifier = 0; + if (selectionStart == 0) { + key = KEYS.up; + } else if (selectionStart == 1) { + key = KEYS.home; + } else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd] == "\n") { + key = KEYS.end; + } else if (selectionStart < lastSelectionStart && lastValue[selectionStart - 1] == " ") { + key = KEYS.left; + modifier = MODS.option; + } else if ( + selectionStart < lastSelectionStart + || ( + selectionStart == lastSelectionStart + && lastSelectionEnd != lastSelectionStart + && selectionStart == selectionEnd + ) + ) { + key = KEYS.left; + } else if (selectionEnd > lastSelectionEnd && lastValue.slice(0, selectionEnd).split("\n").length > 2) { + key = KEYS.down; + } else if (selectionEnd > lastSelectionEnd && lastValue[selectionEnd - 1] == " ") { + key = KEYS.right; + modifier = MODS.option; + } else if ( + selectionEnd > lastSelectionEnd + || ( + selectionEnd == lastSelectionEnd + && lastSelectionEnd != lastSelectionStart + && selectionStart == selectionEnd + ) + ) { + key = KEYS.right; + } + + if (selectionStart !== selectionEnd) + modifier |= MODS.shift; + + if (key) { + var result = host.onCommandKey({}, modifier, key); + if (!result && host.commands) { + key = KEYS.keyCodeToString(key); + var command = host.commands.findKeyCommand(modifier, key); + if (command) + host.execCommand(command); + } + lastSelectionStart = selectionStart; + lastSelectionEnd = selectionEnd; + resetSelection(""); + } + }; + document.addEventListener("selectionchange", detectArrowKeys); + host.on("destroy", function() { + document.removeEventListener("selectionchange", detectArrowKeys); + }); + } + +}; + +exports.TextInput = TextInput; +}); + +define("ace/mouse/default_handlers",["require","exports","module","ace/lib/useragent"], function(require, exports, module) { +"use strict"; + +var useragent = require("../lib/useragent"); + +var DRAG_OFFSET = 0; // pixels +var SCROLL_COOLDOWN_T = 550; // milliseconds + +function DefaultHandlers(mouseHandler) { + mouseHandler.$clickSelection = null; + + var editor = mouseHandler.editor; + editor.setDefaultHandler("mousedown", this.onMouseDown.bind(mouseHandler)); + editor.setDefaultHandler("dblclick", this.onDoubleClick.bind(mouseHandler)); + editor.setDefaultHandler("tripleclick", this.onTripleClick.bind(mouseHandler)); + editor.setDefaultHandler("quadclick", this.onQuadClick.bind(mouseHandler)); + editor.setDefaultHandler("mousewheel", this.onMouseWheel.bind(mouseHandler)); + + var exports = ["select", "startSelect", "selectEnd", "selectAllEnd", "selectByWordsEnd", + "selectByLinesEnd", "dragWait", "dragWaitEnd", "focusWait"]; + + exports.forEach(function(x) { + mouseHandler[x] = this[x]; + }, this); + + mouseHandler.selectByLines = this.extendSelectionBy.bind(mouseHandler, "getLineRange"); + mouseHandler.selectByWords = this.extendSelectionBy.bind(mouseHandler, "getWordRange"); +} + +(function() { + + this.onMouseDown = function(ev) { + var inSelection = ev.inSelection(); + var pos = ev.getDocumentPosition(); + this.mousedownEvent = ev; + var editor = this.editor; + + var button = ev.getButton(); + if (button !== 0) { + var selectionRange = editor.getSelectionRange(); + var selectionEmpty = selectionRange.isEmpty(); + if (selectionEmpty || button == 1) + editor.selection.moveToPosition(pos); + if (button == 2) { + editor.textInput.onContextMenu(ev.domEvent); + if (!useragent.isMozilla) + ev.preventDefault(); + } + return; + } + + this.mousedownEvent.time = Date.now(); + if (inSelection && !editor.isFocused()) { + editor.focus(); + if (this.$focusTimeout && !this.$clickSelection && !editor.inMultiSelectMode) { + this.setState("focusWait"); + this.captureMouse(ev); + return; + } + } + + this.captureMouse(ev); + this.startSelect(pos, ev.domEvent._clicks > 1); + return ev.preventDefault(); + }; + + this.startSelect = function(pos, waitForClickSelection) { + pos = pos || this.editor.renderer.screenToTextCoordinates(this.x, this.y); + var editor = this.editor; + if (!this.mousedownEvent) return; + if (this.mousedownEvent.getShiftKey()) + editor.selection.selectToPosition(pos); + else if (!waitForClickSelection) + editor.selection.moveToPosition(pos); + if (!waitForClickSelection) + this.select(); + if (editor.renderer.scroller.setCapture) { + editor.renderer.scroller.setCapture(); + } + editor.setStyle("ace_selecting"); + this.setState("select"); + }; + + this.select = function() { + var anchor, editor = this.editor; + var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); + if (this.$clickSelection) { + var cmp = this.$clickSelection.comparePoint(cursor); + + if (cmp == -1) { + anchor = this.$clickSelection.end; + } else if (cmp == 1) { + anchor = this.$clickSelection.start; + } else { + var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); + cursor = orientedRange.cursor; + anchor = orientedRange.anchor; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + } + editor.selection.selectToPosition(cursor); + editor.renderer.scrollCursorIntoView(); + }; + + this.extendSelectionBy = function(unitName) { + var anchor, editor = this.editor; + var cursor = editor.renderer.screenToTextCoordinates(this.x, this.y); + var range = editor.selection[unitName](cursor.row, cursor.column); + if (this.$clickSelection) { + var cmpStart = this.$clickSelection.comparePoint(range.start); + var cmpEnd = this.$clickSelection.comparePoint(range.end); + + if (cmpStart == -1 && cmpEnd <= 0) { + anchor = this.$clickSelection.end; + if (range.end.row != cursor.row || range.end.column != cursor.column) + cursor = range.start; + } else if (cmpEnd == 1 && cmpStart >= 0) { + anchor = this.$clickSelection.start; + if (range.start.row != cursor.row || range.start.column != cursor.column) + cursor = range.end; + } else if (cmpStart == -1 && cmpEnd == 1) { + cursor = range.end; + anchor = range.start; + } else { + var orientedRange = calcRangeOrientation(this.$clickSelection, cursor); + cursor = orientedRange.cursor; + anchor = orientedRange.anchor; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + } + editor.selection.selectToPosition(cursor); + editor.renderer.scrollCursorIntoView(); + }; + + this.selectEnd = + this.selectAllEnd = + this.selectByWordsEnd = + this.selectByLinesEnd = function() { + this.$clickSelection = null; + this.editor.unsetStyle("ace_selecting"); + if (this.editor.renderer.scroller.releaseCapture) { + this.editor.renderer.scroller.releaseCapture(); + } + }; + + this.focusWait = function() { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + var time = Date.now(); + + if (distance > DRAG_OFFSET || time - this.mousedownEvent.time > this.$focusTimeout) + this.startSelect(this.mousedownEvent.getDocumentPosition()); + }; + + this.onDoubleClick = function(ev) { + var pos = ev.getDocumentPosition(); + var editor = this.editor; + var session = editor.session; + + var range = session.getBracketRange(pos); + if (range) { + if (range.isEmpty()) { + range.start.column--; + range.end.column++; + } + this.setState("select"); + } else { + range = editor.selection.getWordRange(pos.row, pos.column); + this.setState("selectByWords"); + } + this.$clickSelection = range; + this.select(); + }; + + this.onTripleClick = function(ev) { + var pos = ev.getDocumentPosition(); + var editor = this.editor; + + this.setState("selectByLines"); + var range = editor.getSelectionRange(); + if (range.isMultiLine() && range.contains(pos.row, pos.column)) { + this.$clickSelection = editor.selection.getLineRange(range.start.row); + this.$clickSelection.end = editor.selection.getLineRange(range.end.row).end; + } else { + this.$clickSelection = editor.selection.getLineRange(pos.row); + } + this.select(); + }; + + this.onQuadClick = function(ev) { + var editor = this.editor; + + editor.selectAll(); + this.$clickSelection = editor.getSelectionRange(); + this.setState("selectAll"); + }; + + this.onMouseWheel = function(ev) { + if (ev.getAccelKey()) + return; + if (ev.getShiftKey() && ev.wheelY && !ev.wheelX) { + ev.wheelX = ev.wheelY; + ev.wheelY = 0; + } + + var editor = this.editor; + + if (!this.$lastScroll) + this.$lastScroll = { t: 0, vx: 0, vy: 0, allowed: 0 }; + + var prevScroll = this.$lastScroll; + var t = ev.domEvent.timeStamp; + var dt = t - prevScroll.t; + var vx = dt ? ev.wheelX / dt : prevScroll.vx; + var vy = dt ? ev.wheelY / dt : prevScroll.vy; + if (dt < SCROLL_COOLDOWN_T) { + vx = (vx + prevScroll.vx) / 2; + vy = (vy + prevScroll.vy) / 2; + } + + var direction = Math.abs(vx / vy); + + var canScroll = false; + if (direction >= 1 && editor.renderer.isScrollableBy(ev.wheelX * ev.speed, 0)) + canScroll = true; + if (direction <= 1 && editor.renderer.isScrollableBy(0, ev.wheelY * ev.speed)) + canScroll = true; + + if (canScroll) { + prevScroll.allowed = t; + } else if (t - prevScroll.allowed < SCROLL_COOLDOWN_T) { + var isSlower = Math.abs(vx) <= 1.5 * Math.abs(prevScroll.vx) + && Math.abs(vy) <= 1.5 * Math.abs(prevScroll.vy); + if (isSlower) { + canScroll = true; + prevScroll.allowed = t; + } + else { + prevScroll.allowed = 0; + } + } + + prevScroll.t = t; + prevScroll.vx = vx; + prevScroll.vy = vy; + + if (canScroll) { + editor.renderer.scrollBy(ev.wheelX * ev.speed, ev.wheelY * ev.speed); + return ev.stop(); + } + }; + +}).call(DefaultHandlers.prototype); + +exports.DefaultHandlers = DefaultHandlers; + +function calcDistance(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); +} + +function calcRangeOrientation(range, cursor) { + if (range.start.row == range.end.row) + var cmp = 2 * cursor.column - range.start.column - range.end.column; + else if (range.start.row == range.end.row - 1 && !range.start.column && !range.end.column) + var cmp = cursor.column - 4; + else + var cmp = 2 * cursor.row - range.start.row - range.end.row; + + if (cmp < 0) + return {cursor: range.start, anchor: range.end}; + else + return {cursor: range.end, anchor: range.start}; +} + +}); + +define("ace/tooltip",["require","exports","module","ace/lib/oop","ace/lib/dom"], function(require, exports, module) { +"use strict"; + +var oop = require("./lib/oop"); +var dom = require("./lib/dom"); +function Tooltip (parentNode) { + this.isOpen = false; + this.$element = null; + this.$parentNode = parentNode; +} + +(function() { + this.$init = function() { + this.$element = dom.createElement("div"); + this.$element.className = "ace_tooltip"; + this.$element.style.display = "none"; + this.$parentNode.appendChild(this.$element); + return this.$element; + }; + this.getElement = function() { + return this.$element || this.$init(); + }; + this.setText = function(text) { + this.getElement().textContent = text; + }; + this.setHtml = function(html) { + this.getElement().innerHTML = html; + }; + this.setPosition = function(x, y) { + this.getElement().style.left = x + "px"; + this.getElement().style.top = y + "px"; + }; + this.setClassName = function(className) { + dom.addCssClass(this.getElement(), className); + }; + this.show = function(text, x, y) { + if (text != null) + this.setText(text); + if (x != null && y != null) + this.setPosition(x, y); + if (!this.isOpen) { + this.getElement().style.display = "block"; + this.isOpen = true; + } + }; + + this.hide = function() { + if (this.isOpen) { + this.getElement().style.display = "none"; + this.isOpen = false; + } + }; + this.getHeight = function() { + return this.getElement().offsetHeight; + }; + this.getWidth = function() { + return this.getElement().offsetWidth; + }; + + this.destroy = function() { + this.isOpen = false; + if (this.$element && this.$element.parentNode) { + this.$element.parentNode.removeChild(this.$element); + } + }; + +}).call(Tooltip.prototype); + +exports.Tooltip = Tooltip; +}); + +define("ace/mouse/default_gutter_handler",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/event","ace/tooltip"], function(require, exports, module) { +"use strict"; +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var event = require("../lib/event"); +var Tooltip = require("../tooltip").Tooltip; + +function GutterHandler(mouseHandler) { + var editor = mouseHandler.editor; + var gutter = editor.renderer.$gutterLayer; + var tooltip = new GutterTooltip(editor.container); + + mouseHandler.editor.setDefaultHandler("guttermousedown", function(e) { + if (!editor.isFocused() || e.getButton() != 0) + return; + var gutterRegion = gutter.getRegion(e); + + if (gutterRegion == "foldWidgets") + return; + + var row = e.getDocumentPosition().row; + var selection = editor.session.selection; + + if (e.getShiftKey()) + selection.selectTo(row, 0); + else { + if (e.domEvent.detail == 2) { + editor.selectAll(); + return e.preventDefault(); + } + mouseHandler.$clickSelection = editor.selection.getLineRange(row); + } + mouseHandler.setState("selectByLines"); + mouseHandler.captureMouse(e); + return e.preventDefault(); + }); + + + var tooltipTimeout, mouseEvent, tooltipAnnotation; + + function showTooltip() { + var row = mouseEvent.getDocumentPosition().row; + var annotation = gutter.$annotations[row]; + if (!annotation) + return hideTooltip(); + + var maxRow = editor.session.getLength(); + if (row == maxRow) { + var screenRow = editor.renderer.pixelToScreenCoordinates(0, mouseEvent.y).row; + var pos = mouseEvent.$pos; + if (screenRow > editor.session.documentToScreenRow(pos.row, pos.column)) + return hideTooltip(); + } + + if (tooltipAnnotation == annotation) + return; + tooltipAnnotation = annotation.text.join("
    "); + + tooltip.setHtml(tooltipAnnotation); + tooltip.show(); + editor._signal("showGutterTooltip", tooltip); + editor.on("mousewheel", hideTooltip); + + if (mouseHandler.$tooltipFollowsMouse) { + moveTooltip(mouseEvent); + } else { + var gutterElement = mouseEvent.domEvent.target; + var rect = gutterElement.getBoundingClientRect(); + var style = tooltip.getElement().style; + style.left = rect.right + "px"; + style.top = rect.bottom + "px"; + } + } + + function hideTooltip() { + if (tooltipTimeout) + tooltipTimeout = clearTimeout(tooltipTimeout); + if (tooltipAnnotation) { + tooltip.hide(); + tooltipAnnotation = null; + editor._signal("hideGutterTooltip", tooltip); + editor.removeEventListener("mousewheel", hideTooltip); + } + } + + function moveTooltip(e) { + tooltip.setPosition(e.x, e.y); + } + + mouseHandler.editor.setDefaultHandler("guttermousemove", function(e) { + var target = e.domEvent.target || e.domEvent.srcElement; + if (dom.hasCssClass(target, "ace_fold-widget")) + return hideTooltip(); + + if (tooltipAnnotation && mouseHandler.$tooltipFollowsMouse) + moveTooltip(e); + + mouseEvent = e; + if (tooltipTimeout) + return; + tooltipTimeout = setTimeout(function() { + tooltipTimeout = null; + if (mouseEvent && !mouseHandler.isMousePressed) + showTooltip(); + else + hideTooltip(); + }, 50); + }); + + event.addListener(editor.renderer.$gutter, "mouseout", function(e) { + mouseEvent = null; + if (!tooltipAnnotation || tooltipTimeout) + return; + + tooltipTimeout = setTimeout(function() { + tooltipTimeout = null; + hideTooltip(); + }, 50); + }); + + editor.on("changeSession", hideTooltip); +} + +function GutterTooltip(parentNode) { + Tooltip.call(this, parentNode); +} + +oop.inherits(GutterTooltip, Tooltip); + +(function(){ + this.setPosition = function(x, y) { + var windowWidth = window.innerWidth || document.documentElement.clientWidth; + var windowHeight = window.innerHeight || document.documentElement.clientHeight; + var width = this.getWidth(); + var height = this.getHeight(); + x += 15; + y += 15; + if (x + width > windowWidth) { + x -= (x + width) - windowWidth; + } + if (y + height > windowHeight) { + y -= 20 + height; + } + Tooltip.prototype.setPosition.call(this, x, y); + }; + +}).call(GutterTooltip.prototype); + + + +exports.GutterHandler = GutterHandler; + +}); + +define("ace/mouse/mouse_event",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { +"use strict"; + +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); +var MouseEvent = exports.MouseEvent = function(domEvent, editor) { + this.domEvent = domEvent; + this.editor = editor; + + this.x = this.clientX = domEvent.clientX; + this.y = this.clientY = domEvent.clientY; + + this.$pos = null; + this.$inSelection = null; + + this.propagationStopped = false; + this.defaultPrevented = false; +}; + +(function() { + + this.stopPropagation = function() { + event.stopPropagation(this.domEvent); + this.propagationStopped = true; + }; + + this.preventDefault = function() { + event.preventDefault(this.domEvent); + this.defaultPrevented = true; + }; + + this.stop = function() { + this.stopPropagation(); + this.preventDefault(); + }; + this.getDocumentPosition = function() { + if (this.$pos) + return this.$pos; + + this.$pos = this.editor.renderer.screenToTextCoordinates(this.clientX, this.clientY); + return this.$pos; + }; + this.inSelection = function() { + if (this.$inSelection !== null) + return this.$inSelection; + + var editor = this.editor; + + + var selectionRange = editor.getSelectionRange(); + if (selectionRange.isEmpty()) + this.$inSelection = false; + else { + var pos = this.getDocumentPosition(); + this.$inSelection = selectionRange.contains(pos.row, pos.column); + } + + return this.$inSelection; + }; + this.getButton = function() { + return event.getButton(this.domEvent); + }; + this.getShiftKey = function() { + return this.domEvent.shiftKey; + }; + + this.getAccelKey = useragent.isMac + ? function() { return this.domEvent.metaKey; } + : function() { return this.domEvent.ctrlKey; }; + +}).call(MouseEvent.prototype); + +}); + +define("ace/mouse/dragdrop_handler",["require","exports","module","ace/lib/dom","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { +"use strict"; + +var dom = require("../lib/dom"); +var event = require("../lib/event"); +var useragent = require("../lib/useragent"); + +var AUTOSCROLL_DELAY = 200; +var SCROLL_CURSOR_DELAY = 200; +var SCROLL_CURSOR_HYSTERESIS = 5; + +function DragdropHandler(mouseHandler) { + + var editor = mouseHandler.editor; + + var blankImage = dom.createElement("img"); + blankImage.src = "data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="; + if (useragent.isOpera) + blankImage.style.cssText = "width:1px;height:1px;position:fixed;top:0;left:0;z-index:2147483647;opacity:0;"; + + var exports = ["dragWait", "dragWaitEnd", "startDrag", "dragReadyEnd", "onMouseDrag"]; + + exports.forEach(function(x) { + mouseHandler[x] = this[x]; + }, this); + editor.addEventListener("mousedown", this.onMouseDown.bind(mouseHandler)); + + + var mouseTarget = editor.container; + var dragSelectionMarker, x, y; + var timerId, range; + var dragCursor, counter = 0; + var dragOperation; + var isInternal; + var autoScrollStartTime; + var cursorMovedTime; + var cursorPointOnCaretMoved; + + this.onDragStart = function(e) { + if (this.cancelDrag || !mouseTarget.draggable) { + var self = this; + setTimeout(function(){ + self.startSelect(); + self.captureMouse(e); + }, 0); + return e.preventDefault(); + } + range = editor.getSelectionRange(); + + var dataTransfer = e.dataTransfer; + dataTransfer.effectAllowed = editor.getReadOnly() ? "copy" : "copyMove"; + if (useragent.isOpera) { + editor.container.appendChild(blankImage); + blankImage.scrollTop = 0; + } + dataTransfer.setDragImage && dataTransfer.setDragImage(blankImage, 0, 0); + if (useragent.isOpera) { + editor.container.removeChild(blankImage); + } + dataTransfer.clearData(); + dataTransfer.setData("Text", editor.session.getTextRange()); + + isInternal = true; + this.setState("drag"); + }; + + this.onDragEnd = function(e) { + mouseTarget.draggable = false; + isInternal = false; + this.setState(null); + if (!editor.getReadOnly()) { + var dropEffect = e.dataTransfer.dropEffect; + if (!dragOperation && dropEffect == "move") + editor.session.remove(editor.getSelectionRange()); + editor.$resetCursorStyle(); + } + this.editor.unsetStyle("ace_dragging"); + this.editor.renderer.setCursorStyle(""); + }; + + this.onDragEnter = function(e) { + if (editor.getReadOnly() || !canAccept(e.dataTransfer)) + return; + x = e.clientX; + y = e.clientY; + if (!dragSelectionMarker) + addDragMarker(); + counter++; + e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); + return event.preventDefault(e); + }; + + this.onDragOver = function(e) { + if (editor.getReadOnly() || !canAccept(e.dataTransfer)) + return; + x = e.clientX; + y = e.clientY; + if (!dragSelectionMarker) { + addDragMarker(); + counter++; + } + if (onMouseMoveTimer !== null) + onMouseMoveTimer = null; + + e.dataTransfer.dropEffect = dragOperation = getDropEffect(e); + return event.preventDefault(e); + }; + + this.onDragLeave = function(e) { + counter--; + if (counter <= 0 && dragSelectionMarker) { + clearDragMarker(); + dragOperation = null; + return event.preventDefault(e); + } + }; + + this.onDrop = function(e) { + if (!dragCursor) + return; + var dataTransfer = e.dataTransfer; + if (isInternal) { + switch (dragOperation) { + case "move": + if (range.contains(dragCursor.row, dragCursor.column)) { + range = { + start: dragCursor, + end: dragCursor + }; + } else { + range = editor.moveText(range, dragCursor); + } + break; + case "copy": + range = editor.moveText(range, dragCursor, true); + break; + } + } else { + var dropData = dataTransfer.getData('Text'); + range = { + start: dragCursor, + end: editor.session.insert(dragCursor, dropData) + }; + editor.focus(); + dragOperation = null; + } + clearDragMarker(); + return event.preventDefault(e); + }; + + event.addListener(mouseTarget, "dragstart", this.onDragStart.bind(mouseHandler)); + event.addListener(mouseTarget, "dragend", this.onDragEnd.bind(mouseHandler)); + event.addListener(mouseTarget, "dragenter", this.onDragEnter.bind(mouseHandler)); + event.addListener(mouseTarget, "dragover", this.onDragOver.bind(mouseHandler)); + event.addListener(mouseTarget, "dragleave", this.onDragLeave.bind(mouseHandler)); + event.addListener(mouseTarget, "drop", this.onDrop.bind(mouseHandler)); + + function scrollCursorIntoView(cursor, prevCursor) { + var now = Date.now(); + var vMovement = !prevCursor || cursor.row != prevCursor.row; + var hMovement = !prevCursor || cursor.column != prevCursor.column; + if (!cursorMovedTime || vMovement || hMovement) { + editor.moveCursorToPosition(cursor); + cursorMovedTime = now; + cursorPointOnCaretMoved = {x: x, y: y}; + } else { + var distance = calcDistance(cursorPointOnCaretMoved.x, cursorPointOnCaretMoved.y, x, y); + if (distance > SCROLL_CURSOR_HYSTERESIS) { + cursorMovedTime = null; + } else if (now - cursorMovedTime >= SCROLL_CURSOR_DELAY) { + editor.renderer.scrollCursorIntoView(); + cursorMovedTime = null; + } + } + } + + function autoScroll(cursor, prevCursor) { + var now = Date.now(); + var lineHeight = editor.renderer.layerConfig.lineHeight; + var characterWidth = editor.renderer.layerConfig.characterWidth; + var editorRect = editor.renderer.scroller.getBoundingClientRect(); + var offsets = { + x: { + left: x - editorRect.left, + right: editorRect.right - x + }, + y: { + top: y - editorRect.top, + bottom: editorRect.bottom - y + } + }; + var nearestXOffset = Math.min(offsets.x.left, offsets.x.right); + var nearestYOffset = Math.min(offsets.y.top, offsets.y.bottom); + var scrollCursor = {row: cursor.row, column: cursor.column}; + if (nearestXOffset / characterWidth <= 2) { + scrollCursor.column += (offsets.x.left < offsets.x.right ? -3 : +2); + } + if (nearestYOffset / lineHeight <= 1) { + scrollCursor.row += (offsets.y.top < offsets.y.bottom ? -1 : +1); + } + var vScroll = cursor.row != scrollCursor.row; + var hScroll = cursor.column != scrollCursor.column; + var vMovement = !prevCursor || cursor.row != prevCursor.row; + if (vScroll || (hScroll && !vMovement)) { + if (!autoScrollStartTime) + autoScrollStartTime = now; + else if (now - autoScrollStartTime >= AUTOSCROLL_DELAY) + editor.renderer.scrollCursorIntoView(scrollCursor); + } else { + autoScrollStartTime = null; + } + } + + function onDragInterval() { + var prevCursor = dragCursor; + dragCursor = editor.renderer.screenToTextCoordinates(x, y); + scrollCursorIntoView(dragCursor, prevCursor); + autoScroll(dragCursor, prevCursor); + } + + function addDragMarker() { + range = editor.selection.toOrientedRange(); + dragSelectionMarker = editor.session.addMarker(range, "ace_selection", editor.getSelectionStyle()); + editor.clearSelection(); + if (editor.isFocused()) + editor.renderer.$cursorLayer.setBlinking(false); + clearInterval(timerId); + onDragInterval(); + timerId = setInterval(onDragInterval, 20); + counter = 0; + event.addListener(document, "mousemove", onMouseMove); + } + + function clearDragMarker() { + clearInterval(timerId); + editor.session.removeMarker(dragSelectionMarker); + dragSelectionMarker = null; + editor.selection.fromOrientedRange(range); + if (editor.isFocused() && !isInternal) + editor.$resetCursorStyle(); + range = null; + dragCursor = null; + counter = 0; + autoScrollStartTime = null; + cursorMovedTime = null; + event.removeListener(document, "mousemove", onMouseMove); + } + var onMouseMoveTimer = null; + function onMouseMove() { + if (onMouseMoveTimer == null) { + onMouseMoveTimer = setTimeout(function() { + if (onMouseMoveTimer != null && dragSelectionMarker) + clearDragMarker(); + }, 20); + } + } + + function canAccept(dataTransfer) { + var types = dataTransfer.types; + return !types || Array.prototype.some.call(types, function(type) { + return type == 'text/plain' || type == 'Text'; + }); + } + + function getDropEffect(e) { + var copyAllowed = ['copy', 'copymove', 'all', 'uninitialized']; + var moveAllowed = ['move', 'copymove', 'linkmove', 'all', 'uninitialized']; + + var copyModifierState = useragent.isMac ? e.altKey : e.ctrlKey; + var effectAllowed = "uninitialized"; + try { + effectAllowed = e.dataTransfer.effectAllowed.toLowerCase(); + } catch (e) {} + var dropEffect = "none"; + + if (copyModifierState && copyAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "copy"; + else if (moveAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "move"; + else if (copyAllowed.indexOf(effectAllowed) >= 0) + dropEffect = "copy"; + + return dropEffect; + } +} + +(function() { + + this.dragWait = function() { + var interval = Date.now() - this.mousedownEvent.time; + if (interval > this.editor.getDragDelay()) + this.startDrag(); + }; + + this.dragWaitEnd = function() { + var target = this.editor.container; + target.draggable = false; + this.startSelect(this.mousedownEvent.getDocumentPosition()); + this.selectEnd(); + }; + + this.dragReadyEnd = function(e) { + this.editor.$resetCursorStyle(); + this.editor.unsetStyle("ace_dragging"); + this.editor.renderer.setCursorStyle(""); + this.dragWaitEnd(); + }; + + this.startDrag = function(){ + this.cancelDrag = false; + var editor = this.editor; + var target = editor.container; + target.draggable = true; + editor.renderer.$cursorLayer.setBlinking(false); + editor.setStyle("ace_dragging"); + var cursorStyle = useragent.isWin ? "default" : "move"; + editor.renderer.setCursorStyle(cursorStyle); + this.setState("dragReady"); + }; + + this.onMouseDrag = function(e) { + var target = this.editor.container; + if (useragent.isIE && this.state == "dragReady") { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + if (distance > 3) + target.dragDrop(); + } + if (this.state === "dragWait") { + var distance = calcDistance(this.mousedownEvent.x, this.mousedownEvent.y, this.x, this.y); + if (distance > 0) { + target.draggable = false; + this.startSelect(this.mousedownEvent.getDocumentPosition()); + } + } + }; + + this.onMouseDown = function(e) { + if (!this.$dragEnabled) + return; + this.mousedownEvent = e; + var editor = this.editor; + + var inSelection = e.inSelection(); + var button = e.getButton(); + var clickCount = e.domEvent.detail || 1; + if (clickCount === 1 && button === 0 && inSelection) { + if (e.editor.inMultiSelectMode && (e.getAccelKey() || e.getShiftKey())) + return; + this.mousedownEvent.time = Date.now(); + var eventTarget = e.domEvent.target || e.domEvent.srcElement; + if ("unselectable" in eventTarget) + eventTarget.unselectable = "on"; + if (editor.getDragDelay()) { + if (useragent.isWebKit) { + this.cancelDrag = true; + var mouseTarget = editor.container; + mouseTarget.draggable = true; + } + this.setState("dragWait"); + } else { + this.startDrag(); + } + this.captureMouse(e, this.onMouseDrag.bind(this)); + e.defaultPrevented = true; + } + }; + +}).call(DragdropHandler.prototype); + + +function calcDistance(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); +} + +exports.DragdropHandler = DragdropHandler; + +}); + +define("ace/mouse/touch_handler",["require","exports","module","ace/mouse/mouse_event","ace/lib/dom"], function(require, exports, module) { +"use strict"; + +var MouseEvent = require("./mouse_event").MouseEvent; +var dom = require("../lib/dom"); + +exports.addTouchListeners = function(el, editor) { + var mode = "scroll"; + var startX; + var startY; + var touchStartT; + var lastT; + var longTouchTimer; + var animationTimer; + var animationSteps = 0; + var pos; + var clickCount = 0; + var vX = 0; + var vY = 0; + var pressed; + var contextMenu; + + function createContextMenu() { + var clipboard = window.navigator && window.navigator.clipboard; + var isOpen = false; + var updateMenu = function() { + var selected = editor.getCopyText(); + var hasUndo = editor.session.getUndoManager().hasUndo(); + contextMenu.replaceChild( + dom.buildDom(isOpen ? ["span", + !selected && ["span", { class: "ace_mobile-button", action: "selectall" }, "Select All"], + selected && ["span", { class: "ace_mobile-button", action: "copy" }, "Copy"], + selected && ["span", { class: "ace_mobile-button", action: "cut" }, "Cut"], + clipboard && ["span", { class: "ace_mobile-button", action: "paste" }, "Paste"], + hasUndo && ["span", { class: "ace_mobile-button", action: "undo" }, "Undo"], + ["span", { class: "ace_mobile-button", action: "find" }, "Find"], + ["span", { class: "ace_mobile-button", action: "openCommandPallete" }, "Pallete"] + ] : ["span"]), + contextMenu.firstChild + ); + }; + var handleClick = function(e) { + var action = e.target.getAttribute("action"); + + if (action == "more" || !isOpen) { + isOpen = !isOpen; + return updateMenu(); + } + if (action == "paste") { + clipboard.readText().then(function (text) { + editor.execCommand(action, text); + }); + } + else if (action) { + if (action == "cut" || action == "copy") { + if (clipboard) + clipboard.writeText(editor.getCopyText()); + else + document.execCommand("copy"); + } + editor.execCommand(action); + } + contextMenu.firstChild.style.display = "none"; + isOpen = false; + if (action != "openCommandPallete") + editor.focus(); + }; + contextMenu = dom.buildDom(["div", + { + class: "ace_mobile-menu", + ontouchstart: function(e) { + mode = "menu"; + e.stopPropagation(); + e.preventDefault(); + editor.textInput.focus(); + }, + ontouchend: function(e) { + e.stopPropagation(); + e.preventDefault(); + handleClick(e); + }, + onclick: handleClick + }, + ["span"], + ["span", { class: "ace_mobile-button", action: "more" }, "..."] + ], editor.container); + } + function showContextMenu() { + if (!contextMenu) createContextMenu(); + var cursor = editor.selection.cursor; + var pagePos = editor.renderer.textToScreenCoordinates(cursor.row, cursor.column); + var rect = editor.container.getBoundingClientRect(); + contextMenu.style.top = pagePos.pageY - rect.top - 3 + "px"; + contextMenu.style.right = "10px"; + contextMenu.style.display = ""; + contextMenu.firstChild.style.display = "none"; + editor.on("input", hideContextMenu); + } + function hideContextMenu(e) { + if (contextMenu) + contextMenu.style.display = "none"; + editor.off("input", hideContextMenu); + } + + function handleLongTap() { + longTouchTimer = null; + clearTimeout(longTouchTimer); + var range = editor.selection.getRange(); + var inSelection = range.contains(pos.row, pos.column); + if (range.isEmpty() || !inSelection) { + editor.selection.moveToPosition(pos); + editor.selection.selectWord(); + } + mode = "wait"; + showContextMenu(); + } + function switchToSelectionMode() { + longTouchTimer = null; + clearTimeout(longTouchTimer); + editor.selection.moveToPosition(pos); + var range = clickCount >= 2 + ? editor.selection.getLineRange(pos.row) + : editor.session.getBracketRange(pos); + if (range && !range.isEmpty()) { + editor.selection.setRange(range); + } else { + editor.selection.selectWord(); + } + mode = "wait"; + } + el.addEventListener("contextmenu", function(e) { + if (!pressed) return; + var textarea = editor.textInput.getElement(); + textarea.focus(); + }); + el.addEventListener("touchstart", function (e) { + var touches = e.touches; + if (longTouchTimer || touches.length > 1) { + clearTimeout(longTouchTimer); + longTouchTimer = null; + touchStartT = -1; + mode = "zoom"; + return; + } + + pressed = editor.$mouseHandler.isMousePressed = true; + var h = editor.renderer.layerConfig.lineHeight; + var w = editor.renderer.layerConfig.lineHeight; + var t = e.timeStamp; + lastT = t; + var touchObj = touches[0]; + var x = touchObj.clientX; + var y = touchObj.clientY; + if (Math.abs(startX - x) + Math.abs(startY - y) > h) + touchStartT = -1; + + startX = e.clientX = x; + startY = e.clientY = y; + vX = vY = 0; + + var ev = new MouseEvent(e, editor); + pos = ev.getDocumentPosition(); + + if (t - touchStartT < 500 && touches.length == 1 && !animationSteps) { + clickCount++; + e.preventDefault(); + e.button = 0; + switchToSelectionMode(); + } else { + clickCount = 0; + var cursor = editor.selection.cursor; + var anchor = editor.selection.isEmpty() ? cursor : editor.selection.anchor; + + var cursorPos = editor.renderer.$cursorLayer.getPixelPosition(cursor, true); + var anchorPos = editor.renderer.$cursorLayer.getPixelPosition(anchor, true); + var rect = editor.renderer.scroller.getBoundingClientRect(); + var weightedDistance = function(x, y) { + x = x / w; + y = y / h - 0.75; + return x * x + y * y; + }; + + if (e.clientX < rect.left) { + mode = "zoom"; + return; + } + + var diff1 = weightedDistance( + e.clientX - rect.left - cursorPos.left, + e.clientY - rect.top - cursorPos.top + ); + var diff2 = weightedDistance( + e.clientX - rect.left - anchorPos.left, + e.clientY - rect.top - anchorPos.top + ); + if (diff1 < 3.5 && diff2 < 3.5) + mode = diff1 > diff2 ? "cursor" : "anchor"; + + if (diff2 < 3.5) + mode = "anchor"; + else if (diff1 < 3.5) + mode = "cursor"; + else + mode = "scroll"; + longTouchTimer = setTimeout(handleLongTap, 450); + } + touchStartT = t; + }); + + el.addEventListener("touchend", function (e) { + pressed = editor.$mouseHandler.isMousePressed = false; + if (animationTimer) clearInterval(animationTimer); + if (mode == "zoom") { + mode = ""; + animationSteps = 0; + } else if (longTouchTimer) { + editor.selection.moveToPosition(pos); + animationSteps = 0; + showContextMenu(); + } else if (mode == "scroll") { + animate(); + e.preventDefault(); + hideContextMenu(); + } else { + showContextMenu(); + } + clearTimeout(longTouchTimer); + longTouchTimer = null; + }); + el.addEventListener("touchmove", function (e) { + if (longTouchTimer) { + clearTimeout(longTouchTimer); + longTouchTimer = null; + } + var touches = e.touches; + if (touches.length > 1 || mode == "zoom") return; + + var touchObj = touches[0]; + + var wheelX = startX - touchObj.clientX; + var wheelY = startY - touchObj.clientY; + + if (mode == "wait") { + if (wheelX * wheelX + wheelY * wheelY > 4) + mode = "cursor"; + else + return e.preventDefault(); + } + + startX = touchObj.clientX; + startY = touchObj.clientY; + + e.clientX = touchObj.clientX; + e.clientY = touchObj.clientY; + + var t = e.timeStamp; + var dt = t - lastT; + lastT = t; + if (mode == "scroll") { + var mouseEvent = new MouseEvent(e, editor); + mouseEvent.speed = 1; + mouseEvent.wheelX = wheelX; + mouseEvent.wheelY = wheelY; + if (10 * Math.abs(wheelX) < Math.abs(wheelY)) wheelX = 0; + if (10 * Math.abs(wheelY) < Math.abs(wheelX)) wheelY = 0; + if (dt != 0) { + vX = wheelX / dt; + vY = wheelY / dt; + } + editor._emit("mousewheel", mouseEvent); + if (!mouseEvent.propagationStopped) { + vX = vY = 0; + } + } + else { + var ev = new MouseEvent(e, editor); + var pos = ev.getDocumentPosition(); + if (mode == "cursor") + editor.selection.moveCursorToPosition(pos); + else if (mode == "anchor") + editor.selection.setSelectionAnchor(pos.row, pos.column); + editor.renderer.scrollCursorIntoView(pos); + e.preventDefault(); + } + }); + + function animate() { + animationSteps += 60; + animationTimer = setInterval(function() { + if (animationSteps-- <= 0) { + clearInterval(animationTimer); + animationTimer = null; + } + if (Math.abs(vX) < 0.01) vX = 0; + if (Math.abs(vY) < 0.01) vY = 0; + if (animationSteps < 20) vX = 0.9 * vX; + if (animationSteps < 20) vY = 0.9 * vY; + var oldScrollTop = editor.session.getScrollTop(); + editor.renderer.scrollBy(10 * vX, 10 * vY); + if (oldScrollTop == editor.session.getScrollTop()) + animationSteps = 0; + }, 10); + } +}; + +}); + +define("ace/lib/net",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +"use strict"; +var dom = require("./dom"); + +exports.get = function (url, callback) { + var xhr = new XMLHttpRequest(); + xhr.open('GET', url, true); + xhr.onreadystatechange = function () { + if (xhr.readyState === 4) { + callback(xhr.responseText); + } + }; + xhr.send(null); +}; + +exports.loadScript = function(path, callback) { + var head = dom.getDocumentHead(); + var s = document.createElement('script'); + + s.src = path; + head.appendChild(s); + + s.onload = s.onreadystatechange = function(_, isAbort) { + if (isAbort || !s.readyState || s.readyState == "loaded" || s.readyState == "complete") { + s = s.onload = s.onreadystatechange = null; + if (!isAbort) + callback(); + } + }; +}; +exports.qualifyURL = function(url) { + var a = document.createElement('a'); + a.href = url; + return a.href; +}; + +}); + +define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var EventEmitter = {}; +var stopPropagation = function() { this.propagationStopped = true; }; +var preventDefault = function() { this.defaultPrevented = true; }; + +EventEmitter._emit = +EventEmitter._dispatchEvent = function(eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + + if (typeof e != "object" || !e) + e = {}; + + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + + listeners = listeners.slice(); + for (var i=0; i 1) + base = parts[parts.length - 2]; + var path = options[component + "Path"]; + if (path == null) { + path = options.basePath; + } else if (sep == "/") { + component = sep = ""; + } + if (path && path.slice(-1) != "/") + path += "/"; + return path + component + sep + base + this.get("suffix"); +}; + +exports.setModuleUrl = function(name, subst) { + return options.$moduleUrls[name] = subst; +}; + +exports.$loading = {}; +exports.loadModule = function(moduleName, onLoad) { + var module, moduleType; + if (Array.isArray(moduleName)) { + moduleType = moduleName[0]; + moduleName = moduleName[1]; + } + + try { + module = require(moduleName); + } catch (e) {} + if (module && !exports.$loading[moduleName]) + return onLoad && onLoad(module); + + if (!exports.$loading[moduleName]) + exports.$loading[moduleName] = []; + + exports.$loading[moduleName].push(onLoad); + + if (exports.$loading[moduleName].length > 1) + return; + + var afterLoad = function() { + require([moduleName], function(module) { + exports._emit("load.module", {name: moduleName, module: module}); + var listeners = exports.$loading[moduleName]; + exports.$loading[moduleName] = null; + listeners.forEach(function(onLoad) { + onLoad && onLoad(module); + }); + }); + }; + + if (!exports.get("packaged")) + return afterLoad(); + + net.loadScript(exports.moduleUrl(moduleName, moduleType), afterLoad); + reportErrorIfPathIsNotConfigured(); +}; + +var reportErrorIfPathIsNotConfigured = function() { + if ( + !options.basePath && !options.workerPath + && !options.modePath && !options.themePath + && !Object.keys(options.$moduleUrls).length + ) { + console.error( + "Unable to infer path to ace from script src,", + "use ace.config.set('basePath', 'path') to enable dynamic loading of modes and themes", + "or with webpack use ace/webpack-resolver" + ); + reportErrorIfPathIsNotConfigured = function() {}; + } +}; +init(true);function init(packaged) { + + if (!global || !global.document) + return; + + options.packaged = packaged || require.packaged || module.packaged || (global.define && define.packaged); + + var scriptOptions = {}; + var scriptUrl = ""; + var currentScript = (document.currentScript || document._currentScript ); // native or polyfill + var currentDocument = currentScript && currentScript.ownerDocument || document; + + var scripts = currentDocument.getElementsByTagName("script"); + for (var i=0; i 0){ + if (action == 0x10){ + for(i = condPos; i < ix; i++){ + levels[i] = 1; + } + condPos = -1; + } else { + condPos = -1; + } + } + cond = impTab[newState][6]; + if (cond){ + if(condPos == -1){ + condPos = ix; + } + }else{ + if (condPos > -1){ + for(i = condPos; i < ix; i++){ + levels[i] = newLevel; + } + condPos = -1; + } + } + if (charTypes[ix] == B){ + levels[ix] = 0; + } + hiLevel |= newLevel; + } + if (hasUBAT_S){ + for(i = 0; i < len; i++){ + if(charTypes[i] == S){ + levels[i] = dir; + for(var j = i - 1; j >= 0; j--){ + if(charTypes[j] == WS){ + levels[j] = dir; + }else{ + break; + } + } + } + } + } +} + +function _invertLevel(lev, levels, _array) { + if (hiLevel < lev){ + return; + } + if (lev == 1 && dir == RTL && !hasUBAT_B){ + _array.reverse(); + return; + } + var len = _array.length, start = 0, end, lo, hi, tmp; + while(start < len){ + if (levels[start] >= lev){ + end = start + 1; + while(end < len && levels[end] >= lev){ + end++; + } + for(lo = start, hi = end - 1 ; lo < hi; lo++, hi--){ + tmp = _array[lo]; + _array[lo] = _array[hi]; + _array[hi] = tmp; + } + start = end; + } + start++; + } +} + +function _getCharClass(chars, types, classes, ix) { + var cType = types[ix], wType, nType, len, i; + switch(cType){ + case L: + case R: + lastArabic = false; + case ON: + case AN: + return cType; + case EN: + return lastArabic ? AN : EN; + case AL: + lastArabic = true; + hasUBAT_AL = true; + return R; + case WS: + return ON; + case CS: + if (ix < 1 || (ix + 1) >= types.length || + ((wType = classes[ix - 1]) != EN && wType != AN) || + ((nType = types[ix + 1]) != EN && nType != AN)){ + return ON; + } + if (lastArabic){nType = AN;} + return nType == wType ? nType : ON; + case ES: + wType = ix > 0 ? classes[ix - 1] : B; + if (wType == EN && (ix + 1) < types.length && types[ix + 1] == EN){ + return EN; + } + return ON; + case ET: + if (ix > 0 && classes[ix - 1] == EN){ + return EN; + } + if (lastArabic){ + return ON; + } + i = ix + 1; + len = types.length; + while (i < len && types[i] == ET){ + i++; + } + if (i < len && types[i] == EN){ + return EN; + } + return ON; + case NSM: + len = types.length; + i = ix + 1; + while (i < len && types[i] == NSM){ + i++; + } + if (i < len){ + var c = chars[ix], rtlCandidate = (c >= 0x0591 && c <= 0x08FF) || c == 0xFB1E; + + wType = types[i]; + if (rtlCandidate && (wType == R || wType == AL)){ + return R; + } + } + + if (ix < 1 || (wType = types[ix - 1]) == B){ + return ON; + } + return classes[ix - 1]; + case B: + lastArabic = false; + hasUBAT_B = true; + return dir; + case S: + hasUBAT_S = true; + return ON; + case LRE: + case RLE: + case LRO: + case RLO: + case PDF: + lastArabic = false; + case BN: + return ON; + } +} + +function _getCharacterType( ch ) { + var uc = ch.charCodeAt(0), hi = uc >> 8; + + if (hi == 0) { + return ((uc > 0x00BF) ? L : UnicodeTBL00[uc]); + } else if (hi == 5) { + return (/[\u0591-\u05f4]/.test(ch) ? R : L); + } else if (hi == 6) { + if (/[\u0610-\u061a\u064b-\u065f\u06d6-\u06e4\u06e7-\u06ed]/.test(ch)) + return NSM; + else if (/[\u0660-\u0669\u066b-\u066c]/.test(ch)) + return AN; + else if (uc == 0x066A) + return ET; + else if (/[\u06f0-\u06f9]/.test(ch)) + return EN; + else + return AL; + } else if (hi == 0x20 && uc <= 0x205F) { + return UnicodeTBL20[uc & 0xFF]; + } else if (hi == 0xFE) { + return (uc >= 0xFE70 ? AL : ON); + } + return ON; +} + +function _isArabicDiacritics( ch ) { + return (ch >= '\u064b' && ch <= '\u0655'); +} +exports.L = L; +exports.R = R; +exports.EN = EN; +exports.ON_R = 3; +exports.AN = 4; +exports.R_H = 5; +exports.B = 6; +exports.RLE = 7; + +exports.DOT = "\xB7"; +exports.doBidiReorder = function(text, textCharTypes, isRtl) { + if (text.length < 2) + return {}; + + var chars = text.split(""), logicalFromVisual = new Array(chars.length), + bidiLevels = new Array(chars.length), levels = []; + + dir = isRtl ? RTL : LTR; + + _computeLevels(chars, levels, chars.length, textCharTypes); + + for (var i = 0; i < logicalFromVisual.length; logicalFromVisual[i] = i, i++); + + _invertLevel(2, levels, logicalFromVisual); + _invertLevel(1, levels, logicalFromVisual); + + for (var i = 0; i < logicalFromVisual.length - 1; i++) { //fix levels to reflect character width + if (textCharTypes[i] === AN) { + levels[i] = exports.AN; + } else if (levels[i] === R && ((textCharTypes[i] > AL && textCharTypes[i] < LRE) + || textCharTypes[i] === ON || textCharTypes[i] === BN)) { + levels[i] = exports.ON_R; + } else if ((i > 0 && chars[i - 1] === '\u0644') && /\u0622|\u0623|\u0625|\u0627/.test(chars[i])) { + levels[i - 1] = levels[i] = exports.R_H; + i++; + } + } + if (chars[chars.length - 1] === exports.DOT) + levels[chars.length - 1] = exports.B; + + if (chars[0] === '\u202B') + levels[0] = exports.RLE; + + for (var i = 0; i < logicalFromVisual.length; i++) { + bidiLevels[i] = levels[logicalFromVisual[i]]; + } + + return {'logicalFromVisual': logicalFromVisual, 'bidiLevels': bidiLevels}; +}; +exports.hasBidiCharacters = function(text, textCharTypes){ + var ret = false; + for (var i = 0; i < text.length; i++){ + textCharTypes[i] = _getCharacterType(text.charAt(i)); + if (!ret && (textCharTypes[i] == R || textCharTypes[i] == AL || textCharTypes[i] == AN)) + ret = true; + } + return ret; +}; +exports.getVisualFromLogicalIdx = function(logIdx, rowMap) { + for (var i = 0; i < rowMap.logicalFromVisual.length; i++) { + if (rowMap.logicalFromVisual[i] == logIdx) + return i; + } + return 0; +}; + +}); + +define("ace/bidihandler",["require","exports","module","ace/lib/bidiutil","ace/lib/lang"], function(require, exports, module) { +"use strict"; + +var bidiUtil = require("./lib/bidiutil"); +var lang = require("./lib/lang"); +var bidiRE = /[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\u202B]/; +var BidiHandler = function(session) { + this.session = session; + this.bidiMap = {}; + this.currentRow = null; + this.bidiUtil = bidiUtil; + this.charWidths = []; + this.EOL = "\xAC"; + this.showInvisibles = true; + this.isRtlDir = false; + this.$isRtl = false; + this.line = ""; + this.wrapIndent = 0; + this.EOF = "\xB6"; + this.RLE = "\u202B"; + this.contentWidth = 0; + this.fontMetrics = null; + this.rtlLineOffset = 0; + this.wrapOffset = 0; + this.isMoveLeftOperation = false; + this.seenBidi = bidiRE.test(session.getValue()); +}; + +(function() { + this.isBidiRow = function(screenRow, docRow, splitIndex) { + if (!this.seenBidi) + return false; + if (screenRow !== this.currentRow) { + this.currentRow = screenRow; + this.updateRowLine(docRow, splitIndex); + this.updateBidiMap(); + } + return this.bidiMap.bidiLevels; + }; + + this.onChange = function(delta) { + if (!this.seenBidi) { + if (delta.action == "insert" && bidiRE.test(delta.lines.join("\n"))) { + this.seenBidi = true; + this.currentRow = null; + } + } + else { + this.currentRow = null; + } + }; + + this.getDocumentRow = function() { + var docRow = 0; + var rowCache = this.session.$screenRowCache; + if (rowCache.length) { + var index = this.session.$getRowCacheIndex(rowCache, this.currentRow); + if (index >= 0) + docRow = this.session.$docRowCache[index]; + } + + return docRow; + }; + + this.getSplitIndex = function() { + var splitIndex = 0; + var rowCache = this.session.$screenRowCache; + if (rowCache.length) { + var currentIndex, prevIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow); + while (this.currentRow - splitIndex > 0) { + currentIndex = this.session.$getRowCacheIndex(rowCache, this.currentRow - splitIndex - 1); + if (currentIndex !== prevIndex) + break; + + prevIndex = currentIndex; + splitIndex++; + } + } else { + splitIndex = this.currentRow; + } + + return splitIndex; + }; + + this.updateRowLine = function(docRow, splitIndex) { + if (docRow === undefined) + docRow = this.getDocumentRow(); + + var isLastRow = (docRow === this.session.getLength() - 1), + endOfLine = isLastRow ? this.EOF : this.EOL; + + this.wrapIndent = 0; + this.line = this.session.getLine(docRow); + this.isRtlDir = this.$isRtl || this.line.charAt(0) === this.RLE; + if (this.session.$useWrapMode) { + var splits = this.session.$wrapData[docRow]; + if (splits) { + if (splitIndex === undefined) + splitIndex = this.getSplitIndex(); + + if(splitIndex > 0 && splits.length) { + this.wrapIndent = splits.indent; + this.wrapOffset = this.wrapIndent * this.charWidths[bidiUtil.L]; + this.line = (splitIndex < splits.length) ? + this.line.substring(splits[splitIndex - 1], splits[splitIndex]) : + this.line.substring(splits[splits.length - 1]); + } else { + this.line = this.line.substring(0, splits[splitIndex]); + } + } + if (splitIndex == splits.length) + this.line += (this.showInvisibles) ? endOfLine : bidiUtil.DOT; + } else { + this.line += this.showInvisibles ? endOfLine : bidiUtil.DOT; + } + var session = this.session, shift = 0, size; + this.line = this.line.replace(/\t|[\u1100-\u2029, \u202F-\uFFE6]/g, function(ch, i){ + if (ch === '\t' || session.isFullWidth(ch.charCodeAt(0))) { + size = (ch === '\t') ? session.getScreenTabSize(i + shift) : 2; + shift += size - 1; + return lang.stringRepeat(bidiUtil.DOT, size); + } + return ch; + }); + + if (this.isRtlDir) { + this.fontMetrics.$main.textContent = (this.line.charAt(this.line.length - 1) == bidiUtil.DOT) ? this.line.substr(0, this.line.length - 1) : this.line; + this.rtlLineOffset = this.contentWidth - this.fontMetrics.$main.getBoundingClientRect().width; + } + }; + + this.updateBidiMap = function() { + var textCharTypes = []; + if (bidiUtil.hasBidiCharacters(this.line, textCharTypes) || this.isRtlDir) { + this.bidiMap = bidiUtil.doBidiReorder(this.line, textCharTypes, this.isRtlDir); + } else { + this.bidiMap = {}; + } + }; + this.markAsDirty = function() { + this.currentRow = null; + }; + this.updateCharacterWidths = function(fontMetrics) { + if (this.characterWidth === fontMetrics.$characterSize.width) + return; + + this.fontMetrics = fontMetrics; + var characterWidth = this.characterWidth = fontMetrics.$characterSize.width; + var bidiCharWidth = fontMetrics.$measureCharWidth("\u05d4"); + + this.charWidths[bidiUtil.L] = this.charWidths[bidiUtil.EN] = this.charWidths[bidiUtil.ON_R] = characterWidth; + this.charWidths[bidiUtil.R] = this.charWidths[bidiUtil.AN] = bidiCharWidth; + this.charWidths[bidiUtil.R_H] = bidiCharWidth * 0.45; + this.charWidths[bidiUtil.B] = this.charWidths[bidiUtil.RLE] = 0; + + this.currentRow = null; + }; + + this.setShowInvisibles = function(showInvisibles) { + this.showInvisibles = showInvisibles; + this.currentRow = null; + }; + + this.setEolChar = function(eolChar) { + this.EOL = eolChar; + }; + + this.setContentWidth = function(width) { + this.contentWidth = width; + }; + + this.isRtlLine = function(row) { + if (this.$isRtl) return true; + if (row != undefined) + return (this.session.getLine(row).charAt(0) == this.RLE); + else + return this.isRtlDir; + }; + + this.setRtlDirection = function(editor, isRtlDir) { + var cursor = editor.getCursorPosition(); + for (var row = editor.selection.getSelectionAnchor().row; row <= cursor.row; row++) { + if (!isRtlDir && editor.session.getLine(row).charAt(0) === editor.session.$bidiHandler.RLE) + editor.session.doc.removeInLine(row, 0, 1); + else if (isRtlDir && editor.session.getLine(row).charAt(0) !== editor.session.$bidiHandler.RLE) + editor.session.doc.insert({column: 0, row: row}, editor.session.$bidiHandler.RLE); + } + }; + this.getPosLeft = function(col) { + col -= this.wrapIndent; + var leftBoundary = (this.line.charAt(0) === this.RLE) ? 1 : 0; + var logicalIdx = (col > leftBoundary) ? (this.session.getOverwrite() ? col : col - 1) : leftBoundary; + var visualIdx = bidiUtil.getVisualFromLogicalIdx(logicalIdx, this.bidiMap), + levels = this.bidiMap.bidiLevels, left = 0; + + if (!this.session.getOverwrite() && col <= leftBoundary && levels[visualIdx] % 2 !== 0) + visualIdx++; + + for (var i = 0; i < visualIdx; i++) { + left += this.charWidths[levels[i]]; + } + + if (!this.session.getOverwrite() && (col > leftBoundary) && (levels[visualIdx] % 2 === 0)) + left += this.charWidths[levels[visualIdx]]; + + if (this.wrapIndent) + left += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset; + + if (this.isRtlDir) + left += this.rtlLineOffset; + + return left; + }; + this.getSelections = function(startCol, endCol) { + var map = this.bidiMap, levels = map.bidiLevels, level, selections = [], offset = 0, + selColMin = Math.min(startCol, endCol) - this.wrapIndent, selColMax = Math.max(startCol, endCol) - this.wrapIndent, + isSelected = false, isSelectedPrev = false, selectionStart = 0; + + if (this.wrapIndent) + offset += this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset; + + for (var logIdx, visIdx = 0; visIdx < levels.length; visIdx++) { + logIdx = map.logicalFromVisual[visIdx]; + level = levels[visIdx]; + isSelected = (logIdx >= selColMin) && (logIdx < selColMax); + if (isSelected && !isSelectedPrev) { + selectionStart = offset; + } else if (!isSelected && isSelectedPrev) { + selections.push({left: selectionStart, width: offset - selectionStart}); + } + offset += this.charWidths[level]; + isSelectedPrev = isSelected; + } + + if (isSelected && (visIdx === levels.length)) { + selections.push({left: selectionStart, width: offset - selectionStart}); + } + + if(this.isRtlDir) { + for (var i = 0; i < selections.length; i++) { + selections[i].left += this.rtlLineOffset; + } + } + return selections; + }; + this.offsetToCol = function(posX) { + if(this.isRtlDir) + posX -= this.rtlLineOffset; + + var logicalIdx = 0, posX = Math.max(posX, 0), + offset = 0, visualIdx = 0, levels = this.bidiMap.bidiLevels, + charWidth = this.charWidths[levels[visualIdx]]; + + if (this.wrapIndent) + posX -= this.isRtlDir ? (-1 * this.wrapOffset) : this.wrapOffset; + + while(posX > offset + charWidth/2) { + offset += charWidth; + if(visualIdx === levels.length - 1) { + charWidth = 0; + break; + } + charWidth = this.charWidths[levels[++visualIdx]]; + } + + if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && (levels[visualIdx] % 2 === 0)){ + if(posX < offset) + visualIdx--; + logicalIdx = this.bidiMap.logicalFromVisual[visualIdx]; + + } else if (visualIdx > 0 && (levels[visualIdx - 1] % 2 === 0) && (levels[visualIdx] % 2 !== 0)){ + logicalIdx = 1 + ((posX > offset) ? this.bidiMap.logicalFromVisual[visualIdx] + : this.bidiMap.logicalFromVisual[visualIdx - 1]); + + } else if ((this.isRtlDir && visualIdx === levels.length - 1 && charWidth === 0 && (levels[visualIdx - 1] % 2 === 0)) + || (!this.isRtlDir && visualIdx === 0 && (levels[visualIdx] % 2 !== 0))){ + logicalIdx = 1 + this.bidiMap.logicalFromVisual[visualIdx]; + } else { + if (visualIdx > 0 && (levels[visualIdx - 1] % 2 !== 0) && charWidth !== 0) + visualIdx--; + logicalIdx = this.bidiMap.logicalFromVisual[visualIdx]; + } + + if (logicalIdx === 0 && this.isRtlDir) + logicalIdx++; + + return (logicalIdx + this.wrapIndent); + }; + +}).call(BidiHandler.prototype); + +exports.BidiHandler = BidiHandler; +}); + +define("ace/selection",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -4812,20 +5593,24 @@ var Selection = function(session) { this.doc = session.getDocument(); this.clearSelection(); - this.lead = this.selectionLead = this.doc.createAnchor(0, 0); - this.anchor = this.selectionAnchor = this.doc.createAnchor(0, 0); + this.cursor = this.lead = this.doc.createAnchor(0, 0); + this.anchor = this.doc.createAnchor(0, 0); + this.$silent = false; var self = this; - this.lead.on("change", function(e) { - self._emit("changeCursor"); - if (!self.$isEmpty) + this.cursor.on("change", function(e) { + self.$cursorChanged = true; + if (!self.$silent) + self._emit("changeCursor"); + if (!self.$isEmpty && !self.$silent) self._emit("changeSelection"); if (!self.$keepDesiredColumnOnChange && e.old.column != e.value.column) self.$desiredColumn = null; }); - this.selectionAnchor.on("change", function() { - if (!self.$isEmpty) + this.anchor.on("change", function() { + self.$anchorChanged = true; + if (!self.$isEmpty && !self.$silent) self._emit("changeSelection"); }); }; @@ -4834,58 +5619,31 @@ var Selection = function(session) { oop.implement(this, EventEmitter); this.isEmpty = function() { - return (this.$isEmpty || ( + return this.$isEmpty || ( this.anchor.row == this.lead.row && this.anchor.column == this.lead.column - )); + ); }; this.isMultiLine = function() { - if (this.isEmpty()) { - return false; - } - - return this.getRange().isMultiLine(); + return !this.$isEmpty && this.anchor.row != this.cursor.row; }; this.getCursor = function() { return this.lead.getPosition(); }; this.setSelectionAnchor = function(row, column) { + this.$isEmpty = false; this.anchor.setPosition(row, column); - - if (this.$isEmpty) { - this.$isEmpty = false; - this._emit("changeSelection"); - } }; + this.getAnchor = this.getSelectionAnchor = function() { if (this.$isEmpty) return this.getSelectionLead(); - else - return this.anchor.getPosition(); + + return this.anchor.getPosition(); }; this.getSelectionLead = function() { return this.lead.getPosition(); }; - this.shiftSelection = function(columns) { - if (this.$isEmpty) { - this.moveCursorTo(this.lead.row, this.lead.column + columns); - return; - } - - var anchor = this.getSelectionAnchor(); - var lead = this.getSelectionLead(); - - var isBackwards = this.isBackwards(); - - if (!isBackwards || anchor.column !== 0) - this.setSelectionAnchor(anchor.row, anchor.column + columns); - - if (isBackwards || lead.column !== 0) { - this.$moveSelection(function() { - this.moveCursorTo(lead.row, lead.column + columns); - }); - } - }; this.isBackwards = function() { var anchor = this.anchor; var lead = this.lead; @@ -4895,15 +5653,12 @@ var Selection = function(session) { var anchor = this.anchor; var lead = this.lead; - if (this.isEmpty()) + if (this.$isEmpty) return Range.fromPoints(lead, lead); - if (this.isBackwards()) { - return Range.fromPoints(lead, anchor); - } - else { - return Range.fromPoints(anchor, lead); - } + return this.isBackwards() + ? Range.fromPoints(lead, anchor) + : Range.fromPoints(anchor, lead); }; this.clearSelection = function() { if (!this.$isEmpty) { @@ -4912,22 +5667,28 @@ var Selection = function(session) { } }; this.selectAll = function() { - var lastRow = this.doc.getLength() - 1; - this.setSelectionAnchor(0, 0); - this.moveCursorTo(lastRow, this.doc.getLine(lastRow).length); + this.$setSelection(0, 0, Number.MAX_VALUE, Number.MAX_VALUE); }; this.setRange = this.setSelectionRange = function(range, reverse) { - if (reverse) { - this.setSelectionAnchor(range.end.row, range.end.column); - this.selectTo(range.start.row, range.start.column); - } else { - this.setSelectionAnchor(range.start.row, range.start.column); - this.selectTo(range.end.row, range.end.column); - } - if (this.getRange().isEmpty()) - this.$isEmpty = true; - this.$desiredColumn = null; + var start = reverse ? range.end : range.start; + var end = reverse ? range.start : range.end; + this.$setSelection(start.row, start.column, end.row, end.column); + }; + + this.$setSelection = function(anchorRow, anchorColumn, cursorRow, cursorColumn) { + var wasEmpty = this.$isEmpty; + var wasMultiselect = this.inMultiSelectMode; + this.$silent = true; + this.$cursorChanged = this.$anchorChanged = false; + this.anchor.setPosition(anchorRow, anchorColumn); + this.cursor.setPosition(cursorRow, cursorColumn); + this.$isEmpty = !Range.comparePoints(this.anchor, this.cursor); + this.$silent = false; + if (this.$cursorChanged) + this._emit("changeCursor"); + if (this.$cursorChanged || this.$anchorChanged || wasEmpty != this.$isEmpty || wasMultiselect) + this._emit("changeSelection"); }; this.$moveSelection = function(mover) { @@ -5035,8 +5796,8 @@ var Selection = function(session) { start = cursor.column - tabSize; end = cursor.column; } - return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(" ").length-1 == tabSize - } + return this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(start, end).split(" ").length-1 == tabSize; + }; this.moveCursorLeft = function() { var cursor = this.lead.getPosition(), fold; @@ -5121,7 +5882,6 @@ var Selection = function(session) { var line = this.doc.getLine(row); var rightOfCursor = line.substring(column); - var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; var fold = this.session.getFoldAt(row, column, 1); @@ -5129,7 +5889,7 @@ var Selection = function(session) { this.moveCursorTo(fold.end.row, fold.end.column); return; } - if (match = this.session.nonTokenRe.exec(rightOfCursor)) { + if (this.session.nonTokenRe.exec(rightOfCursor)) { column += this.session.nonTokenRe.lastIndex; this.session.nonTokenRe.lastIndex = 0; rightOfCursor = line.substring(column); @@ -5141,7 +5901,7 @@ var Selection = function(session) { this.moveCursorWordRight(); return; } - if (match = this.session.tokenRe.exec(rightOfCursor)) { + if (this.session.tokenRe.exec(rightOfCursor)) { column += this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } @@ -5163,10 +5923,9 @@ var Selection = function(session) { } var leftOfCursor = lang.stringReverse(str); - var match; this.session.nonTokenRe.lastIndex = 0; this.session.tokenRe.lastIndex = 0; - if (match = this.session.nonTokenRe.exec(leftOfCursor)) { + if (this.session.nonTokenRe.exec(leftOfCursor)) { column -= this.session.nonTokenRe.lastIndex; leftOfCursor = leftOfCursor.slice(this.session.nonTokenRe.lastIndex); this.session.nonTokenRe.lastIndex = 0; @@ -5178,7 +5937,7 @@ var Selection = function(session) { this.moveCursorWordLeft(); return; } - if (match = this.session.tokenRe.exec(leftOfCursor)) { + if (this.session.tokenRe.exec(leftOfCursor)) { column -= this.session.tokenRe.lastIndex; this.session.tokenRe.lastIndex = 0; } @@ -5187,12 +5946,12 @@ var Selection = function(session) { }; this.$shortWordEndIndex = function(rightOfCursor) { - var match, index = 0, ch; + var index = 0, ch; var whitespaceRe = /\s/; var tokenRe = this.session.tokenRe; tokenRe.lastIndex = 0; - if (match = this.session.tokenRe.exec(rightOfCursor)) { + if (this.session.tokenRe.exec(rightOfCursor)) { index = this.session.tokenRe.lastIndex; } else { while ((ch = rightOfCursor[index]) && whitespaceRe.test(ch)) @@ -5294,14 +6053,25 @@ var Selection = function(session) { this.lead.column ); + var offsetX; + if (chars === 0) { + if (rows !== 0) { + if (this.session.$bidiHandler.isBidiRow(screenPos.row, this.lead.row)) { + offsetX = this.session.$bidiHandler.getPosLeft(screenPos.column); + screenPos.column = Math.round(offsetX / this.session.$bidiHandler.charWidths[0]); + } else { + offsetX = screenPos.column * this.session.$bidiHandler.charWidths[0]; + } + } + if (this.$desiredColumn) screenPos.column = this.$desiredColumn; else this.$desiredColumn = screenPos.column; } - var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column); + var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenPos.column, offsetX); if (rows !== 0 && chars === 0 && docPos.row === this.lead.row && docPos.column === this.lead.column) { if (this.session.lineWidgets && this.session.lineWidgets[docPos.row]) { @@ -5322,6 +6092,13 @@ var Selection = function(session) { } this.$keepDesiredColumnOnChange = true; + var line = this.session.getLine(row); + if (/[\uDC00-\uDFFF]/.test(line.charAt(column)) && line.charAt(column - 1)) { + if (this.lead.row == row && this.lead.column == column + 1) + column = column - 1; + else + column = column + 1; + } this.lead.setPosition(row, column); this.$keepDesiredColumnOnChange = false; @@ -5363,9 +6140,9 @@ var Selection = function(session) { try { func(this); var end = this.getCursor(); - return Range.fromPoints(start,end); + return Range.fromPoints(start, end); } catch(e) { - return Range.fromPoints(start,start); + return Range.fromPoints(start, start); } finally { this.moveCursorToPosition(start); } @@ -5387,7 +6164,7 @@ var Selection = function(session) { this.fromJSON = function(data) { if (data.start == undefined) { - if (this.rangeList) { + if (this.rangeList && data.length > 1) { this.toSingleRange(data[0]); for (var i = data.length; i--; ) { var r = Range.fromPoints(data[i].start, data[i].end); @@ -5396,8 +6173,9 @@ var Selection = function(session) { this.addRange(r, true); } return; - } else + } else { data = data[0]; + } } if (this.rangeList) this.toSingleRange(data); @@ -5422,7 +6200,7 @@ var Selection = function(session) { exports.Selection = Selection; }); -ace.define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) { +define("ace/tokenizer",["require","exports","module","ace/config"], function(require, exports, module) { "use strict"; var config = require("./config"); @@ -5550,7 +6328,7 @@ var Tokenizer = function(rules) { this.removeCapturingGroups = function(src) { var r = src.replace( - /\[(?:\\.|[^\]])*?\]|\\.|\(\?[:=!]|(\()/g, + /\\.|\[(?:\\.|[^\\\]])*|\(\?[:=!]|(\()/g, function(x, y) {return y ? "(?:" : x;} ); return r; @@ -5577,7 +6355,7 @@ var Tokenizer = function(rules) { } else if (parenOpen) { stack++; if (parenOpen.length != 1) { - lastCapture.stack = stack + lastCapture.stack = stack; lastCapture.start = index; } } @@ -5597,8 +6375,8 @@ var Tokenizer = function(rules) { var stack = startState.slice(0); startState = stack[0]; if (startState === "#tmp") { - stack.shift() - startState = stack.shift() + stack.shift(); + startState = stack.shift(); } } else var stack = []; @@ -5704,7 +6482,7 @@ var Tokenizer = function(rules) { if (token.type) tokens.push(token); token = { - value: line.substring(lastIndex, lastIndex += 2000), + value: line.substring(lastIndex, lastIndex += 500), type: "overflow" }; } @@ -5734,7 +6512,7 @@ var Tokenizer = function(rules) { exports.Tokenizer = Tokenizer; }); -ace.define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/text_highlight_rules",["require","exports","module","ace/lib/lang"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); @@ -5923,8 +6701,8 @@ var TextHighlightRules = function() { this.$keywordList = Object.keys(keywords); map = null; return ignoreCase - ? function(value) {return keywords[value.toLowerCase()] || defaultToken } - : function(value) {return keywords[value] || defaultToken }; + ? function(value) {return keywords[value.toLowerCase()] || defaultToken; } + : function(value) {return keywords[value] || defaultToken; }; }; this.getKeywords = function() { @@ -5936,7 +6714,7 @@ var TextHighlightRules = function() { exports.TextHighlightRules = TextHighlightRules; }); -ace.define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) { +define("ace/mode/behaviour",["require","exports","module"], function(require, exports, module) { "use strict"; var Behaviour = function() { @@ -5953,7 +6731,7 @@ var Behaviour = function() { this.$behaviours[name] = {}; } this.$behaviours[name][action] = callback; - } + }; this.addBehaviours = function (behaviours) { for (var key in behaviours) { @@ -5961,13 +6739,13 @@ var Behaviour = function() { this.add(key, action, behaviours[key][action]); } } - } + }; this.remove = function (name) { if (this.$behaviours && this.$behaviours[name]) { delete this.$behaviours[name]; } - } + }; this.inherit = function (mode, filter) { if (typeof mode === "function") { @@ -5976,13 +6754,13 @@ var Behaviour = function() { var behaviours = mode.getBehaviours(filter); } this.addBehaviours(behaviours); - } + }; this.getBehaviours = function (filter) { if (!filter) { return this.$behaviours; } else { - var ret = {} + var ret = {}; for (var i = 0; i < filter.length; i++) { if (this.$behaviours[filter[i]]) { ret[filter[i]] = this.$behaviours[filter[i]]; @@ -5990,15 +6768,17 @@ var Behaviour = function() { } return ret; } - } + }; }).call(Behaviour.prototype); exports.Behaviour = Behaviour; }); -ace.define("ace/token_iterator",["require","exports","module"], function(require, exports, module) { +define("ace/token_iterator",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; + +var Range = require("./range").Range; var TokenIterator = function(session, initialRow, initialColumn) { this.$session = session; this.$row = initialRow; @@ -6067,13 +6847,18 @@ var TokenIterator = function(session, initialRow, initialColumn) { this.getCurrentTokenPosition = function() { return {row: this.$row, column: this.getCurrentTokenColumn()}; }; - + this.getCurrentTokenRange = function() { + var token = this.$rowTokens[this.$tokenIndex]; + var column = this.getCurrentTokenColumn(); + return new Range(this.$row, column, this.$row, column + token.value.length); + }; + }).call(TokenIterator.prototype); exports.TokenIterator = TokenIterator; }); -ace.define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/cstyle",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -6082,9 +6867,9 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); var SAFE_INSERT_IN_TOKENS = - ["text", "paren.rparen", "punctuation.operator"]; + ["text", "paren.rparen", "rparen", "paren", "punctuation.operator"]; var SAFE_INSERT_BEFORE_TOKENS = - ["text", "paren.rparen", "punctuation.operator", "comment"]; + ["text", "paren.rparen", "rparen", "paren", "punctuation.operator", "comment"]; var context; var contextCache = {}; @@ -6340,6 +7125,9 @@ var CstyleBehaviour = function(options) { return null; // before or after alphanumeric if (rightChar && !/[\s;,.})\]\\]/.test(rightChar)) return null; // there is rightChar and it isn't closing + var charBefore = line[cursor.column - 2]; + if (leftChar == quote && (charBefore == quote || wordRe.test(charBefore))) + return null; pair = true; } return { @@ -6351,8 +7139,10 @@ var CstyleBehaviour = function(options) { }); this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var quotes = session.$mode.$quotes || defaultQuotes; + var selected = session.doc.getTextRange(range); - if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + if (!range.isMultiLine() && quotes.hasOwnProperty(selected)) { initContext(editor); var line = session.doc.getLine(range.start.row); var rightChar = line.substring(range.start.column + 1, range.start.column + 2); @@ -6370,6 +7160,8 @@ CstyleBehaviour.isSaneInsertion = function(editor, session) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); if (!this.$matchTokenType(iterator.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) { + if (/[)}\]]/.test(editor.session.getLine(cursor.row)[cursor.column])) + return true; var iterator2 = new TokenIterator(session, cursor.row, cursor.column + 1); if (!this.$matchTokenType(iterator2.getCurrentToken() || "text", SAFE_INSERT_IN_TOKENS)) return false; @@ -6437,60 +7229,25 @@ oop.inherits(CstyleBehaviour, Behaviour); exports.CstyleBehaviour = CstyleBehaviour; }); -ace.define("ace/unicode",["require","exports","module"], function(require, exports, module) { +define("ace/unicode",["require","exports","module"], function(require, exports, module) { "use strict"; -exports.packages = {}; +var wordChars = [48,9,8,25,5,0,2,25,48,0,11,0,5,0,6,22,2,30,2,457,5,11,15,4,8,0,2,0,18,116,2,1,3,3,9,0,2,2,2,0,2,19,2,82,2,138,2,4,3,155,12,37,3,0,8,38,10,44,2,0,2,1,2,1,2,0,9,26,6,2,30,10,7,61,2,9,5,101,2,7,3,9,2,18,3,0,17,58,3,100,15,53,5,0,6,45,211,57,3,18,2,5,3,11,3,9,2,1,7,6,2,2,2,7,3,1,3,21,2,6,2,0,4,3,3,8,3,1,3,3,9,0,5,1,2,4,3,11,16,2,2,5,5,1,3,21,2,6,2,1,2,1,2,1,3,0,2,4,5,1,3,2,4,0,8,3,2,0,8,15,12,2,2,8,2,2,2,21,2,6,2,1,2,4,3,9,2,2,2,2,3,0,16,3,3,9,18,2,2,7,3,1,3,21,2,6,2,1,2,4,3,8,3,1,3,2,9,1,5,1,2,4,3,9,2,0,17,1,2,5,4,2,2,3,4,1,2,0,2,1,4,1,4,2,4,11,5,4,4,2,2,3,3,0,7,0,15,9,18,2,2,7,2,2,2,22,2,9,2,4,4,7,2,2,2,3,8,1,2,1,7,3,3,9,19,1,2,7,2,2,2,22,2,9,2,4,3,8,2,2,2,3,8,1,8,0,2,3,3,9,19,1,2,7,2,2,2,22,2,15,4,7,2,2,2,3,10,0,9,3,3,9,11,5,3,1,2,17,4,23,2,8,2,0,3,6,4,0,5,5,2,0,2,7,19,1,14,57,6,14,2,9,40,1,2,0,3,1,2,0,3,0,7,3,2,6,2,2,2,0,2,0,3,1,2,12,2,2,3,4,2,0,2,5,3,9,3,1,35,0,24,1,7,9,12,0,2,0,2,0,5,9,2,35,5,19,2,5,5,7,2,35,10,0,58,73,7,77,3,37,11,42,2,0,4,328,2,3,3,6,2,0,2,3,3,40,2,3,3,32,2,3,3,6,2,0,2,3,3,14,2,56,2,3,3,66,5,0,33,15,17,84,13,619,3,16,2,25,6,74,22,12,2,6,12,20,12,19,13,12,2,2,2,1,13,51,3,29,4,0,5,1,3,9,34,2,3,9,7,87,9,42,6,69,11,28,4,11,5,11,11,39,3,4,12,43,5,25,7,10,38,27,5,62,2,28,3,10,7,9,14,0,89,75,5,9,18,8,13,42,4,11,71,55,9,9,4,48,83,2,2,30,14,230,23,280,3,5,3,37,3,5,3,7,2,0,2,0,2,0,2,30,3,52,2,6,2,0,4,2,2,6,4,3,3,5,5,12,6,2,2,6,67,1,20,0,29,0,14,0,17,4,60,12,5,0,4,11,18,0,5,0,3,9,2,0,4,4,7,0,2,0,2,0,2,3,2,10,3,3,6,4,5,0,53,1,2684,46,2,46,2,132,7,6,15,37,11,53,10,0,17,22,10,6,2,6,2,6,2,6,2,6,2,6,2,6,2,6,2,31,48,0,470,1,36,5,2,4,6,1,5,85,3,1,3,2,2,89,2,3,6,40,4,93,18,23,57,15,513,6581,75,20939,53,1164,68,45,3,268,4,27,21,31,3,13,13,1,2,24,9,69,11,1,38,8,3,102,3,1,111,44,25,51,13,68,12,9,7,23,4,0,5,45,3,35,13,28,4,64,15,10,39,54,10,13,3,9,7,22,4,1,5,66,25,2,227,42,2,1,3,9,7,11171,13,22,5,48,8453,301,3,61,3,105,39,6,13,4,6,11,2,12,2,4,2,0,2,1,2,1,2,107,34,362,19,63,3,53,41,11,5,15,17,6,13,1,25,2,33,4,2,134,20,9,8,25,5,0,2,25,12,88,4,5,3,5,3,5,3,2]; -addUnicodePackage({ - L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", - Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", - Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", - Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", - Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", - Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", - M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", - Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", - Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", - Me: "0488048906DE20DD-20E020E2-20E4A670-A672", - N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", - Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", - Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", - No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", - P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", - Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", - Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", - Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", - Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", - Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", - Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", - Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", - S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", - Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", - Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", - Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", - So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", - Z: "002000A01680180E2000-200A20282029202F205F3000", - Zs: "002000A01680180E2000-200A202F205F3000", - Zl: "2028", - Zp: "2029", - C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", - Cc: "0000-001F007F-009F", - Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", - Co: "E000-F8FF", - Cs: "D800-DFFF", - Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" -}); - -function addUnicodePackage (pack) { - var codePoint = /\w{4}/g; - for (var name in pack) - exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); +var code = 0; +var str = []; +for (var i = 0; i < wordChars.length; i += 2) { + str.push(code += wordChars[i]); + if (wordChars[i + 1]) + str.push(45, code += wordChars[i + 1]); } +exports.wordChars = String.fromCharCode.apply(null, str); + }); -ace.define("ace/mode/text",["require","exports","module","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) { +define("ace/mode/text",["require","exports","module","ace/config","ace/tokenizer","ace/mode/text_highlight_rules","ace/mode/behaviour/cstyle","ace/unicode","ace/lib/lang","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; +var config = require("../config"); var Tokenizer = require("../tokenizer").Tokenizer; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; @@ -6507,19 +7264,9 @@ var Mode = function() { (function() { this.$defaultBehaviour = new CstyleBehaviour(); - this.tokenRe = new RegExp("^[" - + unicode.packages.L - + unicode.packages.Mn + unicode.packages.Mc - + unicode.packages.Nd - + unicode.packages.Pc + "\\$_]+", "g" - ); + this.tokenRe = new RegExp("^[" + unicode.wordChars + "\\$_]+", "g"); - this.nonTokenRe = new RegExp("^(?:[^" - + unicode.packages.L - + unicode.packages.Mn + unicode.packages.Mc - + unicode.packages.Nd - + unicode.packages.Pc + "\\$_]|\\s])+", "g" - ); + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "\\$_]|\\s])+", "g"); this.getTokenizer = function() { if (!this.$tokenizer) { @@ -6621,7 +7368,6 @@ var Mode = function() { return spaces % tabSize != tabSize - 1; else return spaces % tabSize == 0; - return true; }; } @@ -6739,8 +7485,15 @@ var Mode = function() { this.$modes = {}; for (var i in mapping) { if (mapping[i]) { + var Mode = mapping[i]; + var id = Mode.prototype.$id; + var mode = config.$modes[id]; + if (!mode) + config.$modes[id] = mode = new Mode(); + if (!config.$modes[i]) + config.$modes[i] = mode; this.$embeds.push(i); - this.$modes[i] = new mapping[i](); + this.$modes[i] = mode; } } @@ -6759,9 +7512,17 @@ var Mode = function() { }; this.$delegator = function(method, args, defaultHandler) { - var state = args[0]; - if (typeof state != "string") - state = state[0]; + var state = args[0] || "start"; + if (typeof state != "string") { + if (Array.isArray(state[2])) { + var language = state[2][state[2].length - 1]; + var mode = this.$modes[language]; + if (mode) + return mode[method].apply(mode, [state[1]].concat([].slice.call(args, 1))); + } + state = state[0] || "start"; + } + for (var i = 0; i < this.$embeds.length; i++) { if (!this.$modes[this.$embeds[i]]) continue; @@ -6842,7 +7603,7 @@ var Mode = function() { exports.Mode = Mode; }); -ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) { +define("ace/apply_delta",["require","exports","module"], function(require, exports, module) { "use strict"; function throwDeltaError(delta, errorText){ @@ -6904,10 +7665,10 @@ exports.applyDelta = function(docLines, delta, doNotValidate) { } break; } -} +}; }); -ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -7032,7 +7793,7 @@ var Anchor = exports.Anchor = function(doc, row, column) { }); -ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { +define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -7323,28 +8084,23 @@ var Document = function(textOrLines) { return; } - if (isInsert && delta.lines.length > 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -7352,7 +8108,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -7370,7 +8130,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -7388,7 +8148,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/background_tokenizer",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -7425,7 +8185,7 @@ var BackgroundTokenizer = function(tokenizer, editor) { currentLine++; } while (self.lines[currentLine]); processedLines ++; - if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { + if ((processedLines % 5 === 0) && (new Date() - workerStart) > 20) { self.running = setTimeout(self.$worker, 20); break; } @@ -7476,7 +8236,7 @@ var BackgroundTokenizer = function(tokenizer, editor) { this.scheduleStart = function() { if (!this.running) this.running = setTimeout(this.$worker, 700); - } + }; this.$updateOnChange = function(delta) { var startRow = delta.start.row; @@ -7535,7 +8295,7 @@ var BackgroundTokenizer = function(tokenizer, editor) { exports.BackgroundTokenizer = BackgroundTokenizer; }); -ace.define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { +define("ace/search_highlight",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); @@ -7587,7 +8347,7 @@ var SearchHighlight = function(regExp, clazz, type) { exports.SearchHighlight = SearchHighlight; }); -ace.define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/edit_session/fold_line",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -7806,13 +8566,14 @@ function FoldLine(foldData, folds) { exports.FoldLine = FoldLine; }); -ace.define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/range_list",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; var comparePoints = Range.comparePoints; var RangeList = function() { this.ranges = []; + this.$bias = 1; }; (function() { @@ -7957,44 +8718,102 @@ var RangeList = function() { }; this.$onChange = function(delta) { - if (delta.action == "insert"){ - var start = delta.start; - var end = delta.end; - } else { - var end = delta.start; - var start = delta.end; - } + var start = delta.start; + var end = delta.end; var startRow = start.row; var endRow = end.row; - var lineDif = endRow - startRow; - - var colDiff = -start.column + end.column; var ranges = this.ranges; - for (var i = 0, n = ranges.length; i < n; i++) { var r = ranges[i]; - if (r.end.row < startRow) - continue; - if (r.start.row > startRow) + if (r.end.row >= startRow) break; - - if (r.start.row == startRow && r.start.column >= start.column ) { - if (r.start.column == start.column && this.$insertRight) { - } else { - r.start.column += colDiff; - r.start.row += lineDif; + } + + if (delta.action == "insert") { + var lineDif = endRow - startRow; + var colDiff = -start.column + end.column; + for (; i < n; i++) { + var r = ranges[i]; + if (r.start.row > startRow) + break; + + if (r.start.row == startRow && r.start.column >= start.column) { + if (r.start.column == start.column && this.$bias <= 0) { + } else { + r.start.column += colDiff; + r.start.row += lineDif; + } + } + if (r.end.row == startRow && r.end.column >= start.column) { + if (r.end.column == start.column && this.$bias < 0) { + continue; + } + if (r.end.column == start.column && colDiff > 0 && i < n - 1) { + if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) + r.end.column -= colDiff; + } + r.end.column += colDiff; + r.end.row += lineDif; } } - if (r.end.row == startRow && r.end.column >= start.column) { - if (r.end.column == start.column && this.$insertRight) { - continue; + } else { + var lineDif = startRow - endRow; + var colDiff = start.column - end.column; + for (; i < n; i++) { + var r = ranges[i]; + + if (r.start.row > endRow) + break; + + if (r.end.row < endRow + && ( + startRow < r.end.row + || startRow == r.end.row && start.column < r.end.column + ) + ) { + r.end.row = startRow; + r.end.column = start.column; } - if (r.end.column == start.column && colDiff > 0 && i < n - 1) { - if (r.end.column > r.start.column && r.end.column == ranges[i+1].start.column) - r.end.column -= colDiff; + else if (r.end.row == endRow) { + if (r.end.column <= end.column) { + if (lineDif || r.end.column > start.column) { + r.end.column = start.column; + r.end.row = start.row; + } + } + else { + r.end.column += colDiff; + r.end.row += lineDif; + } + } + else if (r.end.row > endRow) { + r.end.row += lineDif; + } + + if (r.start.row < endRow + && ( + startRow < r.start.row + || startRow == r.start.row && start.column < r.start.column + ) + ) { + r.start.row = startRow; + r.start.column = start.column; + } + else if (r.start.row == endRow) { + if (r.start.column <= end.column) { + if (lineDif || r.start.column > start.column) { + r.start.column = start.column; + r.start.row = start.row; + } + } + else { + r.start.column += colDiff; + r.start.row += lineDif; + } + } + else if (r.start.row > endRow) { + r.start.row += lineDif; } - r.end.column += colDiff; - r.end.row += lineDif; } } @@ -8012,12 +8831,11 @@ var RangeList = function() { exports.RangeList = RangeList; }); -ace.define("ace/edit_session/fold",["require","exports","module","ace/range","ace/range_list","ace/lib/oop"], function(require, exports, module) { +define("ace/edit_session/fold",["require","exports","module","ace/range_list","ace/lib/oop"], function(require, exports, module) { "use strict"; -var Range = require("../range").Range; var RangeList = require("../range_list").RangeList; -var oop = require("../lib/oop") +var oop = require("../lib/oop"); var Fold = exports.Fold = function(range, placeholder) { this.foldLine = null; this.placeholder = placeholder; @@ -8057,9 +8875,6 @@ oop.inherits(Fold, RangeList); this.addSubFold = function(fold) { if (this.range.isEqual(fold)) return; - - if (!this.range.containsRange(fold)) - throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); consumeRange(fold, this.start); var row = fold.start.row, column = fold.start.column; @@ -8069,21 +8884,26 @@ oop.inherits(Fold, RangeList); break; } var afterStart = this.subFolds[i]; + var firstConsumed = 0; - if (cmp == 0) - return afterStart.addSubFold(fold); + if (cmp == 0) { + if (afterStart.range.containsRange(fold)) + return afterStart.addSubFold(fold); + else + firstConsumed = 1; + } var row = fold.range.end.row, column = fold.range.end.column; for (var j = i, cmp = -1; j < this.subFolds.length; j++) { cmp = this.subFolds[j].range.compare(row, column); if (cmp != 1) break; } - var afterEnd = this.subFolds[j]; - - if (cmp == 0) - throw new Error("A fold can't intersect already existing fold" + fold.range + this.range); - + if (cmp == 0) j++; var consumedFolds = this.subFolds.splice(i, j - i, fold); + var last = cmp == 0 ? consumedFolds.length - 1 : consumedFolds.length; + for (var k = firstConsumed; k < last; k++) { + fold.addSubFold(consumedFolds[k]); + } fold.setFoldLine(this.foldLine); return fold; @@ -8116,7 +8936,7 @@ function restoreRange(range, anchor) { }); -ace.define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) { +define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold","ace/token_iterator"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -8132,14 +8952,14 @@ function Folding() { var folds = foldLine.folds; for (var i = 0; i < folds.length; i++) { - var fold = folds[i]; - if (fold.range.contains(row, column)) { - if (side == 1 && fold.range.isEnd(row, column)) { + var range = folds[i].range; + if (range.contains(row, column)) { + if (side == 1 && range.isEnd(row, column) && !range.isEmpty()) { continue; - } else if (side == -1 && fold.range.isStart(row, column)) { + } else if (side == -1 && range.isStart(row, column) && !range.isEmpty()) { continue; } - return fold; + return folds[i]; } } }; @@ -8318,9 +9138,6 @@ function Folding() { var startColumn = fold.start.column; var endRow = fold.end.row; var endColumn = fold.end.column; - if (!(startRow < endRow || - startRow == endRow && startColumn <= endColumn - 2)) - throw new Error("The range has to be at least 2 characters width"); var startFold = this.getFoldAt(startRow, startColumn, 1); var endFold = this.getFoldAt(endRow, endColumn, -1); @@ -8864,7 +9681,7 @@ exports.Folding = Folding; }); -ace.define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) { +define("ace/edit_session/bracket_match",["require","exports","module","ace/token_iterator","ace/range"], function(require, exports, module) { "use strict"; var TokenIterator = require("../token_iterator").TokenIterator; @@ -8935,7 +9752,9 @@ function BracketMatch() { "]": "[", "[": "]", "{": "}", - "}": "{" + "}": "{", + "<": ">", + ">": "<" }; this.$findOpeningBracket = function(bracket, position, typeRe) { @@ -9046,11 +9865,12 @@ exports.BracketMatch = BracketMatch; }); -ace.define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) { +define("ace/edit_session",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/bidihandler","ace/config","ace/lib/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/search_highlight","ace/edit_session/folding","ace/edit_session/bracket_match"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var lang = require("./lib/lang"); +var BidiHandler = require("./bidihandler").BidiHandler; var config = require("./config"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var Selection = require("./selection").Selection; @@ -9081,6 +9901,7 @@ var EditSession = function(text, mode) { this.setDocument(text); this.selection = new Selection(this); + this.$bidiHandler = new BidiHandler(this); config.resetOptions(this); this.setMode(mode); @@ -9157,19 +9978,21 @@ EditSession.$uid = 0; this.onChange = function(delta) { this.$modified = true; - + this.$bidiHandler.onChange(delta); this.$resetRowCache(delta.start.row); var removedFolds = this.$updateInternalDataOnChange(delta); - if (!this.$fromUndo && this.$undoManager && !delta.ignore) { - this.$deltasDoc.push(delta); - if (removedFolds && removedFolds.length != 0) { - this.$deltasFold.push({ + if (!this.$fromUndo && this.$undoManager) { + if (removedFolds && removedFolds.length) { + this.$undoManager.add({ action: "removeFolds", folds: removedFolds - }); + }, this.mergeUndoDeltas); + this.mergeUndoDeltas = true; } - + this.$undoManager.add(delta, this.mergeUndoDeltas); + this.mergeUndoDeltas = true; + this.$informUndoManager.schedule(); } @@ -9181,9 +10004,6 @@ EditSession.$uid = 0; this.selection.moveTo(0, 0); this.$resetRowCache(0); - this.$deltas = []; - this.$deltasDoc = []; - this.$deltasFold = []; this.setUndoManager(this.$undoManager); this.getUndoManager().reset(); }; @@ -9204,7 +10024,7 @@ EditSession.$uid = 0; var tokens = this.bgTokenizer.getTokens(row); var token, c = 0; if (column == null) { - i = tokens.length - 1; + var i = tokens.length - 1; c = this.getLine(row).length; } else { for (var i = 0; i < tokens.length; i++) { @@ -9222,46 +10042,20 @@ EditSession.$uid = 0; }; this.setUndoManager = function(undoManager) { this.$undoManager = undoManager; - this.$deltas = []; - this.$deltasDoc = []; - this.$deltasFold = []; - + if (this.$informUndoManager) this.$informUndoManager.cancel(); - + if (undoManager) { var self = this; - + undoManager.addSession(this); this.$syncInformUndoManager = function() { self.$informUndoManager.cancel(); - - if (self.$deltasFold.length) { - self.$deltas.push({ - group: "fold", - deltas: self.$deltasFold - }); - self.$deltasFold = []; - } - - if (self.$deltasDoc.length) { - self.$deltas.push({ - group: "doc", - deltas: self.$deltasDoc - }); - self.$deltasDoc = []; - } - - if (self.$deltas.length > 0) { - undoManager.execute({ - action: "aceupdate", - args: [self.$deltas, self], - merge: self.mergeUndoDeltas - }); - } self.mergeUndoDeltas = false; - self.$deltas = []; }; this.$informUndoManager = lang.delayedCall(this.$syncInformUndoManager); + } else { + this.$syncInformUndoManager = function() {}; } }; this.markUndoGroup = function() { @@ -9272,7 +10066,13 @@ EditSession.$uid = 0; this.$defaultUndoManager = { undo: function() {}, redo: function() {}, - reset: function() {} + hasUndo: function() {}, + hasRedo: function() {}, + reset: function() {}, + add: function() {}, + addSelection: function() {}, + startNewGroup: function() {}, + addSession: function() {} }; this.getUndoManager = function() { return this.$undoManager || this.$defaultUndoManager; @@ -9300,11 +10100,11 @@ EditSession.$uid = 0; return this.$useSoftTabs && (position.column % this.$tabSize === 0); }; this.setNavigateWithinSoftTabs = function (navigateWithinSoftTabs) { - this.setOption("navigateWithinSoftTabs", navigateWithinSoftTabs) - } + this.setOption("navigateWithinSoftTabs", navigateWithinSoftTabs); + }; this.getNavigateWithinSoftTabs = function() { return this.$navigateWithinSoftTabs; - } + }; this.$overwrite = false; this.setOverwrite = function(overwrite) { @@ -9398,10 +10198,8 @@ EditSession.$uid = 0; return; var markers = marker.inFront ? this.$frontMarkers : this.$backMarkers; - if (marker) { - delete (markers[markerId]); - this._signal(marker.inFront ? "changeFrontMarker" : "changeBackMarker"); - } + delete (markers[markerId]); + this._signal(marker.inFront ? "changeFrontMarker" : "changeBackMarker"); }; this.getMarkers = function(inFront) { return inFront ? this.$frontMarkers : this.$backMarkers; @@ -9500,7 +10298,7 @@ EditSession.$uid = 0; this._signal("tokenizerUpdate", e); }; - this.$modes = {}; + this.$modes = config.$modes; this.$mode = null; this.$modeId = null; this.setMode = function(mode, cb) { @@ -9704,69 +10502,68 @@ EditSession.$uid = 0; return; this.$fromUndo = true; - var lastUndoRange = null; for (var i = deltas.length - 1; i != -1; i--) { var delta = deltas[i]; - if (delta.group == "doc") { - this.doc.revertDeltas(delta.deltas); - lastUndoRange = - this.$getUndoSelection(delta.deltas, true, lastUndoRange); - } else { - delta.deltas.forEach(function(foldDelta) { - this.addFolds(foldDelta.folds); - }, this); + if (delta.action == "insert" || delta.action == "remove") { + this.doc.revertDelta(delta); + } else if (delta.folds) { + this.addFolds(delta.folds); } } + if (!dontSelect && this.$undoSelect) { + if (deltas.selectionBefore) + this.selection.fromJSON(deltas.selectionBefore); + else + this.selection.setRange(this.$getUndoSelection(deltas, true)); + } this.$fromUndo = false; - lastUndoRange && - this.$undoSelect && - !dontSelect && - this.selection.setSelectionRange(lastUndoRange); - return lastUndoRange; }; this.redoChanges = function(deltas, dontSelect) { if (!deltas.length) return; this.$fromUndo = true; - var lastUndoRange = null; for (var i = 0; i < deltas.length; i++) { var delta = deltas[i]; - if (delta.group == "doc") { - this.doc.applyDeltas(delta.deltas); - lastUndoRange = - this.$getUndoSelection(delta.deltas, false, lastUndoRange); + if (delta.action == "insert" || delta.action == "remove") { + this.doc.applyDelta(delta); } } + + if (!dontSelect && this.$undoSelect) { + if (deltas.selectionAfter) + this.selection.fromJSON(deltas.selectionAfter); + else + this.selection.setRange(this.$getUndoSelection(deltas, false)); + } this.$fromUndo = false; - lastUndoRange && - this.$undoSelect && - !dontSelect && - this.selection.setSelectionRange(lastUndoRange); - return lastUndoRange; }; this.setUndoSelect = function(enable) { this.$undoSelect = enable; }; - this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { + this.$getUndoSelection = function(deltas, isUndo) { function isInsert(delta) { return isUndo ? delta.action !== "insert" : delta.action === "insert"; } - var delta = deltas[0]; var range, point; - var lastDeltaIsInsert = false; - if (isInsert(delta)) { - range = Range.fromPoints(delta.start, delta.end); - lastDeltaIsInsert = true; - } else { - range = Range.fromPoints(delta.start, delta.start); - lastDeltaIsInsert = false; - } + var lastDeltaIsInsert; - for (var i = 1; i < deltas.length; i++) { - delta = deltas[i]; + for (var i = 0; i < deltas.length; i++) { + var delta = deltas[i]; + if (!delta.start) continue; // skip folds + if (!range) { + if (isInsert(delta)) { + range = Range.fromPoints(delta.start, delta.end); + lastDeltaIsInsert = true; + } else { + range = Range.fromPoints(delta.start, delta.start); + lastDeltaIsInsert = false; + } + continue; + } + if (isInsert(delta)) { point = delta.start; if (range.compare(point.row, point.column) == -1) { @@ -9785,20 +10582,6 @@ EditSession.$uid = 0; lastDeltaIsInsert = false; } } - if (lastUndoRange != null) { - if (Range.comparePoints(lastUndoRange.start, range.start) === 0) { - lastUndoRange.start.column += range.end.column - range.start.column; - lastUndoRange.end.column += range.end.column - range.start.column; - } - - var cmp = lastUndoRange.compareRange(range); - if (cmp == 1) { - range.setStart(lastUndoRange.start); - } else if (cmp == -1) { - range.setEnd(lastUndoRange.end); - } - } - return range; }; this.replace = function(range, text) { @@ -10000,6 +10783,7 @@ EditSession.$uid = 0; if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { this.$wrapLimitRange = { min: min, max: max }; this.$modified = true; + this.$bidiHandler.markAsDirty(); if (this.$useWrapMode) this._signal("changeWrapMode"); } @@ -10088,7 +10872,7 @@ EditSession.$uid = 0; } else { var args = Array(len); args.unshift(firstRow, 0); - var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache + var arr = useWrapMode ? this.$wrapData : this.$rowLengthCache; arr.splice.apply(arr, args); var foldLines = this.$foldData; var foldLine = this.getFoldLine(firstRow); @@ -10238,15 +11022,11 @@ EditSession.$uid = 0; return Math.min(indentation, maxIndent); } function addSplit(screenPos) { - var displayed = tokens.slice(lastSplit, screenPos); - var len = displayed.length; - displayed.join("") - .replace(/12/g, function() { - len -= 1; - }) - .replace(/2/g, function() { - len -= 1; - }); + var len = screenPos - lastSplit; + for (var i = lastSplit; i < screenPos; i++) { + var ch = tokens[i]; + if (ch === 12 || ch === 2) len -= 1; + } if (!splits.length) { indent = getWrapIndent(); @@ -10370,7 +11150,7 @@ EditSession.$uid = 0; if (this.lineWidgets) var h = this.lineWidgets[row] && this.lineWidgets[row].rowCount || 0; else - h = 0 + h = 0; if (!this.$useWrapMode || !this.$wrapData[row]) { return 1 + h; } else { @@ -10393,7 +11173,7 @@ EditSession.$uid = 0; } else { return 0; } - } + }; this.getScreenLastRowColumn = function(screenRow) { var pos = this.screenToDocumentPosition(screenRow, Number.MAX_VALUE); return this.documentToScreenColumn(pos.row, pos.column); @@ -10414,7 +11194,7 @@ EditSession.$uid = 0; } }; this.getScreenTabSize = function(screenColumn) { - return this.$tabSize - screenColumn % this.$tabSize; + return this.$tabSize - (screenColumn % this.$tabSize | 0); }; @@ -10426,7 +11206,7 @@ EditSession.$uid = 0; this.screenToDocumentColumn = function(screenRow, screenColumn) { return this.screenToDocumentPosition(screenRow, screenColumn).column; }; - this.screenToDocumentPosition = function(screenRow, screenColumn) { + this.screenToDocumentPosition = function(screenRow, screenColumn, offsetX) { if (screenRow < 0) return {row: 0, column: 0}; @@ -10484,11 +11264,10 @@ EditSession.$uid = 0; line = this.getLine(docRow); foldLine = null; } - var wrapIndent = 0; + var wrapIndent = 0, splitIndex = Math.floor(screenRow - row); if (this.$useWrapMode) { var splits = this.$wrapData[docRow]; if (splits) { - var splitIndex = Math.floor(screenRow - row); column = splits[splitIndex]; if(splitIndex > 0 && splits.length) { wrapIndent = splits.indent; @@ -10498,6 +11277,9 @@ EditSession.$uid = 0; } } + if (offsetX !== undefined && this.$bidiHandler.isBidiRow(row + splitIndex, docRow, splitIndex)) + screenColumn = this.$bidiHandler.offsetToCol(offsetX); + docColumn += this.$getStringScreenWidth(line, screenColumn - wrapIndent)[1]; if (this.$useWrapMode && docColumn >= column) docColumn = column - 1; @@ -10662,6 +11444,8 @@ EditSession.$uid = 0; } this.$stopWorker(); }; + + this.isFullWidth = isFullWidth; function isFullWidth(c) { if (c < 0x1100) return false; @@ -10748,15 +11532,22 @@ config.defineOptions(EditSession.prototype, "session", { if (val != this.$wrapAsCode) { this.$wrapAsCode = val; if (this.$useWrapMode) { - this.$modified = true; - this.$resetRowCache(0); - this.$updateWrapData(0, this.getLength() - 1); + this.$useWrapMode = false; + this.setUseWrapMode(true); } } }, initialValue: "auto" }, - indentedSoftWrap: { initialValue: true }, + indentedSoftWrap: { + set: function() { + if (this.$useWrapMode) { + this.$useWrapMode = false; + this.setUseWrapMode(true); + } + }, + initialValue: true + }, firstLineNumber: { set: function() {this._signal("changeBreakpoint");}, initialValue: 1 @@ -10774,36 +11565,42 @@ config.defineOptions(EditSession.prototype, "session", { useSoftTabs: {initialValue: true}, tabSize: { set: function(tabSize) { - if (isNaN(tabSize) || this.$tabSize === tabSize) return; - - this.$modified = true; - this.$rowLengthCache = []; - this.$tabSize = tabSize; - this._signal("changeTabSize"); + tabSize = parseInt(tabSize); + if (tabSize > 0 && this.$tabSize !== tabSize) { + this.$modified = true; + this.$rowLengthCache = []; + this.$tabSize = tabSize; + this._signal("changeTabSize"); + } }, initialValue: 4, handlesSet: true }, navigateWithinSoftTabs: {initialValue: false}, + foldStyle: { + set: function(val) {this.setFoldStyle(val);}, + handlesSet: true + }, overwrite: { set: function(val) {this._signal("changeOverwrite");}, initialValue: false }, newLineMode: { - set: function(val) {this.doc.setNewLineMode(val)}, - get: function() {return this.doc.getNewLineMode()}, + set: function(val) {this.doc.setNewLineMode(val);}, + get: function() {return this.doc.getNewLineMode();}, handlesSet: true }, mode: { - set: function(val) { this.setMode(val) }, - get: function() { return this.$modeId } + set: function(val) { this.setMode(val); }, + get: function() { return this.$modeId; }, + handlesSet: true } }); exports.EditSession = EditSession; }); -ace.define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { +define("ace/search",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/range"], function(require, exports, module) { "use strict"; var lang = require("./lib/lang"); @@ -11038,7 +11835,7 @@ var Search = function() { var startRow = backwards ? row - len + 1 : row; if (startRow < 0) return; var line = session.getLine(startRow); - var startIndex = line.search(re[0]) + var startIndex = line.search(re[0]); if (!backwards && startIndex < offset || startIndex === -1) return; for (var i = 1; i < len; i++) { line = session.getLine(startRow + i); @@ -11066,7 +11863,7 @@ var Search = function() { } if (m.index + length > endIndex) break; - matches.push(m.index, length) + matches.push(m.index, length); } for (var i = matches.length - 1; i >= 0; i -= 2) { var column = matches[i - 1]; @@ -11079,8 +11876,8 @@ var Search = function() { else { var forEachInLine = function(row, startIndex, callback) { var line = session.getLine(row); + var last; var m; - var last = startIndex; re.lastIndex = startIndex; while((m = re.exec(line))) { var length = m[0].length; @@ -11111,7 +11908,7 @@ function addWordBoundary(needle, options) { exports.Search = Search; }); -ace.define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { +define("ace/keyboard/hash_handler",["require","exports","module","ace/lib/keys","ace/lib/useragent"], function(require, exports, module) { "use strict"; var keyUtil = require("../lib/keys"); @@ -11268,7 +12065,7 @@ MultiHashHandler.prototype = HashHandler.prototype; this.bindKey(command.bindKey, command); }; this.parseKeys = function(keys) { - var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x}); + var parts = keys.toLowerCase().split(/[\-\+]([\-\+])?/).filter(function(x){return x;}); var key = parts.pop(); var keyCode = keyUtil[key]; @@ -11332,7 +12129,7 @@ exports.HashHandler = HashHandler; exports.MultiHashHandler = MultiHashHandler; }); -ace.define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/commands/command_manager",["require","exports","module","ace/lib/oop","ace/keyboard/hash_handler","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -11370,7 +12167,7 @@ oop.inherits(CommandManager, MultiHashHandler); if (editor && editor.$readOnly && !command.readOnly) return false; - if (command.isAvailable && !command.isAvailable(editor)) + if (this.$checkCommandState != false && command.isAvailable && !command.isAvailable(editor)) return false; var e = {editor: editor, command: command, args: args}; @@ -11442,7 +12239,7 @@ exports.CommandManager = CommandManager; }); -ace.define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) { +define("ace/commands/default_commands",["require","exports","module","ace/lib/lang","ace/config","ace/range"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); @@ -11466,7 +12263,7 @@ exports.commands = [{ name: "goToNextError", bindKey: bindKey("Alt-E", "F4"), exec: function(editor) { - config.loadModule("ace/ext/error_marker", function(module) { + config.loadModule("./ext/error_marker", function(module) { module.showErrorMarker(editor, 1); }); }, @@ -11476,7 +12273,7 @@ exports.commands = [{ name: "goToPreviousError", bindKey: bindKey("Alt-Shift-E", "Shift-F4"), exec: function(editor) { - config.loadModule("ace/ext/error_marker", function(module) { + config.loadModule("./ext/error_marker", function(module) { module.showErrorMarker(editor, -1); }); }, @@ -11484,22 +12281,24 @@ exports.commands = [{ readOnly: true }, { name: "selectall", + description: "Select all", bindKey: bindKey("Ctrl-A", "Command-A"), exec: function(editor) { editor.selectAll(); }, readOnly: true }, { name: "centerselection", + description: "Center selection", bindKey: bindKey(null, "Ctrl-L"), exec: function(editor) { editor.centerSelection(); }, readOnly: true }, { name: "gotoline", + description: "Go to line...", bindKey: bindKey("Ctrl-L", "Command-L"), - exec: function(editor) { - var line = parseInt(prompt("Enter line number:"), 10); - if (!isNaN(line)) { + exec: function(editor, line) { + if (typeof line === "number" && !isNaN(line)) editor.gotoLine(line); - } + editor.prompt({ $type: "gotoLine" }); }, readOnly: true }, { @@ -11532,12 +12331,14 @@ exports.commands = [{ readOnly: true }, { name: "foldall", + description: "Fold all", bindKey: bindKey(null, "Ctrl-Command-Option-0"), exec: function(editor) { editor.session.foldAll(); }, scrollIntoView: "center", readOnly: true }, { name: "foldOther", + description: "Fold other", bindKey: bindKey("Alt-0", "Command-Option-0"), exec: function(editor) { editor.session.foldAll(); @@ -11547,12 +12348,14 @@ exports.commands = [{ readOnly: true }, { name: "unfoldall", + description: "Unfold all", bindKey: bindKey("Alt-Shift-0", "Command-Option-Shift-0"), exec: function(editor) { editor.session.unfold(); }, scrollIntoView: "center", readOnly: true }, { name: "findnext", + description: "Find next", bindKey: bindKey("Ctrl-K", "Command-G"), exec: function(editor) { editor.findNext(); }, multiSelectAction: "forEach", @@ -11560,6 +12363,7 @@ exports.commands = [{ readOnly: true }, { name: "findprevious", + description: "Find previous", bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), exec: function(editor) { editor.findPrevious(); }, multiSelectAction: "forEach", @@ -11567,6 +12371,7 @@ exports.commands = [{ readOnly: true }, { name: "selectOrFindNext", + description: "Select or find next", bindKey: bindKey("Alt-K", "Ctrl-G"), exec: function(editor) { if (editor.selection.isEmpty()) @@ -11577,6 +12382,7 @@ exports.commands = [{ readOnly: true }, { name: "selectOrFindPrevious", + description: "Select or find previous", bindKey: bindKey("Alt-Shift-K", "Ctrl-Shift-G"), exec: function(editor) { if (editor.selection.isEmpty()) @@ -11587,18 +12393,21 @@ exports.commands = [{ readOnly: true }, { name: "find", + description: "Find", bindKey: bindKey("Ctrl-F", "Command-F"), exec: function(editor) { - config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor)}); + config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor);}); }, readOnly: true }, { name: "overwrite", + description: "Overwrite", bindKey: "Insert", exec: function(editor) { editor.toggleOverwrite(); }, readOnly: true }, { name: "selecttostart", + description: "Select to start", bindKey: bindKey("Ctrl-Shift-Home", "Command-Shift-Home|Command-Shift-Up"), exec: function(editor) { editor.getSelection().selectFileStart(); }, multiSelectAction: "forEach", @@ -11607,6 +12416,7 @@ exports.commands = [{ aceCommandGroup: "fileJump" }, { name: "gotostart", + description: "Go to start", bindKey: bindKey("Ctrl-Home", "Command-Home|Command-Up"), exec: function(editor) { editor.navigateFileStart(); }, multiSelectAction: "forEach", @@ -11615,6 +12425,7 @@ exports.commands = [{ aceCommandGroup: "fileJump" }, { name: "selectup", + description: "Select up", bindKey: bindKey("Shift-Up", "Shift-Up|Ctrl-Shift-P"), exec: function(editor) { editor.getSelection().selectUp(); }, multiSelectAction: "forEach", @@ -11622,6 +12433,7 @@ exports.commands = [{ readOnly: true }, { name: "golineup", + description: "Go line up", bindKey: bindKey("Up", "Up|Ctrl-P"), exec: function(editor, args) { editor.navigateUp(args.times); }, multiSelectAction: "forEach", @@ -11629,6 +12441,7 @@ exports.commands = [{ readOnly: true }, { name: "selecttoend", + description: "Select to end", bindKey: bindKey("Ctrl-Shift-End", "Command-Shift-End|Command-Shift-Down"), exec: function(editor) { editor.getSelection().selectFileEnd(); }, multiSelectAction: "forEach", @@ -11637,6 +12450,7 @@ exports.commands = [{ aceCommandGroup: "fileJump" }, { name: "gotoend", + description: "Go to end", bindKey: bindKey("Ctrl-End", "Command-End|Command-Down"), exec: function(editor) { editor.navigateFileEnd(); }, multiSelectAction: "forEach", @@ -11645,6 +12459,7 @@ exports.commands = [{ aceCommandGroup: "fileJump" }, { name: "selectdown", + description: "Select down", bindKey: bindKey("Shift-Down", "Shift-Down|Ctrl-Shift-N"), exec: function(editor) { editor.getSelection().selectDown(); }, multiSelectAction: "forEach", @@ -11652,6 +12467,7 @@ exports.commands = [{ readOnly: true }, { name: "golinedown", + description: "Go line down", bindKey: bindKey("Down", "Down|Ctrl-N"), exec: function(editor, args) { editor.navigateDown(args.times); }, multiSelectAction: "forEach", @@ -11659,6 +12475,7 @@ exports.commands = [{ readOnly: true }, { name: "selectwordleft", + description: "Select word left", bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), exec: function(editor) { editor.getSelection().selectWordLeft(); }, multiSelectAction: "forEach", @@ -11666,6 +12483,7 @@ exports.commands = [{ readOnly: true }, { name: "gotowordleft", + description: "Go to word left", bindKey: bindKey("Ctrl-Left", "Option-Left"), exec: function(editor) { editor.navigateWordLeft(); }, multiSelectAction: "forEach", @@ -11673,6 +12491,7 @@ exports.commands = [{ readOnly: true }, { name: "selecttolinestart", + description: "Select to line start", bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left|Ctrl-Shift-A"), exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", @@ -11680,6 +12499,7 @@ exports.commands = [{ readOnly: true }, { name: "gotolinestart", + description: "Go to line start", bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), exec: function(editor) { editor.navigateLineStart(); }, multiSelectAction: "forEach", @@ -11687,6 +12507,7 @@ exports.commands = [{ readOnly: true }, { name: "selectleft", + description: "Select left", bindKey: bindKey("Shift-Left", "Shift-Left|Ctrl-Shift-B"), exec: function(editor) { editor.getSelection().selectLeft(); }, multiSelectAction: "forEach", @@ -11694,6 +12515,7 @@ exports.commands = [{ readOnly: true }, { name: "gotoleft", + description: "Go to left", bindKey: bindKey("Left", "Left|Ctrl-B"), exec: function(editor, args) { editor.navigateLeft(args.times); }, multiSelectAction: "forEach", @@ -11701,6 +12523,7 @@ exports.commands = [{ readOnly: true }, { name: "selectwordright", + description: "Select word right", bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), exec: function(editor) { editor.getSelection().selectWordRight(); }, multiSelectAction: "forEach", @@ -11708,6 +12531,7 @@ exports.commands = [{ readOnly: true }, { name: "gotowordright", + description: "Go to word right", bindKey: bindKey("Ctrl-Right", "Option-Right"), exec: function(editor) { editor.navigateWordRight(); }, multiSelectAction: "forEach", @@ -11715,6 +12539,7 @@ exports.commands = [{ readOnly: true }, { name: "selecttolineend", + description: "Select to line end", bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right|Shift-End|Ctrl-Shift-E"), exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", @@ -11722,6 +12547,7 @@ exports.commands = [{ readOnly: true }, { name: "gotolineend", + description: "Go to line end", bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), exec: function(editor) { editor.navigateLineEnd(); }, multiSelectAction: "forEach", @@ -11729,6 +12555,7 @@ exports.commands = [{ readOnly: true }, { name: "selectright", + description: "Select right", bindKey: bindKey("Shift-Right", "Shift-Right"), exec: function(editor) { editor.getSelection().selectRight(); }, multiSelectAction: "forEach", @@ -11736,6 +12563,7 @@ exports.commands = [{ readOnly: true }, { name: "gotoright", + description: "Go to right", bindKey: bindKey("Right", "Right|Ctrl-F"), exec: function(editor, args) { editor.navigateRight(args.times); }, multiSelectAction: "forEach", @@ -11743,46 +12571,55 @@ exports.commands = [{ readOnly: true }, { name: "selectpagedown", + description: "Select page down", bindKey: "Shift-PageDown", exec: function(editor) { editor.selectPageDown(); }, readOnly: true }, { name: "pagedown", + description: "Page down", bindKey: bindKey(null, "Option-PageDown"), exec: function(editor) { editor.scrollPageDown(); }, readOnly: true }, { name: "gotopagedown", + description: "Go to page down", bindKey: bindKey("PageDown", "PageDown|Ctrl-V"), exec: function(editor) { editor.gotoPageDown(); }, readOnly: true }, { name: "selectpageup", + description: "Select page up", bindKey: "Shift-PageUp", exec: function(editor) { editor.selectPageUp(); }, readOnly: true }, { name: "pageup", + description: "Page up", bindKey: bindKey(null, "Option-PageUp"), exec: function(editor) { editor.scrollPageUp(); }, readOnly: true }, { name: "gotopageup", + description: "Go to page up", bindKey: "PageUp", exec: function(editor) { editor.gotoPageUp(); }, readOnly: true }, { name: "scrollup", + description: "Scroll up", bindKey: bindKey("Ctrl-Up", null), exec: function(e) { e.renderer.scrollBy(0, -2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "scrolldown", + description: "Scroll down", bindKey: bindKey("Ctrl-Down", null), exec: function(e) { e.renderer.scrollBy(0, 2 * e.renderer.layerConfig.lineHeight); }, readOnly: true }, { name: "selectlinestart", + description: "Select line start", bindKey: "Shift-Home", exec: function(editor) { editor.getSelection().selectLineStart(); }, multiSelectAction: "forEach", @@ -11790,6 +12627,7 @@ exports.commands = [{ readOnly: true }, { name: "selectlineend", + description: "Select line end", bindKey: "Shift-End", exec: function(editor) { editor.getSelection().selectLineEnd(); }, multiSelectAction: "forEach", @@ -11797,30 +12635,35 @@ exports.commands = [{ readOnly: true }, { name: "togglerecording", + description: "Toggle recording", bindKey: bindKey("Ctrl-Alt-E", "Command-Option-E"), exec: function(editor) { editor.commands.toggleRecording(editor); }, readOnly: true }, { name: "replaymacro", + description: "Replay macro", bindKey: bindKey("Ctrl-Shift-E", "Command-Shift-E"), exec: function(editor) { editor.commands.replay(editor); }, readOnly: true }, { name: "jumptomatching", - bindKey: bindKey("Ctrl-P", "Ctrl-P"), + description: "Jump to matching", + bindKey: bindKey("Ctrl-\\|Ctrl-P", "Command-\\"), exec: function(editor) { editor.jumpToMatching(); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "selecttomatching", - bindKey: bindKey("Ctrl-Shift-P", "Ctrl-Shift-P"), + description: "Select to matching", + bindKey: bindKey("Ctrl-Shift-\\|Ctrl-Shift-P", "Command-Shift-\\"), exec: function(editor) { editor.jumpToMatching(true); }, multiSelectAction: "forEach", scrollIntoView: "animate", readOnly: true }, { name: "expandToMatching", + description: "Expand to matching", bindKey: bindKey("Ctrl-Shift-M", "Ctrl-Shift-M"), exec: function(editor) { editor.jumpToMatching(true, true); }, multiSelectAction: "forEach", @@ -11828,119 +12671,139 @@ exports.commands = [{ readOnly: true }, { name: "passKeysToBrowser", + description: "Pass keys to browser", bindKey: bindKey(null, null), exec: function() {}, passEvent: true, readOnly: true }, { name: "copy", + description: "Copy", exec: function(editor) { }, readOnly: true }, { name: "cut", + description: "Cut", exec: function(editor) { - var range = editor.getSelectionRange(); + var cutLine = editor.$copyWithEmptySelection && editor.selection.isEmpty(); + var range = cutLine ? editor.selection.getLineRange() : editor.selection.getRange(); editor._emit("cut", range); - if (!editor.selection.isEmpty()) { + if (!range.isEmpty()) editor.session.remove(range); - editor.clearSelection(); - } + editor.clearSelection(); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "paste", + description: "Paste", exec: function(editor, args) { editor.$handlePaste(args); }, scrollIntoView: "cursor" }, { name: "removeline", + description: "Remove line", bindKey: bindKey("Ctrl-D", "Command-D"), exec: function(editor) { editor.removeLines(); }, scrollIntoView: "cursor", multiSelectAction: "forEachLine" }, { name: "duplicateSelection", + description: "Duplicate selection", bindKey: bindKey("Ctrl-Shift-D", "Command-Shift-D"), exec: function(editor) { editor.duplicateSelection(); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "sortlines", + description: "Sort lines", bindKey: bindKey("Ctrl-Alt-S", "Command-Alt-S"), exec: function(editor) { editor.sortLines(); }, scrollIntoView: "selection", multiSelectAction: "forEachLine" }, { name: "togglecomment", + description: "Toggle comment", bindKey: bindKey("Ctrl-/", "Command-/"), exec: function(editor) { editor.toggleCommentLines(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "toggleBlockComment", + description: "Toggle block comment", bindKey: bindKey("Ctrl-Shift-/", "Command-Shift-/"), exec: function(editor) { editor.toggleBlockComment(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "modifyNumberUp", + description: "Modify number up", bindKey: bindKey("Ctrl-Shift-Up", "Alt-Shift-Up"), exec: function(editor) { editor.modifyNumber(1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "modifyNumberDown", + description: "Modify number down", bindKey: bindKey("Ctrl-Shift-Down", "Alt-Shift-Down"), exec: function(editor) { editor.modifyNumber(-1); }, scrollIntoView: "cursor", multiSelectAction: "forEach" }, { name: "replace", + description: "Replace", bindKey: bindKey("Ctrl-H", "Command-Option-F"), exec: function(editor) { - config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true)}); + config.loadModule("ace/ext/searchbox", function(e) {e.Search(editor, true);}); } }, { name: "undo", + description: "Undo", bindKey: bindKey("Ctrl-Z", "Command-Z"), exec: function(editor) { editor.undo(); } }, { name: "redo", + description: "Redo", bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), exec: function(editor) { editor.redo(); } }, { name: "copylinesup", + description: "Copy lines up", bindKey: bindKey("Alt-Shift-Up", "Command-Option-Up"), exec: function(editor) { editor.copyLinesUp(); }, scrollIntoView: "cursor" }, { name: "movelinesup", + description: "Move lines up", bindKey: bindKey("Alt-Up", "Option-Up"), exec: function(editor) { editor.moveLinesUp(); }, scrollIntoView: "cursor" }, { name: "copylinesdown", + description: "Copy lines down", bindKey: bindKey("Alt-Shift-Down", "Command-Option-Down"), exec: function(editor) { editor.copyLinesDown(); }, scrollIntoView: "cursor" }, { name: "movelinesdown", + description: "Move lines down", bindKey: bindKey("Alt-Down", "Option-Down"), exec: function(editor) { editor.moveLinesDown(); }, scrollIntoView: "cursor" }, { name: "del", + description: "Delete", bindKey: bindKey("Delete", "Delete|Ctrl-D|Shift-Delete"), exec: function(editor) { editor.remove("right"); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "backspace", + description: "Backspace", bindKey: bindKey( "Shift-Backspace|Backspace", "Ctrl-Backspace|Shift-Backspace|Backspace|Ctrl-H" @@ -11950,6 +12813,7 @@ exports.commands = [{ scrollIntoView: "cursor" }, { name: "cut_or_delete", + description: "Cut or delete", bindKey: bindKey("Shift-Delete", null), exec: function(editor) { if (editor.selection.isEmpty()) { @@ -11962,59 +12826,91 @@ exports.commands = [{ scrollIntoView: "cursor" }, { name: "removetolinestart", + description: "Remove to line start", bindKey: bindKey("Alt-Backspace", "Command-Backspace"), exec: function(editor) { editor.removeToLineStart(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removetolineend", - bindKey: bindKey("Alt-Delete", "Ctrl-K"), + description: "Remove to line end", + bindKey: bindKey("Alt-Delete", "Ctrl-K|Command-Delete"), exec: function(editor) { editor.removeToLineEnd(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" +}, { + name: "removetolinestarthard", + description: "Remove to line start hard", + bindKey: bindKey("Ctrl-Shift-Backspace", null), + exec: function(editor) { + var range = editor.selection.getRange(); + range.start.column = 0; + editor.session.remove(range); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "removetolineendhard", + description: "Remove to line end hard", + bindKey: bindKey("Ctrl-Shift-Delete", null), + exec: function(editor) { + var range = editor.selection.getRange(); + range.end.column = Number.MAX_VALUE; + editor.session.remove(range); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" }, { name: "removewordleft", + description: "Remove word left", bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), exec: function(editor) { editor.removeWordLeft(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "removewordright", + description: "Remove word right", bindKey: bindKey("Ctrl-Delete", "Alt-Delete"), exec: function(editor) { editor.removeWordRight(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "outdent", + description: "Outdent", bindKey: bindKey("Shift-Tab", "Shift-Tab"), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "indent", + description: "Indent", bindKey: bindKey("Tab", "Tab"), exec: function(editor) { editor.indent(); }, multiSelectAction: "forEach", scrollIntoView: "selectionPart" }, { name: "blockoutdent", + description: "Block outdent", bindKey: bindKey("Ctrl-[", "Ctrl-["), exec: function(editor) { editor.blockOutdent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "blockindent", + description: "Block indent", bindKey: bindKey("Ctrl-]", "Ctrl-]"), exec: function(editor) { editor.blockIndent(); }, multiSelectAction: "forEachLine", scrollIntoView: "selectionPart" }, { name: "insertstring", + description: "Insert string", exec: function(editor, str) { editor.insert(str); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "inserttext", + description: "Insert text", exec: function(editor, args) { editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); }, @@ -12022,30 +12918,35 @@ exports.commands = [{ scrollIntoView: "cursor" }, { name: "splitline", + description: "Split line", bindKey: bindKey(null, "Ctrl-O"), exec: function(editor) { editor.splitLine(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "transposeletters", + description: "Transpose letters", bindKey: bindKey("Alt-Shift-X", "Ctrl-T"), exec: function(editor) { editor.transposeLetters(); }, multiSelectAction: function(editor) {editor.transposeSelections(1); }, scrollIntoView: "cursor" }, { name: "touppercase", + description: "To uppercase", bindKey: bindKey("Ctrl-U", "Ctrl-U"), exec: function(editor) { editor.toUpperCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "tolowercase", + description: "To lowercase", bindKey: bindKey("Ctrl-Shift-U", "Ctrl-Shift-U"), exec: function(editor) { editor.toLowerCase(); }, multiSelectAction: "forEach", scrollIntoView: "cursor" }, { name: "expandtoline", + description: "Expand to line", bindKey: bindKey("Ctrl-Shift-L", "Command-Shift-L"), exec: function(editor) { var range = editor.selection.getRange(); @@ -12059,6 +12960,7 @@ exports.commands = [{ readOnly: true }, { name: "joinlines", + description: "Join lines", bindKey: bindKey(null, null), exec: function(editor) { var isBackwards = editor.selection.isBackwards(); @@ -12096,6 +12998,7 @@ exports.commands = [{ readOnly: true }, { name: "invertSelection", + description: "Invert selection", bindKey: bindKey(null, null), exec: function(editor) { var endRow = editor.session.doc.getLength() - 1; @@ -12131,11 +13034,27 @@ exports.commands = [{ }, readOnly: true, scrollIntoView: "none" +}, { + name: "openCommandPallete", + description: "Open command pallete", + bindKey: bindKey("F1", "F1"), + exec: function(editor) { + editor.prompt({ $type: "commands" }); + }, + readOnly: true +}, { + name: "modeSelect", + description: "Change language mode...", + bindKey: bindKey(null, null), + exec: function(editor) { + editor.prompt({ $type: "modes" }); + }, + readOnly: true }]; }); -ace.define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator"], function(require, exports, module) { +define("ace/editor",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/keyboard/textinput","ace/mouse/mouse_handler","ace/mouse/fold_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","ace/lib/event_emitter","ace/commands/command_manager","ace/commands/default_commands","ace/config","ace/token_iterator","ace/clipboard"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); @@ -12156,7 +13075,9 @@ var CommandManager = require("./commands/command_manager").CommandManager; var defaultCommands = require("./commands/default_commands").commands; var config = require("./config"); var TokenIterator = require("./token_iterator").TokenIterator; -var Editor = function(renderer, session) { + +var clipboard = require("./clipboard"); +var Editor = function(renderer, session, options) { var container = renderer.getContainerElement(); this.container = container; this.renderer = renderer; @@ -12164,7 +13085,7 @@ var Editor = function(renderer, session) { this.commands = new CommandManager(useragent.isMac ? "mac" : "win", defaultCommands); if (typeof document == "object") { - this.textInput = new TextInput(renderer.getTextAreaContainer(), this); + this.textInput = new TextInput(renderer.getTextAreaContainer(), this); this.renderer.textarea = this.textInput.getElement(); this.$mouseHandler = new MouseHandler(this); new FoldHandler(this); @@ -12172,7 +13093,6 @@ var Editor = function(renderer, session) { this.keyBinding = new KeyBinding(this); - this.$blockScrolling = 0; this.$search = new Search().set({ wrap: true }); @@ -12192,8 +13112,10 @@ var Editor = function(renderer, session) { _self._$emitInputEvent.schedule(31); }); - this.setSession(session || new EditSession("")); + this.setSession(session || options && options.session || new EditSession("")); config.resetOptions(this); + if (options) + this.setOptions(options); config._signal("editor", this); }; @@ -12204,56 +13126,58 @@ Editor.$uid = 0; oop.implement(this, EventEmitter); this.$initOperationListeners = function() { - function last(a) {return a[a.length - 1]} - - this.selections = []; this.commands.on("exec", this.startOperation.bind(this), true); this.commands.on("afterExec", this.endOperation.bind(this), true); - this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this)); - + this.$opResetTimer = lang.delayedCall(this.endOperation.bind(this, true)); this.on("change", function() { - this.curOp || this.startOperation(); + if (!this.curOp) { + this.startOperation(); + this.curOp.selectionBefore = this.$lastSel; + } this.curOp.docChanged = true; }.bind(this), true); - + this.on("changeSelection", function() { - this.curOp || this.startOperation(); + if (!this.curOp) { + this.startOperation(); + this.curOp.selectionBefore = this.$lastSel; + } this.curOp.selectionChanged = true; }.bind(this), true); }; this.curOp = null; this.prevOp = {}; - this.startOperation = function(commadEvent) { + this.startOperation = function(commandEvent) { if (this.curOp) { - if (!commadEvent || this.curOp.command) + if (!commandEvent || this.curOp.command) return; this.prevOp = this.curOp; } - if (!commadEvent) { + if (!commandEvent) { this.previousCommand = null; - commadEvent = {}; + commandEvent = {}; } this.$opResetTimer.schedule(); - this.curOp = { - command: commadEvent.command || {}, - args: commadEvent.args, + this.curOp = this.session.curOp = { + command: commandEvent.command || {}, + args: commandEvent.args, scrollTop: this.renderer.scrollTop }; - if (this.curOp.command.name && this.curOp.command.scrollIntoView !== undefined) - this.$blockScrolling++; + this.curOp.selectionBefore = this.selection.toJSON(); }; this.endOperation = function(e) { if (this.curOp) { if (e && e.returnValue === false) - return this.curOp = null; + return (this.curOp = null); + if (e == true && this.curOp.command && this.curOp.command.name == "mouse") + return; this._signal("beforeEndOperation"); + if (!this.curOp) return; var command = this.curOp.command; - if (command.name && this.$blockScrolling > 0) - this.$blockScrolling--; var scrollIntoView = command && command.scrollIntoView; if (scrollIntoView) { switch (scrollIntoView) { @@ -12279,7 +13203,10 @@ Editor.$uid = 0; if (scrollIntoView == "animate") this.renderer.animateScrolling(this.curOp.scrollTop); } - + var sel = this.selection.toJSON(); + this.curOp.selectionAfter = sel; + this.$lastSel = this.selection.toJSON(); + this.session.getUndoManager().addSelection(sel); this.prevOp = this.curOp; this.curOp = null; } @@ -12320,7 +13247,7 @@ Editor.$uid = 0; this.sequenceStartTime = Date.now(); }; this.setKeyboardHandler = function(keyboardHandler, cb) { - if (keyboardHandler && typeof keyboardHandler === "string") { + if (keyboardHandler && typeof keyboardHandler === "string" && keyboardHandler != "ace") { this.$keybindingId = keyboardHandler; var _self = this; config.loadModule(["keybinding", keyboardHandler], function(module) { @@ -12418,9 +13345,7 @@ Editor.$uid = 0; this.onChangeMode(); - this.$blockScrolling += 1; this.onCursorChange(); - this.$blockScrolling -= 1; this.onScrollTopChange(); this.onScrollLeftChange(); @@ -12487,7 +13412,7 @@ Editor.$uid = 0; }; this.getFontSize = function () { return this.getOption("fontSize") || - dom.computedStyle(this.container, "fontSize"); + dom.computedStyle(this.container).fontSize; }; this.setFontSize = function(size) { this.setOption("fontSize", size); @@ -12594,14 +13519,15 @@ Editor.$uid = 0; session.$tagHighlight = null; } - if (range && !session.$tagHighlight) + if (!session.$tagHighlight) session.$tagHighlight = session.addMarker(range, "ace_bracket", "text"); }, 50); }; this.focus = function() { var _self = this; setTimeout(function() { - _self.textInput.focus(); + if (!_self.isFocused()) + _self.textInput.focus(); }); this.textInput.focus(); }; @@ -12657,14 +13583,6 @@ Editor.$uid = 0; this.onCursorChange = function() { this.$cursorChange(); - if (!this.$blockScrolling) { - config.warn("Automatically scrolling cursor into view after selection change", - "this will be disabled in the next version", - "set editor.$blockScrolling = Infinity to disable this message" - ); - this.renderer.scrollCursorIntoView(); - } - this.$highlightBrackets(); this.$highlightTags(); this.$updateHighlightActiveLine(); @@ -12676,8 +13594,10 @@ Editor.$uid = 0; var highlight; if (this.$highlightActiveLine) { - if ((this.$selectionStyle != "line" || !this.selection.isMultiLine())) + if (this.$selectionStyle != "line" || !this.selection.isMultiLine()) highlight = this.getCursorPosition(); + if (this.renderer.theme && this.renderer.theme.$selectionColorConflict && !this.selection.isEmpty()) + highlight = false; if (this.renderer.$maxLines && this.session.getLength() === 1 && !(this.renderer.$minLines > 1)) highlight = false; } @@ -12726,18 +13646,12 @@ Editor.$uid = 0; if (selection.isEmpty() || selection.isMultiLine()) return; - var startOuter = selection.start.column - 1; - var endOuter = selection.end.column + 1; + var startColumn = selection.start.column; + var endColumn = selection.end.column; var line = session.getLine(selection.start.row); - var lineCols = line.length; - var needle = line.substring(Math.max(startOuter, 0), - Math.min(endOuter, lineCols)); - if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || - (endOuter <= lineCols && /[\w\d]$/.test(needle))) - return; - - needle = line.substring(selection.start.column, selection.end.column); - if (!/^[\w\d]+$/.test(needle)) + + var needle = line.substring(startColumn, endColumn); + if (needle.length > 5000 || !/[\w\d]/.test(needle)) return; var re = this.$search.$assembleRegExp({ @@ -12745,7 +13659,11 @@ Editor.$uid = 0; caseSensitive: true, needle: needle }); - + + var wordWithBoundary = line.substring(startColumn - 1, endColumn + 1); + if (!re.test(wordWithBoundary)) + return; + return re; }; @@ -12792,8 +13710,22 @@ Editor.$uid = 0; }; this.getCopyText = function() { var text = this.getSelectedText(); - this._signal("copy", text); - return text; + var nl = this.session.doc.getNewLineCharacter(); + var copyLine= false; + if (!text && this.$copyWithEmptySelection) { + copyLine = true; + var ranges = this.selection.getAllRanges(); + for (var i = 0; i < ranges.length; i++) { + var range = ranges[i]; + if (i && ranges[i - 1].start.row == range.start.row) + continue; + text += this.session.getLine(range.start.row) + nl; + } + } + var e = {text: text}; + this._signal("copy", e); + clipboard.lineMode = copyLine ? e.text : ""; + return e.text; }; this.onCopy = function() { this.commands.exec("copy", this); @@ -12811,21 +13743,32 @@ Editor.$uid = 0; e = {text: e}; this._signal("paste", e); var text = e.text; + + var lineMode = text == clipboard.lineMode; + var session = this.session; if (!this.inMultiSelectMode || this.inVirtualSelectionMode) { - this.insert(text); + if (lineMode) + session.insert({ row: this.selection.lead.row, column: 0 }, text); + else + this.insert(text); + } else if (lineMode) { + this.selection.rangeList.ranges.forEach(function(range) { + session.insert({ row: range.start.row, column: 0 }, text); + }); } else { var lines = text.split(/\r\n|\r|\n/); var ranges = this.selection.rangeList.ranges; - if (lines.length > ranges.length || lines.length < 2 || !lines[1]) + var isFullLine = lines.length == 2 && (!lines[0] || !lines[1]); + if (lines.length != ranges.length || isFullLine) return this.commands.exec("insertstring", this, text); for (var i = ranges.length; i--;) { var range = ranges[i]; if (!range.isEmpty()) - this.session.remove(range); + session.remove(range); - this.session.insert(range.start, lines[i]); + session.insert(range.start, lines[i]); } } }; @@ -12842,8 +13785,10 @@ Editor.$uid = 0; var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); if (transform) { if (text !== transform.text) { - this.session.mergeUndoDeltas = false; - this.$mergeNextCommand = false; + if (!this.inVirtualSelectionMode) { + this.session.mergeUndoDeltas = false; + this.mergeNextCommand = false; + } } text = transform.text; @@ -12876,7 +13821,7 @@ Editor.$uid = 0; var lineState = session.getState(cursor.row); var line = session.getLine(cursor.row); var shouldOutdent = mode.checkOutdent(lineState, line, text); - var end = session.insert(cursor, text); + session.insert(cursor, text); if (transform && transform.selection) { if (transform.selection.length == 2) { // Transform relative to the current column @@ -12901,12 +13846,40 @@ Editor.$uid = 0; mode.autoOutdent(lineState, session, cursor.row); }; - this.onTextInput = function(text) { - this.keyBinding.onTextInput(text); + this.onTextInput = function(text, composition) { + if (!composition) + return this.keyBinding.onTextInput(text); + + this.startOperation({command: { name: "insertstring" }}); + var applyComposition = this.applyComposition.bind(this, text, composition); + if (this.selection.rangeCount) + this.forEachSelection(applyComposition); + else + applyComposition(); + this.endOperation(); + }; + + this.applyComposition = function(text, composition) { + if (composition.extendLeft || composition.extendRight) { + var r = this.selection.getRange(); + r.start.column -= composition.extendLeft; + r.end.column += composition.extendRight; + this.selection.setRange(r); + if (!text && !r.isEmpty()) + this.remove(); + } + if (text || !this.selection.isEmpty()) + this.insert(text, true); + if (composition.restoreStart || composition.restoreEnd) { + var r = this.selection.getRange(); + r.start.column -= composition.restoreStart; + r.end.column -= composition.restoreEnd; + this.selection.setRange(r); + } }; this.onCommandKey = function(e, hashId, keyCode) { - this.keyBinding.onCommandKey(e, hashId, keyCode); + return this.keyBinding.onCommandKey(e, hashId, keyCode); }; this.setOverwrite = function(overwrite) { this.session.setOverwrite(overwrite); @@ -13068,7 +14041,8 @@ Editor.$uid = 0; this.removeToLineStart = function() { if (this.selection.isEmpty()) this.selection.selectLineStart(); - + if (this.selection.isEmpty()) + this.selection.selectLeft(); this.session.remove(this.getSelectionRange()); this.clearSelection(); }; @@ -13189,7 +14163,7 @@ Editor.$uid = 0; var session = this.session; var lines = []; - for (i = rows.first; i <= rows.last; i++) + for (var i = rows.first; i <= rows.last; i++) lines.push(session.getLine(i)); lines.sort(function(a, b) { @@ -13267,6 +14241,84 @@ Editor.$uid = 0; this.moveCursorTo(row, Math.max(nr.start +1, column + nnr.length - nr.value.length)); } + } else { + this.toggleWord(); + } + }; + + this.$toggleWordPairs = [ + ["first", "last"], + ["true", "false"], + ["yes", "no"], + ["width", "height"], + ["top", "bottom"], + ["right", "left"], + ["on", "off"], + ["x", "y"], + ["get", "set"], + ["max", "min"], + ["horizontal", "vertical"], + ["show", "hide"], + ["add", "remove"], + ["up", "down"], + ["before", "after"], + ["even", "odd"], + ["inside", "outside"], + ["next", "previous"], + ["increase", "decrease"], + ["attach", "detach"], + ["&&", "||"], + ["==", "!="] + ]; + + this.toggleWord = function () { + var row = this.selection.getCursor().row; + var column = this.selection.getCursor().column; + this.selection.selectWord(); + var currentState = this.getSelectedText(); + var currWordStart = this.selection.getWordRange().start.column; + var wordParts = currentState.replace(/([a-z]+|[A-Z]+)(?=[A-Z_]|$)/g, '$1 ').split(/\s/); + var delta = column - currWordStart - 1; + if (delta < 0) delta = 0; + var curLength = 0, itLength = 0; + var that = this; + if (currentState.match(/[A-Za-z0-9_]+/)) { + wordParts.forEach(function (item, i) { + itLength = curLength + item.length; + if (delta >= curLength && delta <= itLength) { + currentState = item; + that.selection.clearSelection(); + that.moveCursorTo(row, curLength + currWordStart); + that.selection.selectTo(row, itLength + currWordStart); + } + curLength = itLength; + }); + } + + var wordPairs = this.$toggleWordPairs; + var reg; + for (var i = 0; i < wordPairs.length; i++) { + var item = wordPairs[i]; + for (var j = 0; j <= 1; j++) { + var negate = +!j; + var firstCondition = currentState.match(new RegExp('^\\s?_?(' + lang.escapeRegExp(item[j]) + ')\\s?$', 'i')); + if (firstCondition) { + var secondCondition = currentState.match(new RegExp('([_]|^|\\s)(' + lang.escapeRegExp(firstCondition[1]) + ')($|\\s)', 'g')); + if (secondCondition) { + reg = currentState.replace(new RegExp(lang.escapeRegExp(item[j]), 'i'), function (result) { + var res = item[negate]; + if (result.toUpperCase() == result) { + res = res.toUpperCase(); + } else if (result.charAt(0).toUpperCase() == result.charAt(0)) { + res = res.substr(0, 0) + item[negate].charAt(0).toUpperCase() + res.substr(1); + } + return res; + }); + this.insert(reg); + reg = ""; + } + } + } } }; this.removeLines = function() { @@ -13365,8 +14417,8 @@ Editor.$uid = 0; }; }; - this.onCompositionStart = function(text) { - this.renderer.showComposition(this.getCursorPosition()); + this.onCompositionStart = function(compositionState) { + this.renderer.showComposition(compositionState); }; this.onCompositionUpdate = function(text) { @@ -13397,7 +14449,6 @@ Editor.$uid = 0; var config = this.renderer.layerConfig; var rows = dir * Math.floor(config.height / config.lineHeight); - this.$blockScrolling++; if (select === true) { this.selection.$moveSelection(function(){ this.moveCursorBy(rows, 0); @@ -13406,7 +14457,6 @@ Editor.$uid = 0; this.selection.moveCursorBy(rows, 0); this.selection.clearSelection(); } - this.$blockScrolling--; var scrollTop = renderer.scrollTop; @@ -13458,9 +14508,7 @@ Editor.$uid = 0; return this.selection.getRange(); }; this.selectAll = function() { - this.$blockScrolling += 1; this.selection.selectAll(); - this.$blockScrolling -= 1; }; this.clearSelection = function() { this.selection.clearSelection(); @@ -13524,7 +14572,7 @@ Editor.$uid = 0; } } } - else if (token && token.type.indexOf('tag-name') !== -1) { + else if (token.type.indexOf('tag-name') !== -1) { if (isNaN(depth[token.value])) { depth[token.value] = 0; } @@ -13628,11 +14676,8 @@ Editor.$uid = 0; this.gotoLine = function(lineNumber, column, animate) { this.selection.clearSelection(); this.session.unfold({row: lineNumber - 1, column: column || 0}); - - this.$blockScrolling += 1; this.exitMultiSelectMode && this.exitMultiSelectMode(); this.moveCursorTo(lineNumber - 1, column || 0); - this.$blockScrolling -= 1; if (!this.isRowFullyVisible(lineNumber - 1)) this.scrollToLine(lineNumber - 1, true, animate); @@ -13718,10 +14763,9 @@ Editor.$uid = 0; if (this.$tryReplace(range, replacement)) { replaced = 1; } - if (range !== null) { - this.selection.setSelectionRange(range); - this.renderer.scrollSelectionIntoView(range.start, range.end); - } + + this.selection.setSelectionRange(range); + this.renderer.scrollSelectionIntoView(range.start, range.end); return replaced; }; @@ -13735,8 +14779,6 @@ Editor.$uid = 0; if (!ranges.length) return replaced; - this.$blockScrolling += 1; - var selection = this.getSelectionRange(); this.selection.moveTo(0, 0); @@ -13747,7 +14789,6 @@ Editor.$uid = 0; } this.selection.setSelectionRange(selection); - this.$blockScrolling -= 1; return replaced; }; @@ -13810,10 +14851,8 @@ Editor.$uid = 0; }; this.revealRange = function(range, animate) { - this.$blockScrolling += 1; this.session.unfold(range); this.selection.setSelectionRange(range); - this.$blockScrolling -= 1; var scrollTop = this.renderer.scrollTop; this.renderer.scrollSelectionIntoView(range.start, range.end, 0.5); @@ -13821,15 +14860,11 @@ Editor.$uid = 0; this.renderer.animateScrolling(scrollTop); }; this.undo = function() { - this.$blockScrolling++; - this.session.getUndoManager().undo(); - this.$blockScrolling--; + this.session.getUndoManager().undo(this.session); this.renderer.scrollCursorIntoView(null, 0.5); }; this.redo = function() { - this.$blockScrolling++; - this.session.getUndoManager().redo(); - this.$blockScrolling--; + this.session.getUndoManager().redo(this.session); this.renderer.scrollCursorIntoView(null, 0.5); }; this.destroy = function() { @@ -13902,6 +14937,12 @@ Editor.$uid = 0; cursorLayer.isBlinking = !this.$readOnly && style != "wide"; dom.setCssClass(cursorLayer.element, "ace_slim-cursors", /slim/.test(style)); }; + this.prompt = function(message, options, callback) { + var editor = this; + config.loadModule("./ext/prompt", function (module) { + module.prompt(editor, message, options, callback); + }); + }; }).call(Editor.prototype); @@ -13925,10 +14966,17 @@ config.defineOptions(Editor.prototype, "editor", { }, readOnly: { set: function(readOnly) { + this.textInput.setReadOnly(readOnly); this.$resetCursorStyle(); }, initialValue: false }, + copyWithEmptySelection: { + set: function(value) { + this.textInput.setCopyWithEmptySelection(value); + }, + initialValue: false + }, cursorStyle: { set: function(val) { this.$resetCursorStyle(); }, values: ["ace", "slim", "smooth", "wide"], @@ -13941,13 +14989,45 @@ config.defineOptions(Editor.prototype, "editor", { behavioursEnabled: {initialValue: true}, wrapBehavioursEnabled: {initialValue: true}, autoScrollEditorIntoView: { - set: function(val) {this.setAutoScrollEditorIntoView(val)} + set: function(val) {this.setAutoScrollEditorIntoView(val);} }, keyboardHandler: { set: function(val) { this.setKeyboardHandler(val); }, - get: function() { return this.keybindingId; }, + get: function() { return this.$keybindingId; }, handlesSet: true }, + value: { + set: function(val) { this.session.setValue(val); }, + get: function() { return this.getValue(); }, + handlesSet: true, + hidden: true + }, + session: { + set: function(val) { this.setSession(val); }, + get: function() { return this.session; }, + handlesSet: true, + hidden: true + }, + + showLineNumbers: { + set: function(show) { + this.renderer.$gutterLayer.setShowLineNumbers(show); + this.renderer.$loop.schedule(this.renderer.CHANGE_GUTTER); + if (show && this.$relativeLineNumbers) + relativeNumberRenderer.attach(this); + else + relativeNumberRenderer.detach(this); + }, + initialValue: true + }, + relativeLineNumbers: { + set: function(value) { + if (this.$showLineNumbers && value) + relativeNumberRenderer.attach(this); + else + relativeNumberRenderer.detach(this); + } + }, hScrollBarAlwaysVisible: "renderer", vScrollBarAlwaysVisible: "renderer", @@ -13959,9 +15039,8 @@ config.defineOptions(Editor.prototype, "editor", { printMargin: "renderer", fadeFoldWidgets: "renderer", showFoldWidgets: "renderer", - showLineNumbers: "renderer", - showGutter: "renderer", displayIndentGuides: "renderer", + showGutter: "renderer", fontSize: "renderer", fontFamily: "renderer", maxLines: "renderer", @@ -13969,11 +15048,14 @@ config.defineOptions(Editor.prototype, "editor", { scrollPastEnd: "renderer", fixedWidthGutter: "renderer", theme: "renderer", + hasCssTransforms: "renderer", + maxPixelHeight: "renderer", + useTextareaForIME: "renderer", scrollSpeed: "$mouseHandler", dragDelay: "$mouseHandler", dragEnabled: "$mouseHandler", - focusTimout: "$mouseHandler", + focusTimeout: "$mouseHandler", tooltipFollowsMouse: "$mouseHandler", firstLineNumber: "session", @@ -13981,6 +15063,7 @@ config.defineOptions(Editor.prototype, "editor", { newLineMode: "session", useWorker: "session", useSoftTabs: "session", + navigateWithinSoftTabs: "session", tabSize: "session", wrap: "session", indentedSoftWrap: "session", @@ -13988,123 +15071,652 @@ config.defineOptions(Editor.prototype, "editor", { mode: "session" }); + +var relativeNumberRenderer = { + getText: function(session, row) { + return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9 ? "\xb7" : ""))) + ""; + }, + getWidth: function(session, lastLineNumber, config) { + return Math.max( + lastLineNumber.toString().length, + (config.lastRow + 1).toString().length, + 2 + ) * config.characterWidth; + }, + update: function(e, editor) { + editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER); + }, + attach: function(editor) { + editor.renderer.$gutterLayer.$renderer = this; + editor.on("changeSelection", this.update); + this.update(null, editor); + }, + detach: function(editor) { + if (editor.renderer.$gutterLayer.$renderer == this) + editor.renderer.$gutterLayer.$renderer = null; + editor.off("changeSelection", this.update); + this.update(null, editor); + } +}; + exports.Editor = Editor; }); -ace.define("ace/undomanager",["require","exports","module"], function(require, exports, module) { +define("ace/undomanager",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var UndoManager = function() { + this.$maxRev = 0; + this.$fromUndo = false; this.reset(); }; (function() { - this.execute = function(options) { - var deltaSets = options.args[0]; - this.$doc = options.args[1]; - if (options.merge && this.hasUndo()){ - this.dirtyCounter--; - deltaSets = this.$undoStack.pop().concat(deltaSets); - } - this.$undoStack.push(deltaSets); - this.$redoStack = []; - if (this.dirtyCounter < 0) { - this.dirtyCounter = NaN; - } - this.dirtyCounter++; + + this.addSession = function(session) { + this.$session = session; }; - this.undo = function(dontSelect) { - var deltaSets = this.$undoStack.pop(); - var undoSelectionRange = null; - if (deltaSets) { - undoSelectionRange = this.$doc.undoChanges(deltaSets, dontSelect); - this.$redoStack.push(deltaSets); - this.dirtyCounter--; + this.add = function(delta, allowMerge, session) { + if (this.$fromUndo) return; + if (delta == this.$lastDelta) return; + if (allowMerge === false || !this.lastDeltas) { + this.lastDeltas = []; + this.$undoStack.push(this.lastDeltas); + delta.id = this.$rev = ++this.$maxRev; } + if (delta.action == "remove" || delta.action == "insert") + this.$lastDelta = delta; + this.lastDeltas.push(delta); + }; + + this.addSelection = function(selection, rev) { + this.selections.push({ + value: selection, + rev: rev || this.$rev + }); + }; + + this.startNewGroup = function() { + this.lastDeltas = null; + return this.$rev; + }; + + this.markIgnored = function(from, to) { + if (to == null) to = this.$rev + 1; + var stack = this.$undoStack; + for (var i = stack.length; i--;) { + var delta = stack[i][0]; + if (delta.id <= from) + break; + if (delta.id < to) + delta.ignore = true; + } + this.lastDeltas = null; + }; + + this.getSelection = function(rev, after) { + var stack = this.selections; + for (var i = stack.length; i--;) { + var selection = stack[i]; + if (selection.rev < rev) { + if (after) + selection = stack[i + 1]; + return selection; + } + } + }; + + this.getRevision = function() { + return this.$rev; + }; + + this.getDeltas = function(from, to) { + if (to == null) to = this.$rev + 1; + var stack = this.$undoStack; + var end = null, start = 0; + for (var i = stack.length; i--;) { + var delta = stack[i][0]; + if (delta.id < to && !end) + end = i+1; + if (delta.id <= from) { + start = i + 1; + break; + } + } + return stack.slice(start, end); + }; + + this.getChangedRanges = function(from, to) { + if (to == null) to = this.$rev + 1; + + }; + + this.getChangedLines = function(from, to) { + if (to == null) to = this.$rev + 1; + + }; + this.undo = function(session, dontSelect) { + this.lastDeltas = null; + var stack = this.$undoStack; + + if (!rearrangeUndoStack(stack, stack.length)) + return; + + if (!session) + session = this.$session; + + if (this.$redoStackBaseRev !== this.$rev && this.$redoStack.length) + this.$redoStack = []; + + this.$fromUndo = true; + + var deltaSet = stack.pop(); + var undoSelectionRange = null; + if (deltaSet && deltaSet.length) { + undoSelectionRange = session.undoChanges(deltaSet, dontSelect); + this.$redoStack.push(deltaSet); + this.$syncRev(); + } + + this.$fromUndo = false; return undoSelectionRange; }; - this.redo = function(dontSelect) { - var deltaSets = this.$redoStack.pop(); - var redoSelectionRange = null; - if (deltaSets) { - redoSelectionRange = - this.$doc.redoChanges(this.$deserializeDeltas(deltaSets), dontSelect); - this.$undoStack.push(deltaSets); - this.dirtyCounter++; + this.redo = function(session, dontSelect) { + this.lastDeltas = null; + + if (!session) + session = this.$session; + + this.$fromUndo = true; + if (this.$redoStackBaseRev != this.$rev) { + var diff = this.getDeltas(this.$redoStackBaseRev, this.$rev + 1); + rebaseRedoStack(this.$redoStack, diff); + this.$redoStackBaseRev = this.$rev; + this.$redoStack.forEach(function(x) { + x[0].id = ++this.$maxRev; + }, this); } + var deltaSet = this.$redoStack.pop(); + var redoSelectionRange = null; + + if (deltaSet) { + redoSelectionRange = session.redoChanges(deltaSet, dontSelect); + this.$undoStack.push(deltaSet); + this.$syncRev(); + } + this.$fromUndo = false; + return redoSelectionRange; }; + + this.$syncRev = function() { + var stack = this.$undoStack; + var nextDelta = stack[stack.length - 1]; + var id = nextDelta && nextDelta[0].id || 0; + this.$redoStackBaseRev = id; + this.$rev = id; + }; this.reset = function() { + this.lastDeltas = null; + this.$lastDelta = null; this.$undoStack = []; this.$redoStack = []; - this.dirtyCounter = 0; + this.$rev = 0; + this.mark = 0; + this.$redoStackBaseRev = this.$rev; + this.selections = []; }; - this.hasUndo = function() { + this.canUndo = function() { return this.$undoStack.length > 0; }; - this.hasRedo = function() { + this.canRedo = function() { return this.$redoStack.length > 0; }; - this.markClean = function() { - this.dirtyCounter = 0; + this.bookmark = function(rev) { + if (rev == undefined) + rev = this.$rev; + this.mark = rev; }; - this.isClean = function() { - return this.dirtyCounter === 0; - }; - this.$serializeDeltas = function(deltaSets) { - return cloneDeltaSetsObj(deltaSets, $serializeDelta); - }; - this.$deserializeDeltas = function(deltaSets) { - return cloneDeltaSetsObj(deltaSets, $deserializeDelta); + this.isAtBookmark = function() { + return this.$rev === this.mark; }; - function $serializeDelta(delta){ - return { - action: delta.action, - start: delta.start, - end: delta.end, - lines: delta.lines.length == 1 ? null : delta.lines, - text: delta.lines.length == 1 ? delta.lines[0] : null - }; - } + this.toJSON = function() { - function $deserializeDelta(delta) { - return { - action: delta.action, - start: delta.start, - end: delta.end, - lines: delta.lines || [delta.text] - }; - } + }; - function cloneDeltaSetsObj(deltaSets_old, fnGetModifiedDelta) { - var deltaSets_new = new Array(deltaSets_old.length); - for (var i = 0; i < deltaSets_old.length; i++) { - var deltaSet_old = deltaSets_old[i]; - var deltaSet_new = { group: deltaSet_old.group, deltas: new Array(deltaSet_old.length)}; - - for (var j = 0; j < deltaSet_old.deltas.length; j++) { - var delta_old = deltaSet_old.deltas[j]; - deltaSet_new.deltas[j] = fnGetModifiedDelta(delta_old); - } - - deltaSets_new[i] = deltaSet_new; - } - return deltaSets_new; - } + this.fromJSON = function() { + + }; + this.hasUndo = this.canUndo; + this.hasRedo = this.canRedo; + this.isClean = this.isAtBookmark; + this.markClean = this.bookmark; + + this.$prettyPrint = function(delta) { + if (delta) return stringifyDelta(delta); + return stringifyDelta(this.$undoStack) + "\n---\n" + stringifyDelta(this.$redoStack); + }; }).call(UndoManager.prototype); +function rearrangeUndoStack(stack, pos) { + for (var i = pos; i--; ) { + var deltaSet = stack[i]; + if (deltaSet && !deltaSet[0].ignore) { + while(i < pos - 1) { + var swapped = swapGroups(stack[i], stack[i + 1]); + stack[i] = swapped[0]; + stack[i + 1] = swapped[1]; + i++; + } + return true; + } + } +} + +var Range = require("./range").Range; +var cmp = Range.comparePoints; +var comparePoints = Range.comparePoints; + +function $updateMarkers(delta) { + var isInsert = delta.action == "insert"; + var start = delta.start; + var end = delta.end; + var rowShift = (end.row - start.row) * (isInsert ? 1 : -1); + var colShift = (end.column - start.column) * (isInsert ? 1 : -1); + if (isInsert) end = start; + + for (var i in this.marks) { + var point = this.marks[i]; + var cmp = comparePoints(point, start); + if (cmp < 0) { + continue; // delta starts after the range + } + if (cmp === 0) { + if (isInsert) { + if (point.bias == 1) { + cmp = 1; + } + else { + point.bias == -1; + continue; + } + } + } + var cmp2 = isInsert ? cmp : comparePoints(point, end); + if (cmp2 > 0) { + point.row += rowShift; + point.column += point.row == end.row ? colShift : 0; + continue; + } + if (!isInsert && cmp2 <= 0) { + point.row = start.row; + point.column = start.column; + if (cmp2 === 0) + point.bias = 1; + } + } +} + + + +function clonePos(pos) { + return {row: pos.row,column: pos.column}; +} +function cloneDelta(d) { + return { + start: clonePos(d.start), + end: clonePos(d.end), + action: d.action, + lines: d.lines.slice() + }; +} +function stringifyDelta(d) { + d = d || this; + if (Array.isArray(d)) { + return d.map(stringifyDelta).join("\n"); + } + var type = ""; + if (d.action) { + type = d.action == "insert" ? "+" : "-"; + type += "[" + d.lines + "]"; + } else if (d.value) { + if (Array.isArray(d.value)) { + type = d.value.map(stringifyRange).join("\n"); + } else { + type = stringifyRange(d.value); + } + } + if (d.start) { + type += stringifyRange(d); + } + if (d.id || d.rev) { + type += "\t(" + (d.id || d.rev) + ")"; + } + return type; +} +function stringifyRange(r) { + return r.start.row + ":" + r.start.column + + "=>" + r.end.row + ":" + r.end.column; +} + +function swap(d1, d2) { + var i1 = d1.action == "insert"; + var i2 = d2.action == "insert"; + + if (i1 && i2) { + if (cmp(d2.start, d1.end) >= 0) { + shift(d2, d1, -1); + } else if (cmp(d2.start, d1.start) <= 0) { + shift(d1, d2, +1); + } else { + return null; + } + } else if (i1 && !i2) { + if (cmp(d2.start, d1.end) >= 0) { + shift(d2, d1, -1); + } else if (cmp(d2.end, d1.start) <= 0) { + shift(d1, d2, -1); + } else { + return null; + } + } else if (!i1 && i2) { + if (cmp(d2.start, d1.start) >= 0) { + shift(d2, d1, +1); + } else if (cmp(d2.start, d1.start) <= 0) { + shift(d1, d2, +1); + } else { + return null; + } + } else if (!i1 && !i2) { + if (cmp(d2.start, d1.start) >= 0) { + shift(d2, d1, +1); + } else if (cmp(d2.end, d1.start) <= 0) { + shift(d1, d2, -1); + } else { + return null; + } + } + return [d2, d1]; +} +function swapGroups(ds1, ds2) { + for (var i = ds1.length; i--; ) { + for (var j = 0; j < ds2.length; j++) { + if (!swap(ds1[i], ds2[j])) { + while (i < ds1.length) { + while (j--) { + swap(ds2[j], ds1[i]); + } + j = ds2.length; + i++; + } + return [ds1, ds2]; + } + } + } + ds1.selectionBefore = ds2.selectionBefore = + ds1.selectionAfter = ds2.selectionAfter = null; + return [ds2, ds1]; +} +function xform(d1, c1) { + var i1 = d1.action == "insert"; + var i2 = c1.action == "insert"; + + if (i1 && i2) { + if (cmp(d1.start, c1.start) < 0) { + shift(c1, d1, 1); + } else { + shift(d1, c1, 1); + } + } else if (i1 && !i2) { + if (cmp(d1.start, c1.end) >= 0) { + shift(d1, c1, -1); + } else if (cmp(d1.start, c1.start) <= 0) { + shift(c1, d1, +1); + } else { + shift(d1, Range.fromPoints(c1.start, d1.start), -1); + shift(c1, d1, +1); + } + } else if (!i1 && i2) { + if (cmp(c1.start, d1.end) >= 0) { + shift(c1, d1, -1); + } else if (cmp(c1.start, d1.start) <= 0) { + shift(d1, c1, +1); + } else { + shift(c1, Range.fromPoints(d1.start, c1.start), -1); + shift(d1, c1, +1); + } + } else if (!i1 && !i2) { + if (cmp(c1.start, d1.end) >= 0) { + shift(c1, d1, -1); + } else if (cmp(c1.end, d1.start) <= 0) { + shift(d1, c1, -1); + } else { + var before, after; + if (cmp(d1.start, c1.start) < 0) { + before = d1; + d1 = splitDelta(d1, c1.start); + } + if (cmp(d1.end, c1.end) > 0) { + after = splitDelta(d1, c1.end); + } + + shiftPos(c1.end, d1.start, d1.end, -1); + if (after && !before) { + d1.lines = after.lines; + d1.start = after.start; + d1.end = after.end; + after = d1; + } + + return [c1, before, after].filter(Boolean); + } + } + return [c1, d1]; +} + +function shift(d1, d2, dir) { + shiftPos(d1.start, d2.start, d2.end, dir); + shiftPos(d1.end, d2.start, d2.end, dir); +} +function shiftPos(pos, start, end, dir) { + if (pos.row == (dir == 1 ? start : end).row) { + pos.column += dir * (end.column - start.column); + } + pos.row += dir * (end.row - start.row); +} +function splitDelta(c, pos) { + var lines = c.lines; + var end = c.end; + c.end = clonePos(pos); + var rowsBefore = c.end.row - c.start.row; + var otherLines = lines.splice(rowsBefore, lines.length); + + var col = rowsBefore ? pos.column : pos.column - c.start.column; + lines.push(otherLines[0].substring(0, col)); + otherLines[0] = otherLines[0].substr(col) ; + var rest = { + start: clonePos(pos), + end: end, + lines: otherLines, + action: c.action + }; + return rest; +} + +function moveDeltasByOne(redoStack, d) { + d = cloneDelta(d); + for (var j = redoStack.length; j--;) { + var deltaSet = redoStack[j]; + for (var i = 0; i < deltaSet.length; i++) { + var x = deltaSet[i]; + var xformed = xform(x, d); + d = xformed[0]; + if (xformed.length != 2) { + if (xformed[2]) { + deltaSet.splice(i + 1, 1, xformed[1], xformed[2]); + i++; + } else if (!xformed[1]) { + deltaSet.splice(i, 1); + i--; + } + } + } + if (!deltaSet.length) { + redoStack.splice(j, 1); + } + } + return redoStack; +} +function rebaseRedoStack(redoStack, deltaSets) { + for (var i = 0; i < deltaSets.length; i++) { + var deltas = deltaSets[i]; + for (var j = 0; j < deltas.length; j++) { + moveDeltasByOne(redoStack, deltas[j]); + } + } +} + exports.UndoManager = UndoManager; + }); -ace.define("ace/layer/gutter",["require","exports","module","ace/lib/dom","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/layer/lines",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +"use strict"; + +var dom = require("../lib/dom"); + +var Lines = function(element, canvasHeight) { + this.element = element; + this.canvasHeight = canvasHeight || 500000; + this.element.style.height = (this.canvasHeight * 2) + "px"; + + this.cells = []; + this.cellCache = []; + this.$offsetCoefficient = 0; +}; + +(function() { + + this.moveContainer = function(config) { + dom.translate(this.element, 0, -((config.firstRowScreen * config.lineHeight) % this.canvasHeight) - config.offset * this.$offsetCoefficient); + }; + + this.pageChanged = function(oldConfig, newConfig) { + return ( + Math.floor((oldConfig.firstRowScreen * oldConfig.lineHeight) / this.canvasHeight) !== + Math.floor((newConfig.firstRowScreen * newConfig.lineHeight) / this.canvasHeight) + ); + }; + + this.computeLineTop = function(row, config, session) { + var screenTop = config.firstRowScreen * config.lineHeight; + var screenPage = Math.floor(screenTop / this.canvasHeight); + var lineTop = session.documentToScreenRow(row, 0) * config.lineHeight; + return lineTop - (screenPage * this.canvasHeight); + }; + + this.computeLineHeight = function(row, config, session) { + return config.lineHeight * session.getRowLength(row); + }; + + this.getLength = function() { + return this.cells.length; + }; + + this.get = function(index) { + return this.cells[index]; + }; + + this.shift = function() { + this.$cacheCell(this.cells.shift()); + }; + + this.pop = function() { + this.$cacheCell(this.cells.pop()); + }; + + this.push = function(cell) { + if (Array.isArray(cell)) { + this.cells.push.apply(this.cells, cell); + var fragment = dom.createFragment(this.element); + for (var i=0; i foldStart) { row = fold.end.row + 1; @@ -14209,101 +15825,250 @@ var Gutter = function(parentEl) { foldStart = fold ? fold.start.row : Infinity; } if (row > lastRow) { - while (this.$cells.length > index + 1) { - cell = this.$cells.pop(); - this.element.removeChild(cell.element); - } + while (this.$lines.getLength() > index + 1) + this.$lines.pop(); + break; } - cell = this.$cells[++index]; - if (!cell) { - cell = {element: null, textNode: null, foldWidget: null}; - cell.element = dom.createElement("div"); - cell.textNode = document.createTextNode(''); - cell.element.appendChild(cell.textNode); - this.element.appendChild(cell.element); - this.$cells[index] = cell; - } - - var className = "ace_gutter-cell "; - if (breakpoints[row]) - className += breakpoints[row]; - if (decorations[row]) - className += decorations[row]; - if (this.$annotations[row]) - className += this.$annotations[row].className; - if (cell.element.className != className) - cell.element.className = className; - - var height = session.getRowLength(row) * config.lineHeight + "px"; - if (height != cell.element.style.height) - cell.element.style.height = height; - - if (foldWidgets) { - var c = foldWidgets[row]; - if (c == null) - c = foldWidgets[row] = session.getFoldWidget(row); - } - - if (c) { - if (!cell.foldWidget) { - cell.foldWidget = dom.createElement("span"); - cell.element.appendChild(cell.foldWidget); - } - var className = "ace_fold-widget ace_" + c; - if (c == "start" && row == foldStart && row < fold.end.row) - className += " ace_closed"; - else - className += " ace_open"; - if (cell.foldWidget.className != className) - cell.foldWidget.className = className; - - var height = config.lineHeight + "px"; - if (cell.foldWidget.style.height != height) - cell.foldWidget.style.height = height; + cell = this.$lines.get(++index); + if (cell) { + cell.row = row; } else { - if (cell.foldWidget) { - cell.element.removeChild(cell.foldWidget); - cell.foldWidget = null; - } + cell = this.$lines.createCell(row, config, this.session, onCreateCell); + this.$lines.push(cell); } - - var text = lastLineNumber = gutterRenderer - ? gutterRenderer.getText(session, row) - : row + firstLineNumber; - if (text !== cell.textNode.data) - cell.textNode.data = text; + this.$renderCell(cell, config, fold, row); row++; } + + this._signal("afterRender"); + this.$updateGutterWidth(config); + }; - this.element.style.height = config.minHeight + "px"; - + this.$updateGutterWidth = function(config) { + var session = this.session; + + var gutterRenderer = session.gutterRenderer || this.$renderer; + + var firstLineNumber = session.$firstLineNumber; + var lastLineText = this.$lines.last() ? this.$lines.last().text : ""; + if (this.$fixedWidth || session.$useWrapMode) - lastLineNumber = session.getLength() + firstLineNumber; + lastLineText = session.getLength() + firstLineNumber - 1; var gutterWidth = gutterRenderer - ? gutterRenderer.getWidth(session, lastLineNumber, config) - : lastLineNumber.toString().length * config.characterWidth; + ? gutterRenderer.getWidth(session, lastLineText, config) + : lastLineText.toString().length * config.characterWidth; var padding = this.$padding || this.$computePadding(); gutterWidth += padding.left + padding.right; if (gutterWidth !== this.gutterWidth && !isNaN(gutterWidth)) { this.gutterWidth = gutterWidth; + this.element.parentNode.style.width = this.element.style.width = Math.ceil(this.gutterWidth) + "px"; - this._emit("changeGutterWidth", gutterWidth); + this._signal("changeGutterWidth", gutterWidth); } }; + + this.$updateCursorRow = function() { + if (!this.$highlightGutterLine) + return; + + var position = this.session.selection.getCursor(); + if (this.$cursorRow === position.row) + return; + + this.$cursorRow = position.row; + }; + + this.updateLineHighlight = function() { + if (!this.$highlightGutterLine) + return; + var row = this.session.selection.cursor.row; + this.$cursorRow = row; + + if (this.$cursorCell && this.$cursorCell.row == row) + return; + if (this.$cursorCell) + this.$cursorCell.element.className = this.$cursorCell.element.className.replace("ace_gutter-active-line ", ""); + var cells = this.$lines.cells; + this.$cursorCell = null; + for (var i = 0; i < cells.length; i++) { + var cell = cells[i]; + if (cell.row >= this.$cursorRow) { + if (cell.row > this.$cursorRow) { + var fold = this.session.getFoldLine(this.$cursorRow); + if (i > 0 && fold && fold.start.row == cells[i - 1].row) + cell = cells[i - 1]; + else + break; + } + cell.element.className = "ace_gutter-active-line " + cell.element.className; + this.$cursorCell = cell; + break; + } + } + }; + + this.scrollLines = function(config) { + var oldConfig = this.config; + this.config = config; + + this.$updateCursorRow(); + if (this.$lines.pageChanged(oldConfig, config)) + return this.update(config); + + this.$lines.moveContainer(config); + + var lastRow = Math.min(config.lastRow + config.gutterOffset, // needed to compensate for hor scollbar + this.session.getLength() - 1); + var oldLastRow = this.oldLastRow; + this.oldLastRow = lastRow; + + if (!oldConfig || oldLastRow < config.firstRow) + return this.update(config); + + if (lastRow < oldConfig.firstRow) + return this.update(config); + + if (oldConfig.firstRow < config.firstRow) + for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) + this.$lines.shift(); + + if (oldLastRow > lastRow) + for (var row=this.session.getFoldedRowCount(lastRow + 1, oldLastRow); row>0; row--) + this.$lines.pop(); + + if (config.firstRow < oldConfig.firstRow) { + this.$lines.unshift(this.$renderLines(config, config.firstRow, oldConfig.firstRow - 1)); + } + + if (lastRow > oldLastRow) { + this.$lines.push(this.$renderLines(config, oldLastRow + 1, lastRow)); + } + + this.updateLineHighlight(); + + this._signal("afterRender"); + this.$updateGutterWidth(config); + }; + + this.$renderLines = function(config, firstRow, lastRow) { + var fragment = []; + var row = firstRow; + var foldLine = this.session.getNextFoldLine(row); + var foldStart = foldLine ? foldLine.start.row : Infinity; + + while (true) { + if (row > foldStart) { + row = foldLine.end.row+1; + foldLine = this.session.getNextFoldLine(row, foldLine); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + if (row > lastRow) + break; + + var cell = this.$lines.createCell(row, config, this.session, onCreateCell); + this.$renderCell(cell, config, foldLine, row); + fragment.push(cell); + + row++; + } + return fragment; + }; + + this.$renderCell = function(cell, config, fold, row) { + var element = cell.element; + + var session = this.session; + + var textNode = element.childNodes[0]; + var foldWidget = element.childNodes[1]; + + var firstLineNumber = session.$firstLineNumber; + + var breakpoints = session.$breakpoints; + var decorations = session.$decorations; + var gutterRenderer = session.gutterRenderer || this.$renderer; + var foldWidgets = this.$showFoldWidgets && session.foldWidgets; + var foldStart = fold ? fold.start.row : Number.MAX_VALUE; + + var className = "ace_gutter-cell "; + if (this.$highlightGutterLine) { + if (row == this.$cursorRow || (fold && row < this.$cursorRow && row >= foldStart && this.$cursorRow <= fold.end.row)) { + className += "ace_gutter-active-line "; + if (this.$cursorCell != cell) { + if (this.$cursorCell) + this.$cursorCell.element.className = this.$cursorCell.element.className.replace("ace_gutter-active-line ", ""); + this.$cursorCell = cell; + } + } + } + + if (breakpoints[row]) + className += breakpoints[row]; + if (decorations[row]) + className += decorations[row]; + if (this.$annotations[row]) + className += this.$annotations[row].className; + if (element.className != className) + element.className = className; + + if (foldWidgets) { + var c = foldWidgets[row]; + if (c == null) + c = foldWidgets[row] = session.getFoldWidget(row); + } + + if (c) { + var className = "ace_fold-widget ace_" + c; + if (c == "start" && row == foldStart && row < fold.end.row) + className += " ace_closed"; + else + className += " ace_open"; + if (foldWidget.className != className) + foldWidget.className = className; + + var foldHeight = config.lineHeight + "px"; + dom.setStyle(foldWidget.style, "height", foldHeight); + dom.setStyle(foldWidget.style, "display", "inline-block"); + } else { + if (foldWidget) { + dom.setStyle(foldWidget.style, "display", "none"); + } + } + + var text = (gutterRenderer + ? gutterRenderer.getText(session, row) + : row + firstLineNumber).toString(); + + if (text !== textNode.data) { + textNode.data = text; + } + + dom.setStyle(cell.element.style, "height", this.$lines.computeLineHeight(row, config, session) + "px"); + dom.setStyle(cell.element.style, "top", this.$lines.computeLineTop(row, config, session) + "px"); + + cell.text = text; + return cell; + }; this.$fixedWidth = false; + this.$highlightGutterLine = true; + this.$renderer = ""; + this.setHighlightGutterLine = function(highlightGutterLine) { + this.$highlightGutterLine = highlightGutterLine; + }; + this.$showLineNumbers = true; this.$renderer = ""; this.setShowLineNumbers = function(show) { this.$renderer = !show && { - getWidth: function() {return ""}, - getText: function() {return ""} + getWidth: function() {return 0;}, + getText: function() {return "";} }; }; @@ -14331,8 +16096,10 @@ var Gutter = function(parentEl) { return {left: 0, right: 0}; var style = dom.computedStyle(this.element.firstChild); this.$padding = {}; - this.$padding.left = parseInt(style.paddingLeft) + 1 || 0; - this.$padding.right = parseInt(style.paddingRight) || 0; + this.$padding.left = (parseInt(style.borderLeftWidth) || 0) + + (parseInt(style.paddingLeft) || 0) + 1; + this.$padding.right = (parseInt(style.borderRightWidth) || 0) + + (parseInt(style.paddingRight) || 0); return this.$padding; }; @@ -14347,11 +16114,21 @@ var Gutter = function(parentEl) { }).call(Gutter.prototype); +function onCreateCell(element) { + var textNode = document.createTextNode(''); + element.appendChild(textNode); + + var foldWidget = dom.createElement("span"); + element.appendChild(foldWidget); + + return element; +} + exports.Gutter = Gutter; }); -ace.define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) { +define("ace/layer/marker",["require","exports","module","ace/range","ace/lib/dom"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -14377,14 +16154,27 @@ var Marker = function(parentEl) { this.setMarkers = function(markers) { this.markers = markers; }; + + this.elt = function(className, css) { + var x = this.i != -1 && this.element.childNodes[this.i]; + if (!x) { + x = document.createElement("div"); + this.element.appendChild(x); + this.i = -1; + } else { + this.i++; + } + x.style.cssText = css; + x.className = className; + }; this.update = function(config) { if (!config) return; this.config = config; - - var html = []; + this.i = 0; + var html; for (var key in this.markers) { var marker = this.markers[key]; @@ -14414,7 +16204,10 @@ var Marker = function(parentEl) { this.drawSingleLineMarker(html, range, marker.clazz + " ace_start" + " ace_br15", config); } } - this.element.innerHTML = html.join(""); + if (this.i !=-1) { + while (this.i < this.element.childElementCount) + this.element.removeChild(this.element.lastChild); + } }; this.$getTop = function(row, layerConfig) { @@ -14453,23 +16246,34 @@ var Marker = function(parentEl) { var left = padding + range.start.column * config.characterWidth; extraStyle = extraStyle || ""; - stringBuilder.push( - "
    " - ); - top = this.$getTop(range.end.row, config); - var width = range.end.column * config.characterWidth; + if (this.session.$bidiHandler.isBidiRow(range.start.row)) { + var range1 = range.clone(); + range1.end.row = range1.start.row; + range1.end.column = this.session.getLine(range1.start.row).length; + this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br1 ace_start", config, null, extraStyle); + } else { + this.elt( + clazz + " ace_br1 ace_start", + "height:"+ height+ "px;"+ "right:0;"+ "top:"+top+ "px;left:"+ left+ "px;" + (extraStyle || "") + ); + } + if (this.session.$bidiHandler.isBidiRow(range.end.row)) { + var range1 = range.clone(); + range1.start.row = range1.end.row; + range1.start.column = 0; + this.drawBidiSingleLineMarker(stringBuilder, range1, clazz + " ace_br12", config, null, extraStyle); + } else { + top = this.$getTop(range.end.row, config); + var width = range.end.column * config.characterWidth; - stringBuilder.push( - "
    " - ); + this.elt( + clazz + " ace_br12", + "height:"+ height+ "px;"+ + "width:"+ width+ "px;"+ + "top:"+ top+ "px;"+ + "left:"+ padding+ "px;"+ (extraStyle || "") + ); + } height = (range.end.row - range.start.row - 1) * config.lineHeight; if (height <= 0) return; @@ -14477,29 +16281,45 @@ var Marker = function(parentEl) { var radiusClass = (range.start.column ? 1 : 0) | (range.end.column ? 0 : 8); - stringBuilder.push( - "
    " + this.elt( + clazz + (radiusClass ? " ace_br" + radiusClass : ""), + "height:"+ height+ "px;"+ + "right:0;"+ + "top:"+ top+ "px;"+ + "left:"+ padding+ "px;"+ (extraStyle || "") ); }; this.drawSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { + if (this.session.$bidiHandler.isBidiRow(range.start.row)) + return this.drawBidiSingleLineMarker(stringBuilder, range, clazz, config, extraLength, extraStyle); var height = config.lineHeight; var width = (range.end.column + (extraLength || 0) - range.start.column) * config.characterWidth; var top = this.$getTop(range.start.row, config); var left = this.$padding + range.start.column * config.characterWidth; - stringBuilder.push( - "
    " + this.elt( + clazz, + "height:"+ height+ "px;"+ + "width:"+ width+ "px;"+ + "top:"+ top+ "px;"+ + "left:"+ left+ "px;"+ (extraStyle || "") ); }; + this.drawBidiSingleLineMarker = function(stringBuilder, range, clazz, config, extraLength, extraStyle) { + var height = config.lineHeight, top = this.$getTop(range.start.row, config), padding = this.$padding; + var selections = this.session.$bidiHandler.getSelections(range.start.column, range.end.column); + + selections.forEach(function(selection) { + this.elt( + clazz, + "height:" + height + "px;" + + "width:" + selection.width + (extraLength || 0) + "px;" + + "top:" + top + "px;" + + "left:" + (padding + selection.left) + "px;" + (extraStyle || "") + ); + }, this); + }; this.drawFullLineMarker = function(stringBuilder, range, clazz, config, extraStyle) { var top = this.$getTop(range.start.row, config); @@ -14507,11 +16327,11 @@ var Marker = function(parentEl) { if (range.start.row != range.end.row) height += this.$getTop(range.end.row, config) - top; - stringBuilder.push( - "
    " + this.elt( + clazz, + "height:"+ height+ "px;"+ + "top:"+ top+ "px;"+ + "left:0;right:0;"+ (extraStyle || "") ); }; @@ -14519,11 +16339,11 @@ var Marker = function(parentEl) { var top = this.$getTop(range.start.row, config); var height = config.lineHeight; - stringBuilder.push( - "
    " + this.elt( + clazz, + "height:"+ height+ "px;"+ + "top:"+ top+ "px;"+ + "left:0;right:0;"+ (extraStyle || "") ); }; @@ -14533,20 +16353,22 @@ exports.Marker = Marker; }); -ace.define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/layer/text",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/layer/lines","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); -var useragent = require("../lib/useragent"); +var Lines = require("./lines").Lines; var EventEmitter = require("../lib/event_emitter").EventEmitter; var Text = function(parentEl) { - this.element = dom.createElement("div"); + this.dom = dom; + this.element = this.dom.createElement("div"); this.element.className = "ace_layer ace_text-layer"; parentEl.appendChild(this.element); this.$updateEolChar = this.$updateEolChar.bind(this); + this.$lines = new Lines(this.element); }; (function() { @@ -14560,20 +16382,21 @@ var Text = function(parentEl) { this.TAB_CHAR = "\u2014"; //"\u21E5"; this.SPACE_CHAR = "\xB7"; this.$padding = 0; + this.MAX_LINE_LENGTH = 10000; this.$updateEolChar = function() { - var EOL_CHAR = this.session.doc.getNewLineCharacter() == "\n" - ? this.EOL_CHAR_LF - : this.EOL_CHAR_CRLF; + var doc = this.session.doc; + var unixMode = doc.getNewLineCharacter() == "\n" && doc.getNewLineMode() != "windows"; + var EOL_CHAR = unixMode ? this.EOL_CHAR_LF : this.EOL_CHAR_CRLF; if (this.EOL_CHAR != EOL_CHAR) { this.EOL_CHAR = EOL_CHAR; return true; } - } + }; this.setPadding = function(padding) { this.$padding = padding; - this.element.style.padding = "0 " + padding + "px"; + this.element.style.margin = "0 " + padding + "px"; }; this.getLineHeight = function() { @@ -14590,7 +16413,7 @@ var Text = function(parentEl) { this._signal("changeCharacterSize", e); }.bind(this)); this.$pollSizeChanges(); - } + }; this.checkForSizeChanges = function() { this.$fontMetrics.checkForSizeChanges(); @@ -14632,11 +16455,12 @@ var Text = function(parentEl) { var tabStr = this.$tabStrings = [0]; for (var i = 1; i < tabSize + 1; i++) { if (this.showInvisibles) { - tabStr.push("" - + lang.stringRepeat(this.TAB_CHAR, i) - + ""); + var span = this.dom.createElement("span"); + span.className = "ace_invisible ace_invisible_tab"; + span.textContent = lang.stringRepeat(this.TAB_CHAR, i); + tabStr.push(span); } else { - tabStr.push(lang.stringRepeat(" ", i)); + tabStr.push(this.dom.createTextNode(lang.stringRepeat(" ", i), this.element)); } } if (this.displayIndentGuides) { @@ -14650,21 +16474,29 @@ var Text = function(parentEl) { tabClass = " ace_invisible_tab"; var spaceContent = lang.stringRepeat(this.SPACE_CHAR, this.tabSize); var tabContent = lang.stringRepeat(this.TAB_CHAR, this.tabSize); - } else{ + } else { var spaceContent = lang.stringRepeat(" ", this.tabSize); var tabContent = spaceContent; } - this.$tabStrings[" "] = "" + spaceContent + ""; - this.$tabStrings["\t"] = "" + tabContent + ""; + var span = this.dom.createElement("span"); + span.className = className + spaceClass; + span.textContent = spaceContent; + this.$tabStrings[" "] = span; + + var span = this.dom.createElement("span"); + span.className = className + tabClass; + span.textContent = tabContent; + this.$tabStrings["\t"] = span; } }; this.updateLines = function(config, firstRow, lastRow) { if (this.config.lastRow != config.lastRow || this.config.firstRow != config.firstRow) { - this.scrollLines(config); + return this.update(config); } + this.config = config; var first = Math.max(firstRow, config.firstRow); @@ -14686,6 +16518,7 @@ var Text = function(parentEl) { lineElementsIdx ++; } + var heightChanged = false; var row = first; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; @@ -14701,52 +16534,73 @@ var Text = function(parentEl) { var lineElement = lineElements[lineElementsIdx++]; if (lineElement) { - var html = []; + this.dom.removeChildren(lineElement); this.$renderLine( - html, row, !this.$useLineGroups(), row == foldStart ? foldLine : false + lineElement, row, row == foldStart ? foldLine : false ); - lineElement.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; - lineElement.innerHTML = html.join(""); + + if (heightChanged) + lineElement.style.top = this.$lines.computeLineTop(row, config, this.session) + "px"; + + var height = (config.lineHeight * this.session.getRowLength(row)) + "px"; + if (lineElement.style.height != height) { + heightChanged = true; + lineElement.style.height = height; + } } row++; } + if (heightChanged) { + while (lineElementsIdx < this.$lines.cells.length) { + var cell = this.$lines.cells[lineElementsIdx++]; + cell.element.style.top = this.$lines.computeLineTop(cell.row, config, this.session) + "px"; + } + } }; this.scrollLines = function(config) { var oldConfig = this.config; this.config = config; + if (this.$lines.pageChanged(oldConfig, config)) + return this.update(config); + + this.$lines.moveContainer(config); + + var lastRow = config.lastRow; + var oldLastRow = oldConfig ? oldConfig.lastRow : -1; + + if (!oldConfig || oldLastRow < config.firstRow) + return this.update(config); + + if (lastRow < oldConfig.firstRow) + return this.update(config); + if (!oldConfig || oldConfig.lastRow < config.firstRow) return this.update(config); if (config.lastRow < oldConfig.firstRow) return this.update(config); - var el = this.element; if (oldConfig.firstRow < config.firstRow) for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) - el.removeChild(el.firstChild); + this.$lines.shift(); if (oldConfig.lastRow > config.lastRow) for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) - el.removeChild(el.lastChild); + this.$lines.pop(); if (config.firstRow < oldConfig.firstRow) { - var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); - if (el.firstChild) - el.insertBefore(fragment, el.firstChild); - else - el.appendChild(fragment); + this.$lines.unshift(this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1)); } if (config.lastRow > oldConfig.lastRow) { - var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); - el.appendChild(fragment); + this.$lines.push(this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow)); } }; this.$renderLinesFragment = function(config, firstRow, lastRow) { - var fragment = this.element.ownerDocument.createDocumentFragment(); + var fragment = []; var row = firstRow; var foldLine = this.session.getNextFoldLine(row); var foldStart = foldLine ? foldLine.start.row : Infinity; @@ -14760,20 +16614,20 @@ var Text = function(parentEl) { if (row > lastRow) break; - var container = dom.createElement("div"); + var line = this.$lines.createCell(row, config, this.session); + + var lineEl = line.element; + this.dom.removeChildren(lineEl); + dom.setStyle(lineEl.style, "height", this.$lines.computeLineHeight(row, config, this.session) + "px"); + dom.setStyle(lineEl.style, "top", this.$lines.computeLineTop(row, config, this.session) + "px"); + this.$renderLine(lineEl, row, row == foldStart ? foldLine : false); - var html = []; - this.$renderLine(html, row, false, row == foldStart ? foldLine : false); - container.innerHTML = html.join(""); if (this.$useLineGroups()) { - container.className = 'ace_line_group'; - fragment.appendChild(container); - container.style.height = config.lineHeight * this.session.getRowLength(row) + "px"; - + lineEl.className = "ace_line_group"; } else { - while(container.firstChild) - fragment.appendChild(container.firstChild); + lineEl.className = "ace_line"; } + fragment.push(line); row++; } @@ -14781,35 +16635,18 @@ var Text = function(parentEl) { }; this.update = function(config) { + this.$lines.moveContainer(config); + this.config = config; - var html = []; - var firstRow = config.firstRow, lastRow = config.lastRow; + var firstRow = config.firstRow; + var lastRow = config.lastRow; - var row = firstRow; - var foldLine = this.session.getNextFoldLine(row); - var foldStart = foldLine ? foldLine.start.row : Infinity; - - while (true) { - if (row > foldStart) { - row = foldLine.end.row+1; - foldLine = this.session.getNextFoldLine(row, foldLine); - foldStart = foldLine ? foldLine.start.row :Infinity; - } - if (row > lastRow) - break; - - if (this.$useLineGroups()) - html.push("
    ") - - this.$renderLine(html, row, false, row == foldStart ? foldLine : false); - - if (this.$useLineGroups()) - html.push("
    "); // end the line group - - row++; - } - this.element.innerHTML = html.join(""); + var lines = this.$lines; + while (lines.getLength()) + lines.pop(); + + lines.push(this.$renderLinesFragment(config, firstRow, lastRow)); }; this.$textToken = { @@ -14818,108 +16655,152 @@ var Text = function(parentEl) { "lparen": true }; - this.$renderToken = function(stringBuilder, screenColumn, token, value) { + this.$renderToken = function(parent, screenColumn, token, value) { var self = this; - var replaceReg = /\t|&|<|>|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\u3000\uFEFF\uFFF9-\uFFFC])|[\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3000-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]/g; - var replaceFunc = function(c, a, b, tabIdx, idx4) { - if (a) { - return self.showInvisibles - ? "" + lang.stringRepeat(self.SPACE_CHAR, c.length) + "" - : c; - } else if (c == "&") { - return "&"; - } else if (c == "<") { - return "<"; - } else if (c == ">") { - return ">"; - } else if (c == "\t") { - var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); - screenColumn += tabSize - 1; - return self.$tabStrings[tabSize]; - } else if (c == "\u3000") { - var classToUse = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; - var space = self.showInvisibles ? self.SPACE_CHAR : ""; - screenColumn += 1; - return "" + space + ""; - } else if (b) { - return "" + self.SPACE_CHAR + ""; - } else { - screenColumn += 1; - return "" + c + ""; - } - }; + var re = /(\t)|( +)|([\x00-\x1f\x80-\xa0\xad\u1680\u180E\u2000-\u200f\u2028\u2029\u202F\u205F\uFEFF\uFFF9-\uFFFC]+)|(\u3000)|([\u1100-\u115F\u11A3-\u11A7\u11FA-\u11FF\u2329-\u232A\u2E80-\u2E99\u2E9B-\u2EF3\u2F00-\u2FD5\u2FF0-\u2FFB\u3001-\u303E\u3041-\u3096\u3099-\u30FF\u3105-\u312D\u3131-\u318E\u3190-\u31BA\u31C0-\u31E3\u31F0-\u321E\u3220-\u3247\u3250-\u32FE\u3300-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFAFF\uFE10-\uFE19\uFE30-\uFE52\uFE54-\uFE66\uFE68-\uFE6B\uFF01-\uFF60\uFFE0-\uFFE6]|[\uD800-\uDBFF][\uDC00-\uDFFF])/g; + + var valueFragment = this.dom.createFragment(this.element); - var output = value.replace(replaceReg, replaceFunc); + var m; + var i = 0; + while (m = re.exec(value)) { + var tab = m[1]; + var simpleSpace = m[2]; + var controlCharacter = m[3]; + var cjkSpace = m[4]; + var cjk = m[5]; + + if (!self.showInvisibles && simpleSpace) + continue; + + var before = i != m.index ? value.slice(i, m.index) : ""; + + i = m.index + m[0].length; + + if (before) { + valueFragment.appendChild(this.dom.createTextNode(before, this.element)); + } + + if (tab) { + var tabSize = self.session.getScreenTabSize(screenColumn + m.index); + valueFragment.appendChild(self.$tabStrings[tabSize].cloneNode(true)); + screenColumn += tabSize - 1; + } else if (simpleSpace) { + if (self.showInvisibles) { + var span = this.dom.createElement("span"); + span.className = "ace_invisible ace_invisible_space"; + span.textContent = lang.stringRepeat(self.SPACE_CHAR, simpleSpace.length); + valueFragment.appendChild(span); + } else { + valueFragment.appendChild(this.com.createTextNode(simpleSpace, this.element)); + } + } else if (controlCharacter) { + var span = this.dom.createElement("span"); + span.className = "ace_invisible ace_invisible_space ace_invalid"; + span.textContent = lang.stringRepeat(self.SPACE_CHAR, controlCharacter.length); + valueFragment.appendChild(span); + } else if (cjkSpace) { + screenColumn += 1; + + var span = this.dom.createElement("span"); + span.style.width = (self.config.characterWidth * 2) + "px"; + span.className = self.showInvisibles ? "ace_cjk ace_invisible ace_invisible_space" : "ace_cjk"; + span.textContent = self.showInvisibles ? self.SPACE_CHAR : cjkSpace; + valueFragment.appendChild(span); + } else if (cjk) { + screenColumn += 1; + var span = this.dom.createElement("span"); + span.style.width = (self.config.characterWidth * 2) + "px"; + span.className = "ace_cjk"; + span.textContent = cjk; + valueFragment.appendChild(span); + } + } + + valueFragment.appendChild(this.dom.createTextNode(i ? value.slice(i) : value, this.element)); if (!this.$textToken[token.type]) { var classes = "ace_" + token.type.replace(/\./g, " ace_"); - var style = ""; + var span = this.dom.createElement("span"); if (token.type == "fold") - style = " style='width:" + (token.value.length * this.config.characterWidth) + "px;' "; - stringBuilder.push("", output, ""); + span.style.width = (token.value.length * this.config.characterWidth) + "px"; + + span.className = classes; + span.appendChild(valueFragment); + + parent.appendChild(span); } else { - stringBuilder.push(output); + parent.appendChild(valueFragment); } + return screenColumn + value.length; }; - this.renderIndentGuide = function(stringBuilder, value, max) { + this.renderIndentGuide = function(parent, value, max) { var cols = value.search(this.$indentGuideRe); if (cols <= 0 || cols >= max) return value; if (value[0] == " ") { cols -= cols % this.tabSize; - stringBuilder.push(lang.stringRepeat(this.$tabStrings[" "], cols/this.tabSize)); + var count = cols/this.tabSize; + for (var i=0; i= splitChars) { screenColumn = this.$renderToken( - stringBuilder, screenColumn, + lineEl, screenColumn, token, value.substring(0, splitChars - chars) ); value = value.substring(splitChars - chars); chars = splitChars; - if (!onlyContents) { - stringBuilder.push("", - "
    " - ); - } + lineEl = this.$createLineElement(); + parent.appendChild(lineEl); - stringBuilder.push(lang.stringRepeat("\xa0", splits.indent)); + lineEl.appendChild(this.dom.createTextNode(lang.stringRepeat("\xa0", splits.indent), this.element)); split ++; screenColumn = 0; @@ -14928,28 +16809,44 @@ var Text = function(parentEl) { if (value.length != 0) { chars += value.length; screenColumn = this.$renderToken( - stringBuilder, screenColumn, token, value + lineEl, screenColumn, token, value ); } } } + + if (splits[splits.length - 1] > this.MAX_LINE_LENGTH) + this.$renderOverflowMessage(lineEl, screenColumn, null, "", true); }; - this.$renderSimpleLine = function(stringBuilder, tokens) { + this.$renderSimpleLine = function(parent, tokens) { var screenColumn = 0; var token = tokens[0]; var value = token.value; if (this.displayIndentGuides) - value = this.renderIndentGuide(stringBuilder, value); + value = this.renderIndentGuide(parent, value); if (value) - screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); + screenColumn = this.$renderToken(parent, screenColumn, token, value); for (var i = 1; i < tokens.length; i++) { token = tokens[i]; value = token.value; - screenColumn = this.$renderToken(stringBuilder, screenColumn, token, value); + if (screenColumn + value.length > this.MAX_LINE_LENGTH) + return this.$renderOverflowMessage(parent, screenColumn, token, value); + screenColumn = this.$renderToken(parent, screenColumn, token, value); } }; - this.$renderLine = function(stringBuilder, row, onlyContents, foldLine) { + + this.$renderOverflowMessage = function(parent, screenColumn, token, value, hide) { + token && this.$renderToken(parent, screenColumn, token, + value.slice(0, this.MAX_LINE_LENGTH - screenColumn)); + + var overflowEl = this.dom.createElement("span"); + overflowEl.className = "ace_inline_button ace_keyword ace_toggle_wrap"; + overflowEl.textContent = hide ? "" : ""; + + parent.appendChild(overflowEl); + }; + this.$renderLine = function(parent, row, foldLine) { if (!foldLine && foldLine != false) foldLine = this.session.getFoldLine(row); @@ -14958,36 +16855,35 @@ var Text = function(parentEl) { else var tokens = this.session.getTokens(row); - - if (!onlyContents) { - stringBuilder.push( - "
    " - ); - } - + var lastLineEl = parent; if (tokens.length) { var splits = this.session.getRowSplitData(row); - if (splits && splits.length) - this.$renderWrappedLine(stringBuilder, tokens, splits, onlyContents); - else - this.$renderSimpleLine(stringBuilder, tokens); + if (splits && splits.length) { + this.$renderWrappedLine(parent, tokens, splits); + var lastLineEl = parent.lastChild; + } else { + var lastLineEl = parent; + if (this.$useLineGroups()) { + lastLineEl = this.$createLineElement(); + parent.appendChild(lastLineEl); + } + this.$renderSimpleLine(lastLineEl, tokens); + } + } else if (this.$useLineGroups()) { + lastLineEl = this.$createLineElement(); + parent.appendChild(lastLineEl); } - if (this.showInvisibles) { + if (this.showInvisibles && lastLineEl) { if (foldLine) - row = foldLine.end.row + row = foldLine.end.row; - stringBuilder.push( - "", - row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR, - "" - ); + var invisibleEl = this.dom.createElement("span"); + invisibleEl.className = "ace_invisible ace_invisible_eol"; + invisibleEl.textContent = row == this.session.getLength() - 1 ? this.EOF_CHAR : this.EOL_CHAR; + + lastLineEl.appendChild(invisibleEl); } - if (!onlyContents) - stringBuilder.push("
    "); }; this.$getFoldLineTokens = function(row, foldLine) { @@ -15054,33 +16950,23 @@ var Text = function(parentEl) { return this.session.getUseWrapMode(); }; - this.destroy = function() { - clearInterval(this.$pollSizeChangesTimer); - if (this.$measureNode) - this.$measureNode.parentNode.removeChild(this.$measureNode); - delete this.$measureNode; - }; - + this.destroy = function() {}; }).call(Text.prototype); exports.Text = Text; }); -ace.define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/layer/cursor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); -var isIE8; var Cursor = function(parentEl) { this.element = dom.createElement("div"); this.element.className = "ace_layer ace_cursor-layer"; parentEl.appendChild(this.element); - if (isIE8 === undefined) - isIE8 = !("opacity" in this.element.style); - this.isVisible = false; this.isBlinking = true; this.blinkInterval = 1000; @@ -15089,24 +16975,30 @@ var Cursor = function(parentEl) { this.cursors = []; this.cursor = this.addCursor(); dom.addCssClass(this.element, "ace_hidden-cursors"); - this.$updateCursors = (isIE8 - ? this.$updateVisibility - : this.$updateOpacity).bind(this); + this.$updateCursors = this.$updateOpacity.bind(this); }; (function() { - this.$updateVisibility = function(val) { - var cursors = this.cursors; - for (var i = cursors.length; i--; ) - cursors[i].style.visibility = val ? "" : "hidden"; - }; this.$updateOpacity = function(val) { var cursors = this.cursors; for (var i = cursors.length; i--; ) - cursors[i].style.opacity = val ? "" : "0"; + dom.setStyle(cursors[i].style, "opacity", val ? "" : "0"); + }; + + this.$startCssAnimation = function() { + var cursors = this.cursors; + for (var i = cursors.length; i--; ) + cursors[i].style.animationDuration = this.blinkInterval + "ms"; + + setTimeout(function() { + dom.addCssClass(this.element, "ace_animate-blinking"); + }.bind(this)); }; + this.$stopCssAnimation = function() { + dom.removeCssClass(this.element, "ace_animate-blinking"); + }; this.$padding = 0; this.setPadding = function(padding) { @@ -15118,25 +17010,24 @@ var Cursor = function(parentEl) { }; this.setBlinking = function(blinking) { - if (blinking != this.isBlinking){ + if (blinking != this.isBlinking) { this.isBlinking = blinking; this.restartTimer(); } }; this.setBlinkInterval = function(blinkInterval) { - if (blinkInterval != this.blinkInterval){ + if (blinkInterval != this.blinkInterval) { this.blinkInterval = blinkInterval; this.restartTimer(); } }; this.setSmoothBlinking = function(smoothBlinking) { - if (smoothBlinking != this.smoothBlinking && !isIE8) { + if (smoothBlinking != this.smoothBlinking) { this.smoothBlinking = smoothBlinking; dom.setCssClass(this.element, "ace_smooth-blinking", smoothBlinking); this.$updateCursors(true); - this.$updateCursors = (this.$updateOpacity).bind(this); this.restartTimer(); } }; @@ -15173,14 +17064,18 @@ var Cursor = function(parentEl) { var update = this.$updateCursors; clearInterval(this.intervalId); clearTimeout(this.timeoutId); + this.$stopCssAnimation(); + if (this.smoothBlinking) { dom.removeCssClass(this.element, "ace_smooth-blinking"); } update(true); - if (!this.isBlinking || !this.blinkInterval || !this.isVisible) + if (!this.isBlinking || !this.blinkInterval || !this.isVisible) { + this.$stopCssAnimation(); return; + } if (this.smoothBlinking) { setTimeout(function(){ @@ -15188,18 +17083,21 @@ var Cursor = function(parentEl) { }.bind(this)); } - var blink = function(){ - this.timeoutId = setTimeout(function() { - update(false); - }, 0.6 * this.blinkInterval); - }.bind(this); - - this.intervalId = setInterval(function() { - update(true); + if (dom.HAS_CSS_ANIMATION) { + this.$startCssAnimation(); + } else { + var blink = function(){ + this.timeoutId = setTimeout(function() { + update(false); + }, 0.6 * this.blinkInterval); + }.bind(this); + + this.intervalId = setInterval(function() { + update(true); + blink(); + }, this.blinkInterval); blink(); - }, this.blinkInterval); - - blink(); + } }; this.getPixelPosition = function(position, onScreen) { @@ -15209,13 +17107,20 @@ var Cursor = function(parentEl) { if (!position) position = this.session.selection.getCursor(); var pos = this.session.documentToScreenPosition(position); - var cursorLeft = this.$padding + pos.column * this.config.characterWidth; + var cursorLeft = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, position.row) + ? this.session.$bidiHandler.getPosLeft(pos.column) + : pos.column * this.config.characterWidth); + var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * this.config.lineHeight; return {left : cursorLeft, top : cursorTop}; }; + this.isCursorInView = function(pixelPos, config) { + return pixelPos.top >= 0 && pixelPos.top < config.maxHeight; + }; + this.update = function(config) { this.config = config; @@ -15233,15 +17138,20 @@ var Cursor = function(parentEl) { continue; } - var style = (this.cursors[cursorIndex++] || this.addCursor()).style; + var element = this.cursors[cursorIndex++] || this.addCursor(); + var style = element.style; if (!this.drawCursor) { - style.left = pixelPos.left + "px"; - style.top = pixelPos.top + "px"; - style.width = config.characterWidth + "px"; - style.height = config.lineHeight + "px"; + if (!this.isCursorInView(pixelPos, config)) { + dom.setStyle(style, "display", "none"); + } else { + dom.setStyle(style, "display", "block"); + dom.translate(element, pixelPos.left, pixelPos.top); + dom.setStyle(style, "width", Math.round(config.characterWidth) + "px"); + dom.setStyle(style, "height", config.lineHeight + "px"); + } } else { - this.drawCursor(style, pixelPos, config, selections[i], this.session); + this.drawCursor(element, pixelPos, config, selections[i], this.session); } } while (this.cursors.length > cursorIndex) @@ -15276,7 +17186,7 @@ exports.Cursor = Cursor; }); -ace.define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/scrollbar",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/event","ace/lib/event_emitter"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -15290,6 +17200,7 @@ var ScrollBar = function(parent) { this.inner = dom.createElement("div"); this.inner.className = "ace_scrollbar-inner"; + this.inner.textContent = "\xa0"; this.element.appendChild(this.inner); parent.appendChild(this.element); @@ -15350,7 +17261,7 @@ oop.inherits(VScrollBar, ScrollBar); this.coeff = MAX_SCROLL_H / height; height = MAX_SCROLL_H; } else if (this.coeff != 1) { - this.coeff = 1 + this.coeff = 1; } this.inner.style.height = height + "px"; }; @@ -15413,7 +17324,7 @@ exports.VScrollBar = VScrollBar; exports.HScrollBar = HScrollBar; }); -ace.define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) { +define("ace/renderloop",["require","exports","module","ace/lib/event"], function(require, exports, module) { "use strict"; var event = require("./lib/event"); @@ -15423,42 +17334,61 @@ var RenderLoop = function(onRender, win) { this.onRender = onRender; this.pending = false; this.changes = 0; + this.$recursionLimit = 2; this.window = win || window; + var _self = this; + this._flush = function(ts) { + _self.pending = false; + var changes = _self.changes; + + if (changes) { + event.blockIdle(100); + _self.changes = 0; + _self.onRender(changes); + } + + if (_self.changes) { + if (_self.$recursionLimit-- < 0) return; + _self.schedule(); + } else { + _self.$recursionLimit = 2; + } + }; }; (function() { - this.schedule = function(change) { this.changes = this.changes | change; - if (!this.pending && this.changes) { + if (this.changes && !this.pending) { + event.nextFrame(this._flush); this.pending = true; - var _self = this; - event.nextFrame(function() { - _self.pending = false; - var changes; - while (changes = _self.changes) { - _self.changes = 0; - _self.onRender(changes); - } - }, this.window); } }; + this.clear = function(change) { + var changes = this.changes; + this.changes = 0; + return changes; + }; + }).call(RenderLoop.prototype); exports.RenderLoop = RenderLoop; }); -ace.define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/layer/font_metrics",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/lib/useragent","ace/lib/event_emitter"], function(require, exports, module) { var oop = require("../lib/oop"); var dom = require("../lib/dom"); var lang = require("../lib/lang"); +var event = require("../lib/event"); var useragent = require("../lib/useragent"); var EventEmitter = require("../lib/event_emitter").EventEmitter; -var CHAR_COUNT = 0; +var CHAR_COUNT = 256; +var USE_OBSERVER = typeof ResizeObserver == "function"; +var L = 200; var FontMetrics = exports.FontMetrics = function(parentEl) { this.el = dom.createElement("div"); @@ -15475,12 +17405,15 @@ var FontMetrics = exports.FontMetrics = function(parentEl) { this.el.appendChild(this.$measureNode); parentEl.appendChild(this.el); - if (!CHAR_COUNT) - this.$testFractionalRect(); this.$measureNode.innerHTML = lang.stringRepeat("X", CHAR_COUNT); this.$characterSize = {width: 0, height: 0}; - this.checkForSizeChanges(); + + + if (USE_OBSERVER) + this.$addObserver(); + else + this.checkForSizeChanges(); }; (function() { @@ -15489,19 +17422,6 @@ var FontMetrics = exports.FontMetrics = function(parentEl) { this.$characterSize = {width: 0, height: 0}; - this.$testFractionalRect = function() { - var el = dom.createElement("div"); - this.$setMeasureNodeStyles(el.style); - el.style.width = "0.2px"; - document.documentElement.appendChild(el); - var w = el.getBoundingClientRect().width; - if (w > 0 && w < 1) - CHAR_COUNT = 50; - else - CHAR_COUNT = 100; - el.parentNode.removeChild(el); - }; - this.$setMeasureNodeStyles = function(style, isRoot) { style.width = style.height = "auto"; style.left = style.top = "0px"; @@ -15517,8 +17437,9 @@ var FontMetrics = exports.FontMetrics = function(parentEl) { style.overflow = isRoot ? "hidden" : "visible"; }; - this.checkForSizeChanges = function() { - var size = this.$measureSizes(); + this.checkForSizeChanges = function(size) { + if (size === undefined) + size = this.$measureSizes(); if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { this.$measureNode.style.fontWeight = "bold"; var boldSize = this.$measureSizes(); @@ -15529,13 +17450,27 @@ var FontMetrics = exports.FontMetrics = function(parentEl) { this._emit("changeCharacterSize", {data: size}); } }; + + this.$addObserver = function() { + var self = this; + this.$observer = new window.ResizeObserver(function(e) { + var rect = e[0].contentRect; + self.checkForSizeChanges({ + height: rect.height, + width: rect.width / CHAR_COUNT + }); + }); + this.$observer.observe(this.$measureNode); + }; this.$pollSizeChanges = function() { - if (this.$pollSizeChangesTimer) + if (this.$pollSizeChangesTimer || this.$observer) return this.$pollSizeChangesTimer; var self = this; - return this.$pollSizeChangesTimer = setInterval(function() { + + return this.$pollSizeChangesTimer = event.onIdle(function cb() { self.checkForSizeChanges(); + event.onIdle(cb, 500); }, 500); }; @@ -15548,24 +17483,11 @@ var FontMetrics = exports.FontMetrics = function(parentEl) { } }; - this.$measureSizes = function() { - if (CHAR_COUNT === 50) { - var rect = null; - try { - rect = this.$measureNode.getBoundingClientRect(); - } catch(e) { - rect = {width: 0, height:0 }; - } - var size = { - height: rect.height, - width: rect.width / CHAR_COUNT - }; - } else { - var size = { - height: this.$measureNode.clientHeight, - width: this.$measureNode.clientWidth / CHAR_COUNT - }; - } + this.$measureSizes = function(node) { + var size = { + height: (node || this.$measureNode).clientHeight, + width: (node || this.$measureNode).clientWidth / CHAR_COUNT + }; if (size.width === 0 || size.height === 0) return null; return size; @@ -15587,21 +17509,80 @@ var FontMetrics = exports.FontMetrics = function(parentEl) { this.destroy = function() { clearInterval(this.$pollSizeChangesTimer); + if (this.$observer) + this.$observer.disconnect(); if (this.el && this.el.parentNode) this.el.parentNode.removeChild(this.el); }; + + this.$getZoom = function getZoom(element) { + if (!element) return 1; + return (window.getComputedStyle(element).zoom || 1) * getZoom(element.parentElement); + }; + this.$initTransformMeasureNodes = function() { + var t = function(t, l) { + return ["div", { + style: "position: absolute;top:" + t + "px;left:" + l + "px;" + }]; + }; + this.els = dom.buildDom([t(0, 0), t(L, 0), t(0, L), t(L, L)], this.el); + }; + this.transformCoordinates = function(clientPos, elPos) { + if (clientPos) { + var zoom = this.$getZoom(this.el); + clientPos = mul(1 / zoom, clientPos); + } + function solve(l1, l2, r) { + var det = l1[1] * l2[0] - l1[0] * l2[1]; + return [ + (-l2[1] * r[0] + l2[0] * r[1]) / det, + (+l1[1] * r[0] - l1[0] * r[1]) / det + ]; + } + function sub(a, b) { return [a[0] - b[0], a[1] - b[1]]; } + function add(a, b) { return [a[0] + b[0], a[1] + b[1]]; } + function mul(a, b) { return [a * b[0], a * b[1]]; } + + if (!this.els) + this.$initTransformMeasureNodes(); + + function p(el) { + var r = el.getBoundingClientRect(); + return [r.left, r.top]; + } + + var a = p(this.els[0]); + var b = p(this.els[1]); + var c = p(this.els[2]); + var d = p(this.els[3]); + + var h = solve(sub(d, b), sub(d, c), sub(add(b, c), add(d, a))); + + var m1 = mul(1 + h[0], sub(b, a)); + var m2 = mul(1 + h[1], sub(c, a)); + + if (elPos) { + var x = elPos; + var k = h[0] * x[0] / L + h[1] * x[1] / L + 1; + var ut = add(mul(x[0], m1), mul(x[1], m2)); + return add(mul(1 / k / L, ut), a); + } + var u = sub(clientPos, a); + var f = solve(sub(m1, mul(h[0], u)), sub(m2, mul(h[1], u)), u); + return mul(L, f); + }; + }).call(FontMetrics.prototype); }); -ace.define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/lib/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/virtual_renderer",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/config","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/scrollbar","ace/renderloop","ace/layer/font_metrics","ace/lib/event_emitter","ace/lib/useragent"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var dom = require("./lib/dom"); var config = require("./config"); -var useragent = require("./lib/useragent"); var GutterLayer = require("./layer/gutter").Gutter; var MarkerLayer = require("./layer/marker").Marker; var TextLayer = require("./layer/text").Text; @@ -15611,7 +17592,23 @@ var VScrollBar = require("./scrollbar").VScrollBar; var RenderLoop = require("./renderloop").RenderLoop; var FontMetrics = require("./layer/font_metrics").FontMetrics; var EventEmitter = require("./lib/event_emitter").EventEmitter; -var editorCss = ".ace_editor {\ +var editorCss = "\ +.ace_br1 {border-top-left-radius : 3px;}\ +.ace_br2 {border-top-right-radius : 3px;}\ +.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\ +.ace_br4 {border-bottom-right-radius: 3px;}\ +.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\ +.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\ +.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\ +.ace_br8 {border-bottom-left-radius : 3px;}\ +.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\ +.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\ +.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ +.ace_editor {\ position: relative;\ overflow: hidden;\ font: 12px/normal 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', 'source-code-pro', monospace;\ @@ -15633,10 +17630,9 @@ cursor: text;\ }\ .ace_content {\ position: absolute;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ min-width: 100%;\ +contain: style size layout;\ }\ .ace_dragging .ace_scroller:before{\ position: absolute;\ @@ -15667,6 +17663,7 @@ z-index: 4;\ -moz-user-select: none;\ -webkit-user-select: none;\ user-select: none;\ +contain: style size layout;\ }\ .ace_gutter-active-line {\ position: absolute;\ @@ -15677,6 +17674,10 @@ right: 0;\ box-shadow: 17px 0 16px -16px rgba(0, 0, 0, 0.4) inset;\ }\ .ace_gutter-cell {\ +position: absolute;\ +top: 0;\ +left: 0;\ +right: 0;\ padding-left: 19px;\ padding-right: 6px;\ background-repeat: no-repeat;\ @@ -15698,6 +17699,7 @@ background-position: 2px center;\ background-image: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQBAMAAADt3eJSAAAAJFBMVEUAAAChoaGAgIAqKiq+vr6tra1ZWVmUlJSbm5s8PDxubm56enrdgzg3AAAAAXRSTlMAQObYZgAAAClJREFUeNpjYMAPdsMYHegyJZFQBlsUlMFVCWUYKkAZMxZAGdxlDMQBAG+TBP4B6RyJAAAAAElFTkSuQmCC\");\ }\ .ace_scrollbar {\ +contain: strict;\ position: absolute;\ right: 0;\ bottom: 0;\ @@ -15739,7 +17741,7 @@ overflow: hidden;\ font: inherit;\ padding: 0 1px;\ margin: 0 -1px;\ -text-indent: -1em;\ +contain: strict;\ -ms-user-select: text;\ -moz-user-select: text;\ -webkit-user-select: text;\ @@ -15747,11 +17749,28 @@ user-select: text;\ white-space: pre!important;\ }\ .ace_text-input.ace_composition {\ -background: inherit;\ +background: transparent;\ color: inherit;\ z-index: 1000;\ opacity: 1;\ -text-indent: 0;\ +}\ +.ace_composition_placeholder { color: transparent }\ +.ace_composition_marker { \ +border-bottom: 1px solid;\ +position: absolute;\ +border-radius: 0;\ +margin-top: 1px;\ +}\ +[ace_nocontext=true] {\ +transform: none!important;\ +filter: none!important;\ +perspective: none!important;\ +clip-path: none!important;\ +mask : none!important;\ +contain: none!important;\ +perspective: none!important;\ +mix-blend-mode: initial!important;\ +z-index: auto;\ }\ .ace_layer {\ z-index: 1;\ @@ -15761,8 +17780,6 @@ word-wrap: normal;\ white-space: pre;\ height: 100%;\ width: 100%;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ pointer-events: none;\ }\ @@ -15771,9 +17788,33 @@ position: relative;\ width: auto;\ text-align: right;\ pointer-events: auto;\ +height: 1000000px;\ +contain: style size layout;\ }\ .ace_text-layer {\ font: inherit !important;\ +position: absolute;\ +height: 1000000px;\ +width: 1000000px;\ +contain: style size layout;\ +}\ +.ace_text-layer > .ace_line, .ace_text-layer > .ace_line_group {\ +contain: style size layout;\ +position: absolute;\ +top: 0;\ +left: 0;\ +right: 0;\ +}\ +.ace_hidpi .ace_text-layer,\ +.ace_hidpi .ace_gutter-layer,\ +.ace_hidpi .ace_content,\ +.ace_hidpi .ace_gutter {\ +contain: strict;\ +will-change: transform;\ +}\ +.ace_hidpi .ace_text-layer > .ace_line, \ +.ace_hidpi .ace_text-layer > .ace_line_group {\ +contain: strict;\ }\ .ace_cjk {\ display: inline-block;\ @@ -15785,8 +17826,6 @@ z-index: 4;\ .ace_cursor {\ z-index: 4;\ position: absolute;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ border-left: 2px solid;\ transform: translatez(0);\ @@ -15805,9 +17844,29 @@ border-bottom: 1px solid;\ opacity: 0.2;\ }\ .ace_smooth-blinking .ace_cursor {\ --webkit-transition: opacity 0.18s;\ transition: opacity 0.18s;\ }\ +.ace_animate-blinking .ace_cursor {\ +animation-duration: 1000ms;\ +animation-timing-function: step-end;\ +animation-name: blink-ace-animate;\ +animation-iteration-count: infinite;\ +}\ +.ace_animate-blinking.ace_smooth-blinking .ace_cursor {\ +animation-duration: 1000ms;\ +animation-timing-function: ease-in-out;\ +animation-name: blink-ace-animate-smooth;\ +}\ +@keyframes blink-ace-animate {\ +from, to { opacity: 1; }\ +60% { opacity: 0; }\ +}\ +@keyframes blink-ace-animate-smooth {\ +from, to { opacity: 1; }\ +45% { opacity: 1; }\ +60% { opacity: 0; }\ +85% { opacity: 0; }\ +}\ .ace_marker-layer .ace_step, .ace_marker-layer .ace_stack {\ position: absolute;\ z-index: 3;\ @@ -15827,13 +17886,9 @@ z-index: 2;\ .ace_marker-layer .ace_selected-word {\ position: absolute;\ z-index: 4;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ .ace_line .ace_fold {\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ display: inline-block;\ height: 11px;\ @@ -15859,7 +17914,6 @@ url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAA3CAYAAADNNiA5AAAAGXRF }\ .ace_tooltip {\ background-color: #FFF;\ -background-image: -webkit-linear-gradient(top, transparent, rgba(0, 0, 0, 0.1));\ background-image: linear-gradient(to bottom, transparent, rgba(0, 0, 0, 0.1));\ border: 1px solid gray;\ border-radius: 1px;\ @@ -15869,8 +17923,6 @@ max-width: 100%;\ padding: 3px 4px;\ position: fixed;\ z-index: 999999;\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ cursor: default;\ white-space: pre;\ @@ -15885,8 +17937,6 @@ pointer-events: none;\ padding-right: 13px;\ }\ .ace_fold-widget {\ --moz-box-sizing: border-box;\ --webkit-box-sizing: border-box;\ box-sizing: border-box;\ margin: 0 -12px 0 1px;\ display: none;\ @@ -15934,17 +17984,29 @@ background-color: rgba(255, 255, 255, 0.1);\ .ace_dark .ace_fold-widget:active {\ box-shadow: 0 1px 1px rgba(255, 255, 255, 0.2);\ }\ +.ace_inline_button {\ +border: 1px solid lightgray;\ +display: inline-block;\ +margin: -1px 8px;\ +padding: 0 5px;\ +pointer-events: auto;\ +cursor: pointer;\ +}\ +.ace_inline_button:hover {\ +border-color: gray;\ +background: rgba(200,200,200,0.2);\ +display: inline-block;\ +pointer-events: auto;\ +}\ .ace_fold-widget.ace_invalid {\ background-color: #FFB4B4;\ border-color: #DE5555;\ }\ .ace_fade-fold-widgets .ace_fold-widget {\ --webkit-transition: opacity 0.4s ease 0.05s;\ transition: opacity 0.4s ease 0.05s;\ opacity: 0;\ }\ .ace_fade-fold-widgets:hover .ace_fold-widget {\ --webkit-transition: opacity 0.05s ease 0.05s;\ transition: opacity 0.05s ease 0.05s;\ opacity:1;\ }\ @@ -15970,27 +18032,40 @@ background-color: rgba(255, 255, 0,0.2);\ position: absolute;\ z-index: 8;\ }\ -.ace_br1 {border-top-left-radius : 3px;}\ -.ace_br2 {border-top-right-radius : 3px;}\ -.ace_br3 {border-top-left-radius : 3px; border-top-right-radius: 3px;}\ -.ace_br4 {border-bottom-right-radius: 3px;}\ -.ace_br5 {border-top-left-radius : 3px; border-bottom-right-radius: 3px;}\ -.ace_br6 {border-top-right-radius : 3px; border-bottom-right-radius: 3px;}\ -.ace_br7 {border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px;}\ -.ace_br8 {border-bottom-left-radius : 3px;}\ -.ace_br9 {border-top-left-radius : 3px; border-bottom-left-radius: 3px;}\ -.ace_br10{border-top-right-radius : 3px; border-bottom-left-radius: 3px;}\ -.ace_br11{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br12{border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br13{border-top-left-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br14{border-top-right-radius : 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_br15{border-top-left-radius : 3px; border-top-right-radius: 3px; border-bottom-right-radius: 3px; border-bottom-left-radius: 3px;}\ -.ace_text-input-ios {\ -position: absolute !important;\ -top: -100000px !important;\ -left: -100000px !important;\ +.ace_mobile-menu {\ +position: absolute;\ +line-height: 1.5;\ +border-radius: 4px;\ +-ms-user-select: none;\ +-moz-user-select: none;\ +-webkit-user-select: none;\ +user-select: none;\ +background: white;\ +box-shadow: 1px 3px 2px grey;\ +border: 1px solid #dcdcdc;\ +color: black;\ }\ -"; +.ace_dark > .ace_mobile-menu {\ +background: #333;\ +color: #ccc;\ +box-shadow: 1px 3px 2px grey;\ +border: 1px solid #444;\ +}\ +.ace_mobile-button {\ +padding: 2px;\ +cursor: pointer;\ +overflow: hidden;\ +}\ +.ace_mobile-button:hover {\ +background-color: #eee;\ +opacity:1;\ +}\ +.ace_mobile-button:active {\ +background-color: #ddd;\ +}"; + +var useragent = require("./lib/useragent"); +var HIDE_TEXTAREA = useragent.isIE; dom.importCssString(editorCss, "ace_editor.css"); @@ -15998,18 +18073,20 @@ var VirtualRenderer = function(container, theme) { var _self = this; this.container = container || dom.createElement("div"); - this.$keepTextAreaAtCursor = !useragent.isOldIE; dom.addCssClass(this.container, "ace_editor"); + if (dom.HI_DPI) dom.addCssClass(this.container, "ace_hidpi"); this.setTheme(theme); this.$gutter = dom.createElement("div"); this.$gutter.className = "ace_gutter"; this.container.appendChild(this.$gutter); + this.$gutter.setAttribute("aria-hidden", true); this.scroller = dom.createElement("div"); this.scroller.className = "ace_scroller"; + this.container.appendChild(this.scroller); this.content = dom.createElement("div"); @@ -16089,6 +18166,17 @@ var VirtualRenderer = function(container, theme) { v: 0, h: 0 }; + + this.margin = { + left: 0, + right: 0, + top: 0, + bottom: 0, + v: 0, + h: 0 + }; + + this.$keepTextAreaAtCursor = !useragent.isIOS; this.$loop = new RenderLoop( this.$renderChanges.bind(this), @@ -16099,7 +18187,7 @@ var VirtualRenderer = function(container, theme) { this.updateCharacterSize(); this.setPadding(4); config.resetOptions(this); - config._emit("renderer", this); + config._signal("renderer", this); }; (function() { @@ -16129,6 +18217,7 @@ var VirtualRenderer = function(container, theme) { this.layerConfig.lineHeight = this.lineHeight = this.$textLayer.getLineHeight(); this.$updatePrintMargin(); + dom.setStyle(this.scroller.style, "line-height", this.lineHeight + "px"); }; this.setSession = function(session) { if (this.session) @@ -16151,7 +18240,7 @@ var VirtualRenderer = function(container, theme) { this.scrollBarH.scrollLeft = this.scrollBarV.scrollTop = null; this.onChangeNewLineMode = this.onChangeNewLineMode.bind(this); - this.onChangeNewLineMode() + this.onChangeNewLineMode(); this.session.doc.on("changeNewLineMode", this.onChangeNewLineMode); }; this.updateLines = function(firstRow, lastRow, force) { @@ -16185,6 +18274,7 @@ var VirtualRenderer = function(container, theme) { this.onChangeNewLineMode = function() { this.$loop.schedule(this.CHANGE_TEXT); this.$textLayer.$updateEolChar(); + this.session.$bidiHandler.setEolChar(this.$textLayer.EOL_CHAR); }; this.onChangeTabSize = function() { @@ -16273,16 +18363,19 @@ var VirtualRenderer = function(container, theme) { this.gutterWidth = gutterWidth; - this.scrollBarH.element.style.left = - this.scroller.style.left = gutterWidth + "px"; - size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth()); + dom.setStyle(this.scrollBarH.element.style, "left", gutterWidth + "px"); + dom.setStyle(this.scroller.style, "left", gutterWidth + this.margin.left + "px"); + size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBarV.getWidth() - this.margin.h); + dom.setStyle(this.$gutter.style, "left", this.margin.left + "px"); - this.scrollBarH.element.style.right = - this.scroller.style.right = this.scrollBarV.getWidth() + "px"; - this.scroller.style.bottom = this.scrollBarH.getHeight() + "px"; + var right = this.scrollBarV.getWidth() + "px"; + dom.setStyle(this.scrollBarH.element.style, "right", right); + dom.setStyle(this.scroller.style, "right", right); + dom.setStyle(this.scroller.style, "bottom", this.scrollBarH.getHeight()); - if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) + if (this.session && this.session.getUseWrapMode() && this.adjustWrapLimit() || force) { changes |= this.CHANGE_FULL; + } } size.$dirty = !width || !height; @@ -16293,8 +18386,8 @@ var VirtualRenderer = function(container, theme) { return changes; }; - this.onGutterResize = function() { - var gutterWidth = this.$showGutter ? this.$gutter.offsetWidth : 0; + this.onGutterResize = function(width) { + var gutterWidth = this.$showGutter ? width : 0; if (gutterWidth != this.gutterWidth) this.$changes |= this.$updateCachedSize(true, gutterWidth, this.$size.width, this.$size.height); @@ -16304,7 +18397,6 @@ var VirtualRenderer = function(container, theme) { this.$loop.schedule(this.CHANGE_FULL); } else { this.$computeLayerConfig(); - this.$loop.schedule(this.CHANGE_MARKER); } }; this.adjustWrapLimit = function() { @@ -16320,6 +18412,7 @@ var VirtualRenderer = function(container, theme) { }; this.setShowInvisibles = function(showInvisibles) { this.setOption("showInvisibles", showInvisibles); + this.session.$bidiHandler.setShowInvisibles(showInvisibles); }; this.getShowInvisibles = function() { return this.getOption("showInvisibles"); @@ -16351,7 +18444,7 @@ var VirtualRenderer = function(container, theme) { }; this.getFadeFoldWidgets = function(){ - return this.getOption("fadeFoldWidgets") + return this.getOption("fadeFoldWidgets"); }; this.setFadeFoldWidgets = function(show) { @@ -16366,19 +18459,6 @@ var VirtualRenderer = function(container, theme) { return this.getOption("highlightGutterLine"); }; - this.$updateGutterLineHighlight = function() { - var pos = this.$cursorLayer.$pixelPos; - var height = this.layerConfig.lineHeight; - if (this.session.getUseWrapMode()) { - var cursor = this.session.selection.getCursor(); - cursor.column = 0; - pos = this.$cursorLayer.getPixelPosition(cursor, true); - height *= this.session.getRowLength(cursor.row); - } - this.$gutterLineHighlight.style.top = pos.top - this.layerConfig.offset + "px"; - this.$gutterLineHighlight.style.height = height + "px"; - }; - this.$updatePrintMargin = function() { if (!this.$showPrintMargin && !this.$printMarginEl) return; @@ -16393,7 +18473,7 @@ var VirtualRenderer = function(container, theme) { } var style = this.$printMarginEl.style; - style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding) + "px"; + style.left = Math.round(this.characterWidth * this.$printMarginColumn + this.$padding) + "px"; style.visibility = this.$showPrintMargin ? "visible" : "hidden"; if (this.session && this.session.$wrap == -1) @@ -16409,35 +18489,55 @@ var VirtualRenderer = function(container, theme) { return this.container; }; this.$moveTextAreaToCursor = function() { - if (!this.$keepTextAreaAtCursor) + if (this.$isMousePressed) return; + var style = this.textarea.style; + var composition = this.$composition; + if (!this.$keepTextAreaAtCursor && !composition) { + dom.translate(this.textarea, -100, 0); return; + } + var pixelPos = this.$cursorLayer.$pixelPos; + if (!pixelPos) + return; + if (composition && composition.markerRange) + pixelPos = this.$cursorLayer.getPixelPosition(composition.markerRange.start, true); + var config = this.layerConfig; - var posTop = this.$cursorLayer.$pixelPos.top; - var posLeft = this.$cursorLayer.$pixelPos.left; + var posTop = pixelPos.top; + var posLeft = pixelPos.left; posTop -= config.offset; - var style = this.textarea.style; - var h = this.lineHeight; + var h = composition && composition.useTextareaForIME ? this.lineHeight : HIDE_TEXTAREA ? 0 : 1; if (posTop < 0 || posTop > config.height - h) { - style.top = style.left = "0"; + dom.translate(this.textarea, 0, 0); return; } - var w = this.characterWidth; - if (this.$composition) { - var val = this.textarea.value.replace(/^\x01+/, ""); - w *= (this.session.$getStringScreenWidth(val)[0]+2); - h += 2; + var w = 1; + var maxTop = this.$size.height - h; + if (!composition) { + posTop += this.lineHeight; } + else { + if (composition.useTextareaForIME) { + var val = this.textarea.value; + w = this.characterWidth * (this.session.$getStringScreenWidth(val)[0]); + h += 2; + } + else { + posTop += this.lineHeight + 2; + } + } + posLeft -= this.scrollLeft; if (posLeft > this.$size.scrollerWidth - w) posLeft = this.$size.scrollerWidth - w; - posLeft += this.gutterWidth; - style.height = h + "px"; - style.width = w + "px"; - style.left = Math.min(posLeft, this.$size.scrollerWidth - w) + "px"; - style.top = Math.min(posTop, this.$size.height - h) + "px"; + posLeft += this.gutterWidth + this.margin.left; + + dom.setStyle(style, "height", h + "px"); + dom.setStyle(style, "width", w + "px"); + dom.translate(this.textarea, Math.min(posLeft, this.$size.scrollerWidth - w), Math.min(posTop, maxTop)); }; this.getFirstVisibleRow = function() { return this.layerConfig.firstRow; @@ -16447,7 +18547,7 @@ var VirtualRenderer = function(container, theme) { }; this.getLastFullyVisibleRow = function() { var config = this.layerConfig; - var lastRow = config.lastRow + var lastRow = config.lastRow; var top = this.session.documentToScreenRow(lastRow, 0) * config.lineHeight; if (top - this.session.getScrollTop() > config.height - config.lineHeight) return lastRow - 1; @@ -16480,6 +18580,18 @@ var VirtualRenderer = function(container, theme) { this.session.setScrollTop(-sm.top); this.updateFull(); }; + + this.setMargin = function(top, bottom, left, right) { + var sm = this.margin; + sm.top = top|0; + sm.bottom = bottom|0; + sm.right = right|0; + sm.left = left|0; + sm.v = sm.top + sm.bottom; + sm.h = sm.left + sm.right; + this.$updateCachedSize(true, this.gutterWidth, this.$size.width, this.$size.height); + this.updateFull(); + }; this.getHScrollBarAlwaysVisible = function() { return this.$hScrollBarAlwaysVisible; }; @@ -16538,6 +18650,10 @@ var VirtualRenderer = function(container, theme) { } this._signal("beforeRender"); + + if (this.session && this.session.$bidiHandler) + this.session.$bidiHandler.updateCharacterWidths(this.$fontMetrics); + var config = this.layerConfig; if (changes & this.CHANGE_FULL || changes & this.CHANGE_SIZE || @@ -16546,29 +18662,34 @@ var VirtualRenderer = function(container, theme) { changes & this.CHANGE_SCROLL || changes & this.CHANGE_H_SCROLL ) { - changes |= this.$computeLayerConfig(); + changes |= this.$computeLayerConfig() | this.$loop.clear(); if (config.firstRow != this.layerConfig.firstRow && config.firstRowScreen == this.layerConfig.firstRowScreen) { var st = this.scrollTop + (config.firstRow - this.layerConfig.firstRow) * this.lineHeight; if (st > 0) { this.scrollTop = st; changes = changes | this.CHANGE_SCROLL; - changes |= this.$computeLayerConfig(); + changes |= this.$computeLayerConfig() | this.$loop.clear(); } } config = this.layerConfig; this.$updateScrollBarV(); if (changes & this.CHANGE_H_SCROLL) this.$updateScrollBarH(); - this.$gutterLayer.element.style.marginTop = (-config.offset) + "px"; - this.content.style.marginTop = (-config.offset) + "px"; - this.content.style.width = config.width + 2 * this.$padding + "px"; - this.content.style.height = config.minHeight + "px"; + + dom.translate(this.content, -this.scrollLeft, -config.offset); + + var width = config.width + 2 * this.$padding + "px"; + var height = config.minHeight + "px"; + + dom.setStyle(this.content.style, "width", width); + dom.setStyle(this.content.style, "height", height); } if (changes & this.CHANGE_H_SCROLL) { - this.content.style.marginLeft = -this.scrollLeft + "px"; + dom.translate(this.content, -this.scrollLeft, -config.offset); this.scroller.className = this.scrollLeft <= 0 ? "ace_scroller" : "ace_scroller ace_scroll-left"; } if (changes & this.CHANGE_FULL) { + this.$changedLines = null; this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); @@ -16576,28 +18697,32 @@ var VirtualRenderer = function(container, theme) { this.$markerFront.update(config); this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); - this.$highlightGutterLine && this.$updateGutterLineHighlight(); this._signal("afterRender"); return; } if (changes & this.CHANGE_SCROLL) { + this.$changedLines = null; if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) this.$textLayer.update(config); else this.$textLayer.scrollLines(config); - if (this.$showGutter) - this.$gutterLayer.update(config); + if (this.$showGutter) { + if (changes & this.CHANGE_GUTTER || changes & this.CHANGE_LINES) + this.$gutterLayer.update(config); + else + this.$gutterLayer.scrollLines(config); + } this.$markerBack.update(config); this.$markerFront.update(config); this.$cursorLayer.update(config); - this.$highlightGutterLine && this.$updateGutterLineHighlight(); this.$moveTextAreaToCursor(); this._signal("afterRender"); return; } if (changes & this.CHANGE_TEXT) { + this.$changedLines = null; this.$textLayer.update(config); if (this.$showGutter) this.$gutterLayer.update(config); @@ -16610,11 +18735,14 @@ var VirtualRenderer = function(container, theme) { if (this.$showGutter) this.$gutterLayer.update(config); } + else if (changes & this.CHANGE_CURSOR) { + if (this.$highlightGutterLine) + this.$gutterLayer.updateLineHighlight(config); + } if (changes & this.CHANGE_CURSOR) { this.$cursorLayer.update(config); this.$moveTextAreaToCursor(); - this.$highlightGutterLine && this.$updateGutterLineHighlight(); } if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { @@ -16639,7 +18767,9 @@ var VirtualRenderer = function(container, theme) { desiredHeight += this.scrollBarH.getHeight(); if (this.$maxPixelHeight && desiredHeight > this.$maxPixelHeight) desiredHeight = this.$maxPixelHeight; - var vScroll = height > maxHeight; + + var hideScrollbars = desiredHeight <= 2 * this.lineHeight; + var vScroll = !hideScrollbars && height > maxHeight; if (desiredHeight != this.desiredHeight || this.$size.height != this.desiredHeight || vScroll != this.$vScroll) { @@ -16679,7 +18809,6 @@ var VirtualRenderer = function(container, theme) { if (this.$maxLines && this.lineHeight > 1) this.$autosize(); - var offset = this.scrollTop % this.lineHeight; var minHeight = size.scrollerHeight + this.lineHeight; var scrollPastEnd = !this.$maxLines && this.$scrollPastEnd @@ -16702,6 +18831,7 @@ var VirtualRenderer = function(container, theme) { this.scrollBarV.setVisible(vScroll); } + var offset = this.scrollTop % this.lineHeight; var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); var lastRow = firstRow + lineCount; @@ -16723,10 +18853,10 @@ var VirtualRenderer = function(container, theme) { offset = this.scrollTop - firstRowScreen * lineHeight; var changes = 0; - if (this.layerConfig.width != longestLine) + if (this.layerConfig.width != longestLine || hScrollChanged) changes = this.CHANGE_H_SCROLL; if (hScrollChanged || vScrollChanged) { - changes = this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); + changes |= this.$updateCachedSize(true, this.gutterWidth, size.width, size.height); this._signal("scrollbarVisibilityChanged"); if (vScrollChanged) longestLine = this.$getLongestLine(); @@ -16747,6 +18877,9 @@ var VirtualRenderer = function(container, theme) { height : this.$size.scrollerHeight }; + if (this.session.$bidiHandler) + this.session.$bidiHandler.setContentWidth(longestLine - this.$padding); + return changes; }; @@ -16774,6 +18907,9 @@ var VirtualRenderer = function(container, theme) { var charCount = this.session.getScreenWidth(); if (this.showInvisibles && !this.session.$useWrapMode) charCount += 1; + + if (this.$textLayer && charCount > this.$textLayer.MAX_LINE_LENGTH) + charCount = this.$textLayer.MAX_LINE_LENGTH + 30; return Math.max(this.$size.scrollerWidth - 2 * this.$padding, Math.round(charCount * this.characterWidth)); }; @@ -16835,7 +18971,7 @@ var VirtualRenderer = function(container, theme) { } else if (scrollTop + this.$size.scrollerHeight - bottomMargin < top + this.lineHeight) { if (offset && scrollTop + this.$size.scrollerHeight - bottomMargin < top - this.lineHeight) top += offset * this.$size.scrollerHeight; - this.session.setScrollTop(top + this.lineHeight - this.$size.scrollerHeight); + this.session.setScrollTop(top + this.lineHeight + bottomMargin - this.$size.scrollerHeight); } var scrollLeft = this.scrollLeft; @@ -16978,31 +19114,51 @@ var VirtualRenderer = function(container, theme) { }; this.pixelToScreenCoordinates = function(x, y) { - var canvasPos = this.scroller.getBoundingClientRect(); - - var offset = (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth; + var canvasPos; + if (this.$hasCssTransforms) { + canvasPos = {top:0, left: 0}; + var p = this.$fontMetrics.transformCoordinates([x, y]); + x = p[1] - this.gutterWidth - this.margin.left; + y = p[0]; + } else { + canvasPos = this.scroller.getBoundingClientRect(); + } + + var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding; + var offset = offsetX / this.characterWidth; var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); - var col = Math.round(offset); + var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset); - return {row: row, column: col, side: offset - col > 0 ? 1 : -1}; + return {row: row, column: col, side: offset - col > 0 ? 1 : -1, offsetX: offsetX}; }; this.screenToTextCoordinates = function(x, y) { - var canvasPos = this.scroller.getBoundingClientRect(); + var canvasPos; + if (this.$hasCssTransforms) { + canvasPos = {top:0, left: 0}; + var p = this.$fontMetrics.transformCoordinates([x, y]); + x = p[1] - this.gutterWidth - this.margin.left; + y = p[0]; + } else { + canvasPos = this.scroller.getBoundingClientRect(); + } - var col = Math.round( - (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth - ); + var offsetX = x + this.scrollLeft - canvasPos.left - this.$padding; + var offset = offsetX / this.characterWidth; + var col = this.$blockCursor ? Math.floor(offset) : Math.round(offset); - var row = (y + this.scrollTop - canvasPos.top) / this.lineHeight; + var row = Math.floor((y + this.scrollTop - canvasPos.top) / this.lineHeight); - return this.session.screenToDocumentPosition(row, Math.max(col, 0)); + return this.session.screenToDocumentPosition(row, Math.max(col, 0), offsetX); }; this.textToScreenCoordinates = function(row, column) { var canvasPos = this.scroller.getBoundingClientRect(); var pos = this.session.documentToScreenPosition(row, column); - var x = this.$padding + Math.round(pos.column * this.characterWidth); + var x = this.$padding + (this.session.$bidiHandler.isBidiRow(pos.row, row) + ? this.session.$bidiHandler.getPosLeft(pos.column) + : Math.round(pos.column * this.characterWidth)); + var y = pos.row * this.lineHeight; return { @@ -17016,29 +19172,64 @@ var VirtualRenderer = function(container, theme) { this.visualizeBlur = function() { dom.removeCssClass(this.container, "ace_focus"); }; - this.showComposition = function(position) { - if (!this.$composition) - this.$composition = { - keepTextAreaAtCursor: this.$keepTextAreaAtCursor, - cssText: this.textarea.style.cssText - }; - - this.$keepTextAreaAtCursor = true; - dom.addCssClass(this.textarea, "ace_composition"); - this.textarea.style.cssText = ""; - this.$moveTextAreaToCursor(); + this.showComposition = function(composition) { + this.$composition = composition; + if (!composition.cssText) { + composition.cssText = this.textarea.style.cssText; + } + composition.useTextareaForIME = this.$useTextareaForIME; + + if (this.$useTextareaForIME) { + dom.addCssClass(this.textarea, "ace_composition"); + this.textarea.style.cssText = ""; + this.$moveTextAreaToCursor(); + this.$cursorLayer.element.style.display = "none"; + } + else { + composition.markerId = this.session.addMarker(composition.markerRange, "ace_composition_marker", "text"); + } }; this.setCompositionText = function(text) { + var cursor = this.session.selection.cursor; + this.addToken(text, "composition_placeholder", cursor.row, cursor.column); this.$moveTextAreaToCursor(); }; this.hideComposition = function() { if (!this.$composition) return; + + if (this.$composition.markerId) + this.session.removeMarker(this.$composition.markerId); dom.removeCssClass(this.textarea, "ace_composition"); - this.$keepTextAreaAtCursor = this.$composition.keepTextAreaAtCursor; this.textarea.style.cssText = this.$composition.cssText; this.$composition = null; + this.$cursorLayer.element.style.display = ""; + }; + + this.addToken = function(text, type, row, column) { + var session = this.session; + session.bgTokenizer.lines[row] = null; + var newToken = {type: type, value: text}; + var tokens = session.getTokens(row); + if (column == null) { + tokens.push(newToken); + } else { + var l = 0; + for (var i =0; i < tokens.length; i++) { + var token = tokens[i]; + l += token.value.length; + if (column <= l) { + var diff = token.value.length - (l - column); + var before = token.value.slice(0, diff); + var after = token.value.slice(diff); + + tokens.splice(i, 1, {type: token.type, value: before}, newToken, {type: token.type, value: after}); + break; + } + } + } + this.updateLines(row, row); }; this.setTheme = function(theme, cb) { var _self = this; @@ -17057,10 +19248,12 @@ var VirtualRenderer = function(container, theme) { return cb && cb(); if (!module || !module.cssClass) throw new Error("couldn't load module " + theme + " or it didn't call define"); + if (module.$id) + _self.$themeId = module.$id; dom.importCssString( module.cssText, module.cssClass, - _self.container.ownerDocument + _self.container ); if (_self.theme) @@ -17095,14 +19288,18 @@ var VirtualRenderer = function(container, theme) { }; this.setCursorStyle = function(style) { - if (this.scroller.style.cursor != style) - this.scroller.style.cursor = style; + dom.setStyle(this.scroller.style, "cursor", style); }; this.setMouseCursor = function(cursorStyle) { - this.scroller.style.cursor = cursorStyle; + dom.setStyle(this.scroller.style, "cursor", cursorStyle); + }; + + this.attachToShadowRoot = function() { + dom.importCssString(editorCss, "ace_editor.css", this.container); }; this.destroy = function() { - this.$textLayer.destroy(); + this.freeze(); + this.$fontMetrics.destroy(); this.$cursorLayer.destroy(); }; @@ -17152,12 +19349,8 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", { initialValue: false }, showFoldWidgets: { - set: function(show) {this.$gutterLayer.setShowFoldWidgets(show)}, - initialValue: true - }, - showLineNumbers: { set: function(show) { - this.$gutterLayer.setShowLineNumbers(show); + this.$gutterLayer.setShowFoldWidgets(show); this.$loop.schedule(this.CHANGE_GUTTER); }, initialValue: true @@ -17171,19 +19364,10 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", { }, highlightGutterLine: { set: function(shouldHighlight) { - if (!this.$gutterLineHighlight) { - this.$gutterLineHighlight = dom.createElement("div"); - this.$gutterLineHighlight.className = "ace_gutter-active-line"; - this.$gutter.appendChild(this.$gutterLineHighlight); - return; - } - - this.$gutterLineHighlight.style.display = shouldHighlight ? "" : "none"; - if (this.$cursorLayer.$pixelPos) - this.$updateGutterLineHighlight(); + this.$gutterLayer.setHighlightGutterLine(shouldHighlight); + this.$loop.schedule(this.CHANGE_GUTTER); }, - initialValue: false, - value: true + initialValue: true }, hScrollBarAlwaysVisible: { set: function(val) { @@ -17199,7 +19383,7 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", { }, initialValue: false }, - fontSize: { + fontSize: { set: function(size) { if (typeof size == "number") size = size + "px"; @@ -17221,6 +19405,8 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", { }, minLines: { set: function(val) { + if (!(this.$minLines < 0x1ffffffffffff)) + this.$minLines = 0; this.updateFull(); } }, @@ -17248,17 +19434,22 @@ config.defineOptions(VirtualRenderer.prototype, "renderer", { } }, theme: { - set: function(val) { this.setTheme(val) }, + set: function(val) { this.setTheme(val); }, get: function() { return this.$themeId || this.theme; }, initialValue: "./theme/textmate", handlesSet: true + }, + hasCssTransforms: { + }, + useTextareaForIME: { + initialValue: !useragent.isMobile && !useragent.isIE } }); exports.VirtualRenderer = VirtualRenderer; }); -ace.define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { +define("ace/worker/worker_client",["require","exports","module","ace/lib/oop","ace/lib/net","ace/lib/event_emitter","ace/config"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -17279,41 +19470,25 @@ function $workerBlob(workerUrl) { } function createWorker(workerUrl) { - var blob = $workerBlob(workerUrl); - var URL = window.URL || window.webkitURL; - var blobURL = URL.createObjectURL(blob); - return new Worker(blobURL); + if (typeof Worker == "undefined") + return { postMessage: function() {}, terminate: function() {} }; + if (config.get("loadWorkerFromBlob")) { + var blob = $workerBlob(workerUrl); + var URL = window.URL || window.webkitURL; + var blobURL = URL.createObjectURL(blob); + return new Worker(blobURL); + } + return new Worker(workerUrl); } -var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) { +var WorkerClient = function(worker) { + if (!worker.postMessage) + worker = this.$createWorkerFromOldConfig.apply(this, arguments); + + this.$worker = worker; this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); this.changeListener = this.changeListener.bind(this); this.onMessage = this.onMessage.bind(this); - if (require.nameToUrl && !require.toUrl) - require.toUrl = require.nameToUrl; - - if (config.get("packaged") || !require.toUrl) { - workerUrl = workerUrl || config.moduleUrl(mod, "worker"); - } else { - var normalizePath = this.$normalizePath; - workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); - - var tlns = {}; - topLevelNamespaces.forEach(function(ns) { - tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); - }); - } - - this.$worker = createWorker(workerUrl); - if (importScripts) { - this.send("importScripts", importScripts); - } - this.$worker.postMessage({ - init : true, - tlns : tlns, - module : mod, - classname : classname - }); this.callbackId = 1; this.callbacks = {}; @@ -17325,6 +19500,35 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, impor oop.implement(this, EventEmitter); + this.$createWorkerFromOldConfig = function(topLevelNamespaces, mod, classname, workerUrl, importScripts) { + if (require.nameToUrl && !require.toUrl) + require.toUrl = require.nameToUrl; + + if (config.get("packaged") || !require.toUrl) { + workerUrl = workerUrl || config.moduleUrl(mod, "worker"); + } else { + var normalizePath = this.$normalizePath; + workerUrl = workerUrl || normalizePath(require.toUrl("ace/worker/worker.js", null, "_")); + + var tlns = {}; + topLevelNamespaces.forEach(function(ns) { + tlns[ns] = normalizePath(require.toUrl(ns, null, "_").replace(/(\.js)?(\?.*)?$/, "")); + }); + } + + this.$worker = createWorker(workerUrl); + if (importScripts) { + this.send("importScripts", importScripts); + } + this.$worker.postMessage({ + init : true, + tlns : tlns, + module : mod, + classname : classname + }); + return this.$worker; + }; + this.onMessage = function(e) { var msg = e.data; switch (msg.type) { @@ -17380,6 +19584,8 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, impor this.emit = function(event, data) { try { + if (data.data && data.data.err) + data.data.err = {message: data.data.err.message, stack: data.data.err.stack, code: data.data.err.code}; this.$worker.postMessage({event: event, data: {data: data.data}}); } catch(ex) { @@ -17421,32 +19627,28 @@ var WorkerClient = function(topLevelNamespaces, mod, classname, workerUrl, impor var UIWorkerClient = function(topLevelNamespaces, mod, classname) { - this.$sendDeltaQueue = this.$sendDeltaQueue.bind(this); - this.changeListener = this.changeListener.bind(this); - this.callbackId = 1; - this.callbacks = {}; - this.messageBuffer = []; - var main = null; var emitSync = false; var sender = Object.create(EventEmitter); - var _self = this; - this.$worker = {}; - this.$worker.terminate = function() {}; - this.$worker.postMessage = function(e) { - _self.messageBuffer.push(e); - if (main) { + var messageBuffer = []; + var workerClient = new WorkerClient({ + messageBuffer: messageBuffer, + terminate: function() {}, + postMessage: function(e) { + messageBuffer.push(e); + if (!main) return; if (emitSync) setTimeout(processNext); else processNext(); } - }; - this.setEmitSync = function(val) { emitSync = val }; + }); + + workerClient.setEmitSync = function(val) { emitSync = val; }; var processNext = function() { - var msg = _self.messageBuffer.shift(); + var msg = messageBuffer.shift(); if (msg.command) main[msg.command].apply(main, msg.args); else if (msg.event) @@ -17454,7 +19656,7 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { }; sender.postMessage = function(msg) { - _self.onMessage({data: msg}); + workerClient.onMessage({data: msg}); }; sender.callback = function(data, callbackId) { this.postMessage({type: "call", id: callbackId, data: data}); @@ -17465,12 +19667,12 @@ var UIWorkerClient = function(topLevelNamespaces, mod, classname) { config.loadModule(["worker", mod], function(Main) { main = new Main[classname](sender); - while (_self.messageBuffer.length) + while (messageBuffer.length) processNext(); }); -}; -UIWorkerClient.prototype = WorkerClient.prototype; + return workerClient; +}; exports.UIWorkerClient = UIWorkerClient; exports.WorkerClient = WorkerClient; @@ -17479,7 +19681,7 @@ exports.createWorker = createWorker; }); -ace.define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) { +define("ace/placeholder",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/oop"], function(require, exports, module) { "use strict"; var Range = require("./range").Range; @@ -17636,7 +19838,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) var undoManager = this.session.getUndoManager(); var undosRequired = (undoManager.$undoStack || undoManager.$undostack).length - this.$undoStackDepth; for (var i = 0; i < undosRequired; i++) { - undoManager.undo(true); + undoManager.undo(this.session, true); } if (this.selectionBefore) this.session.selection.fromJSON(this.selectionBefore); @@ -17647,7 +19849,7 @@ var PlaceHolder = function(session, length, pos, others, mainClass, othersClass) exports.PlaceHolder = PlaceHolder; }); -ace.define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { +define("ace/mouse/multi_select_handler",["require","exports","module","ace/lib/event","ace/lib/useragent"], function(require, exports, module) { var event = require("../lib/event"); var useragent = require("../lib/useragent"); @@ -17728,8 +19930,6 @@ function onMouseDown(e) { var oldRange = selection.rangeList.rangeAtPoint(pos); - - editor.$blockScrolling++; editor.inVirtualSelectionMode = true; if (shift) { @@ -17751,7 +19951,6 @@ function onMouseDown(e) { } selection.addRange(tmpSel); } - editor.$blockScrolling--; editor.inVirtualSelectionMode = false; }); @@ -17762,13 +19961,12 @@ function onMouseDown(e) { var rectSel = []; var blockSelect = function() { var newCursor = editor.renderer.pixelToScreenCoordinates(mouseX, mouseY); - var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column); + var cursor = session.screenToDocumentPosition(newCursor.row, newCursor.column, newCursor.offsetX); if (isSamePoint(screenCursor, newCursor) && isSamePoint(cursor, selection.lead)) return; screenCursor = newCursor; - editor.$blockScrolling++; editor.selection.moveToPosition(cursor); editor.renderer.scrollCursorIntoView(); @@ -17778,9 +19976,7 @@ function onMouseDown(e) { rectSel[0] = editor.$mouseHandler.$clickSelection.clone(); rectSel.forEach(editor.addSelectionMarker, editor); editor.updateSelectionMarkers(); - editor.$blockScrolling--; }; - editor.$blockScrolling++; if (isMultiSelect && !accel) { selection.toSingleRange(); } else if (!isMultiSelect && accel) { @@ -17792,16 +19988,15 @@ function onMouseDown(e) { screenAnchor = session.documentToScreenPosition(selection.lead); else selection.moveToPosition(pos); - editor.$blockScrolling--; screenCursor = {row: -1, column: -1}; var onMouseSelectionEnd = function(e) { + blockSelect(); clearInterval(timerId); editor.removeSelectionMarkers(rectSel); if (!rectSel.length) rectSel = [selection.toOrientedRange()]; - editor.$blockScrolling++; if (initialRange) { editor.removeSelectionMarker(initialRange); selection.toSingleRange(initialRange); @@ -17810,7 +20005,6 @@ function onMouseDown(e) { selection.addRange(rectSel[i]); editor.inVirtualSelectionMode = false; editor.$mouseHandler.$clickSelection = null; - editor.$blockScrolling--; }; var onSelectionInterval = blockSelect; @@ -17827,67 +20021,78 @@ exports.onMouseDown = onMouseDown; }); -ace.define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) { +define("ace/commands/multi_select_commands",["require","exports","module","ace/keyboard/hash_handler"], function(require, exports, module) { exports.defaultCommands = [{ name: "addCursorAbove", + description: "Add cursor above", exec: function(editor) { editor.selectMoreLines(-1); }, bindKey: {win: "Ctrl-Alt-Up", mac: "Ctrl-Alt-Up"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorBelow", + description: "Add cursor below", exec: function(editor) { editor.selectMoreLines(1); }, bindKey: {win: "Ctrl-Alt-Down", mac: "Ctrl-Alt-Down"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorAboveSkipCurrent", + description: "Add cursor above (skip current)", exec: function(editor) { editor.selectMoreLines(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Up", mac: "Ctrl-Alt-Shift-Up"}, scrollIntoView: "cursor", readOnly: true }, { name: "addCursorBelowSkipCurrent", + description: "Add cursor below (skip current)", exec: function(editor) { editor.selectMoreLines(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Down", mac: "Ctrl-Alt-Shift-Down"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectMoreBefore", + description: "Select more before", exec: function(editor) { editor.selectMore(-1); }, bindKey: {win: "Ctrl-Alt-Left", mac: "Ctrl-Alt-Left"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectMoreAfter", + description: "Select more after", exec: function(editor) { editor.selectMore(1); }, bindKey: {win: "Ctrl-Alt-Right", mac: "Ctrl-Alt-Right"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectNextBefore", + description: "Select next before", exec: function(editor) { editor.selectMore(-1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Left", mac: "Ctrl-Alt-Shift-Left"}, scrollIntoView: "cursor", readOnly: true }, { name: "selectNextAfter", + description: "Select next after", exec: function(editor) { editor.selectMore(1, true); }, bindKey: {win: "Ctrl-Alt-Shift-Right", mac: "Ctrl-Alt-Shift-Right"}, scrollIntoView: "cursor", readOnly: true }, { name: "splitIntoLines", + description: "Split into lines", exec: function(editor) { editor.multiSelect.splitIntoLines(); }, bindKey: {win: "Ctrl-Alt-L", mac: "Ctrl-Alt-L"}, readOnly: true }, { name: "alignCursors", + description: "Align cursors", exec: function(editor) { editor.alignCursors(); }, bindKey: {win: "Ctrl-Alt-A", mac: "Ctrl-Alt-A"}, scrollIntoView: "cursor" }, { name: "findAll", + description: "Find all", exec: function(editor) { editor.findAll(); }, bindKey: {win: "Ctrl-Alt-K", mac: "Ctrl-Alt-G"}, scrollIntoView: "cursor", @@ -17895,11 +20100,12 @@ exports.defaultCommands = [{ }]; exports.multiSelectCommands = [{ name: "singleSelection", + description: "Single selection", bindKey: "esc", exec: function(editor) { editor.exitMultiSelectMode(); }, scrollIntoView: "cursor", readOnly: true, - isAvailable: function(editor) {return editor && editor.inMultiSelectMode} + isAvailable: function(editor) {return editor && editor.inMultiSelectMode;} }]; var HashHandler = require("../keyboard/hash_handler").HashHandler; @@ -17907,7 +20113,7 @@ exports.keyboardHandler = new HashHandler(exports.multiSelectCommands); }); -ace.define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) { +define("ace/multi_select",["require","exports","module","ace/range_list","ace/range","ace/selection","ace/mouse/multi_select_handler","ace/lib/event","ace/lib/lang","ace/commands/multi_select_commands","ace/search","ace/edit_session","ace/editor","ace/config"], function(require, exports, module) { var RangeList = require("./range_list").RangeList; var Range = require("./range").Range; @@ -17991,8 +20197,6 @@ var EditSession = require("./edit_session").EditSession; var removed = this.rangeList.merge(); if (removed.length) this.$onRemoveRange(removed); - else if(this.ranges[0]) - this.fromOrientedRange(this.ranges[0]); }; this.$onAddRange = function(range) { @@ -18087,8 +20291,8 @@ var EditSession = require("./edit_session").EditSession; this.toSingleRange(); this.setSelectionRange(range, lastRange.cursor == lastRange.start); } else { - var cursor = this.session.documentToScreenPosition(this.selectionLead); - var anchor = this.session.documentToScreenPosition(this.selectionAnchor); + var cursor = this.session.documentToScreenPosition(this.cursor); + var anchor = this.session.documentToScreenPosition(this.anchor); var rectSel = this.rectangularRangeBlock(cursor, anchor); rectSel.forEach(this.addRange, this); @@ -18101,9 +20305,13 @@ var EditSession = require("./edit_session").EditSession; if (xBackwards) { var startColumn = screenCursor.column; var endColumn = screenAnchor.column; + var startOffsetX = screenCursor.offsetX; + var endOffsetX = screenAnchor.offsetX; } else { var startColumn = screenAnchor.column; var endColumn = screenCursor.column; + var startOffsetX = screenAnchor.offsetX; + var endOffsetX = screenCursor.offsetX; } var yBackwards = screenCursor.row < screenAnchor.row; @@ -18123,15 +20331,16 @@ var EditSession = require("./edit_session").EditSession; if (startRow == endRow) includeEmptyLines = true; + var docEnd; for (var row = startRow; row <= endRow; row++) { var range = Range.fromPoints( - this.session.screenToDocumentPosition(row, startColumn), - this.session.screenToDocumentPosition(row, endColumn) + this.session.screenToDocumentPosition(row, startColumn, startOffsetX), + this.session.screenToDocumentPosition(row, endColumn, endOffsetX) ); if (range.isEmpty()) { if (docEnd && isSamePoint(range.end, docEnd)) break; - var docEnd = range.end; + docEnd = range.end; } range.cursor = xBackwards ? range.start : range.end; rectSel.push(range); @@ -18263,7 +20472,7 @@ var Editor = require("./editor").Editor; if (this.inVirtualSelectionMode) return; var keepOrder = options && options.keepOrder; - var $byLines = options == true || options && options.$byLines + var $byLines = options == true || options && options.$byLines; var session = this.session; var selection = this.selection; var rangeList = selection.rangeList; @@ -18297,6 +20506,8 @@ var Editor = require("./editor").Editor; this.inVirtualSelectionMode = false; selection._eventRegistry = reg; selection.mergeOverlappingRanges(); + if (selection.ranges[0]) + selection.fromOrientedRange(selection.ranges[0]); var anim = this.renderer.$scrollAnimation; this.onCursorChange(); @@ -18341,6 +20552,8 @@ var Editor = require("./editor").Editor; if (pos.row != anchor.row || this.session.$clipPositionToDocument(pos.row, pos.column).column != anchor.column) this.multiSelect.toSingleRange(this.multiSelect.toOrientedRange()); + else + this.multiSelect.mergeOverlappingRanges(); } }; this.findAll = function(needle, options, additive) { @@ -18358,7 +20571,6 @@ var Editor = require("./editor").Editor; if (!ranges.length) return 0; - this.$blockScrolling += 1; var selection = this.multiSelect; if (!additive) @@ -18369,8 +20581,6 @@ var Editor = require("./editor").Editor; if (range && selection.rangeList.rangeAtPoint(range.start)) selection.addRange(range, true); - this.$blockScrolling -= 1; - return ranges.length; }; this.selectMoreLines = function(dir, skip) { @@ -18445,6 +20655,7 @@ var Editor = require("./editor").Editor; range.start.row = tmp.start.row; range.start.column = tmp.start.column; } + sel.fromOrientedRange(sel.ranges[0]); }; this.selectMore = function(dir, skip, stopAtFirst) { var session = this.session; @@ -18463,10 +20674,8 @@ var Editor = require("./editor").Editor; var newRange = find(session, needle, dir); if (newRange) { newRange.cursor = dir == -1 ? newRange.start : newRange.end; - this.$blockScrolling += 1; this.session.unfold(newRange); this.multiSelect.addRange(newRange); - this.$blockScrolling -= 1; this.renderer.scrollCursorIntoView(null, 0.5); } if (skip) @@ -18590,7 +20799,7 @@ var Editor = require("./editor").Editor; } function alignRight(m) { return !m[2] ? m[0] : spaces(startW + textW - m[2].length) + m[2] - + spaces(endW, " ") + + spaces(endW) + m[4].replace(/^([=:])\s+/, "$1 "); } function unAlign(m) { @@ -18660,6 +20869,7 @@ function MultiSelect(editor) { } function addAltCursorListeners(editor){ + if (!editor.textInput) return; var el = editor.textInput.getElement(); var altCursor = false; event.addListener(el, "keydown", function(e) { @@ -18713,7 +20923,7 @@ require("./config").defineOptions(Editor.prototype, "editor", { }); -ace.define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/folding/fold_mode",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../../range").Range; @@ -18757,8 +20967,11 @@ var FoldMode = exports.FoldMode = function() {}; if (level == -1) continue; - if (level <= startLevel) - break; + if (level <= startLevel) { + var token = session.getTokenAt(row, 0); + if (!token || token.type !== "string") + break; + } endRow = row; } @@ -18802,7 +21015,7 @@ var FoldMode = exports.FoldMode = function() {}; }); -ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; @@ -18927,12 +21140,13 @@ border: 1px solid rgb(200, 200, 250);\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; +exports.$id = "ace/theme/textmate"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); -ace.define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) { +define("ace/line_widgets",["require","exports","module","ace/lib/oop","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -19151,7 +21365,7 @@ function LineWidgets(session) { w.editor.destroy(); } catch(e){} if (this.session.lineWidgets) { - var w1 = this.session.lineWidgets[w.row] + var w1 = this.session.lineWidgets[w.row]; if (w1 == w) { this.session.lineWidgets[w.row] = w.$oldWidget; if (w.$oldWidget) @@ -19284,7 +21498,7 @@ exports.LineWidgets = LineWidgets; }); -ace.define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) { +define("ace/ext/error_marker",["require","exports","module","ace/line_widgets","ace/lib/dom","ace/range"], function(require, exports, module) { "use strict"; var LineWidgets = require("../line_widgets").LineWidgets; var dom = require("../lib/dom"); @@ -19470,7 +21684,7 @@ dom.importCssString("\ }); -ace.define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { +define("ace/ace",["require","exports","module","ace/lib/fixoldbrowsers","ace/lib/dom","ace/lib/event","ace/range","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/worker/worker_client","ace/keyboard/hash_handler","ace/placeholder","ace/multi_select","ace/mode/folding/fold_mode","ace/theme/textmate","ace/ext/error_marker","ace/config"], function(require, exports, module) { "use strict"; require("./lib/fixoldbrowsers"); @@ -19478,6 +21692,7 @@ require("./lib/fixoldbrowsers"); var dom = require("./lib/dom"); var event = require("./lib/event"); +var Range = require("./range").Range; var Editor = require("./editor").Editor; var EditSession = require("./edit_session").EditSession; var UndoManager = require("./undomanager").UndoManager; @@ -19495,7 +21710,7 @@ exports.require = require; if (typeof define === "function") exports.define = define; -exports.edit = function(el) { +exports.edit = function(el, options) { if (typeof el == "string") { var _id = el; el = document.getElementById(_id); @@ -19513,14 +21728,13 @@ exports.edit = function(el) { el = dom.createElement("pre"); oldNode.parentNode.replaceChild(el, oldNode); } else if (el) { - value = dom.getInnerText(el); + value = el.textContent; el.innerHTML = ""; } var doc = exports.createEditSession(value); - var editor = new Editor(new Renderer(el)); - editor.setSession(doc); + var editor = new Editor(new Renderer(el), doc, options); var env = { document: doc, @@ -19540,21 +21754,27 @@ exports.createEditSession = function(text, mode) { var doc = new EditSession(text, mode); doc.setUndoManager(new UndoManager()); return doc; -} +}; +exports.Range = Range; +exports.Editor = Editor; exports.EditSession = EditSession; exports.UndoManager = UndoManager; -exports.version = "1.2.8"; -}); - (function() { - ace.require(["ace/ace"], function(a) { +exports.VirtualRenderer = Renderer; +exports.version = exports.config.version; +}); (function() { + window.require(["ace/ace"], function(a) { if (a) { a.config.init(true); - a.define = ace.define; + a.define = window.define; } if (!window.ace) window.ace = a; for (var key in a) if (a.hasOwnProperty(key)) window.ace[key] = a[key]; + window.ace["default"] = window.ace; + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = window.ace; + } }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/src/ext-beautify.js b/htdocs/includes/ace/src/ext-beautify.js new file mode 100644 index 00000000000..a39074326a2 --- /dev/null +++ b/htdocs/includes/ace/src/ext-beautify.js @@ -0,0 +1,324 @@ +define("ace/ext/beautify",["require","exports","module","ace/token_iterator"], function(require, exports, module) { +"use strict"; +var TokenIterator = require("../token_iterator").TokenIterator; + +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} +exports.singletonTags = ["area", "base", "br", "col", "command", "embed", "hr", "html", "img", "input", "keygen", "link", "meta", "param", "source", "track", "wbr"]; +exports.blockTags = ["article", "aside", "blockquote", "body", "div", "dl", "fieldset", "footer", "form", "head", "header", "html", "nav", "ol", "p", "script", "section", "style", "table", "tbody", "tfoot", "thead", "ul"]; + +exports.beautify = function(session) { + var iterator = new TokenIterator(session, 0, 0); + var token = iterator.getCurrentToken(); + var tabString = session.getTabString(); + var singletonTags = exports.singletonTags; + var blockTags = exports.blockTags; + var nextToken; + var breakBefore = false; + var spaceBefore = false; + var spaceAfter = false; + var code = ""; + var value = ""; + var tagName = ""; + var depth = 0; + var lastDepth = 0; + var lastIndent = 0; + var indent = 0; + var unindent = 0; + var roundDepth = 0; + var curlyDepth = 0; + var row; + var curRow = 0; + var rowsToAdd = 0; + var rowTokens = []; + var abort = false; + var i; + var indentNextLine = false; + var inTag = false; + var inCSS = false; + var inBlock = false; + var levels = {0: 0}; + var parents = []; + + var trimNext = function() { + if (nextToken && nextToken.value && nextToken.type !== 'string.regexp') + nextToken.value = nextToken.value.trim(); + }; + + var trimLine = function() { + code = code.replace(/ +$/, ""); + }; + + var trimCode = function() { + code = code.trimRight(); + breakBefore = false; + }; + + while (token !== null) { + curRow = iterator.getCurrentTokenRow(); + rowTokens = iterator.$rowTokens; + nextToken = iterator.stepForward(); + + if (typeof token !== "undefined") { + value = token.value; + unindent = 0; + inCSS = (tagName === "style" || session.$modeId === "ace/mode/css"); + if (is(token, "tag-open")) { + inTag = true; + if (nextToken) + inBlock = (blockTags.indexOf(nextToken.value) !== -1); + if (value === " 0; rowsToAdd--) + code += "\n"; + + breakBefore = true; + if (!is(token, "comment") && !token.type.match(/^(comment|string)$/)) + value = value.trimLeft(); + } + + if (value) { + if (token.type === "keyword" && value.match(/^(if|else|elseif|for|foreach|while|switch)$/)) { + parents[depth] = value; + + trimNext(); + spaceAfter = true; + if (value.match(/^(else|elseif)$/)) { + if (code.match(/\}[\s]*$/)) { + trimCode(); + spaceBefore = true; + } + } + } else if (token.type === "paren.lparen") { + trimNext(); + if (value.substr(-1) === "{") { + spaceAfter = true; + indentNextLine = false; + + if(!inTag) + rowsToAdd = 1; + } + if (value.substr(0, 1) === "{") { + spaceBefore = true; + if (code.substr(-1) !== '[' && code.trimRight().substr(-1) === '[') { + trimCode(); + spaceBefore = false; + } else if (code.trimRight().substr(-1) === ')') { + trimCode(); + } else { + trimLine(); + } + } + } else if (token.type === "paren.rparen") { + unindent = 1; + if (value.substr(0, 1) === "}") { + if (parents[depth-1] === 'case') + unindent++; + + if (code.trimRight().substr(-1) === '{') { + trimCode(); + } else { + spaceBefore = true; + + if (inCSS) + rowsToAdd+=2; + } + } + if (value.substr(0, 1) === "]") { + if (code.substr(-1) !== '}' && code.trimRight().substr(-1) === '}') { + spaceBefore = false; + indent++; + trimCode(); + } + } + if (value.substr(0, 1) === ")") { + if (code.substr(-1) !== '(' && code.trimRight().substr(-1) === '(') { + spaceBefore = false; + indent++; + trimCode(); + } + } + + trimLine(); + } else if ((token.type === "keyword.operator" || token.type === "keyword") && value.match(/^(=|==|===|!=|!==|&&|\|\||and|or|xor|\+=|.=|>|>=|<|<=|=>)$/)) { + trimCode(); + trimNext(); + spaceBefore = true; + spaceAfter = true; + } else if (token.type === "punctuation.operator" && value === ';') { + trimCode(); + trimNext(); + spaceAfter = true; + + if (inCSS) + rowsToAdd++; + } else if (token.type === "punctuation.operator" && value.match(/^(:|,)$/)) { + trimCode(); + trimNext(); + if (value.match(/^(,)$/) && curlyDepth>0 && roundDepth===0) { + rowsToAdd++; + } else { + spaceAfter = true; + breakBefore = false; + } + } else if (token.type === "support.php_tag" && value === "?>" && !breakBefore) { + trimCode(); + spaceBefore = true; + } else if (is(token, "attribute-name") && code.substr(-1).match(/^\s$/)) { + spaceBefore = true; + } else if (is(token, "attribute-equals")) { + trimLine(); + trimNext(); + } else if (is(token, "tag-close")) { + trimLine(); + if(value === "/>") + spaceBefore = true; + } + if (breakBefore && !(token.type.match(/^(comment)$/) && !value.substr(0, 1).match(/^[/#]$/)) && !(token.type.match(/^(string)$/) && !value.substr(0, 1).match(/^['"]$/))) { + + indent = lastIndent; + + if(depth > lastDepth) { + indent++; + + for (i=depth; i > lastDepth; i--) + levels[i] = indent; + } else if(depth < lastDepth) + indent = levels[depth]; + + lastDepth = depth; + lastIndent = indent; + + if(unindent) + indent -= unindent; + + if (indentNextLine && !roundDepth) { + indent++; + indentNextLine = false; + } + + for (i = 0; i < indent; i++) + code += tabString; + } + + + if (token.type === "keyword" && value.match(/^(case|default)$/)) { + parents[depth] = value; + depth++; + } + + + if (token.type === "keyword" && value.match(/^(break)$/)) { + if(parents[depth-1] && parents[depth-1].match(/^(case|default)$/)) { + depth--; + } + } + if (token.type === "paren.lparen") { + roundDepth += (value.match(/\(/g) || []).length; + curlyDepth += (value.match(/\{/g) || []).length; + depth += value.length; + } + + if (token.type === "keyword" && value.match(/^(if|else|elseif|for|while)$/)) { + indentNextLine = true; + roundDepth = 0; + } else if (!roundDepth && value.trim() && token.type !== "comment") + indentNextLine = false; + + if (token.type === "paren.rparen") { + roundDepth -= (value.match(/\)/g) || []).length; + curlyDepth -= (value.match(/\}/g) || []).length; + + for (i = 0; i < value.length; i++) { + depth--; + if(value.substr(i, 1)==='}' && parents[depth]==='case') { + depth--; + } + } + } + if (spaceBefore && !breakBefore) { + trimLine(); + if (code.substr(-1) !== "\n") + code += " "; + } + + code += value; + + if (spaceAfter) + code += " "; + + breakBefore = false; + spaceBefore = false; + spaceAfter = false; + if ((is(token, "tag-close") && (inBlock || blockTags.indexOf(tagName) !== -1)) || (is(token, "doctype") && value === ">")) { + if (inBlock && nextToken && nextToken.value === "" && singletonTags.indexOf(tagName) === -1){ + depth--; + } + + row = curRow; + } + } + + token = nextToken; + } + + code = code.trim(); + session.doc.setValue(code); +}; + +exports.commands = [{ + name: "beautify", + description: "Format selection (Beautify)", + exec: function(editor) { + exports.beautify(editor.session); + }, + bindKey: "Ctrl-Shift-B" +}]; + +}); (function() { + window.require(["ace/ext/beautify"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/ext-elastic_tabstops_lite.js b/htdocs/includes/ace/src/ext-elastic_tabstops_lite.js similarity index 95% rename from htdocs/includes/ace/ext-elastic_tabstops_lite.js rename to htdocs/includes/ace/src/ext-elastic_tabstops_lite.js index 14e8855f1f5..855666ac9a0 100644 --- a/htdocs/includes/ace/ext-elastic_tabstops_lite.js +++ b/htdocs/includes/ace/src/ext-elastic_tabstops_lite.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { +define("ace/ext/elastic_tabstops_lite",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var ElasticTabstopsLite = function(editor) { @@ -267,8 +267,11 @@ require("../config").defineOptions(Editor.prototype, "editor", { } }); -}); - (function() { - ace.require(["ace/ext/elastic_tabstops_lite"], function() {}); +}); (function() { + window.require(["ace/ext/elastic_tabstops_lite"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-emmet.js b/htdocs/includes/ace/src/ext-emmet.js similarity index 70% rename from htdocs/includes/ace/ext-emmet.js rename to htdocs/includes/ace/src/ext-emmet.js index c2f2d1a18fa..30425a69273 100644 --- a/htdocs/includes/ace/ext-emmet.js +++ b/htdocs/includes/ace/src/ext-emmet.js @@ -1,13 +1,88 @@ -ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) { +define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var lang = require("./lib/lang"); var Range = require("./range").Range; -var Anchor = require("./anchor").Anchor; +var RangeList = require("./range_list").RangeList; var HashHandler = require("./keyboard/hash_handler").HashHandler; var Tokenizer = require("./tokenizer").Tokenizer; -var comparePoints = Range.comparePoints; +var clipboard = require("./clipboard"); + +var VARIABLES = { + CURRENT_WORD: function(editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function(editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function(editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function(editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function(editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function(editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function(editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function(editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function(editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function(editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function(editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function(editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function(editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function() { return "Unknown"; }, + FULLNAME: function() { return "Unknown"; }, + BLOCK_COMMENT_START: function(editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function(editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function(editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, {year: "numeric"}), + CURRENT_YEAR_SHORT: date.bind(null, {year: "2-digit"}), + CURRENT_MONTH: date.bind(null, {month: "numeric"}), + CURRENT_MONTH_NAME: date.bind(null, {month: "long"}), + CURRENT_MONTH_NAME_SHORT: date.bind(null, {month: "short"}), + CURRENT_DATE: date.bind(null, {day: "2-digit"}), + CURRENT_DAY_NAME: date.bind(null, {weekday: "long"}), + CURRENT_DAY_NAME_SHORT: date.bind(null, {weekday: "short"}), + CURRENT_HOUR: date.bind(null, {hour: "2-digit", hour12: false}), + CURRENT_MINUTE: date.bind(null, {minute: "2-digit"}), + CURRENT_SECOND: date.bind(null, {second: "2-digit"}) +}; + +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; + +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} var SnippetManager = function() { this.snippetMap = {}; @@ -18,41 +93,40 @@ var SnippetManager = function() { oop.implement(this, EventEmitter); this.getTokenizer = function() { - function TabstopToken(str, _, stack) { + return SnippetManager.$tokenizer || this.createTokenizer(); + }; + + this.createTokenizer = function() { + function TabstopToken(str) { str = str.substr(1); - if (/^\d+$/.test(str) && !stack.inFormatString) + if (/^\d+$/.test(str)) return [{tabstopId: parseInt(str, 10)}]; return [{text: str}]; } function escape(ch) { return "(?:[^\\\\" + ch + "]|\\\\.)"; } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + SnippetManager.$tokenizer = new Tokenizer({ start: [ - {regex: /:/, onMatch: function(val, state, stack) { - if (stack.length && stack[0].expectIf) { - stack[0].expectIf = false; - stack[0].elseBranch = stack[0]; - return [stack[0]]; - } - return ":"; - }}, {regex: /\\./, onMatch: function(val, state, stack) { var ch = val[1]; if (ch == "}" && stack.length) { val = ch; - }else if ("`$\\".indexOf(ch) != -1) { + } else if ("`$\\".indexOf(ch) != -1) { val = ch; - } else if (stack.inFormatString) { - if (ch == "n") - val = "\n"; - else if (ch == "t") - val = "\n"; - else if ("ulULE".indexOf(ch) != -1) { - val = {changeCase: ch, local: ch > "a"}; - } } - return [val]; }}, {regex: /}/, onMatch: function(val, state, stack) { @@ -60,7 +134,7 @@ var SnippetManager = function() { }}, {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { - var t = TabstopToken(str.substr(1), state, stack); + var t = TabstopToken(str.substr(1)); stack.unshift(t[0]); return t; }, next: "snippetVar"}, @@ -68,39 +142,76 @@ var SnippetManager = function() { ], snippetVar: [ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { - stack[0].choices = val.slice(1, -1).split(","); - }, next: "start"}, - {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?", - onMatch: function(val, state, stack) { - var ts = stack[0]; - ts.fmtString = val; - - val = this.splitRegex.exec(val); - ts.guard = val[1]; - ts.fmt = val[2]; - ts.flag = val[3]; - return ""; - }, next: "start"}, - {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) { - stack[0].code = val.splice(1, -1); - return ""; - }, next: "start"}, - {regex: "\\?", onMatch: function(val, state, stack) { - if (stack[0]) - stack[0].expectIf = true; + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function(operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00"); + stack[0].choices = choices; + return [choices[0]]; }, next: "start"}, + formatMatcher, {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} ], formatString: [ - {regex: "/(" + escape("/") + "+)/", token: "regex"}, - {regex: "", onMatch: function(val, state, stack) { - stack.inFormatString = true; + {regex: /:/, onMatch: function(val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = {elseEnd: stack[0]}; + return [stack[0].ifEnd]; + } + return ":"; + }}, + {regex: /\\./, onMatch: function(val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = {changeCase: ch, local: ch > "a"}; + return [val]; + }}, + {regex: "/\\w*}", onMatch: function(val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start"}, + {regex: /\$(?:\d+|\w+)/, onMatch: function(val, state, stack) { + return [{text: val.slice(1)}]; + }}, + {regex: /\${\w+/, onMatch: function(val, state, stack) { + var token = {text: val.slice(2)}; + stack.unshift(token); + return [token]; + }, next: "formatStringVar"}, + {regex: /\n/, token: "newline", merge: false}, + {regex: /}/, onMatch: function(val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; }, next: "start"} + ], + formatStringVar: [ + {regex: /:\/\w+}/, onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString"}, + formatMatcher, + {regex: /:[\?\-+]?/, onMatch: function(val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString"}, + {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString"} ] }); - SnippetManager.prototype.getTokenizer = function() { - return SnippetManager.$tokenizer; - }; return SnippetManager.$tokenizer; }; @@ -109,59 +220,33 @@ var SnippetManager = function() { return x.value || x; }); }; - - this.$getDefaultValue = function(editor, name) { - if (/^[A-Z]\d+$/.test(name)) { - var i = name.substr(1); - return (this.variables[name[0] + "__"] || {})[i]; - } - if (/^\d+$/.test(name)) { - return (this.variables.__ || {})[name]; - } + + this.getVariableValue = function(editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + name = name.replace(/^TM_/, ""); - - if (!editor) - return; - var s = editor.session; - switch(name) { - case "CURRENT_WORD": - var r = s.getWordRange(); - case "SELECTION": - case "SELECTED_TEXT": - return s.getTextRange(r); - case "CURRENT_LINE": - return s.getLine(editor.getCursorPosition().row); - case "PREV_LINE": // not possible in textmate - return s.getLine(editor.getCursorPosition().row - 1); - case "LINE_INDEX": - return editor.getCursorPosition().column; - case "LINE_NUMBER": - return editor.getCursorPosition().row + 1; - case "SOFT_TABS": - return s.getUseSoftTabs() ? "YES" : "NO"; - case "TAB_SIZE": - return s.getTabSize(); - case "FILENAME": - case "FILEPATH": - return ""; - case "FULLNAME": - return "Ace"; - } - }; - this.variables = {}; - this.getVariableValue = function(editor, varName) { - if (this.variables.hasOwnProperty(varName)) - return this.variables[varName](editor, varName) || ""; - return this.$getDefaultValue(editor, varName) || ""; + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; }; + + this.variables = VARIABLES; this.tmStrFormat = function(str, ch, editor) { + if (!ch.fmt) return str; var flag = ch.flag || ""; var re = ch.guard; - re = new RegExp(re, flag.replace(/[^gi]/, "")); - var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString"); + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; var _self = this; var formatted = str.replace(re, function() { - _self.variables.__ = arguments; + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); var fmtParts = _self.resolveVariables(fmtTokens, editor); var gChangeCase = "E"; for (var i = 0; i < fmtParts.length; i++) { @@ -186,40 +271,63 @@ var SnippetManager = function() { fmtParts[i] = ch.toLowerCase(); } } + _self.variables.__ = oldArgs; return fmtParts.join(""); }); - this.variables.__ = null; return formatted; }; + + this.tmFormatFunction = function(str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; this.resolveVariables = function(snippet, editor) { var result = []; + var indentation = ""; + var afterNewLine = true; for (var i = 0; i < snippet.length; i++) { var ch = snippet[i]; if (typeof ch == "string") { result.push(ch); - } else if (typeof ch != "object") { - continue; - } else if (ch.skip) { - gotoNext(ch); - } else if (ch.processed < i) { - continue; - } else if (ch.text) { - var value = this.getVariableValue(editor, ch.text); - if (value && ch.fmtString) - value = this.tmStrFormat(value, ch); - ch.processed = i; - if (ch.expectIf == null) { - if (value) { - result.push(value); - gotoNext(ch); - } - } else { - if (value) { - ch.skip = ch.elseBranch; - } else - gotoNext(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) continue; + afterNewLine = false; + + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } else if (ch.elseEnd) { + gotoNext(ch.elseEnd); } else if (ch.tabstopId != null) { result.push(ch); } else if (ch.changeCase != null) { @@ -263,23 +371,26 @@ var SnippetManager = function() { ts = tabstops[id] = []; ts.index = id; ts.value = ""; + ts.parents = {}; } if (ts.indexOf(p) !== -1) return; + if (p.choices && !ts.choices) + ts.choices = p.choices; ts.push(p); var i1 = tokens.indexOf(p, i + 1); if (i1 === -1) return; var value = tokens.slice(i + 1, i1); - var isNested = value.some(function(t) {return typeof t === "object"}); + var isNested = value.some(function(t) {return typeof t === "object";}); if (isNested && !ts.value) { ts.value = value; } else if (value.length && (!ts.value || typeof ts.value !== "string")) { ts.value = value.join(""); } }); - tabstops.forEach(function(ts) {ts.length = 0}); + tabstops.forEach(function(ts) {ts.length = 0;}); var expanding = {}; function copyValue(val) { var copy = []; @@ -300,19 +411,24 @@ var SnippetManager = function() { if (typeof p != "object") continue; var id = p.tabstopId; + var ts = tabstops[id]; var i1 = tokens.indexOf(p, i + 1); if (expanding[id]) { - if (expanding[id] === p) - expanding[id] = null; + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function(parentId) { + ts.parents[parentId] = true; + }); + } continue; } - - var ts = tabstops[id]; - var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value); - arg.unshift(i + 1, Math.max(0, i1 - i)); - arg.push(p); expanding[id] = p; - tokens.splice.apply(tokens, arg); + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); if (ts.indexOf(p) === -1) ts.push(p); @@ -328,7 +444,7 @@ var SnippetManager = function() { } else column += t.length; text += t; - } else { + } else if (t) { if (!t.start) t.start = {row: row, column: column}; else @@ -509,10 +625,10 @@ var SnippetManager = function() { return; s.startRe = guardedRegexp(s.trigger, s.guard, true); - s.triggerRe = new RegExp(s.trigger, "", true); + s.triggerRe = new RegExp(s.trigger); s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); - s.endTriggerRe = new RegExp(s.endTrigger, "", true); + s.endTriggerRe = new RegExp(s.endTrigger); } if (snippets && snippets.content) @@ -630,66 +746,43 @@ var TabstopManager = function(editor) { }; this.onChange = function(delta) { - var changeRange = delta; var isRemove = delta.action[0] == "r"; - var start = delta.start; - var end = delta.end; - var startRow = start.row; - var endRow = end.row; - var lineDif = endRow - startRow; - var colDiff = end.column - start.column; - - if (isRemove) { - lineDif = -lineDif; - colDiff = -colDiff; - } - if (!this.$inChange && isRemove) { - var ts = this.selectedTabstop; - var changedOutside = ts && !ts.some(function(r) { - return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; - }); - if (changedOutside) - return this.detach(); - } - var ranges = this.ranges; - for (var i = 0; i < ranges.length; i++) { - var r = ranges[i]; - if (r.end.row < start.row) - continue; - - if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { - this.removeRange(r); - i--; - continue; + var parents = this.selectedTabstop && this.selectedTabstop.parents || {}; + var tabstops = (this.tabstops || []).slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == this.selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + + if (delta.action == "remove" && ts !== this.selectedTabstop) { + var parentActive = ts.parents && ts.parents[this.selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); } - - if (r.start.row == startRow && r.start.column > start.column) - r.start.column += colDiff; - if (r.end.row == startRow && r.end.column >= start.column) - r.end.column += colDiff; - if (r.start.row >= startRow) - r.start.row += lineDif; - if (r.end.row >= startRow) - r.end.row += lineDif; - - if (comparePoints(r.start, r.end) > 0) - this.removeRange(r); + ts.rangeList.$onChange(delta); } - if (!ranges.length) + var session = this.editor.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) this.detach(); }; this.updateLinkedFields = function() { var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges) + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) return; this.$inChange = true; var session = this.editor.session; var text = session.getTextRange(ts.firstNonLinked); - for (var i = ts.length; i--;) { + for (var i = 0; i < ts.length; i++) { var range = ts[i]; if (!range.linked) continue; - var fmt = exports.snippetManager.tmStrFormat(text, range.original); + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); session.replace(range, fmt); } this.$inChange = false; @@ -704,7 +797,7 @@ var TabstopManager = function(editor) { var lead = this.editor.selection.lead; var anchor = this.editor.selection.anchor; var isEmpty = this.editor.selection.isEmpty(); - for (var i = this.ranges.length; i--;) { + for (var i = 0; i < this.ranges.length; i++) { if (this.ranges[i].linked) continue; var containsLead = this.ranges[i].contains(lead.row, lead.column); @@ -738,10 +831,11 @@ var TabstopManager = function(editor) { return; this.selectedTabstop = ts; - if (!this.editor.inVirtualSelectionMode) { + var range = ts.firstNonLinked || ts; + if (!this.editor.inVirtualSelectionMode) { var sel = this.editor.multiSelect; - sel.toSingleRange(ts.firstNonLinked.clone()); - for (var i = ts.length; i--;) { + sel.toSingleRange(range.clone()); + for (var i = 0; i < ts.length; i++) { if (ts.hasLinkedRanges && ts[i].linked) continue; sel.addRange(ts[i].clone(), true); @@ -749,12 +843,16 @@ var TabstopManager = function(editor) { if (sel.ranges[0]) sel.addRange(sel.ranges[0].clone()); } else { - this.editor.selection.setRange(ts.firstNonLinked); + this.editor.selection.setRange(range); } this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", {matches: this.selectedTabstop.choices}); }; this.addTabstops = function(tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + if (!this.$openTabstops) this.$openTabstops = []; if (!tabstops[0]) { @@ -770,8 +868,10 @@ var TabstopManager = function(editor) { var ranges = this.ranges; tabstops.forEach(function(ts, index) { var dest = this.$openTabstops[index] || ts; - - for (var i = ts.length; i--;) { + ts.rangeList = new RangeList(); + ts.rangeList.$bias = 0; + + for (var i = 0; i < ts.length; i++) { var p = ts[i]; var range = Range.fromPoints(p.start, p.end || p.start); movePoint(range.start, start); @@ -779,11 +879,12 @@ var TabstopManager = function(editor) { range.original = p; range.tabstop = dest; ranges.push(range); + ts.rangeList.ranges.push(range); if (dest != ts) dest.unshift(range); else dest[i] = range; - if (p.fmtString) { + if (p.fmtString || (dest.firstNonLinked && useLink)) { range.linked = true; dest.hasLinkedRanges = true; } else if (!dest.firstNonLinked) @@ -821,9 +922,11 @@ var TabstopManager = function(editor) { }; this.removeRange = function(range) { var i = range.tabstop.indexOf(range); - range.tabstop.splice(i, 1); + if (i != -1) range.tabstop.splice(i, 1); i = this.ranges.indexOf(range); - this.ranges.splice(i, 1); + if (i != -1) this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) range.tabstop.splice(i, 1); this.editor.session.removeMarker(range.markerId); if (!range.tabstop.length) { i = this.tabstops.indexOf(range.tabstop); @@ -857,18 +960,6 @@ var TabstopManager = function(editor) { -var changeTracker = {}; -changeTracker.onChange = Anchor.prototype.onChange; -changeTracker.setPosition = function(row, column) { - this.pos.row = row; - this.pos.column = column; -}; -changeTracker.update = function(pos, delta, $insertRight) { - this.$insertRight = $insertRight; - this.pos = pos; - this.onChange(delta); -}; - var movePoint = function(point, diff) { if (point.row == 0) point.column += diff.column; @@ -906,12 +997,13 @@ var Editor = require("./editor").Editor; }); -ace.define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","resources","resources","tabStops","resources","utils","actions","ace/config","ace/config"], function(require, exports, module) { +define("ace/ext/emmet",["require","exports","module","ace/keyboard/hash_handler","ace/editor","ace/snippets","ace/range","ace/config","resources","resources","tabStops","resources","utils","actions"], function(require, exports, module) { "use strict"; -var HashHandler = require("ace/keyboard/hash_handler").HashHandler; -var Editor = require("ace/editor").Editor; -var snippetManager = require("ace/snippets").snippetManager; -var Range = require("ace/range").Range; +var HashHandler = require("../keyboard/hash_handler").HashHandler; +var Editor = require("../editor").Editor; +var snippetManager = require("../snippets").snippetManager; +var Range = require("../range").Range; +var config = require("../config"); var emmet, emmetPath; function AceEmmetEditor() {} @@ -1019,7 +1111,7 @@ AceEmmetEditor.prototype = { } }, prompt: function(title) { - return prompt(title); + return prompt(title); // eslint-disable-line no-alert }, getSelection: function() { return this.ace.session.getTextRange(); @@ -1106,18 +1198,17 @@ var keymap = { var editorProxy = new AceEmmetEditor(); exports.commands = new HashHandler(); exports.runEmmetCommand = function runEmmetCommand(editor) { + if (this.action == "expand_abbreviation_with_tab") { + if (!editor.selection.isEmpty()) + return false; + var pos = editor.selection.lead; + var token = editor.session.getTokenAt(pos.row, pos.column); + if (token && /\btag\b/.test(token.type)) + return false; + } try { editorProxy.setupContext(editor); var actions = emmet.actions || emmet.require("actions"); - - if (this.action == "expand_abbreviation_with_tab") { - if (!editor.selection.isEmpty()) - return false; - var pos = editor.selection.lead; - var token = editor.session.getTokenAt(pos.row, pos.column); - if (token && /\btag\b/.test(token.type)) - return false; - } if (this.action == "wrap_with_abbreviation") { return setTimeout(function() { @@ -1128,11 +1219,13 @@ exports.runEmmetCommand = function runEmmetCommand(editor) { var result = actions.run(this.action, editorProxy); } catch(e) { if (!emmet) { - load(runEmmetCommand.bind(this, editor)); - return true; + var loading = exports.load(runEmmetCommand.bind(this, editor)); + if (this.action == "expand_abbreviation_with_tab") + return false; + return loading; } editor._signal("changeStatus", typeof e == "string" ? e : e.message); - console.log(e); + config.warn(e); result = false; } return result; @@ -1176,7 +1269,7 @@ exports.isAvailable = function(editor, command) { } catch(e) {} } return isSupported; -} +}; var onChangeMode = function(e, target) { var editor = target; @@ -1186,21 +1279,24 @@ var onChangeMode = function(e, target) { if (e.enableEmmet === false) enabled = false; if (enabled) - load(); + exports.load(); exports.updateCommands(editor, enabled); }; -var load = function(cb) { - if (typeof emmetPath == "string") { - require("ace/config").loadModule(emmetPath, function() { - emmetPath = null; - cb && cb(); - }); +exports.load = function(cb) { + if (typeof emmetPath !== "string") { + config.warn("script for emmet-core is not loaded"); + return false; } + config.loadModule(emmetPath, function() { + emmetPath = null; + cb && cb(); + }); + return true; }; exports.AceEmmetEditor = AceEmmetEditor; -require("ace/config").defineOptions(Editor.prototype, "editor", { +config.defineOptions(Editor.prototype, "editor", { enableEmmet: { set: function(val) { this[val ? "on" : "removeListener"]("changeMode", onChangeMode); @@ -1216,8 +1312,11 @@ exports.setCore = function(e) { else emmet = e; }; -}); - (function() { - ace.require(["ace/ext/emmet"], function() {}); +}); (function() { + window.require(["ace/ext/emmet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/src/ext-error_marker.js b/htdocs/includes/ace/src/ext-error_marker.js new file mode 100644 index 00000000000..683423d7e7c --- /dev/null +++ b/htdocs/includes/ace/src/ext-error_marker.js @@ -0,0 +1,9 @@ + +; (function() { + window.require(["ace/ext/error_marker"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/ext-keybinding_menu.js b/htdocs/includes/ace/src/ext-keybinding_menu.js similarity index 71% rename from htdocs/includes/ace/ext-keybinding_menu.js rename to htdocs/includes/ace/src/ext-keybinding_menu.js index ede7d8dbe4e..501c5f9ccad 100644 --- a/htdocs/includes/ace/ext-keybinding_menu.js +++ b/htdocs/includes/ace/src/ext-keybinding_menu.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { 'use strict'; var dom = require("../../lib/dom"); var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ @@ -22,7 +22,6 @@ color: black;\ }\ .ace_optionsMenuEntry:hover {\ background-color: rgba(100, 100, 100, 0.1);\ --webkit-transition: all 0.5s;\ transition: all 0.3s\ }\ .ace_closeButton {\ @@ -33,7 +32,7 @@ padding: 7px;\ position: absolute;\ right: -8px;\ top: -8px;\ -z-index: 1000;\ +z-index: 100000;\ }\ .ace_closeButton{\ background: rgba(245, 146, 146, 0.9);\ @@ -45,61 +44,67 @@ font-weight: bold;\ .ace_optionsMenuCommand {\ color: darkcyan;\ font-weight: normal;\ +}\ +.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ +vertical-align: middle;\ +}\ +.ace_optionsMenuEntry button[ace_selected_button=true] {\ +background: #e7e7e7;\ +box-shadow: 1px 0px 2px 0px #adadad inset;\ +border-color: #adadad;\ +}\ +.ace_optionsMenuEntry button {\ +background: white;\ +border: 1px solid lightgray;\ +margin: 0px;\ +}\ +.ace_optionsMenuEntry button:hover{\ +background: #f0f0f0;\ }"; dom.importCssString(cssText); -module.exports.overlayPage = function overlayPage(editor, contentElement, top, right, bottom, left) { - top = top ? 'top: ' + top + ';' : ''; - bottom = bottom ? 'bottom: ' + bottom + ';' : ''; - right = right ? 'right: ' + right + ';' : ''; - left = left ? 'left: ' + left + ';' : ''; +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { var closer = document.createElement('div'); - var contentContainer = document.createElement('div'); function documentEscListener(e) { if (e.keyCode === 27) { - closer.click(); + close(); } } + function close() { + if (!closer) return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + editor.focus(); + closer = null; + callback && callback(); + } + closer.style.cssText = 'margin: 0; padding: 0; ' + 'position: fixed; top:0; bottom:0; left:0; right:0;' + 'z-index: 9990; ' + 'background-color: rgba(0, 0, 0, 0.3);'; closer.addEventListener('click', function() { - document.removeEventListener('keydown', documentEscListener); - closer.parentNode.removeChild(closer); - editor.focus(); - closer = null; + close(); }); document.addEventListener('keydown', documentEscListener); - contentContainer.style.cssText = top + right + bottom + left; - contentContainer.addEventListener('click', function(e) { + contentElement.addEventListener('click', function (e) { e.stopPropagation(); }); - var wrapper = dom.createElement("div"); - wrapper.style.position = "relative"; - - var closeButton = dom.createElement("div"); - closeButton.className = "ace_closeButton"; - closeButton.addEventListener('click', function() { - closer.click(); - }); - - wrapper.appendChild(closeButton); - contentContainer.appendChild(wrapper); - - contentContainer.appendChild(contentElement); - closer.appendChild(contentContainer); + closer.appendChild(contentElement); document.body.appendChild(closer); editor.blur(); + return { + close: close + }; }; }); -ace.define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) { +define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) { "use strict"; var keys = require("../../lib/keys"); module.exports.getEditorKeybordShortcuts = function(editor) { @@ -115,7 +120,7 @@ module.exports.getEditorKeybordShortcuts = function(editor) { commands = [commands]; commands.forEach(function(command) { if (typeof command != "string") - command = command.name + command = command.name; if (commandMap[command]) { commandMap[command].key += "|" + key; } else { @@ -130,9 +135,9 @@ module.exports.getEditorKeybordShortcuts = function(editor) { }); -ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) { +define("ace/ext/keybinding_menu",["require","exports","module","ace/editor","ace/ext/menu_tools/overlay_page","ace/ext/menu_tools/get_editor_keyboard_shortcuts"], function(require, exports, module) { "use strict"; - var Editor = require("ace/editor").Editor; + var Editor = require("../editor").Editor; function showKeyboardShortcuts (editor) { if(!document.getElementById('kbshortcutmenu')) { var overlayPage = require('./menu_tools/overlay_page').overlayPage; @@ -147,7 +152,7 @@ ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor", el.id = 'kbshortcutmenu'; el.innerHTML = '

    Keyboard Shortcuts

    ' + commands + '
    '; - overlayPage(editor, el, '0', '0', '0', null); + overlayPage(editor, el); } } module.exports.init = function(editor) { @@ -163,8 +168,11 @@ ace.define("ace/ext/keybinding_menu",["require","exports","module","ace/editor", }]); }; -}); - (function() { - ace.require(["ace/ext/keybinding_menu"], function() {}); +}); (function() { + window.require(["ace/ext/keybinding_menu"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-language_tools.js b/htdocs/includes/ace/src/ext-language_tools.js similarity index 73% rename from htdocs/includes/ace/ext-language_tools.js rename to htdocs/includes/ace/src/ext-language_tools.js index 133669510d9..80af02df566 100644 --- a/htdocs/includes/ace/ext-language_tools.js +++ b/htdocs/includes/ace/src/ext-language_tools.js @@ -1,13 +1,88 @@ -ace.define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/anchor","ace/keyboard/hash_handler","ace/tokenizer","ace/lib/dom","ace/editor"], function(require, exports, module) { +define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); var EventEmitter = require("./lib/event_emitter").EventEmitter; var lang = require("./lib/lang"); var Range = require("./range").Range; -var Anchor = require("./anchor").Anchor; +var RangeList = require("./range_list").RangeList; var HashHandler = require("./keyboard/hash_handler").HashHandler; var Tokenizer = require("./tokenizer").Tokenizer; -var comparePoints = Range.comparePoints; +var clipboard = require("./clipboard"); + +var VARIABLES = { + CURRENT_WORD: function(editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function(editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function(editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function(editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function(editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function(editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function(editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function(editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function(editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function(editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function(editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function(editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function(editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function() { return "Unknown"; }, + FULLNAME: function() { return "Unknown"; }, + BLOCK_COMMENT_START: function(editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function(editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function(editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, {year: "numeric"}), + CURRENT_YEAR_SHORT: date.bind(null, {year: "2-digit"}), + CURRENT_MONTH: date.bind(null, {month: "numeric"}), + CURRENT_MONTH_NAME: date.bind(null, {month: "long"}), + CURRENT_MONTH_NAME_SHORT: date.bind(null, {month: "short"}), + CURRENT_DATE: date.bind(null, {day: "2-digit"}), + CURRENT_DAY_NAME: date.bind(null, {weekday: "long"}), + CURRENT_DAY_NAME_SHORT: date.bind(null, {weekday: "short"}), + CURRENT_HOUR: date.bind(null, {hour: "2-digit", hour12: false}), + CURRENT_MINUTE: date.bind(null, {minute: "2-digit"}), + CURRENT_SECOND: date.bind(null, {second: "2-digit"}) +}; + +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; + +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} var SnippetManager = function() { this.snippetMap = {}; @@ -18,41 +93,40 @@ var SnippetManager = function() { oop.implement(this, EventEmitter); this.getTokenizer = function() { - function TabstopToken(str, _, stack) { + return SnippetManager.$tokenizer || this.createTokenizer(); + }; + + this.createTokenizer = function() { + function TabstopToken(str) { str = str.substr(1); - if (/^\d+$/.test(str) && !stack.inFormatString) + if (/^\d+$/.test(str)) return [{tabstopId: parseInt(str, 10)}]; return [{text: str}]; } function escape(ch) { return "(?:[^\\\\" + ch + "]|\\\\.)"; } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + SnippetManager.$tokenizer = new Tokenizer({ start: [ - {regex: /:/, onMatch: function(val, state, stack) { - if (stack.length && stack[0].expectIf) { - stack[0].expectIf = false; - stack[0].elseBranch = stack[0]; - return [stack[0]]; - } - return ":"; - }}, {regex: /\\./, onMatch: function(val, state, stack) { var ch = val[1]; if (ch == "}" && stack.length) { val = ch; - }else if ("`$\\".indexOf(ch) != -1) { + } else if ("`$\\".indexOf(ch) != -1) { val = ch; - } else if (stack.inFormatString) { - if (ch == "n") - val = "\n"; - else if (ch == "t") - val = "\n"; - else if ("ulULE".indexOf(ch) != -1) { - val = {changeCase: ch, local: ch > "a"}; - } } - return [val]; }}, {regex: /}/, onMatch: function(val, state, stack) { @@ -60,7 +134,7 @@ var SnippetManager = function() { }}, {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { - var t = TabstopToken(str.substr(1), state, stack); + var t = TabstopToken(str.substr(1)); stack.unshift(t[0]); return t; }, next: "snippetVar"}, @@ -68,39 +142,76 @@ var SnippetManager = function() { ], snippetVar: [ {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { - stack[0].choices = val.slice(1, -1).split(","); - }, next: "start"}, - {regex: "/(" + escape("/") + "+)/(?:(" + escape("/") + "*)/)(\\w*):?", - onMatch: function(val, state, stack) { - var ts = stack[0]; - ts.fmtString = val; - - val = this.splitRegex.exec(val); - ts.guard = val[1]; - ts.fmt = val[2]; - ts.flag = val[3]; - return ""; - }, next: "start"}, - {regex: "`" + escape("`") + "*`", onMatch: function(val, state, stack) { - stack[0].code = val.splice(1, -1); - return ""; - }, next: "start"}, - {regex: "\\?", onMatch: function(val, state, stack) { - if (stack[0]) - stack[0].expectIf = true; + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function(operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00"); + stack[0].choices = choices; + return [choices[0]]; }, next: "start"}, + formatMatcher, {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} ], formatString: [ - {regex: "/(" + escape("/") + "+)/", token: "regex"}, - {regex: "", onMatch: function(val, state, stack) { - stack.inFormatString = true; + {regex: /:/, onMatch: function(val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = {elseEnd: stack[0]}; + return [stack[0].ifEnd]; + } + return ":"; + }}, + {regex: /\\./, onMatch: function(val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = {changeCase: ch, local: ch > "a"}; + return [val]; + }}, + {regex: "/\\w*}", onMatch: function(val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start"}, + {regex: /\$(?:\d+|\w+)/, onMatch: function(val, state, stack) { + return [{text: val.slice(1)}]; + }}, + {regex: /\${\w+/, onMatch: function(val, state, stack) { + var token = {text: val.slice(2)}; + stack.unshift(token); + return [token]; + }, next: "formatStringVar"}, + {regex: /\n/, token: "newline", merge: false}, + {regex: /}/, onMatch: function(val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; }, next: "start"} + ], + formatStringVar: [ + {regex: /:\/\w+}/, onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString"}, + formatMatcher, + {regex: /:[\?\-+]?/, onMatch: function(val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString"}, + {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString"} ] }); - SnippetManager.prototype.getTokenizer = function() { - return SnippetManager.$tokenizer; - }; return SnippetManager.$tokenizer; }; @@ -109,59 +220,33 @@ var SnippetManager = function() { return x.value || x; }); }; - - this.$getDefaultValue = function(editor, name) { - if (/^[A-Z]\d+$/.test(name)) { - var i = name.substr(1); - return (this.variables[name[0] + "__"] || {})[i]; - } - if (/^\d+$/.test(name)) { - return (this.variables.__ || {})[name]; - } + + this.getVariableValue = function(editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + name = name.replace(/^TM_/, ""); - - if (!editor) - return; - var s = editor.session; - switch(name) { - case "CURRENT_WORD": - var r = s.getWordRange(); - case "SELECTION": - case "SELECTED_TEXT": - return s.getTextRange(r); - case "CURRENT_LINE": - return s.getLine(editor.getCursorPosition().row); - case "PREV_LINE": // not possible in textmate - return s.getLine(editor.getCursorPosition().row - 1); - case "LINE_INDEX": - return editor.getCursorPosition().column; - case "LINE_NUMBER": - return editor.getCursorPosition().row + 1; - case "SOFT_TABS": - return s.getUseSoftTabs() ? "YES" : "NO"; - case "TAB_SIZE": - return s.getTabSize(); - case "FILENAME": - case "FILEPATH": - return ""; - case "FULLNAME": - return "Ace"; - } - }; - this.variables = {}; - this.getVariableValue = function(editor, varName) { - if (this.variables.hasOwnProperty(varName)) - return this.variables[varName](editor, varName) || ""; - return this.$getDefaultValue(editor, varName) || ""; + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; }; + + this.variables = VARIABLES; this.tmStrFormat = function(str, ch, editor) { + if (!ch.fmt) return str; var flag = ch.flag || ""; var re = ch.guard; - re = new RegExp(re, flag.replace(/[^gi]/, "")); - var fmtTokens = this.tokenizeTmSnippet(ch.fmt, "formatString"); + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; var _self = this; var formatted = str.replace(re, function() { - _self.variables.__ = arguments; + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); var fmtParts = _self.resolveVariables(fmtTokens, editor); var gChangeCase = "E"; for (var i = 0; i < fmtParts.length; i++) { @@ -186,40 +271,63 @@ var SnippetManager = function() { fmtParts[i] = ch.toLowerCase(); } } + _self.variables.__ = oldArgs; return fmtParts.join(""); }); - this.variables.__ = null; return formatted; }; + + this.tmFormatFunction = function(str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; this.resolveVariables = function(snippet, editor) { var result = []; + var indentation = ""; + var afterNewLine = true; for (var i = 0; i < snippet.length; i++) { var ch = snippet[i]; if (typeof ch == "string") { result.push(ch); - } else if (typeof ch != "object") { - continue; - } else if (ch.skip) { - gotoNext(ch); - } else if (ch.processed < i) { - continue; - } else if (ch.text) { - var value = this.getVariableValue(editor, ch.text); - if (value && ch.fmtString) - value = this.tmStrFormat(value, ch); - ch.processed = i; - if (ch.expectIf == null) { - if (value) { - result.push(value); - gotoNext(ch); - } - } else { - if (value) { - ch.skip = ch.elseBranch; - } else - gotoNext(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) continue; + afterNewLine = false; + + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } else if (ch.elseEnd) { + gotoNext(ch.elseEnd); } else if (ch.tabstopId != null) { result.push(ch); } else if (ch.changeCase != null) { @@ -263,23 +371,26 @@ var SnippetManager = function() { ts = tabstops[id] = []; ts.index = id; ts.value = ""; + ts.parents = {}; } if (ts.indexOf(p) !== -1) return; + if (p.choices && !ts.choices) + ts.choices = p.choices; ts.push(p); var i1 = tokens.indexOf(p, i + 1); if (i1 === -1) return; var value = tokens.slice(i + 1, i1); - var isNested = value.some(function(t) {return typeof t === "object"}); + var isNested = value.some(function(t) {return typeof t === "object";}); if (isNested && !ts.value) { ts.value = value; } else if (value.length && (!ts.value || typeof ts.value !== "string")) { ts.value = value.join(""); } }); - tabstops.forEach(function(ts) {ts.length = 0}); + tabstops.forEach(function(ts) {ts.length = 0;}); var expanding = {}; function copyValue(val) { var copy = []; @@ -300,19 +411,24 @@ var SnippetManager = function() { if (typeof p != "object") continue; var id = p.tabstopId; + var ts = tabstops[id]; var i1 = tokens.indexOf(p, i + 1); if (expanding[id]) { - if (expanding[id] === p) - expanding[id] = null; + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function(parentId) { + ts.parents[parentId] = true; + }); + } continue; } - - var ts = tabstops[id]; - var arg = typeof ts.value == "string" ? [ts.value] : copyValue(ts.value); - arg.unshift(i + 1, Math.max(0, i1 - i)); - arg.push(p); expanding[id] = p; - tokens.splice.apply(tokens, arg); + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); if (ts.indexOf(p) === -1) ts.push(p); @@ -328,7 +444,7 @@ var SnippetManager = function() { } else column += t.length; text += t; - } else { + } else if (t) { if (!t.start) t.start = {row: row, column: column}; else @@ -509,10 +625,10 @@ var SnippetManager = function() { return; s.startRe = guardedRegexp(s.trigger, s.guard, true); - s.triggerRe = new RegExp(s.trigger, "", true); + s.triggerRe = new RegExp(s.trigger); s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); - s.endTriggerRe = new RegExp(s.endTrigger, "", true); + s.endTriggerRe = new RegExp(s.endTrigger); } if (snippets && snippets.content) @@ -630,66 +746,43 @@ var TabstopManager = function(editor) { }; this.onChange = function(delta) { - var changeRange = delta; var isRemove = delta.action[0] == "r"; - var start = delta.start; - var end = delta.end; - var startRow = start.row; - var endRow = end.row; - var lineDif = endRow - startRow; - var colDiff = end.column - start.column; - - if (isRemove) { - lineDif = -lineDif; - colDiff = -colDiff; - } - if (!this.$inChange && isRemove) { - var ts = this.selectedTabstop; - var changedOutside = ts && !ts.some(function(r) { - return comparePoints(r.start, start) <= 0 && comparePoints(r.end, end) >= 0; - }); - if (changedOutside) - return this.detach(); - } - var ranges = this.ranges; - for (var i = 0; i < ranges.length; i++) { - var r = ranges[i]; - if (r.end.row < start.row) - continue; - - if (isRemove && comparePoints(start, r.start) < 0 && comparePoints(end, r.end) > 0) { - this.removeRange(r); - i--; - continue; + var parents = this.selectedTabstop && this.selectedTabstop.parents || {}; + var tabstops = (this.tabstops || []).slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == this.selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + + if (delta.action == "remove" && ts !== this.selectedTabstop) { + var parentActive = ts.parents && ts.parents[this.selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); } - - if (r.start.row == startRow && r.start.column > start.column) - r.start.column += colDiff; - if (r.end.row == startRow && r.end.column >= start.column) - r.end.column += colDiff; - if (r.start.row >= startRow) - r.start.row += lineDif; - if (r.end.row >= startRow) - r.end.row += lineDif; - - if (comparePoints(r.start, r.end) > 0) - this.removeRange(r); + ts.rangeList.$onChange(delta); } - if (!ranges.length) + var session = this.editor.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) this.detach(); }; this.updateLinkedFields = function() { var ts = this.selectedTabstop; - if (!ts || !ts.hasLinkedRanges) + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) return; this.$inChange = true; var session = this.editor.session; var text = session.getTextRange(ts.firstNonLinked); - for (var i = ts.length; i--;) { + for (var i = 0; i < ts.length; i++) { var range = ts[i]; if (!range.linked) continue; - var fmt = exports.snippetManager.tmStrFormat(text, range.original); + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); session.replace(range, fmt); } this.$inChange = false; @@ -704,7 +797,7 @@ var TabstopManager = function(editor) { var lead = this.editor.selection.lead; var anchor = this.editor.selection.anchor; var isEmpty = this.editor.selection.isEmpty(); - for (var i = this.ranges.length; i--;) { + for (var i = 0; i < this.ranges.length; i++) { if (this.ranges[i].linked) continue; var containsLead = this.ranges[i].contains(lead.row, lead.column); @@ -738,10 +831,11 @@ var TabstopManager = function(editor) { return; this.selectedTabstop = ts; - if (!this.editor.inVirtualSelectionMode) { + var range = ts.firstNonLinked || ts; + if (!this.editor.inVirtualSelectionMode) { var sel = this.editor.multiSelect; - sel.toSingleRange(ts.firstNonLinked.clone()); - for (var i = ts.length; i--;) { + sel.toSingleRange(range.clone()); + for (var i = 0; i < ts.length; i++) { if (ts.hasLinkedRanges && ts[i].linked) continue; sel.addRange(ts[i].clone(), true); @@ -749,12 +843,16 @@ var TabstopManager = function(editor) { if (sel.ranges[0]) sel.addRange(sel.ranges[0].clone()); } else { - this.editor.selection.setRange(ts.firstNonLinked); + this.editor.selection.setRange(range); } this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", {matches: this.selectedTabstop.choices}); }; this.addTabstops = function(tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + if (!this.$openTabstops) this.$openTabstops = []; if (!tabstops[0]) { @@ -770,8 +868,10 @@ var TabstopManager = function(editor) { var ranges = this.ranges; tabstops.forEach(function(ts, index) { var dest = this.$openTabstops[index] || ts; - - for (var i = ts.length; i--;) { + ts.rangeList = new RangeList(); + ts.rangeList.$bias = 0; + + for (var i = 0; i < ts.length; i++) { var p = ts[i]; var range = Range.fromPoints(p.start, p.end || p.start); movePoint(range.start, start); @@ -779,11 +879,12 @@ var TabstopManager = function(editor) { range.original = p; range.tabstop = dest; ranges.push(range); + ts.rangeList.ranges.push(range); if (dest != ts) dest.unshift(range); else dest[i] = range; - if (p.fmtString) { + if (p.fmtString || (dest.firstNonLinked && useLink)) { range.linked = true; dest.hasLinkedRanges = true; } else if (!dest.firstNonLinked) @@ -821,9 +922,11 @@ var TabstopManager = function(editor) { }; this.removeRange = function(range) { var i = range.tabstop.indexOf(range); - range.tabstop.splice(i, 1); + if (i != -1) range.tabstop.splice(i, 1); i = this.ranges.indexOf(range); - this.ranges.splice(i, 1); + if (i != -1) this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) range.tabstop.splice(i, 1); this.editor.session.removeMarker(range.markerId); if (!range.tabstop.length) { i = this.tabstops.indexOf(range.tabstop); @@ -857,18 +960,6 @@ var TabstopManager = function(editor) { -var changeTracker = {}; -changeTracker.onChange = Anchor.prototype.onChange; -changeTracker.setPosition = function(row, column) { - this.pos.row = row; - this.pos.column = column; -}; -changeTracker.update = function(pos, delta, $insertRight) { - this.$insertRight = $insertRight; - this.pos = pos; - this.onChange(delta); -}; - var movePoint = function(point, diff) { if (point.row == 0) point.column += diff.column; @@ -906,7 +997,7 @@ var Editor = require("./editor").Editor; }); -ace.define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) { +define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) { "use strict"; var Renderer = require("../virtual_renderer").VirtualRenderer; @@ -928,7 +1019,7 @@ var $singleLineEditor = function(el) { editor.renderer.setShowGutter(false); editor.renderer.setHighlightGutterLine(false); - editor.$mouseHandler.$focusWaitTimout = 0; + editor.$mouseHandler.$focusTimeout = 0; editor.$highlightTagPending = true; return editor; @@ -1012,15 +1103,13 @@ var AcePopup = function(parentNode) { var row = popup.getRow(); var t = popup.renderer.$textLayer; var selected = t.element.childNodes[row - t.config.firstRow]; - if (selected == t.selectedNode) - return; - if (t.selectedNode) + if (selected !== t.selectedNode && t.selectedNode) dom.removeCssClass(t.selectedNode, "ace_selected"); t.selectedNode = selected; if (selected) dom.addCssClass(selected, "ace_selected"); }); - var hideHoverMarker = function() { setHoverMarker(-1) }; + var hideHoverMarker = function() { setHoverMarker(-1); }; var setHoverMarker = function(row, suppressRedraw) { if (row !== hoverMarker.start.row) { hoverMarker.start.row = hoverMarker.end.row = row; @@ -1055,30 +1144,37 @@ var AcePopup = function(parentNode) { return tokens; if (typeof data == "string") data = {value: data}; - if (!data.caption) - data.caption = data.value || data.name; + var caption = data.caption || data.value || data.name; - var last = -1; - var flag, c; - for (var i = 0; i < data.caption.length; i++) { - c = data.caption[i]; - flag = data.matchMask & (1 << i) ? 1 : 0; - if (last !== flag) { - tokens.push({type: data.className || "" + ( flag ? "completion-highlight" : ""), value: c}); - last = flag; - } else { - tokens[tokens.length - 1].value += c; + function addToken(value, className) { + value && tokens.push({ + type: (data.className || "") + (className || ""), + value: value + }); + } + + var lower = caption.toLowerCase(); + var filterText = (popup.filterText || "").toLowerCase(); + var lastIndex = 0; + var lastI = 0; + for (var i = 0; i <= filterText.length; i++) { + if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) { + var sub = filterText.slice(lastI, i); + lastI = i; + var index = lower.indexOf(sub, lastIndex); + if (index == -1) continue; + addToken(caption.slice(lastIndex, index), ""); + lastIndex = index + sub.length; + addToken(caption.slice(index, lastIndex), "completion-highlight"); } } + addToken(caption.slice(lastIndex, caption.length), ""); + + if (data.meta) + tokens.push({type: "completion-meta", value: data.meta}); + if (data.message) + tokens.push({type: "completion-message", value: data.message}); - if (data.meta) { - var maxW = popup.renderer.$size.scrollerWidth / popup.renderer.layerConfig.characterWidth; - var metaData = data.meta; - if (metaData.length + data.caption.length > maxW - 2) { - metaData = metaData.substr(0, maxW - data.caption.length - 3) + "\u2026" - } - tokens.push({type: "rightAlignedText", value: metaData}); - } return tokens; }; bgTokenizer.$updateOnChange = noop; @@ -1087,14 +1183,14 @@ var AcePopup = function(parentNode) { popup.session.$computeWidth = function() { return this.screenWidth = 0; }; - - popup.$blockScrolling = Infinity; popup.isOpen = false; popup.isTopdown = false; popup.autoSelect = true; + popup.filterText = ""; popup.data = []; - popup.setData = function(list) { + popup.setData = function(list, filterText) { + popup.filterText = filterText || ""; popup.setValue(lang.stringRepeat("\n", list.length), -1); popup.data = list || []; popup.setRow(0); @@ -1151,7 +1247,6 @@ var AcePopup = function(parentNode) { } el.style.display = ""; - this.renderer.$textLayer.checkForSizeChanges(); var left = pos.left; if (left + el.offsetWidth > screenWidth) @@ -1164,6 +1259,21 @@ var AcePopup = function(parentNode) { popup.isOpen = true; }; + popup.goTo = function(where) { + var row = this.getRow(); + var max = this.session.getLength() - 1; + + switch(where) { + case "up": row = row <= 0 ? max : row - 1; break; + case "down": row = row >= max ? -1 : row + 1; break; + case "start": row = 0; break; + case "end": row = max; break; + } + + this.setRow(row); + }; + + popup.getTextLeftOffset = function() { return this.$borderSize + this.renderer.$padding + this.$imageSize; }; @@ -1179,48 +1289,56 @@ dom.importCssString("\ background-color: #CAD6FA;\ z-index: 1;\ }\ +.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ + background-color: #3a674e;\ +}\ .ace_editor.ace_autocomplete .ace_line-hover {\ border: 1px solid #abbffe;\ margin-top: -1px;\ background: rgba(233,233,253,0.4);\ -}\ -.ace_editor.ace_autocomplete .ace_line-hover {\ position: absolute;\ z-index: 2;\ }\ -.ace_editor.ace_autocomplete .ace_scroller {\ - background: none;\ - border: none;\ - box-shadow: none;\ +.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\ + border: 1px solid rgba(109, 150, 13, 0.8);\ + background: rgba(58, 103, 78, 0.62);\ }\ -.ace_rightAlignedText {\ - color: gray;\ - display: inline-block;\ - position: absolute;\ - right: 4px;\ - text-align: right;\ - z-index: -1;\ +.ace_completion-meta {\ + opacity: 0.5;\ + margin: 0.9em;\ +}\ +.ace_completion-message {\ + color: blue;\ }\ .ace_editor.ace_autocomplete .ace_completion-highlight{\ - color: #000;\ - text-shadow: 0 0 0.01em;\ + color: #2d69c7;\ +}\ +.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\ + color: #93ca12;\ }\ .ace_editor.ace_autocomplete {\ - width: 280px;\ + width: 300px;\ z-index: 200000;\ - background: #fbfbfb;\ - color: #444;\ border: 1px lightgray solid;\ position: fixed;\ box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ line-height: 1.4;\ -}"); + background: #fefefe;\ + color: #111;\ +}\ +.ace_dark.ace_editor.ace_autocomplete {\ + border: 1px #484747 solid;\ + box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\ + line-height: 1.4;\ + background: #25282c;\ + color: #c1c1c1;\ +}", "autocompletion.css"); exports.AcePopup = AcePopup; - +exports.$singleLineEditor = $singleLineEditor; }); -ace.define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) { +define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) { "use strict"; exports.parForEach = function(array, fn, callback) { @@ -1280,16 +1398,16 @@ exports.getCompletionPrefix = function (editor) { }); -ace.define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/event","ace/lib/lang","ace/lib/dom","ace/snippets"], function(require, exports, module) { +define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"], function(require, exports, module) { "use strict"; var HashHandler = require("./keyboard/hash_handler").HashHandler; var AcePopup = require("./autocomplete/popup").AcePopup; var util = require("./autocomplete/util"); -var event = require("./lib/event"); var lang = require("./lib/lang"); var dom = require("./lib/dom"); var snippetManager = require("./snippets").snippetManager; +var config = require("./config"); var Autocomplete = function() { this.autoInsert = false; @@ -1334,9 +1452,9 @@ var Autocomplete = function() { if (!this.popup) this.$init(); - this.popup.autoSelect = this.autoSelect; + this.popup.autoSelect = this.autoSelect; - this.popup.setData(this.completions.filtered); + this.popup.setData(this.completions.filtered, this.completions.filterText); editor.keyBinding.addKeyboardHandler(this.keyboardHandler); @@ -1413,17 +1531,7 @@ var Autocomplete = function() { }; this.goTo = function(where) { - var row = this.popup.getRow(); - var max = this.popup.session.getLength() - 1; - - switch(where) { - case "up": row = row <= 0 ? max : row - 1; break; - case "down": row = row >= max ? -1 : row + 1; break; - case "start": row = 0; break; - case "end": row = max; break; - } - - this.popup.setRow(row); + this.popup.goTo(where); }; this.insertMatch = function(data, options) { @@ -1497,7 +1605,7 @@ var Autocomplete = function() { return true; }; - this.showPopup = function(editor) { + this.showPopup = function(editor, options) { if (this.editor) this.detach(); @@ -1515,10 +1623,10 @@ var Autocomplete = function() { editor.on("mousedown", this.mousedownListener); editor.on("mousewheel", this.mousewheelListener); - this.updateCompletions(); + this.updateCompletions(false, options); }; - this.updateCompletions = function(keepPopupPosition) { + this.updateCompletions = function(keepPopupPosition, options) { if (keepPopupPosition && this.base && this.completions) { var pos = this.editor.getCursorPosition(); var prefix = this.editor.session.getTextRange({start: this.base, end: pos}); @@ -1534,6 +1642,14 @@ var Autocomplete = function() { this.openPopup(this.editor, prefix, keepPopupPosition); return; } + + if (options && options.matches) { + var pos = this.editor.getSelectionRange().start; + this.base = this.editor.session.doc.createAnchor(pos.row, pos.column); + this.base.$insertRight = true; + this.completions = new FilteredList(options.matches); + return this.openPopup(this.editor, "", keepPopupPosition); + } var _id = this.gatherCompletionsId; this.gatherCompletions(this.editor, function(err, results) { var detachIfFinished = function() { @@ -1583,7 +1699,7 @@ var Autocomplete = function() { doc = completer.getDocTooltip(selected); return doc; }); - if (!doc) + if (!doc && typeof selected != "string") doc = selected; if (typeof doc == "string") @@ -1618,14 +1734,28 @@ var Autocomplete = function() { tooltipNode.style.top = popup.container.style.top; tooltipNode.style.bottom = popup.container.style.bottom; + tooltipNode.style.display = "block"; if (window.innerWidth - rect.right < 320) { - tooltipNode.style.right = window.innerWidth - rect.left + "px"; - tooltipNode.style.left = ""; + if (rect.left < 320) { + if(popup.isTopdown) { + tooltipNode.style.top = rect.bottom + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } else { + tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + } else { + tooltipNode.style.right = window.innerWidth - rect.left + "px"; + tooltipNode.style.left = ""; + } } else { tooltipNode.style.left = (rect.right + 1) + "px"; tooltipNode.style.right = ""; } - tooltipNode.style.display = "block"; }; this.hideDocTooltip = function() { @@ -1649,19 +1779,49 @@ var Autocomplete = function() { } a = a.parentNode; } - } + }; + + this.destroy = function() { + this.detach(); + if (this.popup) { + this.popup.destroy(); + var el = this.popup.container; + if (el && el.parentNode) + el.parentNode.removeChild(el); + } + if (this.editor && this.editor.completer == this) + this.editor.completer == null; + this.popup = null; + }; }).call(Autocomplete.prototype); + +Autocomplete.for = function(editor) { + if (editor.completer) { + return editor.completer; + } + if (config.get("sharedPopups")) { + if (!Autocomplete.$shared) + Autocomplete.$sharedInstance = new Autocomplete(); + editor.completer = Autocomplete.$sharedInstance; + } else { + editor.completer = new Autocomplete(); + editor.once("destroy", function(e, editor) { + editor.completer.destroy(); + }); + } + return editor.completer; +}; + Autocomplete.startCommand = { name: "startAutocomplete", - exec: function(editor) { - if (!editor.completer) - editor.completer = new Autocomplete(); - editor.completer.autoInsert = false; - editor.completer.autoSelect = true; - editor.completer.showPopup(editor); - editor.completer.cancelContextMenu(); + exec: function(editor, options) { + var completer = Autocomplete.for(editor); + completer.autoInsert = false; + completer.autoSelect = true; + completer.showPopup(editor, options); + completer.cancelContextMenu(); }, bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" }; @@ -1682,7 +1842,8 @@ var FilteredList = function(array, filterText) { this.filterText = str; matches = this.filterCompletions(matches, this.filterText); matches = matches.sort(function(a, b) { - return b.exactMatch - a.exactMatch || b.score - a.score; + return b.exactMatch - a.exactMatch || b.$score - a.$score + || (a.caption || a.value).localeCompare(b.caption || b.value); }); var prev = null; matches = matches.filter(function(item){ @@ -1699,7 +1860,7 @@ var FilteredList = function(array, filterText) { var upper = needle.toUpperCase(); var lower = needle.toLowerCase(); loop: for (var i = 0, item; item = items[i]; i++) { - var caption = item.value || item.caption || item.snippet; + var caption = item.caption || item.value || item.snippet; if (!caption) continue; var lastIndex = -1; var matchMask = 0; @@ -1709,26 +1870,31 @@ var FilteredList = function(array, filterText) { if (this.exactMatch) { if (needle !== caption.substr(0, needle.length)) continue loop; - }else{ - for (var j = 0; j < needle.length; j++) { - var i1 = caption.indexOf(lower[j], lastIndex + 1); - var i2 = caption.indexOf(upper[j], lastIndex + 1); - index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; - if (index < 0) - continue loop; - distance = index - lastIndex - 1; - if (distance > 0) { - if (lastIndex === -1) - penalty += 10; - penalty += distance; + } else { + var fullMatchIndex = caption.toLowerCase().indexOf(lower); + if (fullMatchIndex > -1) { + penalty = fullMatchIndex; + } else { + for (var j = 0; j < needle.length; j++) { + var i1 = caption.indexOf(lower[j], lastIndex + 1); + var i2 = caption.indexOf(upper[j], lastIndex + 1); + index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; + if (index < 0) + continue loop; + distance = index - lastIndex - 1; + if (distance > 0) { + if (lastIndex === -1) + penalty += 10; + penalty += distance; + matchMask = matchMask | (1 << j); + } + lastIndex = index; } - matchMask = matchMask | (1 << index); - lastIndex = index; } } item.matchMask = matchMask; item.exactMatch = penalty ? 0 : 1; - item.score = (item.score || 0) - penalty; + item.$score = (item.score || 0) - penalty; results.push(item); } return results; @@ -1740,7 +1906,7 @@ exports.FilteredList = FilteredList; }); -ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/autocomplete/text_completer",["require","exports","module","ace/range"], function(require, exports, module) { var Range = require("../range").Range; var splitRegex = /[^a-zA-Z_0-9\$\-\u00C0-\u1FFF\u2C00-\uD7FF\w]+/; @@ -1771,7 +1937,7 @@ ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/ } exports.getCompletions = function(editor, session, pos, prefix, callback) { - var wordScore = wordDistance(session, pos, prefix); + var wordScore = wordDistance(session, pos); var wordList = Object.keys(wordScore); callback(null, wordList.map(function(word) { return { @@ -1784,7 +1950,7 @@ ace.define("ace/autocomplete/text_completer",["require","exports","module","ace/ }; }); -ace.define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) { +define("ace/ext/language_tools",["require","exports","module","ace/snippets","ace/autocomplete","ace/config","ace/lib/lang","ace/autocomplete/util","ace/autocomplete/text_completer","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var snippetManager = require("../snippets").snippetManager; @@ -1807,9 +1973,16 @@ var keyWordCompleter = { var snippetCompleter = { getCompletions: function(editor, session, pos, prefix, callback) { + var scopes = []; + var token = session.getTokenAt(pos.row, pos.column); + if (token && token.type.match(/(tag-name|tag-open|tag-whitespace|attribute-name|attribute-value)\.xml$/)) + scopes.push('html-tag'); + else + scopes = snippetManager.getActiveScopes(editor); + var snippetMap = snippetManager.snippetMap; var completions = []; - snippetManager.getActiveScopes(editor).forEach(function(scope) { + scopes.forEach(function(scope) { var snippets = snippetMap[scope] || []; for (var i = snippets.length; i--;) { var s = snippets[i]; @@ -1900,11 +2073,9 @@ var doLiveAutocomplete = function(e) { else if (e.command.name === "insertstring") { var prefix = util.getCompletionPrefix(editor); if (prefix && !hasCompleter) { - if (!editor.completer) { - editor.completer = new Autocomplete(); - } - editor.completer.autoInsert = false; - editor.completer.showPopup(editor); + var completer = Autocomplete.for(editor); + completer.autoInsert = false; + completer.showPopup(editor); } } }; @@ -1949,8 +2120,11 @@ require("../config").defineOptions(Editor.prototype, "editor", { value: false } }); -}); - (function() { - ace.require(["ace/ext/language_tools"], function() {}); +}); (function() { + window.require(["ace/ext/language_tools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-linking.js b/htdocs/includes/ace/src/ext-linking.js similarity index 76% rename from htdocs/includes/ace/ext-linking.js rename to htdocs/includes/ace/src/ext-linking.js index baa7570254d..147efe94299 100644 --- a/htdocs/includes/ace/ext-linking.js +++ b/htdocs/includes/ace/src/ext-linking.js @@ -1,6 +1,6 @@ -ace.define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { +define("ace/ext/linking",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { -var Editor = require("ace/editor").Editor; +var Editor = require("../editor").Editor; require("../config").defineOptions(Editor.prototype, "editor", { enableLinking: { @@ -15,7 +15,7 @@ require("../config").defineOptions(Editor.prototype, "editor", { }, value: false } -}) +}); exports.previousLinkingHover = false; @@ -54,8 +54,11 @@ function onClick(e) { } } -}); - (function() { - ace.require(["ace/ext/linking"], function() {}); +}); (function() { + window.require(["ace/ext/linking"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-modelist.js b/htdocs/includes/ace/src/ext-modelist.js similarity index 78% rename from htdocs/includes/ace/ext-modelist.js rename to htdocs/includes/ace/src/ext-modelist.js index b0c7fd0dba0..0032ecd178f 100644 --- a/htdocs/includes/ace/ext-modelist.js +++ b/htdocs/includes/ace/src/ext-modelist.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { "use strict"; var modes = []; @@ -41,18 +41,24 @@ var supportedModes = { ADA: ["ada|adb"], Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl"], Assembly_x86:["asm|a"], AutoHotKey: ["ahk"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], BatchFile: ["bat|cmd"], - Bro: ["bro"], C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], C9Search: ["c9search_results"], + Crystal: ["cr"], Cirru: ["cirru|cr"], Clojure: ["clj|cljs"], Cobol: ["CBL|COB"], coffee: ["coffee|cf|cson|^Cakefile"], ColdFusion: ["cfm"], CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], CSS: ["css"], Curly: ["curly"], D: ["d|di"], @@ -61,8 +67,7 @@ var supportedModes = { Dockerfile: ["^Dockerfile"], Dot: ["dot"], Drools: ["drl"], - Dummy: ["dummy"], - DummySyntax: ["dummy"], + Edifact: ["edi"], Eiffel: ["e|ge"], EJS: ["ejs"], Elixir: ["ex|exs"], @@ -70,6 +75,8 @@ var supportedModes = { Erlang: ["erl|hrl"], Forth: ["frt|fs|ldr|fth|4th"], Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], FTL: ["ftl"], Gcode: ["gcode"], Gherkin: ["feature"], @@ -82,10 +89,10 @@ var supportedModes = { HAML: ["haml"], Handlebars: ["hbs|handlebars|tpl|mustache"], Haskell: ["hs"], - Haskell_Cabal: ["cabal"], + Haskell_Cabal: ["cabal"], haXe: ["hx"], Hjson: ["hjson"], - HTML: ["html|htm|xhtml"], + HTML: ["html|htm|xhtml|vue|we|wpy"], HTML_Elixir: ["eex|html.eex"], HTML_Ruby: ["erb|rhtml|html.erb"], INI: ["ini|conf|cfg|prefs"], @@ -97,6 +104,7 @@ var supportedModes = { JSON: ["json"], JSONiq: ["jq"], JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], JSX: ["jsx"], Julia: ["jl"], Kotlin: ["kt|kts"], @@ -116,16 +124,22 @@ var supportedModes = { MATLAB: ["matlab"], Maze: ["mz"], MEL: ["mel"], + MIXAL: ["mixal"], MUSHCode: ["mc|mush"], MySQL: ["mysql"], + Nginx: ["nginx|conf"], Nix: ["nix"], + Nim: ["nim"], NSIS: ["nsi|nsh"], ObjectiveC: ["m|mm"], OCaml: ["ml|mli"], Pascal: ["pas|p"], Perl: ["pl|pm"], + Perl6: ["p6|pl6|pm6"], pgSQL: ["pgsql"], - PHP: ["php|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + PHP_Laravel_blade: ["blade.php"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + Puppet: ["epp|pp"], Pig: ["pig"], Powershell: ["ps1"], Praat: ["praat|praatscript|psc|proc"], @@ -136,17 +150,19 @@ var supportedModes = { R: ["r"], Razor: ["cshtml|asp"], RDoc: ["Rd"], + Red: ["red|reds"], RHTML: ["Rhtml"], RST: ["rst"], Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], Rust: ["rs"], SASS: ["sass"], SCAD: ["scad"], - Scala: ["scala"], + Scala: ["scala|sbt"], Scheme: ["scm|sm|rkt|oak|scheme"], SCSS: ["scss"], SH: ["sh|bash|^.bashrc"], SJS: ["sjs"], + Slim: ["slim|skim"], Smarty: ["smarty|tpl"], snippets: ["snippets"], Soy_Template:["soy"], @@ -157,22 +173,25 @@ var supportedModes = { SVG: ["svg"], Swift: ["swift"], Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], Tex: ["tex"], Text: ["txt"], Textile: ["textile"], Toml: ["toml"], TSX: ["tsx"], - Twig: ["twig|swig"], + Twig: ["latte|twig|swig"], Typescript: ["ts|typescript|str"], Vala: ["vala"], VBScript: ["vbs|vb"], Velocity: ["vm"], Verilog: ["v|vh|sv|svh"], VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], Wollok: ["wlk|wpgm|wtest"], XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], XQuery: ["xq"], YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], Django: ["html"] }; @@ -181,10 +200,16 @@ var nameOverrides = { CSharp: "C#", golang: "Go", C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", coffee: "CoffeeScript", HTML_Ruby: "HTML (Ruby)", HTML_Elixir: "HTML (Elixir)", - FTL: "FreeMarker" + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" }; var modesByName = {}; for (var name in supportedModes) { @@ -202,8 +227,11 @@ module.exports = { modesByName: modesByName }; -}); - (function() { - ace.require(["ace/ext/modelist"], function() {}); +}); (function() { + window.require(["ace/ext/modelist"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/src/ext-options.js b/htdocs/includes/ace/src/ext-options.js new file mode 100644 index 00000000000..e01961df4ed --- /dev/null +++ b/htdocs/includes/ace/src/ext-options.js @@ -0,0 +1,751 @@ +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +'use strict'; +var dom = require("../../lib/dom"); +var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ +background-color: #F7F7F7;\ +color: black;\ +box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ +padding: 1em 0.5em 2em 1em;\ +overflow: auto;\ +position: absolute;\ +margin: 0;\ +bottom: 0;\ +right: 0;\ +top: 0;\ +z-index: 9991;\ +cursor: default;\ +}\ +.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ +box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ +background-color: rgba(255, 255, 255, 0.6);\ +color: black;\ +}\ +.ace_optionsMenuEntry:hover {\ +background-color: rgba(100, 100, 100, 0.1);\ +transition: all 0.3s\ +}\ +.ace_closeButton {\ +background: rgba(245, 146, 146, 0.5);\ +border: 1px solid #F48A8A;\ +border-radius: 50%;\ +padding: 7px;\ +position: absolute;\ +right: -8px;\ +top: -8px;\ +z-index: 100000;\ +}\ +.ace_closeButton{\ +background: rgba(245, 146, 146, 0.9);\ +}\ +.ace_optionsMenuKey {\ +color: darkslateblue;\ +font-weight: bold;\ +}\ +.ace_optionsMenuCommand {\ +color: darkcyan;\ +font-weight: normal;\ +}\ +.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ +vertical-align: middle;\ +}\ +.ace_optionsMenuEntry button[ace_selected_button=true] {\ +background: #e7e7e7;\ +box-shadow: 1px 0px 2px 0px #adadad inset;\ +border-color: #adadad;\ +}\ +.ace_optionsMenuEntry button {\ +background: white;\ +border: 1px solid lightgray;\ +margin: 0px;\ +}\ +.ace_optionsMenuEntry button:hover{\ +background: #f0f0f0;\ +}"; +dom.importCssString(cssText); + +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + + function close() { + if (!closer) return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + editor.focus(); + closer = null; + callback && callback(); + } + + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + 'background-color: rgba(0, 0, 0, 0.3);'; + closer.addEventListener('click', function() { + close(); + }); + document.addEventListener('keydown', documentEscListener); + + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + + closer.appendChild(contentElement); + document.body.appendChild(closer); + editor.blur(); + return { + close: close + }; +}; + +}); + +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} + +var Mode = function(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function(a, b){ + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } else { + re = "^.*\\.(" + extensions + ")$"; + } + + this.extRe = new RegExp(re, "gi"); +}; + +Mode.prototype.supportsFile = function(filename) { + return filename.match(this.extRe); +}; +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript:["as"], + ADA: ["ada|adb"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl"], + Assembly_x86:["asm|a"], + AutoHotKey: ["ahk"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + BatchFile: ["bat|cmd"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Crystal: ["cr"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|vue|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|jsx"], + JSON: ["json"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + LogiQL: ["logic|lql"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MEL: ["mel"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nginx: ["nginx|conf"], + Nix: ["nix"], + Nim: ["nim"], + NSIS: ["nsi|nsh"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + Perl6: ["p6|pl6|pm6"], + pgSQL: ["pgsql"], + PHP_Laravel_blade: ["blade.php"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + Puppet: ["epp|pp"], + Pig: ["pig"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + Python: ["py"], + R: ["r"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + snippets: ["snippets"], + Soy_Template:["soy"], + Space: ["space"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Twig: ["latte|twig|swig"], + Typescript: ["ts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Django: ["html"] +}; + +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} + +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); + +define("ace/ext/themelist",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var themeData = [ + ["Chrome" ], + ["Clouds" ], + ["Crimson Editor" ], + ["Dawn" ], + ["Dreamweaver" ], + ["Eclipse" ], + ["GitHub" ], + ["IPlastic" ], + ["Solarized Light"], + ["TextMate" ], + ["Tomorrow" ], + ["XCode" ], + ["Kuroir"], + ["KatzenMilch"], + ["SQL Server" ,"sqlserver" , "light"], + ["Ambiance" ,"ambiance" , "dark"], + ["Chaos" ,"chaos" , "dark"], + ["Clouds Midnight" ,"clouds_midnight" , "dark"], + ["Dracula" ,"" , "dark"], + ["Cobalt" ,"cobalt" , "dark"], + ["Gruvbox" ,"gruvbox" , "dark"], + ["Green on Black" ,"gob" , "dark"], + ["idle Fingers" ,"idle_fingers" , "dark"], + ["krTheme" ,"kr_theme" , "dark"], + ["Merbivore" ,"merbivore" , "dark"], + ["Merbivore Soft" ,"merbivore_soft" , "dark"], + ["Mono Industrial" ,"mono_industrial" , "dark"], + ["Monokai" ,"monokai" , "dark"], + ["Pastel on dark" ,"pastel_on_dark" , "dark"], + ["Solarized Dark" ,"solarized_dark" , "dark"], + ["Terminal" ,"terminal" , "dark"], + ["Tomorrow Night" ,"tomorrow_night" , "dark"], + ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"], + ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"], + ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"], + ["Twilight" ,"twilight" , "dark"], + ["Vibrant Ink" ,"vibrant_ink" , "dark"] +]; + + +exports.themesByName = {}; +exports.themes = themeData.map(function(data) { + var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); + var theme = { + caption: data[0], + theme: "ace/theme/" + name, + isDark: data[2] == "dark", + name: name + }; + exports.themesByName[name] = theme; + return theme; +}); + +}); + +define("ace/ext/options",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/lib/oop","ace/config","ace/lib/event_emitter","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) { +"use strict"; +var overlayPage = require('./menu_tools/overlay_page').overlayPage; + + +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var config = require("../config"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var buildDom = dom.buildDom; + +var modelist = require("./modelist"); +var themelist = require("./themelist"); + +var themes = { Bright: [], Dark: [] }; +themelist.themes.forEach(function(x) { + themes[x.isDark ? "Dark" : "Bright"].push({ caption: x.caption, value: x.theme }); +}); + +var modes = modelist.modes.map(function(x){ + return { caption: x.caption, value: x.mode }; +}); + + +var optionGroups = { + Main: { + Mode: { + path: "mode", + type: "select", + items: modes + }, + Theme: { + path: "theme", + type: "select", + items: themes + }, + "Keybinding": { + type: "buttonBar", + path: "keyboardHandler", + items: [ + { caption : "Ace", value : null }, + { caption : "Vim", value : "ace/keyboard/vim" }, + { caption : "Emacs", value : "ace/keyboard/emacs" }, + { caption : "Sublime", value : "ace/keyboard/sublime" } + ] + }, + "Font Size": { + path: "fontSize", + type: "number", + defaultValue: 12, + defaults: [ + {caption: "12px", value: 12}, + {caption: "24px", value: 24} + ] + }, + "Soft Wrap": { + type: "buttonBar", + path: "wrap", + items: [ + { caption : "Off", value : "off" }, + { caption : "View", value : "free" }, + { caption : "margin", value : "printMargin" }, + { caption : "40", value : "40" } + ] + }, + "Cursor Style": { + path: "cursorStyle", + items: [ + { caption : "Ace", value : "ace" }, + { caption : "Slim", value : "slim" }, + { caption : "Smooth", value : "smooth" }, + { caption : "Smooth And Slim", value : "smooth slim" }, + { caption : "Wide", value : "wide" } + ] + }, + "Folding": { + path: "foldStyle", + items: [ + { caption : "Manual", value : "manual" }, + { caption : "Mark begin", value : "markbegin" }, + { caption : "Mark begin and end", value : "markbeginend" } + ] + }, + "Soft Tabs": [{ + path: "useSoftTabs" + }, { + path: "tabSize", + type: "number", + values: [2, 3, 4, 8, 16] + }], + "Overscroll": { + type: "buttonBar", + path: "scrollPastEnd", + items: [ + { caption : "None", value : 0 }, + { caption : "Half", value : 0.5 }, + { caption : "Full", value : 1 } + ] + } + }, + More: { + "Atomic soft tabs": { + path: "navigateWithinSoftTabs" + }, + "Enable Behaviours": { + path: "behavioursEnabled" + }, + "Full Line Selection": { + type: "checkbox", + values: "text|line", + path: "selectionStyle" + }, + "Highlight Active Line": { + path: "highlightActiveLine" + }, + "Show Invisibles": { + path: "showInvisibles" + }, + "Show Indent Guides": { + path: "displayIndentGuides" + }, + "Persistent Scrollbar": [{ + path: "hScrollBarAlwaysVisible" + }, { + path: "vScrollBarAlwaysVisible" + }], + "Animate scrolling": { + path: "animatedScroll" + }, + "Show Gutter": { + path: "showGutter" + }, + "Show Line Numbers": { + path: "showLineNumbers" + }, + "Relative Line Numbers": { + path: "relativeLineNumbers" + }, + "Fixed Gutter Width": { + path: "fixedWidthGutter" + }, + "Show Print Margin": [{ + path: "showPrintMargin" + }, { + type: "number", + path: "printMarginColumn" + }], + "Indented Soft Wrap": { + path: "indentedSoftWrap" + }, + "Highlight selected word": { + path: "highlightSelectedWord" + }, + "Fade Fold Widgets": { + path: "fadeFoldWidgets" + }, + "Use textarea for IME": { + path: "useTextareaForIME" + }, + "Merge Undo Deltas": { + path: "mergeUndoDeltas", + items: [ + { caption : "Always", value : "always" }, + { caption : "Never", value : "false" }, + { caption : "Timed", value : "true" } + ] + }, + "Elastic Tabstops": { + path: "useElasticTabstops" + }, + "Incremental Search": { + path: "useIncrementalSearch" + }, + "Read-only": { + path: "readOnly" + }, + "Copy without selection": { + path: "copyWithEmptySelection" + }, + "Live Autocompletion": { + path: "enableLiveAutocompletion" + } + } +}; + + +var OptionPanel = function(editor, element) { + this.editor = editor; + this.container = element || document.createElement("div"); + this.groups = []; + this.options = {}; +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.add = function(config) { + if (config.Main) + oop.mixin(optionGroups.Main, config.Main); + if (config.More) + oop.mixin(optionGroups.More, config.More); + }; + + this.render = function() { + this.container.innerHTML = ""; + buildDom(["table", {id: "controls"}, + this.renderOptionGroup(optionGroups.Main), + ["tr", null, ["td", {colspan: 2}, + ["table", {id: "more-controls"}, + this.renderOptionGroup(optionGroups.More) + ] + ]], + ["tr", null, ["td", {colspan: 2}, "version " + config.version]] + ], this.container); + }; + + this.renderOptionGroup = function(group) { + return Object.keys(group).map(function(key, i) { + var item = group[key]; + if (!item.position) + item.position = i / 10000; + if (!item.label) + item.label = key; + return item; + }).sort(function(a, b) { + return a.position - b.position; + }).map(function(item) { + return this.renderOption(item.label, item); + }, this); + }; + + this.renderOptionControl = function(key, option) { + var self = this; + if (Array.isArray(option)) { + return option.map(function(x) { + return self.renderOptionControl(key, x); + }); + } + var control; + + var value = self.getOption(option); + + if (option.values && option.type != "checkbox") { + if (typeof option.values == "string") + option.values = option.values.split("|"); + option.items = option.values.map(function(v) { + return { value: v, name: v }; + }); + } + + if (option.type == "buttonBar") { + control = ["div", option.items.map(function(item) { + return ["button", { + value: item.value, + ace_selected_button: value == item.value, + onclick: function() { + self.setOption(option, item.value); + var nodes = this.parentNode.querySelectorAll("[ace_selected_button]"); + for (var i = 0; i < nodes.length; i++) { + nodes[i].removeAttribute("ace_selected_button"); + } + this.setAttribute("ace_selected_button", true); + } + }, item.desc || item.caption || item.name]; + })]; + } else if (option.type == "number") { + control = ["input", {type: "number", value: value || option.defaultValue, style:"width:3em", oninput: function() { + self.setOption(option, parseInt(this.value)); + }}]; + if (option.defaults) { + control = [control, option.defaults.map(function(item) { + return ["button", {onclick: function() { + var input = this.parentNode.firstChild; + input.value = item.value; + input.oninput(); + }}, item.caption]; + })]; + } + } else if (option.items) { + var buildItems = function(items) { + return items.map(function(item) { + return ["option", { value: item.value || item.name }, item.desc || item.caption || item.name]; + }); + }; + + var items = Array.isArray(option.items) + ? buildItems(option.items) + : Object.keys(option.items).map(function(key) { + return ["optgroup", {"label": key}, buildItems(option.items[key])]; + }); + control = ["select", { id: key, value: value, onchange: function() { + self.setOption(option, this.value); + } }, items]; + } else { + if (typeof option.values == "string") + option.values = option.values.split("|"); + if (option.values) value = value == option.values[1]; + control = ["input", { type: "checkbox", id: key, checked: value || null, onchange: function() { + var value = this.checked; + if (option.values) value = option.values[value ? 1 : 0]; + self.setOption(option, value); + }}]; + if (option.type == "checkedNumber") { + control = [control, []]; + } + } + return control; + }; + + this.renderOption = function(key, option) { + if (option.path && !option.onchange && !this.editor.$options[option.path]) + return; + this.options[option.path] = option; + var safeKey = "-" + option.path; + var control = this.renderOptionControl(safeKey, option); + return ["tr", {class: "ace_optionsMenuEntry"}, ["td", + ["label", {for: safeKey}, key] + ], ["td", control]]; + }; + + this.setOption = function(option, value) { + if (typeof option == "string") + option = this.options[option]; + if (value == "false") value = false; + if (value == "true") value = true; + if (value == "null") value = null; + if (value == "undefined") value = undefined; + if (typeof value == "string" && parseFloat(value).toString() == value) + value = parseFloat(value); + if (option.onchange) + option.onchange(value); + else if (option.path) + this.editor.setOption(option.path, value); + this._signal("setOption", {name: option.path, value: value}); + }; + + this.getOption = function(option) { + if (option.getValue) + return option.getValue(); + return this.editor.getOption(option.path); + }; + +}).call(OptionPanel.prototype); + +exports.OptionPanel = OptionPanel; + +}); (function() { + window.require(["ace/ext/options"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/ext-prompt.js b/htdocs/includes/ace/src/ext-prompt.js new file mode 100644 index 00000000000..815c7cda214 --- /dev/null +++ b/htdocs/includes/ace/src/ext-prompt.js @@ -0,0 +1,2724 @@ +define("ace/ext/menu_tools/get_editor_keyboard_shortcuts",["require","exports","module","ace/lib/keys"], function(require, exports, module) { +"use strict"; +var keys = require("../../lib/keys"); +module.exports.getEditorKeybordShortcuts = function(editor) { + var KEY_MODS = keys.KEY_MODS; + var keybindings = []; + var commandMap = {}; + editor.keyBinding.$handlers.forEach(function(handler) { + var ckb = handler.commandKeyBinding; + for (var i in ckb) { + var key = i.replace(/(^|-)\w/g, function(x) { return x.toUpperCase(); }); + var commands = ckb[i]; + if (!Array.isArray(commands)) + commands = [commands]; + commands.forEach(function(command) { + if (typeof command != "string") + command = command.name; + if (commandMap[command]) { + commandMap[command].key += "|" + key; + } else { + commandMap[command] = {key: key, command: command}; + keybindings.push(commandMap[command]); + } + }); + } + }); + return keybindings; +}; + +}); + +define("ace/autocomplete/popup",["require","exports","module","ace/virtual_renderer","ace/editor","ace/range","ace/lib/event","ace/lib/lang","ace/lib/dom"], function(require, exports, module) { +"use strict"; + +var Renderer = require("../virtual_renderer").VirtualRenderer; +var Editor = require("../editor").Editor; +var Range = require("../range").Range; +var event = require("../lib/event"); +var lang = require("../lib/lang"); +var dom = require("../lib/dom"); + +var $singleLineEditor = function(el) { + var renderer = new Renderer(el); + + renderer.$maxLines = 4; + + var editor = new Editor(renderer); + + editor.setHighlightActiveLine(false); + editor.setShowPrintMargin(false); + editor.renderer.setShowGutter(false); + editor.renderer.setHighlightGutterLine(false); + + editor.$mouseHandler.$focusTimeout = 0; + editor.$highlightTagPending = true; + + return editor; +}; + +var AcePopup = function(parentNode) { + var el = dom.createElement("div"); + var popup = new $singleLineEditor(el); + + if (parentNode) + parentNode.appendChild(el); + el.style.display = "none"; + popup.renderer.content.style.cursor = "default"; + popup.renderer.setStyle("ace_autocomplete"); + + popup.setOption("displayIndentGuides", false); + popup.setOption("dragDelay", 150); + + var noop = function(){}; + + popup.focus = noop; + popup.$isFocused = true; + + popup.renderer.$cursorLayer.restartTimer = noop; + popup.renderer.$cursorLayer.element.style.opacity = 0; + + popup.renderer.$maxLines = 8; + popup.renderer.$keepTextAreaAtCursor = false; + + popup.setHighlightActiveLine(false); + popup.session.highlight(""); + popup.session.$searchHighlight.clazz = "ace_highlight-marker"; + + popup.on("mousedown", function(e) { + var pos = e.getDocumentPosition(); + popup.selection.moveToPosition(pos); + selectionMarker.start.row = selectionMarker.end.row = pos.row; + e.stop(); + }); + + var lastMouseEvent; + var hoverMarker = new Range(-1,0,-1,Infinity); + var selectionMarker = new Range(-1,0,-1,Infinity); + selectionMarker.id = popup.session.addMarker(selectionMarker, "ace_active-line", "fullLine"); + popup.setSelectOnHover = function(val) { + if (!val) { + hoverMarker.id = popup.session.addMarker(hoverMarker, "ace_line-hover", "fullLine"); + } else if (hoverMarker.id) { + popup.session.removeMarker(hoverMarker.id); + hoverMarker.id = null; + } + }; + popup.setSelectOnHover(false); + popup.on("mousemove", function(e) { + if (!lastMouseEvent) { + lastMouseEvent = e; + return; + } + if (lastMouseEvent.x == e.x && lastMouseEvent.y == e.y) { + return; + } + lastMouseEvent = e; + lastMouseEvent.scrollTop = popup.renderer.scrollTop; + var row = lastMouseEvent.getDocumentPosition().row; + if (hoverMarker.start.row != row) { + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row); + } + }); + popup.renderer.on("beforeRender", function() { + if (lastMouseEvent && hoverMarker.start.row != -1) { + lastMouseEvent.$pos = null; + var row = lastMouseEvent.getDocumentPosition().row; + if (!hoverMarker.id) + popup.setRow(row); + setHoverMarker(row, true); + } + }); + popup.renderer.on("afterRender", function() { + var row = popup.getRow(); + var t = popup.renderer.$textLayer; + var selected = t.element.childNodes[row - t.config.firstRow]; + if (selected !== t.selectedNode && t.selectedNode) + dom.removeCssClass(t.selectedNode, "ace_selected"); + t.selectedNode = selected; + if (selected) + dom.addCssClass(selected, "ace_selected"); + }); + var hideHoverMarker = function() { setHoverMarker(-1); }; + var setHoverMarker = function(row, suppressRedraw) { + if (row !== hoverMarker.start.row) { + hoverMarker.start.row = hoverMarker.end.row = row; + if (!suppressRedraw) + popup.session._emit("changeBackMarker"); + popup._emit("changeHoverMarker"); + } + }; + popup.getHoveredRow = function() { + return hoverMarker.start.row; + }; + + event.addListener(popup.container, "mouseout", hideHoverMarker); + popup.on("hide", hideHoverMarker); + popup.on("changeSelection", hideHoverMarker); + + popup.session.doc.getLength = function() { + return popup.data.length; + }; + popup.session.doc.getLine = function(i) { + var data = popup.data[i]; + if (typeof data == "string") + return data; + return (data && data.value) || ""; + }; + + var bgTokenizer = popup.session.bgTokenizer; + bgTokenizer.$tokenizeRow = function(row) { + var data = popup.data[row]; + var tokens = []; + if (!data) + return tokens; + if (typeof data == "string") + data = {value: data}; + var caption = data.caption || data.value || data.name; + + function addToken(value, className) { + value && tokens.push({ + type: (data.className || "") + (className || ""), + value: value + }); + } + + var lower = caption.toLowerCase(); + var filterText = (popup.filterText || "").toLowerCase(); + var lastIndex = 0; + var lastI = 0; + for (var i = 0; i <= filterText.length; i++) { + if (i != lastI && (data.matchMask & (1 << i) || i == filterText.length)) { + var sub = filterText.slice(lastI, i); + lastI = i; + var index = lower.indexOf(sub, lastIndex); + if (index == -1) continue; + addToken(caption.slice(lastIndex, index), ""); + lastIndex = index + sub.length; + addToken(caption.slice(index, lastIndex), "completion-highlight"); + } + } + addToken(caption.slice(lastIndex, caption.length), ""); + + if (data.meta) + tokens.push({type: "completion-meta", value: data.meta}); + if (data.message) + tokens.push({type: "completion-message", value: data.message}); + + return tokens; + }; + bgTokenizer.$updateOnChange = noop; + bgTokenizer.start = noop; + + popup.session.$computeWidth = function() { + return this.screenWidth = 0; + }; + popup.isOpen = false; + popup.isTopdown = false; + popup.autoSelect = true; + popup.filterText = ""; + + popup.data = []; + popup.setData = function(list, filterText) { + popup.filterText = filterText || ""; + popup.setValue(lang.stringRepeat("\n", list.length), -1); + popup.data = list || []; + popup.setRow(0); + }; + popup.getData = function(row) { + return popup.data[row]; + }; + + popup.getRow = function() { + return selectionMarker.start.row; + }; + popup.setRow = function(line) { + line = Math.max(this.autoSelect ? 0 : -1, Math.min(this.data.length, line)); + if (selectionMarker.start.row != line) { + popup.selection.clearSelection(); + selectionMarker.start.row = selectionMarker.end.row = line || 0; + popup.session._emit("changeBackMarker"); + popup.moveCursorTo(line || 0, 0); + if (popup.isOpen) + popup._signal("select"); + } + }; + + popup.on("changeSelection", function() { + if (popup.isOpen) + popup.setRow(popup.selection.lead.row); + popup.renderer.scrollCursorIntoView(); + }); + + popup.hide = function() { + this.container.style.display = "none"; + this._signal("hide"); + popup.isOpen = false; + }; + popup.show = function(pos, lineHeight, topdownOnly) { + var el = this.container; + var screenHeight = window.innerHeight; + var screenWidth = window.innerWidth; + var renderer = this.renderer; + var maxH = renderer.$maxLines * lineHeight * 1.4; + var top = pos.top + this.$borderSize; + var allowTopdown = top > screenHeight / 2 && !topdownOnly; + if (allowTopdown && top + lineHeight + maxH > screenHeight) { + renderer.$maxPixelHeight = top - 2 * this.$borderSize; + el.style.top = ""; + el.style.bottom = screenHeight - top + "px"; + popup.isTopdown = false; + } else { + top += lineHeight; + renderer.$maxPixelHeight = screenHeight - top - 0.2 * lineHeight; + el.style.top = top + "px"; + el.style.bottom = ""; + popup.isTopdown = true; + } + + el.style.display = ""; + + var left = pos.left; + if (left + el.offsetWidth > screenWidth) + left = screenWidth - el.offsetWidth; + + el.style.left = left + "px"; + + this._signal("show"); + lastMouseEvent = null; + popup.isOpen = true; + }; + + popup.goTo = function(where) { + var row = this.getRow(); + var max = this.session.getLength() - 1; + + switch(where) { + case "up": row = row <= 0 ? max : row - 1; break; + case "down": row = row >= max ? -1 : row + 1; break; + case "start": row = 0; break; + case "end": row = max; break; + } + + this.setRow(row); + }; + + + popup.getTextLeftOffset = function() { + return this.$borderSize + this.renderer.$padding + this.$imageSize; + }; + + popup.$imageSize = 0; + popup.$borderSize = 1; + + return popup; +}; + +dom.importCssString("\ +.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ + background-color: #CAD6FA;\ + z-index: 1;\ +}\ +.ace_dark.ace_editor.ace_autocomplete .ace_marker-layer .ace_active-line {\ + background-color: #3a674e;\ +}\ +.ace_editor.ace_autocomplete .ace_line-hover {\ + border: 1px solid #abbffe;\ + margin-top: -1px;\ + background: rgba(233,233,253,0.4);\ + position: absolute;\ + z-index: 2;\ +}\ +.ace_dark.ace_editor.ace_autocomplete .ace_line-hover {\ + border: 1px solid rgba(109, 150, 13, 0.8);\ + background: rgba(58, 103, 78, 0.62);\ +}\ +.ace_completion-meta {\ + opacity: 0.5;\ + margin: 0.9em;\ +}\ +.ace_completion-message {\ + color: blue;\ +}\ +.ace_editor.ace_autocomplete .ace_completion-highlight{\ + color: #2d69c7;\ +}\ +.ace_dark.ace_editor.ace_autocomplete .ace_completion-highlight{\ + color: #93ca12;\ +}\ +.ace_editor.ace_autocomplete {\ + width: 300px;\ + z-index: 200000;\ + border: 1px lightgray solid;\ + position: fixed;\ + box-shadow: 2px 3px 5px rgba(0,0,0,.2);\ + line-height: 1.4;\ + background: #fefefe;\ + color: #111;\ +}\ +.ace_dark.ace_editor.ace_autocomplete {\ + border: 1px #484747 solid;\ + box-shadow: 2px 3px 5px rgba(0, 0, 0, 0.51);\ + line-height: 1.4;\ + background: #25282c;\ + color: #c1c1c1;\ +}", "autocompletion.css"); + +exports.AcePopup = AcePopup; +exports.$singleLineEditor = $singleLineEditor; +}); + +define("ace/autocomplete/util",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.parForEach = function(array, fn, callback) { + var completed = 0; + var arLength = array.length; + if (arLength === 0) + callback(); + for (var i = 0; i < arLength; i++) { + fn(array[i], function(result, err) { + completed++; + if (completed === arLength) + callback(result, err); + }); + } +}; + +var ID_REGEX = /[a-zA-Z_0-9\$\-\u00A2-\uFFFF]/; + +exports.retrievePrecedingIdentifier = function(text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos-1; i >= 0; i--) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf.reverse().join(""); +}; + +exports.retrieveFollowingIdentifier = function(text, pos, regex) { + regex = regex || ID_REGEX; + var buf = []; + for (var i = pos; i < text.length; i++) { + if (regex.test(text[i])) + buf.push(text[i]); + else + break; + } + return buf; +}; + +exports.getCompletionPrefix = function (editor) { + var pos = editor.getCursorPosition(); + var line = editor.session.getLine(pos.row); + var prefix; + editor.completers.forEach(function(completer) { + if (completer.identifierRegexps) { + completer.identifierRegexps.forEach(function(identifierRegex) { + if (!prefix && identifierRegex) + prefix = this.retrievePrecedingIdentifier(line, pos.column, identifierRegex); + }.bind(this)); + } + }.bind(this)); + return prefix || this.retrievePrecedingIdentifier(line, pos.column); +}; + +}); + +define("ace/snippets",["require","exports","module","ace/lib/oop","ace/lib/event_emitter","ace/lib/lang","ace/range","ace/range_list","ace/keyboard/hash_handler","ace/tokenizer","ace/clipboard","ace/lib/dom","ace/editor"], function(require, exports, module) { +"use strict"; +var oop = require("./lib/oop"); +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var lang = require("./lib/lang"); +var Range = require("./range").Range; +var RangeList = require("./range_list").RangeList; +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var Tokenizer = require("./tokenizer").Tokenizer; +var clipboard = require("./clipboard"); + +var VARIABLES = { + CURRENT_WORD: function(editor) { + return editor.session.getTextRange(editor.session.getWordRange()); + }, + SELECTION: function(editor, name, indentation) { + var text = editor.session.getTextRange(); + if (indentation) + return text.replace(/\n\r?([ \t]*\S)/g, "\n" + indentation + "$1"); + return text; + }, + CURRENT_LINE: function(editor) { + return editor.session.getLine(editor.getCursorPosition().row); + }, + PREV_LINE: function(editor) { + return editor.session.getLine(editor.getCursorPosition().row - 1); + }, + LINE_INDEX: function(editor) { + return editor.getCursorPosition().row; + }, + LINE_NUMBER: function(editor) { + return editor.getCursorPosition().row + 1; + }, + SOFT_TABS: function(editor) { + return editor.session.getUseSoftTabs() ? "YES" : "NO"; + }, + TAB_SIZE: function(editor) { + return editor.session.getTabSize(); + }, + CLIPBOARD: function(editor) { + return clipboard.getText && clipboard.getText(); + }, + FILENAME: function(editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0]; + }, + FILENAME_BASE: function(editor) { + return /[^/\\]*$/.exec(this.FILEPATH(editor))[0].replace(/\.[^.]*$/, ""); + }, + DIRECTORY: function(editor) { + return this.FILEPATH(editor).replace(/[^/\\]*$/, ""); + }, + FILEPATH: function(editor) { return "/not implemented.txt"; }, + WORKSPACE_NAME: function() { return "Unknown"; }, + FULLNAME: function() { return "Unknown"; }, + BLOCK_COMMENT_START: function(editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.start || ""; + }, + BLOCK_COMMENT_END: function(editor) { + var mode = editor.session.$mode || {}; + return mode.blockComment && mode.blockComment.end || ""; + }, + LINE_COMMENT: function(editor) { + var mode = editor.session.$mode || {}; + return mode.lineCommentStart || ""; + }, + CURRENT_YEAR: date.bind(null, {year: "numeric"}), + CURRENT_YEAR_SHORT: date.bind(null, {year: "2-digit"}), + CURRENT_MONTH: date.bind(null, {month: "numeric"}), + CURRENT_MONTH_NAME: date.bind(null, {month: "long"}), + CURRENT_MONTH_NAME_SHORT: date.bind(null, {month: "short"}), + CURRENT_DATE: date.bind(null, {day: "2-digit"}), + CURRENT_DAY_NAME: date.bind(null, {weekday: "long"}), + CURRENT_DAY_NAME_SHORT: date.bind(null, {weekday: "short"}), + CURRENT_HOUR: date.bind(null, {hour: "2-digit", hour12: false}), + CURRENT_MINUTE: date.bind(null, {minute: "2-digit"}), + CURRENT_SECOND: date.bind(null, {second: "2-digit"}) +}; + +VARIABLES.SELECTED_TEXT = VARIABLES.SELECTION; + +function date(dateFormat) { + var str = new Date().toLocaleString("en-us", dateFormat); + return str.length == 1 ? "0" + str : str; +} + +var SnippetManager = function() { + this.snippetMap = {}; + this.snippetNameMap = {}; +}; + +(function() { + oop.implement(this, EventEmitter); + + this.getTokenizer = function() { + return SnippetManager.$tokenizer || this.createTokenizer(); + }; + + this.createTokenizer = function() { + function TabstopToken(str) { + str = str.substr(1); + if (/^\d+$/.test(str)) + return [{tabstopId: parseInt(str, 10)}]; + return [{text: str}]; + } + function escape(ch) { + return "(?:[^\\\\" + ch + "]|\\\\.)"; + } + var formatMatcher = { + regex: "/(" + escape("/") + "+)/", + onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.fmtString = true; + ts.guard = val.slice(1, -1); + ts.flag = ""; + return ""; + }, + next: "formatString" + }; + + SnippetManager.$tokenizer = new Tokenizer({ + start: [ + {regex: /\\./, onMatch: function(val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) { + val = ch; + } else if ("`$\\".indexOf(ch) != -1) { + val = ch; + } + return [val]; + }}, + {regex: /}/, onMatch: function(val, state, stack) { + return [stack.length ? stack.shift() : val]; + }}, + {regex: /\$(?:\d+|\w+)/, onMatch: TabstopToken}, + {regex: /\$\{[\dA-Z_a-z]+/, onMatch: function(str, state, stack) { + var t = TabstopToken(str.substr(1)); + stack.unshift(t[0]); + return t; + }, next: "snippetVar"}, + {regex: /\n/, token: "newline", merge: false} + ], + snippetVar: [ + {regex: "\\|" + escape("\\|") + "*\\|", onMatch: function(val, state, stack) { + var choices = val.slice(1, -1).replace(/\\[,|\\]|,/g, function(operator) { + return operator.length == 2 ? operator[1] : "\x00"; + }).split("\x00"); + stack[0].choices = choices; + return [choices[0]]; + }, next: "start"}, + formatMatcher, + {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "start"} + ], + formatString: [ + {regex: /:/, onMatch: function(val, state, stack) { + if (stack.length && stack[0].expectElse) { + stack[0].expectElse = false; + stack[0].ifEnd = {elseEnd: stack[0]}; + return [stack[0].ifEnd]; + } + return ":"; + }}, + {regex: /\\./, onMatch: function(val, state, stack) { + var ch = val[1]; + if (ch == "}" && stack.length) + val = ch; + else if ("`$\\".indexOf(ch) != -1) + val = ch; + else if (ch == "n") + val = "\n"; + else if (ch == "t") + val = "\t"; + else if ("ulULE".indexOf(ch) != -1) + val = {changeCase: ch, local: ch > "a"}; + return [val]; + }}, + {regex: "/\\w*}", onMatch: function(val, state, stack) { + var next = stack.shift(); + if (next) + next.flag = val.slice(1, -1); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start"}, + {regex: /\$(?:\d+|\w+)/, onMatch: function(val, state, stack) { + return [{text: val.slice(1)}]; + }}, + {regex: /\${\w+/, onMatch: function(val, state, stack) { + var token = {text: val.slice(2)}; + stack.unshift(token); + return [token]; + }, next: "formatStringVar"}, + {regex: /\n/, token: "newline", merge: false}, + {regex: /}/, onMatch: function(val, state, stack) { + var next = stack.shift(); + this.next = next && next.tabstopId ? "start" : ""; + return [next || val]; + }, next: "start"} + ], + formatStringVar: [ + {regex: /:\/\w+}/, onMatch: function(val, state, stack) { + var ts = stack[0]; + ts.formatFunction = val.slice(2, -1); + return [stack.shift()]; + }, next: "formatString"}, + formatMatcher, + {regex: /:[\?\-+]?/, onMatch: function(val, state, stack) { + if (val[1] == "+") + stack[0].ifEnd = stack[0]; + if (val[1] == "?") + stack[0].expectElse = true; + }, next: "formatString"}, + {regex: "([^:}\\\\]|\\\\.)*:?", token: "", next: "formatString"} + ] + }); + return SnippetManager.$tokenizer; + }; + + this.tokenizeTmSnippet = function(str, startState) { + return this.getTokenizer().getLineTokens(str, startState).tokens.map(function(x) { + return x.value || x; + }); + }; + + this.getVariableValue = function(editor, name, indentation) { + if (/^\d+$/.test(name)) + return (this.variables.__ || {})[name] || ""; + if (/^[A-Z]\d+$/.test(name)) + return (this.variables[name[0] + "__"] || {})[name.substr(1)] || ""; + + name = name.replace(/^TM_/, ""); + if (!this.variables.hasOwnProperty(name)) + return ""; + var value = this.variables[name]; + if (typeof value == "function") + value = this.variables[name](editor, name, indentation); + return value == null ? "" : value; + }; + + this.variables = VARIABLES; + this.tmStrFormat = function(str, ch, editor) { + if (!ch.fmt) return str; + var flag = ch.flag || ""; + var re = ch.guard; + re = new RegExp(re, flag.replace(/[^gim]/g, "")); + var fmtTokens = typeof ch.fmt == "string" ? this.tokenizeTmSnippet(ch.fmt, "formatString") : ch.fmt; + var _self = this; + var formatted = str.replace(re, function() { + var oldArgs = _self.variables.__; + _self.variables.__ = [].slice.call(arguments); + var fmtParts = _self.resolveVariables(fmtTokens, editor); + var gChangeCase = "E"; + for (var i = 0; i < fmtParts.length; i++) { + var ch = fmtParts[i]; + if (typeof ch == "object") { + fmtParts[i] = ""; + if (ch.changeCase && ch.local) { + var next = fmtParts[i + 1]; + if (next && typeof next == "string") { + if (ch.changeCase == "u") + fmtParts[i] = next[0].toUpperCase(); + else + fmtParts[i] = next[0].toLowerCase(); + fmtParts[i + 1] = next.substr(1); + } + } else if (ch.changeCase) { + gChangeCase = ch.changeCase; + } + } else if (gChangeCase == "U") { + fmtParts[i] = ch.toUpperCase(); + } else if (gChangeCase == "L") { + fmtParts[i] = ch.toLowerCase(); + } + } + _self.variables.__ = oldArgs; + return fmtParts.join(""); + }); + return formatted; + }; + + this.tmFormatFunction = function(str, ch, editor) { + if (ch.formatFunction == "upcase") + return str.toUpperCase(); + if (ch.formatFunction == "downcase") + return str.toLowerCase(); + return str; + }; + + this.resolveVariables = function(snippet, editor) { + var result = []; + var indentation = ""; + var afterNewLine = true; + for (var i = 0; i < snippet.length; i++) { + var ch = snippet[i]; + if (typeof ch == "string") { + result.push(ch); + if (ch == "\n") { + afterNewLine = true; + indentation = ""; + } + else if (afterNewLine) { + indentation = /^\t*/.exec(ch)[0]; + afterNewLine = /\S/.test(ch); + } + continue; + } + if (!ch) continue; + afterNewLine = false; + + if (ch.fmtString) { + var j = snippet.indexOf(ch, i + 1); + if (j == -1) j = snippet.length; + ch.fmt = snippet.slice(i + 1, j); + i = j; + } + + if (ch.text) { + var value = this.getVariableValue(editor, ch.text, indentation) + ""; + if (ch.fmtString) + value = this.tmStrFormat(value, ch, editor); + if (ch.formatFunction) + value = this.tmFormatFunction(value, ch, editor); + + if (value && !ch.ifEnd) { + result.push(value); + gotoNext(ch); + } else if (!value && ch.ifEnd) { + gotoNext(ch.ifEnd); + } + } else if (ch.elseEnd) { + gotoNext(ch.elseEnd); + } else if (ch.tabstopId != null) { + result.push(ch); + } else if (ch.changeCase != null) { + result.push(ch); + } + } + function gotoNext(ch) { + var i1 = snippet.indexOf(ch, i + 1); + if (i1 != -1) + i = i1; + } + return result; + }; + + this.insertSnippetForSelection = function(editor, snippetText) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var tabString = editor.session.getTabString(); + var indentString = line.match(/^\s*/)[0]; + + if (cursor.column < indentString.length) + indentString = indentString.slice(0, cursor.column); + + snippetText = snippetText.replace(/\r/g, ""); + var tokens = this.tokenizeTmSnippet(snippetText); + tokens = this.resolveVariables(tokens, editor); + tokens = tokens.map(function(x) { + if (x == "\n") + return x + indentString; + if (typeof x == "string") + return x.replace(/\t/g, tabString); + return x; + }); + var tabstops = []; + tokens.forEach(function(p, i) { + if (typeof p != "object") + return; + var id = p.tabstopId; + var ts = tabstops[id]; + if (!ts) { + ts = tabstops[id] = []; + ts.index = id; + ts.value = ""; + ts.parents = {}; + } + if (ts.indexOf(p) !== -1) + return; + if (p.choices && !ts.choices) + ts.choices = p.choices; + ts.push(p); + var i1 = tokens.indexOf(p, i + 1); + if (i1 === -1) + return; + + var value = tokens.slice(i + 1, i1); + var isNested = value.some(function(t) {return typeof t === "object";}); + if (isNested && !ts.value) { + ts.value = value; + } else if (value.length && (!ts.value || typeof ts.value !== "string")) { + ts.value = value.join(""); + } + }); + tabstops.forEach(function(ts) {ts.length = 0;}); + var expanding = {}; + function copyValue(val) { + var copy = []; + for (var i = 0; i < val.length; i++) { + var p = val[i]; + if (typeof p == "object") { + if (expanding[p.tabstopId]) + continue; + var j = val.lastIndexOf(p, i - 1); + p = copy[j] || {tabstopId: p.tabstopId}; + } + copy[i] = p; + } + return copy; + } + for (var i = 0; i < tokens.length; i++) { + var p = tokens[i]; + if (typeof p != "object") + continue; + var id = p.tabstopId; + var ts = tabstops[id]; + var i1 = tokens.indexOf(p, i + 1); + if (expanding[id]) { + if (expanding[id] === p) { + delete expanding[id]; + Object.keys(expanding).forEach(function(parentId) { + ts.parents[parentId] = true; + }); + } + continue; + } + expanding[id] = p; + var value = ts.value; + if (typeof value !== "string") + value = copyValue(value); + else if (p.fmt) + value = this.tmStrFormat(value, p, editor); + tokens.splice.apply(tokens, [i + 1, Math.max(0, i1 - i)].concat(value, p)); + + if (ts.indexOf(p) === -1) + ts.push(p); + } + var row = 0, column = 0; + var text = ""; + tokens.forEach(function(t) { + if (typeof t === "string") { + var lines = t.split("\n"); + if (lines.length > 1){ + column = lines[lines.length - 1].length; + row += lines.length - 1; + } else + column += t.length; + text += t; + } else if (t) { + if (!t.start) + t.start = {row: row, column: column}; + else + t.end = {row: row, column: column}; + } + }); + var range = editor.getSelectionRange(); + var end = editor.session.replace(range, text); + + var tabstopManager = new TabstopManager(editor); + var selectionId = editor.inVirtualSelectionMode && editor.selection.index; + tabstopManager.addTabstops(tabstops, range.start, end, selectionId); + }; + + this.insertSnippet = function(editor, snippetText) { + var self = this; + if (editor.inVirtualSelectionMode) + return self.insertSnippetForSelection(editor, snippetText); + + editor.forEachSelection(function() { + self.insertSnippetForSelection(editor, snippetText); + }, null, {keepOrder: true}); + + if (editor.tabstopManager) + editor.tabstopManager.tabNext(); + }; + + this.$getScope = function(editor) { + var scope = editor.session.$mode.$id || ""; + scope = scope.split("/").pop(); + if (scope === "html" || scope === "php") { + if (scope === "php" && !editor.session.$mode.inlinePhp) + scope = "html"; + var c = editor.getCursorPosition(); + var state = editor.session.getState(c.row); + if (typeof state === "object") { + state = state[0]; + } + if (state.substring) { + if (state.substring(0, 3) == "js-") + scope = "javascript"; + else if (state.substring(0, 4) == "css-") + scope = "css"; + else if (state.substring(0, 4) == "php-") + scope = "php"; + } + } + + return scope; + }; + + this.getActiveScopes = function(editor) { + var scope = this.$getScope(editor); + var scopes = [scope]; + var snippetMap = this.snippetMap; + if (snippetMap[scope] && snippetMap[scope].includeScopes) { + scopes.push.apply(scopes, snippetMap[scope].includeScopes); + } + scopes.push("_"); + return scopes; + }; + + this.expandWithTab = function(editor, options) { + var self = this; + var result = editor.forEachSelection(function() { + return self.expandSnippetForSelection(editor, options); + }, null, {keepOrder: true}); + if (result && editor.tabstopManager) + editor.tabstopManager.tabNext(); + return result; + }; + + this.expandSnippetForSelection = function(editor, options) { + var cursor = editor.getCursorPosition(); + var line = editor.session.getLine(cursor.row); + var before = line.substring(0, cursor.column); + var after = line.substr(cursor.column); + + var snippetMap = this.snippetMap; + var snippet; + this.getActiveScopes(editor).some(function(scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = this.findMatchingSnippet(snippets, before, after); + return !!snippet; + }, this); + if (!snippet) + return false; + if (options && options.dryRun) + return true; + editor.session.doc.removeInLine(cursor.row, + cursor.column - snippet.replaceBefore.length, + cursor.column + snippet.replaceAfter.length + ); + + this.variables.M__ = snippet.matchBefore; + this.variables.T__ = snippet.matchAfter; + this.insertSnippetForSelection(editor, snippet.content); + + this.variables.M__ = this.variables.T__ = null; + return true; + }; + + this.findMatchingSnippet = function(snippetList, before, after) { + for (var i = snippetList.length; i--;) { + var s = snippetList[i]; + if (s.startRe && !s.startRe.test(before)) + continue; + if (s.endRe && !s.endRe.test(after)) + continue; + if (!s.startRe && !s.endRe) + continue; + + s.matchBefore = s.startRe ? s.startRe.exec(before) : [""]; + s.matchAfter = s.endRe ? s.endRe.exec(after) : [""]; + s.replaceBefore = s.triggerRe ? s.triggerRe.exec(before)[0] : ""; + s.replaceAfter = s.endTriggerRe ? s.endTriggerRe.exec(after)[0] : ""; + return s; + } + }; + + this.snippetMap = {}; + this.snippetNameMap = {}; + this.register = function(snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + var self = this; + + if (!snippets) + snippets = []; + + function wrapRegexp(src) { + if (src && !/^\^?\(.*\)\$?$|^\\b$/.test(src)) + src = "(?:" + src + ")"; + + return src || ""; + } + function guardedRegexp(re, guard, opening) { + re = wrapRegexp(re); + guard = wrapRegexp(guard); + if (opening) { + re = guard + re; + if (re && re[re.length - 1] != "$") + re = re + "$"; + } else { + re = re + guard; + if (re && re[0] != "^") + re = "^" + re; + } + return new RegExp(re); + } + + function addSnippet(s) { + if (!s.scope) + s.scope = scope || "_"; + scope = s.scope; + if (!snippetMap[scope]) { + snippetMap[scope] = []; + snippetNameMap[scope] = {}; + } + + var map = snippetNameMap[scope]; + if (s.name) { + var old = map[s.name]; + if (old) + self.unregister(old); + map[s.name] = s; + } + snippetMap[scope].push(s); + + if (s.tabTrigger && !s.trigger) { + if (!s.guard && /^\w/.test(s.tabTrigger)) + s.guard = "\\b"; + s.trigger = lang.escapeRegExp(s.tabTrigger); + } + + if (!s.trigger && !s.guard && !s.endTrigger && !s.endGuard) + return; + + s.startRe = guardedRegexp(s.trigger, s.guard, true); + s.triggerRe = new RegExp(s.trigger); + + s.endRe = guardedRegexp(s.endTrigger, s.endGuard, true); + s.endTriggerRe = new RegExp(s.endTrigger); + } + + if (snippets && snippets.content) + addSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(addSnippet); + + this._signal("registerSnippets", {scope: scope}); + }; + this.unregister = function(snippets, scope) { + var snippetMap = this.snippetMap; + var snippetNameMap = this.snippetNameMap; + + function removeSnippet(s) { + var nameMap = snippetNameMap[s.scope||scope]; + if (nameMap && nameMap[s.name]) { + delete nameMap[s.name]; + var map = snippetMap[s.scope||scope]; + var i = map && map.indexOf(s); + if (i >= 0) + map.splice(i, 1); + } + } + if (snippets.content) + removeSnippet(snippets); + else if (Array.isArray(snippets)) + snippets.forEach(removeSnippet); + }; + this.parseSnippetFile = function(str) { + str = str.replace(/\r/g, ""); + var list = [], snippet = {}; + var re = /^#.*|^({[\s\S]*})\s*$|^(\S+) (.*)$|^((?:\n*\t.*)+)/gm; + var m; + while (m = re.exec(str)) { + if (m[1]) { + try { + snippet = JSON.parse(m[1]); + list.push(snippet); + } catch (e) {} + } if (m[4]) { + snippet.content = m[4].replace(/^\t/gm, ""); + list.push(snippet); + snippet = {}; + } else { + var key = m[2], val = m[3]; + if (key == "regex") { + var guardRe = /\/((?:[^\/\\]|\\.)*)|$/g; + snippet.guard = guardRe.exec(val)[1]; + snippet.trigger = guardRe.exec(val)[1]; + snippet.endTrigger = guardRe.exec(val)[1]; + snippet.endGuard = guardRe.exec(val)[1]; + } else if (key == "snippet") { + snippet.tabTrigger = val.match(/^\S*/)[0]; + if (!snippet.name) + snippet.name = val; + } else { + snippet[key] = val; + } + } + } + return list; + }; + this.getSnippetByName = function(name, editor) { + var snippetMap = this.snippetNameMap; + var snippet; + this.getActiveScopes(editor).some(function(scope) { + var snippets = snippetMap[scope]; + if (snippets) + snippet = snippets[name]; + return !!snippet; + }, this); + return snippet; + }; + +}).call(SnippetManager.prototype); + + +var TabstopManager = function(editor) { + if (editor.tabstopManager) + return editor.tabstopManager; + editor.tabstopManager = this; + this.$onChange = this.onChange.bind(this); + this.$onChangeSelection = lang.delayedCall(this.onChangeSelection.bind(this)).schedule; + this.$onChangeSession = this.onChangeSession.bind(this); + this.$onAfterExec = this.onAfterExec.bind(this); + this.attach(editor); +}; +(function() { + this.attach = function(editor) { + this.index = 0; + this.ranges = []; + this.tabstops = []; + this.$openTabstops = null; + this.selectedTabstop = null; + + this.editor = editor; + this.editor.on("change", this.$onChange); + this.editor.on("changeSelection", this.$onChangeSelection); + this.editor.on("changeSession", this.$onChangeSession); + this.editor.commands.on("afterExec", this.$onAfterExec); + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + }; + this.detach = function() { + this.tabstops.forEach(this.removeTabstopMarkers, this); + this.ranges = null; + this.tabstops = null; + this.selectedTabstop = null; + this.editor.removeListener("change", this.$onChange); + this.editor.removeListener("changeSelection", this.$onChangeSelection); + this.editor.removeListener("changeSession", this.$onChangeSession); + this.editor.commands.removeListener("afterExec", this.$onAfterExec); + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.tabstopManager = null; + this.editor = null; + }; + + this.onChange = function(delta) { + var isRemove = delta.action[0] == "r"; + var parents = this.selectedTabstop && this.selectedTabstop.parents || {}; + var tabstops = (this.tabstops || []).slice(); + for (var i = 0; i < tabstops.length; i++) { + var ts = tabstops[i]; + var active = ts == this.selectedTabstop || parents[ts.index]; + ts.rangeList.$bias = active ? 0 : 1; + + if (delta.action == "remove" && ts !== this.selectedTabstop) { + var parentActive = ts.parents && ts.parents[this.selectedTabstop.index]; + var startIndex = ts.rangeList.pointIndex(delta.start, parentActive); + startIndex = startIndex < 0 ? -startIndex - 1 : startIndex + 1; + var endIndex = ts.rangeList.pointIndex(delta.end, parentActive); + endIndex = endIndex < 0 ? -endIndex - 1 : endIndex - 1; + var toRemove = ts.rangeList.ranges.slice(startIndex, endIndex); + for (var j = 0; j < toRemove.length; j++) + this.removeRange(toRemove[j]); + } + ts.rangeList.$onChange(delta); + } + var session = this.editor.session; + if (!this.$inChange && isRemove && session.getLength() == 1 && !session.getValue()) + this.detach(); + }; + this.updateLinkedFields = function() { + var ts = this.selectedTabstop; + if (!ts || !ts.hasLinkedRanges || !ts.firstNonLinked) + return; + this.$inChange = true; + var session = this.editor.session; + var text = session.getTextRange(ts.firstNonLinked); + for (var i = 0; i < ts.length; i++) { + var range = ts[i]; + if (!range.linked) + continue; + var original = range.original; + var fmt = exports.snippetManager.tmStrFormat(text, original, this.editor); + session.replace(range, fmt); + } + this.$inChange = false; + }; + this.onAfterExec = function(e) { + if (e.command && !e.command.readOnly) + this.updateLinkedFields(); + }; + this.onChangeSelection = function() { + if (!this.editor) + return; + var lead = this.editor.selection.lead; + var anchor = this.editor.selection.anchor; + var isEmpty = this.editor.selection.isEmpty(); + for (var i = 0; i < this.ranges.length; i++) { + if (this.ranges[i].linked) + continue; + var containsLead = this.ranges[i].contains(lead.row, lead.column); + var containsAnchor = isEmpty || this.ranges[i].contains(anchor.row, anchor.column); + if (containsLead && containsAnchor) + return; + } + this.detach(); + }; + this.onChangeSession = function() { + this.detach(); + }; + this.tabNext = function(dir) { + var max = this.tabstops.length; + var index = this.index + (dir || 1); + index = Math.min(Math.max(index, 1), max); + if (index == max) + index = 0; + this.selectTabstop(index); + if (index === 0) + this.detach(); + }; + this.selectTabstop = function(index) { + this.$openTabstops = null; + var ts = this.tabstops[this.index]; + if (ts) + this.addTabstopMarkers(ts); + this.index = index; + ts = this.tabstops[this.index]; + if (!ts || !ts.length) + return; + + this.selectedTabstop = ts; + var range = ts.firstNonLinked || ts; + if (!this.editor.inVirtualSelectionMode) { + var sel = this.editor.multiSelect; + sel.toSingleRange(range.clone()); + for (var i = 0; i < ts.length; i++) { + if (ts.hasLinkedRanges && ts[i].linked) + continue; + sel.addRange(ts[i].clone(), true); + } + if (sel.ranges[0]) + sel.addRange(sel.ranges[0].clone()); + } else { + this.editor.selection.setRange(range); + } + + this.editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + if (this.selectedTabstop && this.selectedTabstop.choices) + this.editor.execCommand("startAutocomplete", {matches: this.selectedTabstop.choices}); + }; + this.addTabstops = function(tabstops, start, end) { + var useLink = this.useLink || !this.editor.getOption("enableMultiselect"); + + if (!this.$openTabstops) + this.$openTabstops = []; + if (!tabstops[0]) { + var p = Range.fromPoints(end, end); + moveRelative(p.start, start); + moveRelative(p.end, start); + tabstops[0] = [p]; + tabstops[0].index = 0; + } + + var i = this.index; + var arg = [i + 1, 0]; + var ranges = this.ranges; + tabstops.forEach(function(ts, index) { + var dest = this.$openTabstops[index] || ts; + ts.rangeList = new RangeList(); + ts.rangeList.$bias = 0; + + for (var i = 0; i < ts.length; i++) { + var p = ts[i]; + var range = Range.fromPoints(p.start, p.end || p.start); + movePoint(range.start, start); + movePoint(range.end, start); + range.original = p; + range.tabstop = dest; + ranges.push(range); + ts.rangeList.ranges.push(range); + if (dest != ts) + dest.unshift(range); + else + dest[i] = range; + if (p.fmtString || (dest.firstNonLinked && useLink)) { + range.linked = true; + dest.hasLinkedRanges = true; + } else if (!dest.firstNonLinked) + dest.firstNonLinked = range; + } + if (!dest.firstNonLinked) + dest.hasLinkedRanges = false; + if (dest === ts) { + arg.push(dest); + this.$openTabstops[index] = dest; + } + this.addTabstopMarkers(dest); + }, this); + + if (arg.length > 2) { + if (this.tabstops.length) + arg.push(arg.splice(2, 1)[0]); + this.tabstops.splice.apply(this.tabstops, arg); + } + }; + + this.addTabstopMarkers = function(ts) { + var session = this.editor.session; + ts.forEach(function(range) { + if (!range.markerId) + range.markerId = session.addMarker(range, "ace_snippet-marker", "text"); + }); + }; + this.removeTabstopMarkers = function(ts) { + var session = this.editor.session; + ts.forEach(function(range) { + session.removeMarker(range.markerId); + range.markerId = null; + }); + }; + this.removeRange = function(range) { + var i = range.tabstop.indexOf(range); + if (i != -1) range.tabstop.splice(i, 1); + i = this.ranges.indexOf(range); + if (i != -1) this.ranges.splice(i, 1); + i = range.tabstop.rangeList.ranges.indexOf(range); + if (i != -1) range.tabstop.splice(i, 1); + this.editor.session.removeMarker(range.markerId); + if (!range.tabstop.length) { + i = this.tabstops.indexOf(range.tabstop); + if (i != -1) + this.tabstops.splice(i, 1); + if (!this.tabstops.length) + this.detach(); + } + }; + + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys({ + "Tab": function(ed) { + if (exports.snippetManager && exports.snippetManager.expandWithTab(ed)) { + return; + } + + ed.tabstopManager.tabNext(1); + }, + "Shift-Tab": function(ed) { + ed.tabstopManager.tabNext(-1); + }, + "Esc": function(ed) { + ed.tabstopManager.detach(); + }, + "Return": function(ed) { + return false; + } + }); +}).call(TabstopManager.prototype); + + + +var movePoint = function(point, diff) { + if (point.row == 0) + point.column += diff.column; + point.row += diff.row; +}; + +var moveRelative = function(point, start) { + if (point.row == start.row) + point.column -= start.column; + point.row -= start.row; +}; + + +require("./lib/dom").importCssString("\ +.ace_snippet-marker {\ + -moz-box-sizing: border-box;\ + box-sizing: border-box;\ + background: rgba(194, 193, 208, 0.09);\ + border: 1px dotted rgba(211, 208, 235, 0.62);\ + position: absolute;\ +}"); + +exports.snippetManager = new SnippetManager(); + + +var Editor = require("./editor").Editor; +(function() { + this.insertSnippet = function(content, options) { + return exports.snippetManager.insertSnippet(this, content, options); + }; + this.expandSnippet = function(options) { + return exports.snippetManager.expandWithTab(this, options); + }; +}).call(Editor.prototype); + +}); + +define("ace/autocomplete",["require","exports","module","ace/keyboard/hash_handler","ace/autocomplete/popup","ace/autocomplete/util","ace/lib/lang","ace/lib/dom","ace/snippets","ace/config"], function(require, exports, module) { +"use strict"; + +var HashHandler = require("./keyboard/hash_handler").HashHandler; +var AcePopup = require("./autocomplete/popup").AcePopup; +var util = require("./autocomplete/util"); +var lang = require("./lib/lang"); +var dom = require("./lib/dom"); +var snippetManager = require("./snippets").snippetManager; +var config = require("./config"); + +var Autocomplete = function() { + this.autoInsert = false; + this.autoSelect = true; + this.exactMatch = false; + this.gatherCompletionsId = 0; + this.keyboardHandler = new HashHandler(); + this.keyboardHandler.bindKeys(this.commands); + + this.blurListener = this.blurListener.bind(this); + this.changeListener = this.changeListener.bind(this); + this.mousedownListener = this.mousedownListener.bind(this); + this.mousewheelListener = this.mousewheelListener.bind(this); + + this.changeTimer = lang.delayedCall(function() { + this.updateCompletions(true); + }.bind(this)); + + this.tooltipTimer = lang.delayedCall(this.updateDocTooltip.bind(this), 50); +}; + +(function() { + + this.$init = function() { + this.popup = new AcePopup(document.body || document.documentElement); + this.popup.on("click", function(e) { + this.insertMatch(); + e.stop(); + }.bind(this)); + this.popup.focus = this.editor.focus.bind(this.editor); + this.popup.on("show", this.tooltipTimer.bind(null, null)); + this.popup.on("select", this.tooltipTimer.bind(null, null)); + this.popup.on("changeHoverMarker", this.tooltipTimer.bind(null, null)); + return this.popup; + }; + + this.getPopup = function() { + return this.popup || this.$init(); + }; + + this.openPopup = function(editor, prefix, keepPopupPosition) { + if (!this.popup) + this.$init(); + + this.popup.autoSelect = this.autoSelect; + + this.popup.setData(this.completions.filtered, this.completions.filterText); + + editor.keyBinding.addKeyboardHandler(this.keyboardHandler); + + var renderer = editor.renderer; + this.popup.setRow(this.autoSelect ? 0 : -1); + if (!keepPopupPosition) { + this.popup.setTheme(editor.getTheme()); + this.popup.setFontSize(editor.getFontSize()); + + var lineHeight = renderer.layerConfig.lineHeight; + + var pos = renderer.$cursorLayer.getPixelPosition(this.base, true); + pos.left -= this.popup.getTextLeftOffset(); + + var rect = editor.container.getBoundingClientRect(); + pos.top += rect.top - renderer.layerConfig.offset; + pos.left += rect.left - editor.renderer.scrollLeft; + pos.left += renderer.gutterWidth; + + this.popup.show(pos, lineHeight); + } else if (keepPopupPosition && !prefix) { + this.detach(); + } + }; + + this.detach = function() { + this.editor.keyBinding.removeKeyboardHandler(this.keyboardHandler); + this.editor.off("changeSelection", this.changeListener); + this.editor.off("blur", this.blurListener); + this.editor.off("mousedown", this.mousedownListener); + this.editor.off("mousewheel", this.mousewheelListener); + this.changeTimer.cancel(); + this.hideDocTooltip(); + + this.gatherCompletionsId += 1; + if (this.popup && this.popup.isOpen) + this.popup.hide(); + + if (this.base) + this.base.detach(); + this.activated = false; + this.completions = this.base = null; + }; + + this.changeListener = function(e) { + var cursor = this.editor.selection.lead; + if (cursor.row != this.base.row || cursor.column < this.base.column) { + this.detach(); + } + if (this.activated) + this.changeTimer.schedule(); + else + this.detach(); + }; + + this.blurListener = function(e) { + var el = document.activeElement; + var text = this.editor.textInput.getElement(); + var fromTooltip = e.relatedTarget && this.tooltipNode && this.tooltipNode.contains(e.relatedTarget); + var container = this.popup && this.popup.container; + if (el != text && el.parentNode != container && !fromTooltip + && el != this.tooltipNode && e.relatedTarget != text + ) { + this.detach(); + } + }; + + this.mousedownListener = function(e) { + this.detach(); + }; + + this.mousewheelListener = function(e) { + this.detach(); + }; + + this.goTo = function(where) { + this.popup.goTo(where); + }; + + this.insertMatch = function(data, options) { + if (!data) + data = this.popup.getData(this.popup.getRow()); + if (!data) + return false; + + if (data.completer && data.completer.insertMatch) { + data.completer.insertMatch(this.editor, data); + } else { + if (this.completions.filterText) { + var ranges = this.editor.selection.getAllRanges(); + for (var i = 0, range; range = ranges[i]; i++) { + range.start.column -= this.completions.filterText.length; + this.editor.session.remove(range); + } + } + if (data.snippet) + snippetManager.insertSnippet(this.editor, data.snippet); + else + this.editor.execCommand("insertstring", data.value || data); + } + this.detach(); + }; + + + this.commands = { + "Up": function(editor) { editor.completer.goTo("up"); }, + "Down": function(editor) { editor.completer.goTo("down"); }, + "Ctrl-Up|Ctrl-Home": function(editor) { editor.completer.goTo("start"); }, + "Ctrl-Down|Ctrl-End": function(editor) { editor.completer.goTo("end"); }, + + "Esc": function(editor) { editor.completer.detach(); }, + "Return": function(editor) { return editor.completer.insertMatch(); }, + "Shift-Return": function(editor) { editor.completer.insertMatch(null, {deleteSuffix: true}); }, + "Tab": function(editor) { + var result = editor.completer.insertMatch(); + if (!result && !editor.tabstopManager) + editor.completer.goTo("down"); + else + return result; + }, + + "PageUp": function(editor) { editor.completer.popup.gotoPageUp(); }, + "PageDown": function(editor) { editor.completer.popup.gotoPageDown(); } + }; + + this.gatherCompletions = function(editor, callback) { + var session = editor.getSession(); + var pos = editor.getCursorPosition(); + + var prefix = util.getCompletionPrefix(editor); + + this.base = session.doc.createAnchor(pos.row, pos.column - prefix.length); + this.base.$insertRight = true; + + var matches = []; + var total = editor.completers.length; + editor.completers.forEach(function(completer, i) { + completer.getCompletions(editor, session, pos, prefix, function(err, results) { + if (!err && results) + matches = matches.concat(results); + callback(null, { + prefix: util.getCompletionPrefix(editor), + matches: matches, + finished: (--total === 0) + }); + }); + }); + return true; + }; + + this.showPopup = function(editor, options) { + if (this.editor) + this.detach(); + + this.activated = true; + + this.editor = editor; + if (editor.completer != this) { + if (editor.completer) + editor.completer.detach(); + editor.completer = this; + } + + editor.on("changeSelection", this.changeListener); + editor.on("blur", this.blurListener); + editor.on("mousedown", this.mousedownListener); + editor.on("mousewheel", this.mousewheelListener); + + this.updateCompletions(false, options); + }; + + this.updateCompletions = function(keepPopupPosition, options) { + if (keepPopupPosition && this.base && this.completions) { + var pos = this.editor.getCursorPosition(); + var prefix = this.editor.session.getTextRange({start: this.base, end: pos}); + if (prefix == this.completions.filterText) + return; + this.completions.setFilter(prefix); + if (!this.completions.filtered.length) + return this.detach(); + if (this.completions.filtered.length == 1 + && this.completions.filtered[0].value == prefix + && !this.completions.filtered[0].snippet) + return this.detach(); + this.openPopup(this.editor, prefix, keepPopupPosition); + return; + } + + if (options && options.matches) { + var pos = this.editor.getSelectionRange().start; + this.base = this.editor.session.doc.createAnchor(pos.row, pos.column); + this.base.$insertRight = true; + this.completions = new FilteredList(options.matches); + return this.openPopup(this.editor, "", keepPopupPosition); + } + var _id = this.gatherCompletionsId; + this.gatherCompletions(this.editor, function(err, results) { + var detachIfFinished = function() { + if (!results.finished) return; + return this.detach(); + }.bind(this); + + var prefix = results.prefix; + var matches = results && results.matches; + + if (!matches || !matches.length) + return detachIfFinished(); + if (prefix.indexOf(results.prefix) !== 0 || _id != this.gatherCompletionsId) + return; + + this.completions = new FilteredList(matches); + + if (this.exactMatch) + this.completions.exactMatch = true; + + this.completions.setFilter(prefix); + var filtered = this.completions.filtered; + if (!filtered.length) + return detachIfFinished(); + if (filtered.length == 1 && filtered[0].value == prefix && !filtered[0].snippet) + return detachIfFinished(); + if (this.autoInsert && filtered.length == 1 && results.finished) + return this.insertMatch(filtered[0]); + + this.openPopup(this.editor, prefix, keepPopupPosition); + }.bind(this)); + }; + + this.cancelContextMenu = function() { + this.editor.$mouseHandler.cancelContextMenu(); + }; + + this.updateDocTooltip = function() { + var popup = this.popup; + var all = popup.data; + var selected = all && (all[popup.getHoveredRow()] || all[popup.getRow()]); + var doc = null; + if (!selected || !this.editor || !this.popup.isOpen) + return this.hideDocTooltip(); + this.editor.completers.some(function(completer) { + if (completer.getDocTooltip) + doc = completer.getDocTooltip(selected); + return doc; + }); + if (!doc && typeof selected != "string") + doc = selected; + + if (typeof doc == "string") + doc = {docText: doc}; + if (!doc || !(doc.docHTML || doc.docText)) + return this.hideDocTooltip(); + this.showDocTooltip(doc); + }; + + this.showDocTooltip = function(item) { + if (!this.tooltipNode) { + this.tooltipNode = dom.createElement("div"); + this.tooltipNode.className = "ace_tooltip ace_doc-tooltip"; + this.tooltipNode.style.margin = 0; + this.tooltipNode.style.pointerEvents = "auto"; + this.tooltipNode.tabIndex = -1; + this.tooltipNode.onblur = this.blurListener.bind(this); + this.tooltipNode.onclick = this.onTooltipClick.bind(this); + } + + var tooltipNode = this.tooltipNode; + if (item.docHTML) { + tooltipNode.innerHTML = item.docHTML; + } else if (item.docText) { + tooltipNode.textContent = item.docText; + } + + if (!tooltipNode.parentNode) + document.body.appendChild(tooltipNode); + var popup = this.popup; + var rect = popup.container.getBoundingClientRect(); + tooltipNode.style.top = popup.container.style.top; + tooltipNode.style.bottom = popup.container.style.bottom; + + tooltipNode.style.display = "block"; + if (window.innerWidth - rect.right < 320) { + if (rect.left < 320) { + if(popup.isTopdown) { + tooltipNode.style.top = rect.bottom + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } else { + tooltipNode.style.top = popup.container.offsetTop - tooltipNode.offsetHeight + "px"; + tooltipNode.style.left = rect.left + "px"; + tooltipNode.style.right = ""; + tooltipNode.style.bottom = ""; + } + } else { + tooltipNode.style.right = window.innerWidth - rect.left + "px"; + tooltipNode.style.left = ""; + } + } else { + tooltipNode.style.left = (rect.right + 1) + "px"; + tooltipNode.style.right = ""; + } + }; + + this.hideDocTooltip = function() { + this.tooltipTimer.cancel(); + if (!this.tooltipNode) return; + var el = this.tooltipNode; + if (!this.editor.isFocused() && document.activeElement == el) + this.editor.focus(); + this.tooltipNode = null; + if (el.parentNode) + el.parentNode.removeChild(el); + }; + + this.onTooltipClick = function(e) { + var a = e.target; + while (a && a != this.tooltipNode) { + if (a.nodeName == "A" && a.href) { + a.rel = "noreferrer"; + a.target = "_blank"; + break; + } + a = a.parentNode; + } + }; + + this.destroy = function() { + this.detach(); + if (this.popup) { + this.popup.destroy(); + var el = this.popup.container; + if (el && el.parentNode) + el.parentNode.removeChild(el); + } + if (this.editor && this.editor.completer == this) + this.editor.completer == null; + this.popup = null; + }; + +}).call(Autocomplete.prototype); + + +Autocomplete.for = function(editor) { + if (editor.completer) { + return editor.completer; + } + if (config.get("sharedPopups")) { + if (!Autocomplete.$shared) + Autocomplete.$sharedInstance = new Autocomplete(); + editor.completer = Autocomplete.$sharedInstance; + } else { + editor.completer = new Autocomplete(); + editor.once("destroy", function(e, editor) { + editor.completer.destroy(); + }); + } + return editor.completer; +}; + +Autocomplete.startCommand = { + name: "startAutocomplete", + exec: function(editor, options) { + var completer = Autocomplete.for(editor); + completer.autoInsert = false; + completer.autoSelect = true; + completer.showPopup(editor, options); + completer.cancelContextMenu(); + }, + bindKey: "Ctrl-Space|Ctrl-Shift-Space|Alt-Space" +}; + +var FilteredList = function(array, filterText) { + this.all = array; + this.filtered = array; + this.filterText = filterText || ""; + this.exactMatch = false; +}; +(function(){ + this.setFilter = function(str) { + if (str.length > this.filterText && str.lastIndexOf(this.filterText, 0) === 0) + var matches = this.filtered; + else + var matches = this.all; + + this.filterText = str; + matches = this.filterCompletions(matches, this.filterText); + matches = matches.sort(function(a, b) { + return b.exactMatch - a.exactMatch || b.$score - a.$score + || (a.caption || a.value).localeCompare(b.caption || b.value); + }); + var prev = null; + matches = matches.filter(function(item){ + var caption = item.snippet || item.caption || item.value; + if (caption === prev) return false; + prev = caption; + return true; + }); + + this.filtered = matches; + }; + this.filterCompletions = function(items, needle) { + var results = []; + var upper = needle.toUpperCase(); + var lower = needle.toLowerCase(); + loop: for (var i = 0, item; item = items[i]; i++) { + var caption = item.caption || item.value || item.snippet; + if (!caption) continue; + var lastIndex = -1; + var matchMask = 0; + var penalty = 0; + var index, distance; + + if (this.exactMatch) { + if (needle !== caption.substr(0, needle.length)) + continue loop; + } else { + var fullMatchIndex = caption.toLowerCase().indexOf(lower); + if (fullMatchIndex > -1) { + penalty = fullMatchIndex; + } else { + for (var j = 0; j < needle.length; j++) { + var i1 = caption.indexOf(lower[j], lastIndex + 1); + var i2 = caption.indexOf(upper[j], lastIndex + 1); + index = (i1 >= 0) ? ((i2 < 0 || i1 < i2) ? i1 : i2) : i2; + if (index < 0) + continue loop; + distance = index - lastIndex - 1; + if (distance > 0) { + if (lastIndex === -1) + penalty += 10; + penalty += distance; + matchMask = matchMask | (1 << j); + } + lastIndex = index; + } + } + } + item.matchMask = matchMask; + item.exactMatch = penalty ? 0 : 1; + item.$score = (item.score || 0) - penalty; + results.push(item); + } + return results; + }; +}).call(FilteredList.prototype); + +exports.Autocomplete = Autocomplete; +exports.FilteredList = FilteredList; + +}); + +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +'use strict'; +var dom = require("../../lib/dom"); +var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ +background-color: #F7F7F7;\ +color: black;\ +box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ +padding: 1em 0.5em 2em 1em;\ +overflow: auto;\ +position: absolute;\ +margin: 0;\ +bottom: 0;\ +right: 0;\ +top: 0;\ +z-index: 9991;\ +cursor: default;\ +}\ +.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ +box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ +background-color: rgba(255, 255, 255, 0.6);\ +color: black;\ +}\ +.ace_optionsMenuEntry:hover {\ +background-color: rgba(100, 100, 100, 0.1);\ +transition: all 0.3s\ +}\ +.ace_closeButton {\ +background: rgba(245, 146, 146, 0.5);\ +border: 1px solid #F48A8A;\ +border-radius: 50%;\ +padding: 7px;\ +position: absolute;\ +right: -8px;\ +top: -8px;\ +z-index: 100000;\ +}\ +.ace_closeButton{\ +background: rgba(245, 146, 146, 0.9);\ +}\ +.ace_optionsMenuKey {\ +color: darkslateblue;\ +font-weight: bold;\ +}\ +.ace_optionsMenuCommand {\ +color: darkcyan;\ +font-weight: normal;\ +}\ +.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ +vertical-align: middle;\ +}\ +.ace_optionsMenuEntry button[ace_selected_button=true] {\ +background: #e7e7e7;\ +box-shadow: 1px 0px 2px 0px #adadad inset;\ +border-color: #adadad;\ +}\ +.ace_optionsMenuEntry button {\ +background: white;\ +border: 1px solid lightgray;\ +margin: 0px;\ +}\ +.ace_optionsMenuEntry button:hover{\ +background: #f0f0f0;\ +}"; +dom.importCssString(cssText); + +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + + function close() { + if (!closer) return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + editor.focus(); + closer = null; + callback && callback(); + } + + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + 'background-color: rgba(0, 0, 0, 0.3);'; + closer.addEventListener('click', function() { + close(); + }); + document.addEventListener('keydown', documentEscListener); + + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + + closer.appendChild(contentElement); + document.body.appendChild(closer); + editor.blur(); + return { + close: close + }; +}; + +}); + +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} + +var Mode = function(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function(a, b){ + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } else { + re = "^.*\\.(" + extensions + ")$"; + } + + this.extRe = new RegExp(re, "gi"); +}; + +Mode.prototype.supportsFile = function(filename) { + return filename.match(this.extRe); +}; +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript:["as"], + ADA: ["ada|adb"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl"], + Assembly_x86:["asm|a"], + AutoHotKey: ["ahk"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + BatchFile: ["bat|cmd"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Crystal: ["cr"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|vue|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|jsx"], + JSON: ["json"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + LogiQL: ["logic|lql"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MEL: ["mel"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nginx: ["nginx|conf"], + Nix: ["nix"], + Nim: ["nim"], + NSIS: ["nsi|nsh"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + Perl6: ["p6|pl6|pm6"], + pgSQL: ["pgsql"], + PHP_Laravel_blade: ["blade.php"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + Puppet: ["epp|pp"], + Pig: ["pig"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + Python: ["py"], + R: ["r"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + snippets: ["snippets"], + Soy_Template:["soy"], + Space: ["space"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Twig: ["latte|twig|swig"], + Typescript: ["ts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Django: ["html"] +}; + +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} + +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); + +define("ace/ext/prompt",["require","exports","module","ace/range","ace/lib/dom","ace/ext/menu_tools/get_editor_keyboard_shortcuts","ace/autocomplete","ace/autocomplete/popup","ace/autocomplete/popup","ace/undomanager","ace/tokenizer","ace/ext/menu_tools/overlay_page","ace/ext/modelist"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; +var dom = require("../lib/dom"); +var shortcuts = require("../ext/menu_tools/get_editor_keyboard_shortcuts"); +var FilteredList= require("../autocomplete").FilteredList; +var AcePopup = require('../autocomplete/popup').AcePopup; +var $singleLineEditor = require('../autocomplete/popup').$singleLineEditor; +var UndoManager = require("../undomanager").UndoManager; +var Tokenizer = require("../tokenizer").Tokenizer; +var overlayPage = require("./menu_tools/overlay_page").overlayPage; +var modelist = require("./modelist"); +var openPrompt; + +function prompt(editor, message, options, callback) { + if (typeof message == "object") { + return prompt(editor, "", message, options); + } + if (openPrompt) { + var lastPrompt = openPrompt; + editor = lastPrompt.editor; + lastPrompt.close(); + if (lastPrompt.name && lastPrompt.name == options.name) + return; + } + if (options.$type) + return prompt[options.$type](editor, callback); + + var cmdLine = $singleLineEditor(); + cmdLine.session.setUndoManager(new UndoManager()); + cmdLine.setOption("fontSize", editor.getOption("fontSize")); + + var el = dom.buildDom(["div", {class: "ace_prompt_container"}]); + var overlay = overlayPage(editor, el, done); + el.appendChild(cmdLine.container); + + editor.cmdLine = cmdLine; + cmdLine.setValue(message, 1); + if (options.selection) { + cmdLine.selection.setRange({ + start: cmdLine.session.doc.indexToPosition(options.selection[0]), + end: cmdLine.session.doc.indexToPosition(options.selection[1]) + }); + } + + if (options.getCompletions) { + var popup = new AcePopup(); + popup.renderer.setStyle("ace_autocomplete_inline"); + popup.container.style.display = "block"; + popup.container.style.maxWidth = "600px"; + popup.container.style.width = "100%"; + popup.container.style.marginTop = "3px"; + popup.renderer.setScrollMargin(2, 2, 0, 0); + popup.autoSelect = false; + popup.renderer.$maxLines = 15; + popup.setRow(-1); + popup.on("click", function(e) { + var data = popup.getData(popup.getRow()); + if (!data.error) { + cmdLine.setValue(data.value || data.name || data); + accept(); + e.stop(); + } + }); + el.appendChild(popup.container); + updateCompletions(); + } + + if (options.$rules) { + var tokenizer = new Tokenizer(options.$rules); + cmdLine.session.bgTokenizer.setTokenizer(tokenizer); + } + + function accept() { + var val; + if (popup.getCursorPosition().row > 0) { + val = valueFromRecentList(); + } else { + val = cmdLine.getValue(); + } + var curData = popup.getData(popup.getRow()); + if (curData && !curData.error) { + done(); + options.onAccept && options.onAccept({ + value: val, + item: curData + }, cmdLine); + } + } + + cmdLine.commands.bindKeys({ + "Enter": accept, + "Esc|Shift-Esc": function() { + options.onCancel && options.onCancel(cmdLine.getValue(), cmdLine); + done(); + }, + "Up": function(editor) { popup.goTo("up"); valueFromRecentList();}, + "Down": function(editor) { popup.goTo("down"); valueFromRecentList();}, + "Ctrl-Up|Ctrl-Home": function(editor) { popup.goTo("start"); valueFromRecentList();}, + "Ctrl-Down|Ctrl-End": function(editor) { popup.goTo("end"); valueFromRecentList();}, + "Tab": function(editor) { + popup.goTo("down"); valueFromRecentList(); + }, + "PageUp": function(editor) { popup.gotoPageUp(); valueFromRecentList();}, + "PageDown": function(editor) { popup.gotoPageDown(); valueFromRecentList();} + }); + + function done() { + overlay.close(); + callback && callback(); + openPrompt = null; + } + + cmdLine.on("input", function() { + options.onInput && options.onInput(); + updateCompletions(); + }); + + function updateCompletions() { + if (options.getCompletions) { + var prefix; + if (options.getPrefix) { + prefix = options.getPrefix(cmdLine); + } + + var completions = options.getCompletions(cmdLine); + popup.setData(completions, prefix); + popup.resize(true); + } + } + + function valueFromRecentList() { + var current = popup.getData(popup.getRow()); + if (current && !current.error) + return current.value || current.caption || current; + } + + cmdLine.resize(true); + popup.resize(true); + cmdLine.focus(); + + openPrompt = { + close: done, + name: options.name, + editor: editor + }; +} + +prompt.gotoLine = function(editor, callback) { + function stringifySelection(selection) { + if (!Array.isArray(selection)) + selection = [selection]; + return selection.map(function(r) { + var cursor = r.isBackwards ? r.start: r.end; + var anchor = r.isBackwards ? r.end: r.start; + var row = anchor.row; + var s = (row + 1) + ":" + anchor.column; + + if (anchor.row == cursor.row) { + if (anchor.column != cursor.column) + s += ">" + ":" + cursor.column; + } else { + s += ">" + (cursor.row + 1) + ":" + cursor.column; + } + return s; + }).reverse().join(", "); + } + + prompt(editor, ":" + stringifySelection(editor.selection.toJSON()), { + name: "gotoLine", + selection: [1, Number.MAX_VALUE], + onAccept: function(data) { + var value = data.value; + var _history = prompt.gotoLine._history; + if (!_history) + prompt.gotoLine._history = _history = []; + if (_history.indexOf(value) != -1) + _history.splice(_history.indexOf(value), 1); + _history.unshift(value); + if (_history.length > 20) _history.length = 20; + + + var pos = editor.getCursorPosition(); + var ranges = []; + value.replace(/^:/, "").split(/,/).map(function(str) { + var parts = str.split(/([<>:+-]|c?\d+)|[^c\d<>:+-]+/).filter(Boolean); + var i = 0; + function readPosition() { + var c = parts[i++]; + if (!c) return; + if (c[0] == "c") { + var index = parseInt(c.slice(1)) || 0; + return editor.session.doc.indexToPosition(index); + } + var row = pos.row; + var column = 0; + if (/\d/.test(c)) { + row = parseInt(c) - 1; + c = parts[i++]; + } + if (c == ":") { + c = parts[i++]; + if (/\d/.test(c)) { + column = parseInt(c) || 0; + } + } + return {row: row, column: column}; + } + pos = readPosition(); + var range = Range.fromPoints(pos, pos); + if (parts[i] == ">") { + i++; + range.end = readPosition(); + } + else if (parts[i] == "<") { + i++; + range.start = readPosition(); + } + ranges.unshift(range); + }); + editor.selection.fromJSON(ranges); + var scrollTop = editor.renderer.scrollTop; + editor.renderer.scrollSelectionIntoView( + editor.selection.anchor, + editor.selection.cursor, + 0.5 + ); + editor.renderer.animateScrolling(scrollTop); + }, + history: function() { + var undoManager = editor.session.getUndoManager(); + if (!prompt.gotoLine._history) + return []; + return prompt.gotoLine._history; + + }, + getCompletions: function(cmdLine) { + var value = cmdLine.getValue(); + var m = value.replace(/^:/, "").split(":"); + var row = Math.min(parseInt(m[0]) || 1, editor.session.getLength()) - 1; + var line = editor.session.getLine(row); + var current = value + " " + line; + return [current].concat(this.history()); + }, + $rules: { + start: [{ + regex: /\d+/, + token: "string" + }, { + regex: /[:,><+\-c]/, + token: "keyword" + }] + } + }); +}; + +prompt.commands = function(editor, callback) { + function normalizeName(name) { + return (name || "").replace(/^./, function(x) { + return x.toUpperCase(x); + }).replace(/[a-z][A-Z]/g, function(x) { + return x[0] + " " + x[1].toLowerCase(x); + }); + } + function getEditorCommandsByName(excludeCommands) { + var commandsByName = []; + var commandMap = {}; + editor.keyBinding.$handlers.forEach(function(handler) { + var platform = handler.platform; + var cbn = handler.byName; + for (var i in cbn) { + var key; + if (cbn[i].bindKey && cbn[i].bindKey[platform] !== null) { + key = cbn[i].bindKey["win"]; + } else { + key = ""; + } + + var commands = cbn[i]; + var description = commands.description || normalizeName(commands.name); + if (!Array.isArray(commands)) + commands = [commands]; + commands.forEach(function(command) { + if (typeof command != "string") + command = command.name; + var needle = excludeCommands.find(function(el) { + return el === command; + }); + if (!needle) { + if (commandMap[command]) { + commandMap[command].key += "|" + key; + } else { + commandMap[command] = {key: key, command: command, description: description}; + commandsByName.push(commandMap[command]); + } + } + }); + } + }); + return commandsByName; + } + var excludeCommandsList = ["insertstring", "inserttext", "setIndentation", "paste"]; + var shortcutsArray = getEditorCommandsByName(excludeCommandsList); + shortcutsArray = shortcutsArray.map(function(item) { + return {value: item.description, meta: item.key, command: item.command}; + }); + prompt(editor, "", { + name: "commands", + selection: [0, Number.MAX_VALUE], + maxHistoryCount: 5, + onAccept: function(data) { + if (data.item) { + var commandName = data.item.command; + this.addToHistory(data.item); + + editor.execCommand(commandName); + } + }, + addToHistory: function(item) { + var history = this.history(); + history.unshift(item); + delete item.message; + for (var i = 1; i < history.length; i++) { + if (history[i]["command"] == item.command ) { + history.splice(i, 1); + break; + } + } + if (this.maxHistoryCount > 0 && history.length > this.maxHistoryCount) { + history.splice(history.length - 1, 1); + } + prompt.commands.history = history; + }, + history: function() { + return prompt.commands.history || []; + }, + getPrefix: function(cmdLine) { + var currentPos = cmdLine.getCursorPosition(); + var filterValue = cmdLine.getValue(); + return filterValue.substring(0, currentPos.column); + }, + getCompletions: function(cmdLine) { + function getFilteredCompletions(commands, prefix) { + var resultCommands = JSON.parse(JSON.stringify(commands)); + + var filtered = new FilteredList(resultCommands); + return filtered.filterCompletions(resultCommands, prefix); + } + + function getUniqueCommandList(commands, usedCommands) { + if (!usedCommands || !usedCommands.length) { + return commands; + } + var excludeCommands = []; + usedCommands.forEach(function(item) { + excludeCommands.push(item.command); + }); + + var resultCommands = []; + + commands.forEach(function(item) { + if (excludeCommands.indexOf(item.command) === -1) { + resultCommands.push(item); + } + }); + + return resultCommands; + } + + var prefix = this.getPrefix(cmdLine); + var recentlyUsedCommands = getFilteredCompletions(this.history(), prefix); + var otherCommands = getUniqueCommandList(shortcutsArray, recentlyUsedCommands); + otherCommands = getFilteredCompletions(otherCommands, prefix); + + if (recentlyUsedCommands.length && otherCommands.length) { + recentlyUsedCommands[0]["message"] = " Recently used"; + otherCommands[0]["message"] = " Other commands"; + } + + var completions = recentlyUsedCommands.concat(otherCommands); + return completions.length > 0 ? completions : [{ + value: "No matching commands", + error: 1 + }]; + } + }); +}; + +prompt.modes = function(editor, callback) { + var modesArray = modelist.modes; + modesArray = modesArray.map(function(item) { + return {value: item.caption, mode: item.name}; + }); + prompt(editor, "", { + name: "modes", + selection: [0, Number.MAX_VALUE], + onAccept: function(data) { + if (data.item) { + var modeName = "ace/mode/" + data.item.mode; + editor.session.setMode(modeName); + } + }, + getPrefix: function(cmdLine) { + var currentPos = cmdLine.getCursorPosition(); + var filterValue = cmdLine.getValue(); + return filterValue.substring(0, currentPos.column); + }, + getCompletions: function(cmdLine) { + function getFilteredCompletions(modes, prefix) { + var resultCommands = JSON.parse(JSON.stringify(modes)); + + var filtered = new FilteredList(resultCommands); + return filtered.filterCompletions(resultCommands, prefix); + } + + var prefix = this.getPrefix(cmdLine); + var completions = getFilteredCompletions(modesArray, prefix); + return completions.length > 0 ? completions : [{ + "caption": "No mode matching", + "value": "No mode matching", + "error": 1 + }]; + } + }); +}; + +dom.importCssString(".ace_prompt_container {\ + max-width: 600px;\ + width: 100%;\ + margin: 20px auto;\ + padding: 3px;\ + background: white;\ + border-radius: 2px;\ + box-shadow: 0px 2px 3px 0px #555;\ +}"); + + +exports.prompt = prompt; + +}); (function() { + window.require(["ace/ext/prompt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/ext-rtl.js b/htdocs/includes/ace/src/ext-rtl.js new file mode 100644 index 00000000000..39ebfd9d6a8 --- /dev/null +++ b/htdocs/includes/ace/src/ext-rtl.js @@ -0,0 +1,122 @@ +define("ace/ext/rtl",["require","exports","module","ace/editor","ace/config"], function(require, exports, module) { +"use strict"; + +var commands = [{ + name: "leftToRight", + bindKey: { win: "Ctrl-Alt-Shift-L", mac: "Command-Alt-Shift-L" }, + exec: function(editor) { + editor.session.$bidiHandler.setRtlDirection(editor, false); + }, + readOnly: true +}, { + name: "rightToLeft", + bindKey: { win: "Ctrl-Alt-Shift-R", mac: "Command-Alt-Shift-R" }, + exec: function(editor) { + editor.session.$bidiHandler.setRtlDirection(editor, true); + }, + readOnly: true +}]; + +var Editor = require("../editor").Editor; +require("../config").defineOptions(Editor.prototype, "editor", { + rtlText: { + set: function(val) { + if (val) { + this.on("change", onChange); + this.on("changeSelection", onChangeSelection); + this.renderer.on("afterRender", updateLineDirection); + this.commands.on("exec", onCommandEmitted); + this.commands.addCommands(commands); + } else { + this.off("change", onChange); + this.off("changeSelection", onChangeSelection); + this.renderer.off("afterRender", updateLineDirection); + this.commands.off("exec", onCommandEmitted); + this.commands.removeCommands(commands); + clearTextLayer(this.renderer); + } + this.renderer.updateFull(); + } + }, + rtl: { + set: function(val) { + this.session.$bidiHandler.$isRtl = val; + if (val) { + this.setOption("rtlText", false); + this.renderer.on("afterRender", updateLineDirection); + this.session.$bidiHandler.seenBidi = true; + } else { + this.renderer.off("afterRender", updateLineDirection); + clearTextLayer(this.renderer); + } + this.renderer.updateFull(); + } + } +}); +function onChangeSelection(e, editor) { + var lead = editor.getSelection().lead; + if (editor.session.$bidiHandler.isRtlLine(lead.row)) { + if (lead.column === 0) { + if (editor.session.$bidiHandler.isMoveLeftOperation && lead.row > 0) { + editor.getSelection().moveCursorTo(lead.row - 1, editor.session.getLine(lead.row - 1).length); + } else { + if (editor.getSelection().isEmpty()) + lead.column += 1; + else + lead.setPosition(lead.row, lead.column + 1); + } + } + } +} + +function onCommandEmitted(commadEvent) { + commadEvent.editor.session.$bidiHandler.isMoveLeftOperation = /gotoleft|selectleft|backspace|removewordleft/.test(commadEvent.command.name); +} +function onChange(delta, editor) { + var session = editor.session; + session.$bidiHandler.currentRow = null; + if (session.$bidiHandler.isRtlLine(delta.start.row) && delta.action === 'insert' && delta.lines.length > 1) { + for (var row = delta.start.row; row < delta.end.row; row++) { + if (session.getLine(row + 1).charAt(0) !== session.$bidiHandler.RLE) + session.doc.$lines[row + 1] = session.$bidiHandler.RLE + session.getLine(row + 1); + } + } +} + +function updateLineDirection(e, renderer) { + var session = renderer.session; + var $bidiHandler = session.$bidiHandler; + var cells = renderer.$textLayer.$lines.cells; + var width = renderer.layerConfig.width - renderer.layerConfig.padding + "px"; + cells.forEach(function(cell) { + var style = cell.element.style; + if ($bidiHandler && $bidiHandler.isRtlLine(cell.row)) { + style.direction = "rtl"; + style.textAlign = "right"; + style.width = width; + } else { + style.direction = ""; + style.textAlign = ""; + style.width = ""; + } + }); +} + +function clearTextLayer(renderer) { + var lines = renderer.$textLayer.$lines; + lines.cells.forEach(clear); + lines.cellCache.forEach(clear); + function clear(cell) { + var style = cell.element.style; + style.direction = style.textAlign = style.width = ""; + } +} + +}); (function() { + window.require(["ace/ext/rtl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/ext-searchbox.js b/htdocs/includes/ace/src/ext-searchbox.js similarity index 84% rename from htdocs/includes/ace/ext-searchbox.js rename to htdocs/includes/ace/src/ext-searchbox.js index 81b936bd3a0..4fbe7933506 100644 --- a/htdocs/includes/ace/ext-searchbox.js +++ b/htdocs/includes/ace/src/ext-searchbox.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { +define("ace/ext/searchbox",["require","exports","module","ace/lib/dom","ace/lib/lang","ace/lib/event","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); @@ -45,7 +45,6 @@ background-color: white;\ color: black;\ border: 1px solid #cbcbcb;\ border-right: 0 none;\ -box-sizing: border-box!important;\ outline: 0;\ padding: 0;\ font-size: inherit;\ @@ -54,6 +53,8 @@ line-height: inherit;\ padding: 0 6px;\ min-width: 17em;\ vertical-align: top;\ +min-height: 1.8em;\ +box-sizing: content-box;\ }\ .ace_searchbtn {\ border: 1px solid #cbcbcb;\ @@ -66,7 +67,6 @@ border-left: 1px solid #dcdcdc;\ cursor: pointer;\ margin: 0;\ position: relative;\ -box-sizing: content-box!important;\ color: #666;\ }\ .ace_searchbtn:last-child {\ @@ -162,39 +162,38 @@ var MAX_COUNT = 999; dom.importCssString(searchboxCss, "ace_searchbox"); -var html = ''.replace(/> +/g, ">"); - var SearchBox = function(editor, range, showReplaceForm) { var div = dom.createElement("div"); - div.innerHTML = html; + dom.buildDom(["div", {class:"ace_search right"}, + ["span", {action: "hide", class: "ace_searchbtn_close"}], + ["div", {class: "ace_search_form"}, + ["input", {class: "ace_search_field", placeholder: "Search for", spellcheck: "false"}], + ["span", {action: "findPrev", class: "ace_searchbtn prev"}, "\u200b"], + ["span", {action: "findNext", class: "ace_searchbtn next"}, "\u200b"], + ["span", {action: "findAll", class: "ace_searchbtn", title: "Alt-Enter"}, "All"] + ], + ["div", {class: "ace_replace_form"}, + ["input", {class: "ace_search_field", placeholder: "Replace with", spellcheck: "false"}], + ["span", {action: "replaceAndFindNext", class: "ace_searchbtn"}, "Replace"], + ["span", {action: "replaceAll", class: "ace_searchbtn"}, "All"] + ], + ["div", {class: "ace_search_options"}, + ["span", {action: "toggleReplace", class: "ace_button", title: "Toggle Replace mode", + style: "float:left;margin-top:-2px;padding:0 5px;"}, "+"], + ["span", {class: "ace_search_counter"}], + ["span", {action: "toggleRegexpMode", class: "ace_button", title: "RegExp Search"}, ".*"], + ["span", {action: "toggleCaseSensitive", class: "ace_button", title: "CaseSensitive Search"}, "Aa"], + ["span", {action: "toggleWholeWords", class: "ace_button", title: "Whole Word Search"}, "\\b"], + ["span", {action: "searchInSelection", class: "ace_button", title: "Search In Selection"}, "S"] + ] + ], div); this.element = div.firstChild; this.setSession = this.setSession.bind(this); this.$init(); this.setEditor(editor); + dom.importCssString(searchboxCss, "ace_searchbox", editor.container); }; (function() { @@ -205,10 +204,9 @@ var SearchBox = function(editor, range, showReplaceForm) { }; this.setSession = function(e) { - debugger this.searchRange = null; this.$syncOptions(true); - } + }; this.$initElements = function(sb) { this.searchBox = sb.querySelector(".ace_search_form"); @@ -287,6 +285,8 @@ var SearchBox = function(editor, range, showReplaceForm) { sb.searchInput.focus(); }, "Ctrl-H|Command-Option-F": function(sb) { + if (sb.editor.getReadOnly()) + return; sb.replaceOption.checked = true; sb.$syncOptions(); sb.replaceInput.focus(); @@ -364,7 +364,7 @@ var SearchBox = function(editor, range, showReplaceForm) { this.editor.session.removeMarker(this.searchRangeMarker); this.searchRangeMarker = null; } - } + }; this.$syncOptions = function(preventScroll) { dom.setCssClass(this.replaceOption, "checked", this.searchRange); @@ -373,13 +373,15 @@ var SearchBox = function(editor, range, showReplaceForm) { dom.setCssClass(this.regExpOption, "checked", this.regExpOption.checked); dom.setCssClass(this.wholeWordOption, "checked", this.wholeWordOption.checked); dom.setCssClass(this.caseSensitiveOption, "checked", this.caseSensitiveOption.checked); - this.replaceBox.style.display = this.replaceOption.checked ? "" : "none"; + var readOnly = this.editor.getReadOnly(); + this.replaceOption.style.display = readOnly ? "none" : ""; + this.replaceBox.style.display = this.replaceOption.checked && !readOnly ? "" : "none"; this.find(false, false, preventScroll); }; this.highlight = function(re) { this.editor.session.highlight(re || this.editor.$search.$options.re); - this.editor.renderer.updateBackMarkers() + this.editor.renderer.updateBackMarkers(); }; this.find = function(skipCurrent, backwards, preventScroll) { var range = this.editor.find(this.searchInput.value, { @@ -402,7 +404,7 @@ var SearchBox = function(editor, range, showReplaceForm) { var editor = this.editor; var regex = editor.$search.$options.re; var all = 0; - var before = 0 + var before = 0; if (regex) { var value = this.searchRange ? editor.session.getTextRange(this.searchRange) @@ -420,7 +422,7 @@ var SearchBox = function(editor, range, showReplaceForm) { if (last <= offset) before++; if (all > MAX_COUNT) - break + break; if (!m[0]) { regex.lastIndex = last += 1; if (last >= value.length) @@ -455,7 +457,7 @@ var SearchBox = function(editor, range, showReplaceForm) { this.replaceAndFindNext = function() { if (!this.editor.getReadOnly()) { this.editor.replace(this.replaceInput.value); - this.findNext() + this.findNext(); } }; this.replaceAll = function() { @@ -465,7 +467,7 @@ var SearchBox = function(editor, range, showReplaceForm) { this.hide = function() { this.active = false; - this.setSearchRange(null) + this.setSearchRange(null); this.editor.off("changeSession", this.setSession); this.element.style.display = "none"; @@ -492,7 +494,7 @@ var SearchBox = function(editor, range, showReplaceForm) { this.isFocused = function() { var el = document.activeElement; return el == this.searchInput || el == this.replaceInput; - } + }; }).call(SearchBox.prototype); exports.SearchBox = SearchBox; @@ -502,8 +504,11 @@ exports.Search = function(editor, isReplace) { sb.show(editor.session.getTextRange(), isReplace); }; -}); - (function() { - ace.require(["ace/ext/searchbox"], function() {}); +}); (function() { + window.require(["ace/ext/searchbox"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/src/ext-settings_menu.js b/htdocs/includes/ace/src/ext-settings_menu.js new file mode 100644 index 00000000000..d10afac8f34 --- /dev/null +++ b/htdocs/includes/ace/src/ext-settings_menu.js @@ -0,0 +1,772 @@ +define("ace/ext/menu_tools/overlay_page",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +'use strict'; +var dom = require("../../lib/dom"); +var cssText = "#ace_settingsmenu, #kbshortcutmenu {\ +background-color: #F7F7F7;\ +color: black;\ +box-shadow: -5px 4px 5px rgba(126, 126, 126, 0.55);\ +padding: 1em 0.5em 2em 1em;\ +overflow: auto;\ +position: absolute;\ +margin: 0;\ +bottom: 0;\ +right: 0;\ +top: 0;\ +z-index: 9991;\ +cursor: default;\ +}\ +.ace_dark #ace_settingsmenu, .ace_dark #kbshortcutmenu {\ +box-shadow: -20px 10px 25px rgba(126, 126, 126, 0.25);\ +background-color: rgba(255, 255, 255, 0.6);\ +color: black;\ +}\ +.ace_optionsMenuEntry:hover {\ +background-color: rgba(100, 100, 100, 0.1);\ +transition: all 0.3s\ +}\ +.ace_closeButton {\ +background: rgba(245, 146, 146, 0.5);\ +border: 1px solid #F48A8A;\ +border-radius: 50%;\ +padding: 7px;\ +position: absolute;\ +right: -8px;\ +top: -8px;\ +z-index: 100000;\ +}\ +.ace_closeButton{\ +background: rgba(245, 146, 146, 0.9);\ +}\ +.ace_optionsMenuKey {\ +color: darkslateblue;\ +font-weight: bold;\ +}\ +.ace_optionsMenuCommand {\ +color: darkcyan;\ +font-weight: normal;\ +}\ +.ace_optionsMenuEntry input, .ace_optionsMenuEntry button {\ +vertical-align: middle;\ +}\ +.ace_optionsMenuEntry button[ace_selected_button=true] {\ +background: #e7e7e7;\ +box-shadow: 1px 0px 2px 0px #adadad inset;\ +border-color: #adadad;\ +}\ +.ace_optionsMenuEntry button {\ +background: white;\ +border: 1px solid lightgray;\ +margin: 0px;\ +}\ +.ace_optionsMenuEntry button:hover{\ +background: #f0f0f0;\ +}"; +dom.importCssString(cssText); + +module.exports.overlayPage = function overlayPage(editor, contentElement, callback) { + var closer = document.createElement('div'); + + function documentEscListener(e) { + if (e.keyCode === 27) { + close(); + } + } + + function close() { + if (!closer) return; + document.removeEventListener('keydown', documentEscListener); + closer.parentNode.removeChild(closer); + editor.focus(); + closer = null; + callback && callback(); + } + + closer.style.cssText = 'margin: 0; padding: 0; ' + + 'position: fixed; top:0; bottom:0; left:0; right:0;' + + 'z-index: 9990; ' + + 'background-color: rgba(0, 0, 0, 0.3);'; + closer.addEventListener('click', function() { + close(); + }); + document.addEventListener('keydown', documentEscListener); + + contentElement.addEventListener('click', function (e) { + e.stopPropagation(); + }); + + closer.appendChild(contentElement); + document.body.appendChild(closer); + editor.blur(); + return { + close: close + }; +}; + +}); + +define("ace/ext/modelist",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var modes = []; +function getModeForPath(path) { + var mode = modesByName.text; + var fileName = path.split(/[\/\\]/).pop(); + for (var i = 0; i < modes.length; i++) { + if (modes[i].supportsFile(fileName)) { + mode = modes[i]; + break; + } + } + return mode; +} + +var Mode = function(name, caption, extensions) { + this.name = name; + this.caption = caption; + this.mode = "ace/mode/" + name; + this.extensions = extensions; + var re; + if (/\^/.test(extensions)) { + re = extensions.replace(/\|(\^)?/g, function(a, b){ + return "$|" + (b ? "^" : "^.*\\."); + }) + "$"; + } else { + re = "^.*\\.(" + extensions + ")$"; + } + + this.extRe = new RegExp(re, "gi"); +}; + +Mode.prototype.supportsFile = function(filename) { + return filename.match(this.extRe); +}; +var supportedModes = { + ABAP: ["abap"], + ABC: ["abc"], + ActionScript:["as"], + ADA: ["ada|adb"], + Apache_Conf: ["^htaccess|^htgroups|^htpasswd|^conf|htaccess|htgroups|htpasswd"], + AsciiDoc: ["asciidoc|adoc"], + ASL: ["dsl|asl"], + Assembly_x86:["asm|a"], + AutoHotKey: ["ahk"], + Apex: ["apex|cls|trigger|tgr"], + AQL: ["aql"], + BatchFile: ["bat|cmd"], + C_Cpp: ["cpp|c|cc|cxx|h|hh|hpp|ino"], + C9Search: ["c9search_results"], + Crystal: ["cr"], + Cirru: ["cirru|cr"], + Clojure: ["clj|cljs"], + Cobol: ["CBL|COB"], + coffee: ["coffee|cf|cson|^Cakefile"], + ColdFusion: ["cfm"], + CSharp: ["cs"], + Csound_Document: ["csd"], + Csound_Orchestra: ["orc"], + Csound_Score: ["sco"], + CSS: ["css"], + Curly: ["curly"], + D: ["d|di"], + Dart: ["dart"], + Diff: ["diff|patch"], + Dockerfile: ["^Dockerfile"], + Dot: ["dot"], + Drools: ["drl"], + Edifact: ["edi"], + Eiffel: ["e|ge"], + EJS: ["ejs"], + Elixir: ["ex|exs"], + Elm: ["elm"], + Erlang: ["erl|hrl"], + Forth: ["frt|fs|ldr|fth|4th"], + Fortran: ["f|f90"], + FSharp: ["fsi|fs|ml|mli|fsx|fsscript"], + FSL: ["fsl"], + FTL: ["ftl"], + Gcode: ["gcode"], + Gherkin: ["feature"], + Gitignore: ["^.gitignore"], + Glsl: ["glsl|frag|vert"], + Gobstones: ["gbs"], + golang: ["go"], + GraphQLSchema: ["gql"], + Groovy: ["groovy"], + HAML: ["haml"], + Handlebars: ["hbs|handlebars|tpl|mustache"], + Haskell: ["hs"], + Haskell_Cabal: ["cabal"], + haXe: ["hx"], + Hjson: ["hjson"], + HTML: ["html|htm|xhtml|vue|we|wpy"], + HTML_Elixir: ["eex|html.eex"], + HTML_Ruby: ["erb|rhtml|html.erb"], + INI: ["ini|conf|cfg|prefs"], + Io: ["io"], + Jack: ["jack"], + Jade: ["jade|pug"], + Java: ["java"], + JavaScript: ["js|jsm|jsx"], + JSON: ["json"], + JSONiq: ["jq"], + JSP: ["jsp"], + JSSM: ["jssm|jssm_state"], + JSX: ["jsx"], + Julia: ["jl"], + Kotlin: ["kt|kts"], + LaTeX: ["tex|latex|ltx|bib"], + LESS: ["less"], + Liquid: ["liquid"], + Lisp: ["lisp"], + LiveScript: ["ls"], + LogiQL: ["logic|lql"], + LSL: ["lsl"], + Lua: ["lua"], + LuaPage: ["lp"], + Lucene: ["lucene"], + Makefile: ["^Makefile|^GNUmakefile|^makefile|^OCamlMakefile|make"], + Markdown: ["md|markdown"], + Mask: ["mask"], + MATLAB: ["matlab"], + Maze: ["mz"], + MEL: ["mel"], + MIXAL: ["mixal"], + MUSHCode: ["mc|mush"], + MySQL: ["mysql"], + Nginx: ["nginx|conf"], + Nix: ["nix"], + Nim: ["nim"], + NSIS: ["nsi|nsh"], + ObjectiveC: ["m|mm"], + OCaml: ["ml|mli"], + Pascal: ["pas|p"], + Perl: ["pl|pm"], + Perl6: ["p6|pl6|pm6"], + pgSQL: ["pgsql"], + PHP_Laravel_blade: ["blade.php"], + PHP: ["php|inc|phtml|shtml|php3|php4|php5|phps|phpt|aw|ctp|module"], + Puppet: ["epp|pp"], + Pig: ["pig"], + Powershell: ["ps1"], + Praat: ["praat|praatscript|psc|proc"], + Prolog: ["plg|prolog"], + Properties: ["properties"], + Protobuf: ["proto"], + Python: ["py"], + R: ["r"], + Razor: ["cshtml|asp"], + RDoc: ["Rd"], + Red: ["red|reds"], + RHTML: ["Rhtml"], + RST: ["rst"], + Ruby: ["rb|ru|gemspec|rake|^Guardfile|^Rakefile|^Gemfile"], + Rust: ["rs"], + SASS: ["sass"], + SCAD: ["scad"], + Scala: ["scala|sbt"], + Scheme: ["scm|sm|rkt|oak|scheme"], + SCSS: ["scss"], + SH: ["sh|bash|^.bashrc"], + SJS: ["sjs"], + Slim: ["slim|skim"], + Smarty: ["smarty|tpl"], + snippets: ["snippets"], + Soy_Template:["soy"], + Space: ["space"], + SQL: ["sql"], + SQLServer: ["sqlserver"], + Stylus: ["styl|stylus"], + SVG: ["svg"], + Swift: ["swift"], + Tcl: ["tcl"], + Terraform: ["tf", "tfvars", "terragrunt"], + Tex: ["tex"], + Text: ["txt"], + Textile: ["textile"], + Toml: ["toml"], + TSX: ["tsx"], + Twig: ["latte|twig|swig"], + Typescript: ["ts|typescript|str"], + Vala: ["vala"], + VBScript: ["vbs|vb"], + Velocity: ["vm"], + Verilog: ["v|vh|sv|svh"], + VHDL: ["vhd|vhdl"], + Visualforce: ["vfp|component|page"], + Wollok: ["wlk|wpgm|wtest"], + XML: ["xml|rdf|rss|wsdl|xslt|atom|mathml|mml|xul|xbl|xaml"], + XQuery: ["xq"], + YAML: ["yaml|yml"], + Zeek: ["zeek|bro"], + Django: ["html"] +}; + +var nameOverrides = { + ObjectiveC: "Objective-C", + CSharp: "C#", + golang: "Go", + C_Cpp: "C and C++", + Csound_Document: "Csound Document", + Csound_Orchestra: "Csound", + Csound_Score: "Csound Score", + coffee: "CoffeeScript", + HTML_Ruby: "HTML (Ruby)", + HTML_Elixir: "HTML (Elixir)", + FTL: "FreeMarker", + PHP_Laravel_blade: "PHP (Blade Template)", + Perl6: "Perl 6", + AutoHotKey: "AutoHotkey / AutoIt" +}; +var modesByName = {}; +for (var name in supportedModes) { + var data = supportedModes[name]; + var displayName = (nameOverrides[name] || name).replace(/_/g, " "); + var filename = name.toLowerCase(); + var mode = new Mode(filename, displayName, data[0]); + modesByName[filename] = mode; + modes.push(mode); +} + +module.exports = { + getModeForPath: getModeForPath, + modes: modes, + modesByName: modesByName +}; + +}); + +define("ace/ext/themelist",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var themeData = [ + ["Chrome" ], + ["Clouds" ], + ["Crimson Editor" ], + ["Dawn" ], + ["Dreamweaver" ], + ["Eclipse" ], + ["GitHub" ], + ["IPlastic" ], + ["Solarized Light"], + ["TextMate" ], + ["Tomorrow" ], + ["XCode" ], + ["Kuroir"], + ["KatzenMilch"], + ["SQL Server" ,"sqlserver" , "light"], + ["Ambiance" ,"ambiance" , "dark"], + ["Chaos" ,"chaos" , "dark"], + ["Clouds Midnight" ,"clouds_midnight" , "dark"], + ["Dracula" ,"" , "dark"], + ["Cobalt" ,"cobalt" , "dark"], + ["Gruvbox" ,"gruvbox" , "dark"], + ["Green on Black" ,"gob" , "dark"], + ["idle Fingers" ,"idle_fingers" , "dark"], + ["krTheme" ,"kr_theme" , "dark"], + ["Merbivore" ,"merbivore" , "dark"], + ["Merbivore Soft" ,"merbivore_soft" , "dark"], + ["Mono Industrial" ,"mono_industrial" , "dark"], + ["Monokai" ,"monokai" , "dark"], + ["Pastel on dark" ,"pastel_on_dark" , "dark"], + ["Solarized Dark" ,"solarized_dark" , "dark"], + ["Terminal" ,"terminal" , "dark"], + ["Tomorrow Night" ,"tomorrow_night" , "dark"], + ["Tomorrow Night Blue" ,"tomorrow_night_blue" , "dark"], + ["Tomorrow Night Bright","tomorrow_night_bright" , "dark"], + ["Tomorrow Night 80s" ,"tomorrow_night_eighties" , "dark"], + ["Twilight" ,"twilight" , "dark"], + ["Vibrant Ink" ,"vibrant_ink" , "dark"] +]; + + +exports.themesByName = {}; +exports.themes = themeData.map(function(data) { + var name = data[1] || data[0].replace(/ /g, "_").toLowerCase(); + var theme = { + caption: data[0], + theme: "ace/theme/" + name, + isDark: data[2] == "dark", + name: name + }; + exports.themesByName[name] = theme; + return theme; +}); + +}); + +define("ace/ext/options",["require","exports","module","ace/ext/menu_tools/overlay_page","ace/lib/dom","ace/lib/oop","ace/config","ace/lib/event_emitter","ace/ext/modelist","ace/ext/themelist"], function(require, exports, module) { +"use strict"; +var overlayPage = require('./menu_tools/overlay_page').overlayPage; + + +var dom = require("../lib/dom"); +var oop = require("../lib/oop"); +var config = require("../config"); +var EventEmitter = require("../lib/event_emitter").EventEmitter; +var buildDom = dom.buildDom; + +var modelist = require("./modelist"); +var themelist = require("./themelist"); + +var themes = { Bright: [], Dark: [] }; +themelist.themes.forEach(function(x) { + themes[x.isDark ? "Dark" : "Bright"].push({ caption: x.caption, value: x.theme }); +}); + +var modes = modelist.modes.map(function(x){ + return { caption: x.caption, value: x.mode }; +}); + + +var optionGroups = { + Main: { + Mode: { + path: "mode", + type: "select", + items: modes + }, + Theme: { + path: "theme", + type: "select", + items: themes + }, + "Keybinding": { + type: "buttonBar", + path: "keyboardHandler", + items: [ + { caption : "Ace", value : null }, + { caption : "Vim", value : "ace/keyboard/vim" }, + { caption : "Emacs", value : "ace/keyboard/emacs" }, + { caption : "Sublime", value : "ace/keyboard/sublime" } + ] + }, + "Font Size": { + path: "fontSize", + type: "number", + defaultValue: 12, + defaults: [ + {caption: "12px", value: 12}, + {caption: "24px", value: 24} + ] + }, + "Soft Wrap": { + type: "buttonBar", + path: "wrap", + items: [ + { caption : "Off", value : "off" }, + { caption : "View", value : "free" }, + { caption : "margin", value : "printMargin" }, + { caption : "40", value : "40" } + ] + }, + "Cursor Style": { + path: "cursorStyle", + items: [ + { caption : "Ace", value : "ace" }, + { caption : "Slim", value : "slim" }, + { caption : "Smooth", value : "smooth" }, + { caption : "Smooth And Slim", value : "smooth slim" }, + { caption : "Wide", value : "wide" } + ] + }, + "Folding": { + path: "foldStyle", + items: [ + { caption : "Manual", value : "manual" }, + { caption : "Mark begin", value : "markbegin" }, + { caption : "Mark begin and end", value : "markbeginend" } + ] + }, + "Soft Tabs": [{ + path: "useSoftTabs" + }, { + path: "tabSize", + type: "number", + values: [2, 3, 4, 8, 16] + }], + "Overscroll": { + type: "buttonBar", + path: "scrollPastEnd", + items: [ + { caption : "None", value : 0 }, + { caption : "Half", value : 0.5 }, + { caption : "Full", value : 1 } + ] + } + }, + More: { + "Atomic soft tabs": { + path: "navigateWithinSoftTabs" + }, + "Enable Behaviours": { + path: "behavioursEnabled" + }, + "Full Line Selection": { + type: "checkbox", + values: "text|line", + path: "selectionStyle" + }, + "Highlight Active Line": { + path: "highlightActiveLine" + }, + "Show Invisibles": { + path: "showInvisibles" + }, + "Show Indent Guides": { + path: "displayIndentGuides" + }, + "Persistent Scrollbar": [{ + path: "hScrollBarAlwaysVisible" + }, { + path: "vScrollBarAlwaysVisible" + }], + "Animate scrolling": { + path: "animatedScroll" + }, + "Show Gutter": { + path: "showGutter" + }, + "Show Line Numbers": { + path: "showLineNumbers" + }, + "Relative Line Numbers": { + path: "relativeLineNumbers" + }, + "Fixed Gutter Width": { + path: "fixedWidthGutter" + }, + "Show Print Margin": [{ + path: "showPrintMargin" + }, { + type: "number", + path: "printMarginColumn" + }], + "Indented Soft Wrap": { + path: "indentedSoftWrap" + }, + "Highlight selected word": { + path: "highlightSelectedWord" + }, + "Fade Fold Widgets": { + path: "fadeFoldWidgets" + }, + "Use textarea for IME": { + path: "useTextareaForIME" + }, + "Merge Undo Deltas": { + path: "mergeUndoDeltas", + items: [ + { caption : "Always", value : "always" }, + { caption : "Never", value : "false" }, + { caption : "Timed", value : "true" } + ] + }, + "Elastic Tabstops": { + path: "useElasticTabstops" + }, + "Incremental Search": { + path: "useIncrementalSearch" + }, + "Read-only": { + path: "readOnly" + }, + "Copy without selection": { + path: "copyWithEmptySelection" + }, + "Live Autocompletion": { + path: "enableLiveAutocompletion" + } + } +}; + + +var OptionPanel = function(editor, element) { + this.editor = editor; + this.container = element || document.createElement("div"); + this.groups = []; + this.options = {}; +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.add = function(config) { + if (config.Main) + oop.mixin(optionGroups.Main, config.Main); + if (config.More) + oop.mixin(optionGroups.More, config.More); + }; + + this.render = function() { + this.container.innerHTML = ""; + buildDom(["table", {id: "controls"}, + this.renderOptionGroup(optionGroups.Main), + ["tr", null, ["td", {colspan: 2}, + ["table", {id: "more-controls"}, + this.renderOptionGroup(optionGroups.More) + ] + ]], + ["tr", null, ["td", {colspan: 2}, "version " + config.version]] + ], this.container); + }; + + this.renderOptionGroup = function(group) { + return Object.keys(group).map(function(key, i) { + var item = group[key]; + if (!item.position) + item.position = i / 10000; + if (!item.label) + item.label = key; + return item; + }).sort(function(a, b) { + return a.position - b.position; + }).map(function(item) { + return this.renderOption(item.label, item); + }, this); + }; + + this.renderOptionControl = function(key, option) { + var self = this; + if (Array.isArray(option)) { + return option.map(function(x) { + return self.renderOptionControl(key, x); + }); + } + var control; + + var value = self.getOption(option); + + if (option.values && option.type != "checkbox") { + if (typeof option.values == "string") + option.values = option.values.split("|"); + option.items = option.values.map(function(v) { + return { value: v, name: v }; + }); + } + + if (option.type == "buttonBar") { + control = ["div", option.items.map(function(item) { + return ["button", { + value: item.value, + ace_selected_button: value == item.value, + onclick: function() { + self.setOption(option, item.value); + var nodes = this.parentNode.querySelectorAll("[ace_selected_button]"); + for (var i = 0; i < nodes.length; i++) { + nodes[i].removeAttribute("ace_selected_button"); + } + this.setAttribute("ace_selected_button", true); + } + }, item.desc || item.caption || item.name]; + })]; + } else if (option.type == "number") { + control = ["input", {type: "number", value: value || option.defaultValue, style:"width:3em", oninput: function() { + self.setOption(option, parseInt(this.value)); + }}]; + if (option.defaults) { + control = [control, option.defaults.map(function(item) { + return ["button", {onclick: function() { + var input = this.parentNode.firstChild; + input.value = item.value; + input.oninput(); + }}, item.caption]; + })]; + } + } else if (option.items) { + var buildItems = function(items) { + return items.map(function(item) { + return ["option", { value: item.value || item.name }, item.desc || item.caption || item.name]; + }); + }; + + var items = Array.isArray(option.items) + ? buildItems(option.items) + : Object.keys(option.items).map(function(key) { + return ["optgroup", {"label": key}, buildItems(option.items[key])]; + }); + control = ["select", { id: key, value: value, onchange: function() { + self.setOption(option, this.value); + } }, items]; + } else { + if (typeof option.values == "string") + option.values = option.values.split("|"); + if (option.values) value = value == option.values[1]; + control = ["input", { type: "checkbox", id: key, checked: value || null, onchange: function() { + var value = this.checked; + if (option.values) value = option.values[value ? 1 : 0]; + self.setOption(option, value); + }}]; + if (option.type == "checkedNumber") { + control = [control, []]; + } + } + return control; + }; + + this.renderOption = function(key, option) { + if (option.path && !option.onchange && !this.editor.$options[option.path]) + return; + this.options[option.path] = option; + var safeKey = "-" + option.path; + var control = this.renderOptionControl(safeKey, option); + return ["tr", {class: "ace_optionsMenuEntry"}, ["td", + ["label", {for: safeKey}, key] + ], ["td", control]]; + }; + + this.setOption = function(option, value) { + if (typeof option == "string") + option = this.options[option]; + if (value == "false") value = false; + if (value == "true") value = true; + if (value == "null") value = null; + if (value == "undefined") value = undefined; + if (typeof value == "string" && parseFloat(value).toString() == value) + value = parseFloat(value); + if (option.onchange) + option.onchange(value); + else if (option.path) + this.editor.setOption(option.path, value); + this._signal("setOption", {name: option.path, value: value}); + }; + + this.getOption = function(option) { + if (option.getValue) + return option.getValue(); + return this.editor.getOption(option.path); + }; + +}).call(OptionPanel.prototype); + +exports.OptionPanel = OptionPanel; + +}); + +define("ace/ext/settings_menu",["require","exports","module","ace/ext/options","ace/ext/menu_tools/overlay_page","ace/editor"], function(require, exports, module) { +"use strict"; +var OptionPanel = require("./options").OptionPanel; +var overlayPage = require('./menu_tools/overlay_page').overlayPage; +function showSettingsMenu(editor) { + if (!document.getElementById('ace_settingsmenu')) { + var options = new OptionPanel(editor); + options.render(); + options.container.id = "ace_settingsmenu"; + overlayPage(editor, options.container); + options.container.querySelector("select,input,button,checkbox").focus(); + } +} +module.exports.init = function() { + var Editor = require("../editor").Editor; + Editor.prototype.showSettingsMenu = function() { + showSettingsMenu(this); + }; +}; +}); (function() { + window.require(["ace/ext/settings_menu"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/ext-spellcheck.js b/htdocs/includes/ace/src/ext-spellcheck.js similarity index 82% rename from htdocs/includes/ace/ext-spellcheck.js rename to htdocs/includes/ace/src/ext-spellcheck.js index 8d3b5f6cb11..6f5af5049d7 100644 --- a/htdocs/includes/ace/ext-spellcheck.js +++ b/htdocs/includes/ace/src/ext-spellcheck.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) { +define("ace/ext/spellcheck",["require","exports","module","ace/lib/event","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); @@ -28,7 +28,7 @@ exports.contextMenuHandler = function(e){ }); host.textInput.setInputHandler(function(newVal) { - console.log(newVal , value, text.selectionStart, text.selectionEnd) + console.log(newVal , value, text.selectionStart, text.selectionEnd); if (newVal == value) return ''; if (newVal.lastIndexOf(value, 0) === 0) @@ -64,8 +64,11 @@ require("../config").defineOptions(Editor.prototype, "editor", { } }); -}); - (function() { - ace.require(["ace/ext/spellcheck"], function() {}); +}); (function() { + window.require(["ace/ext/spellcheck"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-split.js b/htdocs/includes/ace/src/ext-split.js similarity index 79% rename from htdocs/includes/ace/ext-split.js rename to htdocs/includes/ace/src/ext-split.js index 29dd20efbea..ca286bce833 100644 --- a/htdocs/includes/ace/ext-split.js +++ b/htdocs/includes/ace/src/ext-split.js @@ -1,4 +1,4 @@ -ace.define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) { +define("ace/split",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/lib/event_emitter","ace/editor","ace/virtual_renderer","ace/edit_session"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -120,11 +120,7 @@ var Split = function(container, theme, splits) { var s = new EditSession(session.getDocument(), session.getMode()); var undoManager = session.getUndoManager(); - if (undoManager) { - var undoManagerProxy = new UndoManagerProxy(undoManager, s); - s.setUndoManager(undoManagerProxy); - } - s.$informUndoManager = lang.delayedCall(function() { s.$deltas = []; }); + s.setUndoManager(undoManager); s.setTabSize(session.getTabSize()); s.setUseSoftTabs(session.getUseSoftTabs()); s.setOverwrite(session.getOverwrite()); @@ -194,53 +190,18 @@ var Split = function(container, theme, splits) { }).call(Split.prototype); - -function UndoManagerProxy(undoManager, session) { - this.$u = undoManager; - this.$doc = session; -} - -(function() { - this.execute = function(options) { - this.$u.execute(options); - }; - - this.undo = function() { - var selectionRange = this.$u.undo(true); - if (selectionRange) { - this.$doc.selection.setSelectionRange(selectionRange); - } - }; - - this.redo = function() { - var selectionRange = this.$u.redo(true); - if (selectionRange) { - this.$doc.selection.setSelectionRange(selectionRange); - } - }; - - this.reset = function() { - this.$u.reset(); - }; - - this.hasUndo = function() { - return this.$u.hasUndo(); - }; - - this.hasRedo = function() { - return this.$u.hasRedo(); - }; -}).call(UndoManagerProxy.prototype); - exports.Split = Split; }); -ace.define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) { +define("ace/ext/split",["require","exports","module","ace/split"], function(require, exports, module) { "use strict"; module.exports = require("../split"); -}); - (function() { - ace.require(["ace/ext/split"], function() {}); +}); (function() { + window.require(["ace/ext/split"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-static_highlight.js b/htdocs/includes/ace/src/ext-static_highlight.js similarity index 57% rename from htdocs/includes/ace/ext-static_highlight.js rename to htdocs/includes/ace/src/ext-static_highlight.js index a875f9d7a01..93b0840b3c0 100644 --- a/htdocs/includes/ace/ext-static_highlight.js +++ b/htdocs/includes/ace/src/ext-static_highlight.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom"], function(require, exports, module) { +define("ace/ext/static_highlight",["require","exports","module","ace/edit_session","ace/layer/text","ace/config","ace/lib/dom","ace/lib/lang"], function(require, exports, module) { "use strict"; var EditSession = require("../edit_session").EditSession; @@ -13,6 +13,7 @@ width: 2em;\ text-align: right;\ padding: 0 3px 0 0;\ margin-right: 3px;\ +contain: none;\ }\ .ace_static_highlight.ace_show_gutter .ace_line {\ padding-left: 2.6em;\ @@ -38,9 +39,61 @@ counter-reset: ace_line;\ "; var config = require("../config"); var dom = require("../lib/dom"); +var escapeHTML = require("../lib/lang").escapeHTML; + +function Element(type) { + this.type = type; + this.style = {}; + this.textContent = ""; +} +Element.prototype.cloneNode = function() { + return this; +}; +Element.prototype.appendChild = function(child) { + this.textContent += child.toString(); +}; +Element.prototype.toString = function() { + var stringBuilder = []; + if (this.type != "fragment") { + stringBuilder.push("<", this.type); + if (this.className) + stringBuilder.push(" class='", this.className, "'"); + var styleStr = []; + for (var key in this.style) { + styleStr.push(key, ":", this.style[key]); + } + if (styleStr.length) + stringBuilder.push(" style='", styleStr.join(""), "'"); + stringBuilder.push(">"); + } + + if (this.textContent) { + stringBuilder.push(this.textContent); + } + + if (this.type != "fragment") { + stringBuilder.push(""); + } + + return stringBuilder.join(""); +}; + + +var simpleDom = { + createTextNode: function(textContent, element) { + return escapeHTML(textContent); + }, + createElement: function(type) { + return new Element(type); + }, + createFragment: function() { + return new Element("fragment"); + } +}; var SimpleTextLayer = function() { this.config = {}; + this.dom = simpleDom; }; SimpleTextLayer.prototype = TextLayer.prototype; @@ -66,7 +119,7 @@ var highlight = function(el, opts, callback) { } } } else { - data = dom.getInnerText(el); + data = el.textContent; if (opts.trim) data = data.trim(); } @@ -123,39 +176,54 @@ highlight.renderSync = function(input, mode, theme, lineStart, disableGutter) { var textLayer = new SimpleTextLayer(); textLayer.setSession(session); + Object.keys(textLayer.$tabStrings).forEach(function(k) { + if (typeof textLayer.$tabStrings[k] == "string") { + var el = simpleDom.createFragment(); + el.textContent = textLayer.$tabStrings[k]; + textLayer.$tabStrings[k] = el; + } + }); session.setValue(input); - - var stringBuilder = []; var length = session.getLength(); + + var outerEl = simpleDom.createElement("div"); + outerEl.className = theme.cssClass; + + var innerEl = simpleDom.createElement("div"); + innerEl.className = "ace_static_highlight" + (disableGutter ? "" : " ace_show_gutter"); + innerEl.style["counter-reset"] = "ace_line " + (lineStart - 1); - for(var ix = 0; ix < length; ix++) { - stringBuilder.push("
    "); - if (!disableGutter) - stringBuilder.push("" + /*(ix + lineStart) + */ ""); - textLayer.$renderLine(stringBuilder, ix, true, false); - stringBuilder.push("\n
    "); + for (var ix = 0; ix < length; ix++) { + var lineEl = simpleDom.createElement("div"); + lineEl.className = "ace_line"; + + if (!disableGutter) { + var gutterEl = simpleDom.createElement("span"); + gutterEl.className ="ace_gutter ace_gutter-cell"; + gutterEl.textContent = ""; + lineEl.appendChild(gutterEl); + } + textLayer.$renderLine(lineEl, ix, false); + lineEl.textContent += "\n"; + innerEl.appendChild(lineEl); } - var html = "
    " + - "
    " + - stringBuilder.join("") + - "
    " + - "
    "; - - textLayer.destroy(); + outerEl.appendChild(innerEl); return { css: baseStyles + theme.cssText, - html: html, + html: outerEl.toString(), session: session }; }; module.exports = highlight; module.exports.highlight = highlight; -}); - (function() { - ace.require(["ace/ext/static_highlight"], function() {}); +}); (function() { + window.require(["ace/ext/static_highlight"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-statusbar.js b/htdocs/includes/ace/src/ext-statusbar.js similarity index 72% rename from htdocs/includes/ace/ext-statusbar.js rename to htdocs/includes/ace/src/ext-statusbar.js index 0c46b3812e3..936cc4fd91b 100644 --- a/htdocs/includes/ace/ext-statusbar.js +++ b/htdocs/includes/ace/src/ext-statusbar.js @@ -1,7 +1,7 @@ -ace.define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) { +define("ace/ext/statusbar",["require","exports","module","ace/lib/dom","ace/lib/lang"], function(require, exports, module) { "use strict"; -var dom = require("ace/lib/dom"); -var lang = require("ace/lib/lang"); +var dom = require("../lib/dom"); +var lang = require("../lib/lang"); var StatusBar = function(editor, parentNode) { this.element = dom.createElement("div"); @@ -10,7 +10,7 @@ var StatusBar = function(editor, parentNode) { parentNode.appendChild(this.element); var statusUpdate = lang.delayedCall(function(){ - this.updateStatus(editor) + this.updateStatus(editor); }.bind(this)).schedule.bind(null, 100); editor.on("changeStatus", statusUpdate); @@ -46,8 +46,11 @@ var StatusBar = function(editor, parentNode) { exports.StatusBar = StatusBar; -}); - (function() { - ace.require(["ace/ext/statusbar"], function() {}); +}); (function() { + window.require(["ace/ext/statusbar"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-textarea.js b/htdocs/includes/ace/src/ext-textarea.js similarity index 93% rename from htdocs/includes/ace/ext-textarea.js rename to htdocs/includes/ace/src/ext-textarea.js index f3bc70afda1..b876bd3854e 100644 --- a/htdocs/includes/ace/ext-textarea.js +++ b/htdocs/includes/ace/src/ext-textarea.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; @@ -123,12 +123,13 @@ border: 1px solid rgb(200, 200, 250);\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; +exports.$id = "ace/theme/textmate"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); }); -ace.define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) { +define("ace/ext/textarea",["require","exports","module","ace/lib/event","ace/lib/useragent","ace/lib/net","ace/ace","ace/theme/textmate"], function(require, exports, module) { "use strict"; var event = require("../lib/event"); @@ -203,6 +204,7 @@ function setupContainer(element, getValue) { } exports.transformTextarea = function(element, options) { + var isFocused = element.autofocus || document.activeElement == element; var session; var container = setupContainer(element, function() { return session.getValue(); @@ -225,12 +227,9 @@ exports.transformTextarea = function(element, options) { position: "absolute", right: "0px", bottom: "0px", - background: "red", cursor: "nw-resize", - borderStyle: "solid", - borderWidth: "9px 8px 10px 9px", - width: "2px", - borderColor: "lightblue gray gray lightblue", + border: "solid 9px", + borderColor: "lightblue gray gray #ceade6", zIndex: 101 }); @@ -263,9 +262,10 @@ exports.transformTextarea = function(element, options) { session = editor.getSession(); session.setValue(element.value || element.innerHTML); - editor.focus(); + if (isFocused) + editor.focus(); container.appendChild(settingOpener); - setupApi(editor, editorDiv, settingDiv, ace, options, load); + setupApi(editor, editorDiv, settingDiv, ace, options); setupSettingPanel(settingDiv, settingOpener, editor); var state = ""; @@ -282,6 +282,7 @@ exports.transformTextarea = function(element, options) { }); event.addListener(settingOpener, "mousedown", function(e) { + e.preventDefault(); if (state == "toggle") { editor.setDisplaySettings(); return; @@ -306,10 +307,9 @@ function load(url, module, callback) { }); } -function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { +function setupApi(editor, editorDiv, settingDiv, ace, options) { var session = editor.getSession(); var renderer = editor.renderer; - loader = loader || load; function toBool(value) { return value === "true" || value == true; @@ -335,10 +335,10 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { editor.setOption = function(key, value) { switch (key) { case "mode": - editor.$setOption("mode", "ace/mode/" + value) + editor.$setOption("mode", "ace/mode/" + value); break; case "theme": - editor.$setOption("theme", "ace/theme/" + value) + editor.$setOption("theme", "ace/theme/" + value); break; case "keybindings": switch (value) { @@ -353,7 +353,7 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { } break; - case "softWrap": + case "wrap": case "fontSize": editor.$setOption(key, value); break; @@ -366,15 +366,15 @@ function setupApi(editor, editorDiv, settingDiv, ace, options, loader) { editor.getOption = function(key) { switch (key) { case "mode": - return editor.$getOption("mode").substr("ace/mode/".length) + return editor.$getOption("mode").substr("ace/mode/".length); break; case "theme": - return editor.$getOption("theme").substr("ace/theme/".length) + return editor.$getOption("theme").substr("ace/theme/".length); break; case "keybindings": - var value = editor.getKeyboardHandler() + var value = editor.getKeyboardHandler(); switch (value && value.$id) { case "ace/keyboard/vim": return "vim"; @@ -553,8 +553,11 @@ exports.defaultOptions = { showInvisibles: "false" }; -}); - (function() { - ace.require(["ace/ext/textarea"], function() {}); +}); (function() { + window.require(["ace/ext/textarea"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-themelist.js b/htdocs/includes/ace/src/ext-themelist.js similarity index 82% rename from htdocs/includes/ace/ext-themelist.js rename to htdocs/includes/ace/src/ext-themelist.js index 53225ada739..712700a64bd 100644 --- a/htdocs/includes/ace/ext-themelist.js +++ b/htdocs/includes/ace/src/ext-themelist.js @@ -1,6 +1,5 @@ -ace.define("ace/ext/themelist",["require","exports","module","ace/lib/fixoldbrowsers"], function(require, exports, module) { +define("ace/ext/themelist",["require","exports","module"], function(require, exports, module) { "use strict"; -require("ace/lib/fixoldbrowsers"); var themeData = [ ["Chrome" ], @@ -21,6 +20,7 @@ var themeData = [ ["Ambiance" ,"ambiance" , "dark"], ["Chaos" ,"chaos" , "dark"], ["Clouds Midnight" ,"clouds_midnight" , "dark"], + ["Dracula" ,"" , "dark"], ["Cobalt" ,"cobalt" , "dark"], ["Gruvbox" ,"gruvbox" , "dark"], ["Green on Black" ,"gob" , "dark"], @@ -55,8 +55,11 @@ exports.themes = themeData.map(function(data) { return theme; }); -}); - (function() { - ace.require(["ace/ext/themelist"], function() {}); +}); (function() { + window.require(["ace/ext/themelist"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/ext-whitespace.js b/htdocs/includes/ace/src/ext-whitespace.js similarity index 88% rename from htdocs/includes/ace/ext-whitespace.js rename to htdocs/includes/ace/src/ext-whitespace.js index 8f4af96cf9a..f6d45930022 100644 --- a/htdocs/includes/ace/ext-whitespace.js +++ b/htdocs/includes/ace/src/ext-whitespace.js @@ -1,4 +1,4 @@ -ace.define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module) { +define("ace/ext/whitespace",["require","exports","module","ace/lib/lang"], function(require, exports, module) { "use strict"; var lang = require("../lib/lang"); @@ -38,7 +38,7 @@ exports.$detectIndentation = function(lines, fallback) { return score; } - var changesTotal = changes.reduce(function(a,b){return a+b}, 0); + var changesTotal = changes.reduce(function(a,b){return a+b;}, 0); var first = {score: 0, length: 0}; var spaceIndents = 0; @@ -176,22 +176,26 @@ exports.$parseArg = function(arg) { exports.commands = [{ name: "detectIndentation", + description: "Detect indentation from content", exec: function(editor) { exports.detectIndentation(editor.session); } }, { name: "trimTrailingSpace", - exec: function(editor) { - exports.trimTrailingSpace(editor.session); + description: "Trim trailing whitespace", + exec: function(editor, args) { + exports.trimTrailingSpace(editor.session, args); } }, { name: "convertIndentation", + description: "Convert indentation to ...", exec: function(editor, arg) { var indent = exports.$parseArg(arg); exports.convertIndentation(editor.session, indent.ch, indent.length); } }, { name: "setIndentation", + description: "Set indentation", exec: function(editor, arg) { var indent = exports.$parseArg(arg); indent.length && editor.session.setTabSize(indent.length); @@ -199,8 +203,11 @@ exports.commands = [{ } }]; -}); - (function() { - ace.require(["ace/ext/whitespace"], function() {}); +}); (function() { + window.require(["ace/ext/whitespace"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); })(); \ No newline at end of file diff --git a/htdocs/includes/ace/keybinding-emacs.js b/htdocs/includes/ace/src/keybinding-emacs.js similarity index 95% rename from htdocs/includes/ace/keybinding-emacs.js rename to htdocs/includes/ace/src/keybinding-emacs.js index a6cb038e95b..960ff734b3d 100644 --- a/htdocs/includes/ace/keybinding-emacs.js +++ b/htdocs/includes/ace/src/keybinding-emacs.js @@ -1,4 +1,4 @@ -ace.define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module) { +define("ace/occur",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/edit_session","ace/search_highlight","ace/lib/dom"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -18,7 +18,7 @@ oop.inherits(Occur, Search); var translatedPos = this.originalToOccurPosition(editor.session, pos); editor.moveCursorToPosition(translatedPos); return true; - } + }; this.exit = function(editor, options) { var pos = options.translatePosition && editor.getCursorPosition(); var translatedPos = pos && this.occurToOriginalPosition(editor.session, pos); @@ -26,14 +26,14 @@ oop.inherits(Occur, Search); if (translatedPos) editor.moveCursorToPosition(translatedPos); return true; - } + }; this.highlight = function(sess, regexp) { var hl = sess.$occurHighlight = sess.$occurHighlight || sess.addDynamicMarker( new SearchHighlight(null, "ace_occur-highlight", "text")); hl.setRegexp(regexp); sess._emit("changeBackMarker"); // force highlight layer redraw - } + }; this.displayOccurContent = function(editor, options) { this.$originalSession = editor.session; @@ -47,12 +47,12 @@ oop.inherits(Occur, Search); occurSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; this.highlight(occurSession, options.re); occurSession._emit('changeBackMarker'); - } + }; this.displayOriginalContent = function(editor) { editor.setSession(this.$originalSession); this.$originalSession.$useEmacsStyleLineStart = this.$useEmacsStyleLineStart; - } + }; this.originalToOccurPosition = function(session, pos) { var lines = session.$occurMatchingLines; var nullPos = {row: 0, column: 0}; @@ -62,13 +62,13 @@ oop.inherits(Occur, Search); return {row: i, column: pos.column}; } return nullPos; - } + }; this.occurToOriginalPosition = function(session, pos) { var lines = session.$occurMatchingLines; if (!lines || !lines[pos.row]) return pos; return {row: lines[pos.row].row, column: pos.column}; - } + }; this.matchingLines = function(session, options) { options = oop.mixin({}, options); @@ -82,7 +82,7 @@ oop.inherits(Occur, Search); lines : lines.concat({row: row, content: session.getLine(row)}); }, []); - } + }; }).call(Occur.prototype); @@ -92,8 +92,6 @@ dom.importCssString(".ace_occur-highlight {\n\ background-color: rgba(87, 255, 8, 0.25);\n\ position: absolute;\n\ z-index: 4;\n\ - -moz-box-sizing: border-box;\n\ - -webkit-box-sizing: border-box;\n\ box-sizing: border-box;\n\ box-shadow: 0 0 4px rgb(91, 255, 50);\n\ }\n\ @@ -106,7 +104,7 @@ exports.Occur = Occur; }); -ace.define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module) { +define("ace/commands/occur_commands",["require","exports","module","ace/config","ace/occur","ace/keyboard/hash_handler","ace/lib/oop"], function(require, exports, module) { var config = require("../config"), Occur = require("../occur").Occur; @@ -158,13 +156,13 @@ oop.inherits(OccurKeyboardHandler, HashHandler); this.attach = function(editor) { HashHandler.call(this, occurCommands, editor.commands.platform); this.$editor = editor; - } + }; var handleKeyboard$super = this.handleKeyboard; this.handleKeyboard = function(data, hashId, key, keyCode) { var cmd = handleKeyboard$super.call(this, data, hashId, key, keyCode); return (cmd && cmd.command) ? cmd : undefined; - } + }; }).call(OccurKeyboardHandler.prototype); @@ -172,20 +170,20 @@ OccurKeyboardHandler.installIn = function(editor) { var handler = new this(); editor.keyBinding.addKeyboardHandler(handler); editor.commands.addCommands(occurCommands); -} +}; OccurKeyboardHandler.uninstallFrom = function(editor) { editor.commands.removeCommands(occurCommands); var handler = editor.getKeyboardHandler(); if (handler.isOccurHandler) editor.keyBinding.removeKeyboardHandler(handler); -} +}; exports.occurStartCommand = occurStartCommand; }); -ace.define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module) { +define("ace/commands/incremental_search_commands",["require","exports","module","ace/config","ace/lib/oop","ace/keyboard/hash_handler","ace/commands/occur_commands"], function(require, exports, module) { var config = require("../config"); var oop = require("../lib/oop"); @@ -366,7 +364,7 @@ exports.IncrementalSearchKeyboardHandler = IncrementalSearchKeyboardHandler; }); -ace.define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module) { +define("ace/incremental_search",["require","exports","module","ace/lib/oop","ace/range","ace/search","ace/search_highlight","ace/commands/incremental_search_commands","ace/lib/dom","ace/commands/command_manager","ace/editor","ace/config"], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -393,7 +391,7 @@ function regExpToObject(re) { return { expression: string.slice(start+1, flagStart), flags: string.slice(flagStart+1) - } + }; } function stringToRegExp(string, flags) { @@ -565,8 +563,6 @@ dom.importCssString && dom.importCssString("\ .ace_marker-layer .ace_isearch-result {\ position: absolute;\ z-index: 6;\ - -moz-box-sizing: border-box;\ - -webkit-box-sizing: border-box;\ box-sizing: border-box;\ }\ div.ace_isearch-result {\ @@ -604,7 +600,7 @@ require("./config").defineOptions(Editor.prototype, "editor", { }); -ace.define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { +define("ace/keyboard/emacs",["require","exports","module","ace/lib/dom","ace/incremental_search","ace/commands/incremental_search_commands","ace/keyboard/hash_handler","ace/lib/keys"], function(require, exports, module) { "use strict"; var dom = require("../lib/dom"); @@ -612,19 +608,6 @@ require("../incremental_search"); var iSearchCommandModule = require("../commands/incremental_search_commands"); -var screenToTextBlockCoordinates = function(x, y) { - var canvasPos = this.scroller.getBoundingClientRect(); - - var col = Math.floor( - (x + this.scrollLeft - canvasPos.left - this.$padding) / this.characterWidth - ); - var row = Math.floor( - (y + this.scrollTop - canvasPos.top) / this.lineHeight - ); - - return this.session.screenToDocumentPosition(row, col); -}; - var HashHandler = require("./hash_handler").HashHandler; exports.handler = new HashHandler(); @@ -641,8 +624,6 @@ exports.handler.attach = function(editor) { dom.importCssString('\ .emacs-mode .ace_cursor{\ border: 1px rgba(50,250,50,0.8) solid!important;\ - -moz-box-sizing: border-box!important;\ - -webkit-box-sizing: border-box!important;\ box-sizing: border-box!important;\ background-color: rgba(0,250,0,0.9);\ opacity: 0.5;\ @@ -712,11 +693,11 @@ exports.handler.attach = function(editor) { replacement : undefined); } return lastMark; - } + }; editor.on("click", $resetMarkMode); editor.on("changeSession", $kbSessionChange); - editor.renderer.screenToTextCoordinates = screenToTextBlockCoordinates; + editor.renderer.$blockCursor = true; editor.setStyle("emacs-mode"); editor.commands.addCommands(commands); exports.handler.platform = editor.commands.platform; @@ -726,7 +707,7 @@ exports.handler.attach = function(editor) { }; exports.handler.detach = function(editor) { - delete editor.renderer.screenToTextCoordinates; + editor.renderer.$blockCursor = false; editor.session.$selectLongWords = $formerLongWords; editor.session.$useEmacsStyleLineStart = $formerLineStart; editor.removeEventListener("click", $resetMarkMode); @@ -809,7 +790,7 @@ exports.handler.getStatusText = function(editor, data) { if (data.count) str += data.count; if (data.keyChain) - str += " " + data.keyChain + str += " " + data.keyChain; return str; }; @@ -871,7 +852,7 @@ exports.handler.handleKeyboard = function(data, hashId, key, keyCode) { data.lastCommand = null; if (!command.readOnly && editor.emacsMark()) - editor.setEmacsMark(null) + editor.setEmacsMark(null); if (data.count) { var count = data.count; @@ -1068,7 +1049,7 @@ exports.handler.addCommands({ var range = editor.getSelectionRange(); var line = editor.session.getLine(range.start.row); range.end.column = line.length; - line = line.substr(range.start.column) + line = line.substr(range.start.column); var foldLine = editor.session.getFoldLine(range.start.row); if (foldLine && range.end.row != foldLine.end.row) { @@ -1128,6 +1109,7 @@ exports.handler.addCommands({ editor.$handlesEmacsOnCopy = false; if (editor.inMultiSelectMode) editor.forEachSelection({exec: deselect}); else deselect(); + editor.setEmacsMark(null); editor.session.$emacsMarkRing = marks.concat(deselectedMarks.reverse()); }, 0); }, @@ -1178,4 +1160,11 @@ exports.killRing = { } }; -}); +}); (function() { + window.require(["ace/keyboard/emacs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/keybinding-sublime.js b/htdocs/includes/ace/src/keybinding-sublime.js new file mode 100644 index 00000000000..e34735b2ae0 --- /dev/null +++ b/htdocs/includes/ace/src/keybinding-sublime.js @@ -0,0 +1,425 @@ +define("ace/keyboard/sublime",["require","exports","module","ace/lib/keys","ace/lib/oop","ace/lib/useragent","ace/keyboard/hash_handler"], function(require, exports, module) { +"use strict"; + +var keyUtil = require("../lib/keys"); +var oop = require("../lib/oop"); +var useragent = require("../lib/useragent"); +var HashHandler = require("../keyboard/hash_handler").HashHandler; + +function moveBySubWords(editor, direction, extend) { + var selection = editor.selection; + var row = selection.lead.row; + var column = selection.lead.column; + + var line = editor.session.getLine(row); + if (!line[column + direction]) { + var method = (extend ? "selectWord" : "moveCursorShortWord") + + (direction == 1 ? "Right" : "Left"); + return editor.selection[method](); + } + if (direction == -1) column--; + while (line[column]) { + var type = getType(line[column]) + getType(line[column + direction]); + column += direction; + if (direction == 1) { + if (type == "WW" && getType(line[column + 1]) == "w") + break; + } + else { + if (type == "wW") { + if (getType(line[column - 1]) == "W") { + column -= 1; + break; + } else { + continue; + } + } + if (type == "Ww") + break; + } + if (/w[s_oW]|_[sWo]|o[s_wW]|s[W]|W[so]/.test(type)) + break; + } + if (direction == -1) column++; + if (extend) + editor.selection.moveCursorTo(row, column); + else + editor.selection.moveTo(row, column); + + function getType(x) { + if (!x) return "-"; + if (/\s/.test(x)) return "s"; + if (x == "_") return "_"; + if (x.toUpperCase() == x && x.toLowerCase() != x) return "W"; + if (x.toUpperCase() != x && x.toLowerCase() == x) return "w"; + return "o"; + } +} + +exports.handler = new HashHandler(); + +exports.handler.addCommands([{ + name: "find_all_under", + exec: function(editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + editor.findAll(); + }, + readOnly: true +}, { + name: "find_under", + exec: function(editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + editor.findNext(); + }, + readOnly: true +}, { + name: "find_under_prev", + exec: function(editor) { + if (editor.selection.isEmpty()) + editor.selection.selectWord(); + editor.findPrevious(); + }, + readOnly: true +}, { + name: "find_under_expand", + exec: function(editor) { + editor.selectMore(1, false, true); + }, + scrollIntoView: "animate", + readOnly: true +}, { + name: "find_under_expand_skip", + exec: function(editor) { + editor.selectMore(1, true, true); + }, + scrollIntoView: "animate", + readOnly: true +}, { + name: "delete_to_hard_bol", + exec: function(editor) { + var pos = editor.selection.getCursor(); + editor.session.remove({ + start: { row: pos.row, column: 0 }, + end: pos + }); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "delete_to_hard_eol", + exec: function(editor) { + var pos = editor.selection.getCursor(); + editor.session.remove({ + start: pos, + end: { row: pos.row, column: Infinity } + }); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "moveToWordStartLeft", + exec: function(editor) { + editor.selection.moveCursorLongWordLeft(); + editor.clearSelection(); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "moveToWordEndRight", + exec: function(editor) { + editor.selection.moveCursorLongWordRight(); + editor.clearSelection(); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "selectToWordStartLeft", + exec: function(editor) { + var sel = editor.selection; + sel.$moveSelection(sel.moveCursorLongWordLeft); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "selectToWordEndRight", + exec: function(editor) { + var sel = editor.selection; + sel.$moveSelection(sel.moveCursorLongWordRight); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor" +}, { + name: "selectSubWordRight", + exec: function(editor) { + moveBySubWords(editor, 1, true); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "selectSubWordLeft", + exec: function(editor) { + moveBySubWords(editor, -1, true); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "moveSubWordRight", + exec: function(editor) { + moveBySubWords(editor, 1); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}, { + name: "moveSubWordLeft", + exec: function(editor) { + moveBySubWords(editor, -1); + }, + multiSelectAction: "forEach", + scrollIntoView: "cursor", + readOnly: true +}]); + + +[{ + bindKey: { mac: "cmd-k cmd-backspace|cmd-backspace", win: "ctrl-shift-backspace|ctrl-k ctrl-backspace" }, + name: "removetolinestarthard" +}, { + bindKey: { mac: "cmd-k cmd-k|cmd-delete|ctrl-k", win: "ctrl-shift-delete|ctrl-k ctrl-k" }, + name: "removetolineendhard" +}, { + bindKey: { mac: "cmd-shift-d", win: "ctrl-shift-d" }, + name: "duplicateSelection" +}, { + bindKey: { mac: "cmd-l", win: "ctrl-l" }, + name: "expandtoline" +}, +{ + bindKey: {mac: "cmd-shift-a", win: "ctrl-shift-a"}, + name: "expandSelection", + args: {to: "tag"} +}, { + bindKey: {mac: "cmd-shift-j", win: "ctrl-shift-j"}, + name: "expandSelection", + args: {to: "indentation"} +}, { + bindKey: {mac: "ctrl-shift-m", win: "ctrl-shift-m"}, + name: "expandSelection", + args: {to: "brackets"} +}, { + bindKey: {mac: "cmd-shift-space", win: "ctrl-shift-space"}, + name: "expandSelection", + args: {to: "scope"} +}, +{ + bindKey: { mac: "ctrl-cmd-g", win: "alt-f3" }, + name: "find_all_under" +}, { + bindKey: { mac: "alt-cmd-g", win: "ctrl-f3" }, + name: "find_under" +}, { + bindKey: { mac: "shift-alt-cmd-g", win: "ctrl-shift-f3" }, + name: "find_under_prev" +}, { + bindKey: { mac: "cmd-g", win: "f3" }, + name: "findnext" +}, { + bindKey: { mac: "shift-cmd-g", win: "shift-f3" }, + name: "findprevious" +}, { + bindKey: { mac: "cmd-d", win: "ctrl-d" }, + name: "find_under_expand" +}, { + bindKey: { mac: "cmd-k cmd-d", win: "ctrl-k ctrl-d" }, + name: "find_under_expand_skip" +}, +{ + bindKey: { mac: "cmd-alt-[", win: "ctrl-shift-[" }, + name: "toggleFoldWidget" +}, { + bindKey: { mac: "cmd-alt-]", win: "ctrl-shift-]" }, + name: "unfold" +}, { + bindKey: { mac: "cmd-k cmd-0|cmd-k cmd-j", win: "ctrl-k ctrl-0|ctrl-k ctrl-j" }, + name: "unfoldall" +}, { + bindKey: { mac: "cmd-k cmd-1", win: "ctrl-k ctrl-1" }, + name: "foldOther", + args: { level: 1 } +}, +{ + bindKey: { win: "ctrl-left", mac: "alt-left" }, + name: "moveToWordStartLeft" +}, { + bindKey: { win: "ctrl-right", mac: "alt-right" }, + name: "moveToWordEndRight" +}, { + bindKey: { win: "ctrl-shift-left", mac: "alt-shift-left" }, + name: "selectToWordStartLeft" +}, { + bindKey: { win: "ctrl-shift-right", mac: "alt-shift-right" }, + name: "selectToWordEndRight" +}, +{ + bindKey: {mac: "ctrl-alt-shift-right|ctrl-shift-right", win: "alt-shift-right"}, + name: "selectSubWordRight" +}, { + bindKey: {mac: "ctrl-alt-shift-left|ctrl-shift-left", win: "alt-shift-left"}, + name: "selectSubWordLeft" +}, { + bindKey: {mac: "ctrl-alt-right|ctrl-right", win: "alt-right"}, + name: "moveSubWordRight" +}, { + bindKey: {mac: "ctrl-alt-left|ctrl-left", win: "alt-left"}, + name: "moveSubWordLeft" +}, +{ + bindKey: { mac: "ctrl-m", win: "ctrl-m" }, + name: "jumptomatching", + args: { to: "brackets" } +}, +{ + bindKey: { mac: "ctrl-f6", win: "ctrl-f6" }, + name: "goToNextError" +}, { + bindKey: { mac: "ctrl-shift-f6", win: "ctrl-shift-f6" }, + name: "goToPreviousError" +}, + +{ + bindKey: { mac: "ctrl-o" }, + name: "splitline" +}, +{ + bindKey: {mac: "ctrl-shift-w", win: "alt-shift-w"}, + name: "surrowndWithTag" +},{ + bindKey: {mac: "cmd-alt-.", win: "alt-."}, + name: "close_tag" +}, +{ + bindKey: { mac: "cmd-j", win: "ctrl-j" }, + name: "joinlines" +}, + +{ + bindKey: {mac: "ctrl--", win: "alt--"}, + name: "jumpBack" +}, { + bindKey: {mac: "ctrl-shift--", win: "alt-shift--"}, + name: "jumpForward" +}, + +{ + bindKey: { mac: "cmd-k cmd-l", win: "ctrl-k ctrl-l" }, + name: "tolowercase" +}, { + bindKey: { mac: "cmd-k cmd-u", win: "ctrl-k ctrl-u" }, + name: "touppercase" +}, + +{ + bindKey: {mac: "cmd-shift-v", win: "ctrl-shift-v"}, + name: "paste_and_indent" +}, { + bindKey: {mac: "cmd-k cmd-v|cmd-alt-v", win: "ctrl-k ctrl-v"}, + name: "paste_from_history" +}, + +{ + bindKey: { mac: "cmd-shift-enter", win: "ctrl-shift-enter" }, + name: "addLineBefore" +}, { + bindKey: { mac: "cmd-enter", win: "ctrl-enter" }, + name: "addLineAfter" +}, { + bindKey: { mac: "ctrl-shift-k", win: "ctrl-shift-k" }, + name: "removeline" +}, { + bindKey: { mac: "ctrl-alt-up", win: "ctrl-up" }, + name: "scrollup" +}, { + bindKey: { mac: "ctrl-alt-down", win: "ctrl-down" }, + name: "scrolldown" +}, { + bindKey: { mac: "cmd-a", win: "ctrl-a" }, + name: "selectall" +}, { + bindKey: { linux: "alt-shift-down", mac: "ctrl-shift-down", win: "ctrl-alt-down" }, + name: "addCursorBelow" +}, { + bindKey: { linux: "alt-shift-up", mac: "ctrl-shift-up", win: "ctrl-alt-up" }, + name: "addCursorAbove" +}, + + +{ + bindKey: { mac: "cmd-k cmd-c|ctrl-l", win: "ctrl-k ctrl-c" }, + name: "centerselection" +}, + +{ + bindKey: { mac: "f5", win: "f9" }, + name: "sortlines" +}, +{ + bindKey: {mac: "ctrl-f5", win: "ctrl-f9"}, + name: "sortlines", + args: {caseSensitive: true} +}, +{ + bindKey: { mac: "cmd-shift-l", win: "ctrl-shift-l" }, + name: "splitIntoLines" +}, { + bindKey: { mac: "ctrl-cmd-down", win: "ctrl-shift-down" }, + name: "movelinesdown" +}, { + bindKey: { mac: "ctrl-cmd-up", win: "ctrl-shift-up" }, + name: "movelinesup" +}, { + bindKey: { mac: "alt-down", win: "alt-down" }, + name: "modifyNumberDown" +}, { + bindKey: { mac: "alt-up", win: "alt-up" }, + name: "modifyNumberUp" +}, { + bindKey: { mac: "cmd-/", win: "ctrl-/" }, + name: "togglecomment" +}, { + bindKey: { mac: "cmd-alt-/", win: "ctrl-shift-/" }, + name: "toggleBlockComment" +}, + + +{ + bindKey: { linux: "ctrl-alt-q", mac: "ctrl-q", win: "ctrl-q" }, + name: "togglerecording" +}, { + bindKey: { linux: "ctrl-alt-shift-q", mac: "ctrl-shift-q", win: "ctrl-shift-q" }, + name: "replaymacro" +}, + +{ + bindKey: { mac: "ctrl-t", win: "ctrl-t" }, + name: "transpose" +} + +].forEach(function(binding) { + var command = exports.handler.commands[binding.name]; + if (command) + command.bindKey = binding.bindKey; + exports.handler.bindKey(binding.bindKey, command || binding.name); +}); + +}); (function() { + window.require(["ace/keyboard/sublime"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/keybinding-vim.js b/htdocs/includes/ace/src/keybinding-vim.js similarity index 89% rename from htdocs/includes/ace/keybinding-vim.js rename to htdocs/includes/ace/src/keybinding-vim.js index 5b0f378e6cd..889c2269ac7 100644 --- a/htdocs/includes/ace/keybinding-vim.js +++ b/htdocs/includes/ace/src/keybinding-vim.js @@ -1,4 +1,4 @@ -ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"], function(require, exports, module) { +define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib/event_emitter","ace/lib/dom","ace/lib/oop","ace/lib/keys","ace/lib/event","ace/search","ace/lib/useragent","ace/search_highlight","ace/commands/multi_select_commands","ace/mode/text","ace/multi_select"], function(require, exports, module) { 'use strict'; function log() { @@ -61,11 +61,10 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib newlineAndIndent: function(cm) { cm.ace.insert("\n"); } }; CodeMirror.keyMap = {}; - CodeMirror.addClass = CodeMirror.rmClass = - CodeMirror.e_stop = function() {}; + CodeMirror.addClass = CodeMirror.rmClass = function() {}; + CodeMirror.e_stop = CodeMirror.e_preventDefault = event.stopEvent; CodeMirror.keyName = function(e) { - if (e.key) return e.key; - var key = (KEYS[e.keyCode] || ""); + var key = (KEYS[e.keyCode] || e.key || ""); if (key.length == 1) key = key.toUpperCase(); key = event.getModifierString(e).replace(/(^|-)\w/g, function(m) { return m.toUpperCase(); @@ -79,6 +78,7 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib }; }; CodeMirror.lookupKey = function lookupKey(key, map, handle) { + if (!map) map = "default"; if (typeof map == "string") map = CodeMirror.keyMap[map]; var found = typeof map == "function" ? map(key) : map[key]; @@ -122,7 +122,6 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib var curOp = this.curOp = this.curOp || {}; if (!curOp.changeHandlers) curOp.changeHandlers = this._eventRegistry["change"] && this._eventRegistry["change"].slice(); - if (this.virtualSelectionMode()) return; if (!curOp.lastChange) { curOp.lastChange = curOp.change = change; } else { @@ -157,6 +156,8 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib this.curOp.force = force; var result = fn(); if (this.ace.curOp && this.ace.curOp.command.name == "vim") { + if (this.state.dialog) + this.ace.curOp.command.scrollIntoView = false; this.ace.endOperation(); if (!curOp.cursorActivity && !curOp.lastChange && prevOp) this.ace.prevOp = prevOp; @@ -280,7 +281,7 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib if (point.bias == 1) { cmp = 1; } else { - point.bias == -1; + point.bias = -1; continue; } } @@ -459,7 +460,7 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib return this.ace.textInput.getElement(); }; this.getWrapperElement = function() { - return this.ace.containter; + return this.ace.container; }; var optMap = { indentWithTabs: "useSoftTabs", @@ -475,6 +476,10 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib name = optMap[name]; val = !val; break; + case 'keyMap': + this.state.$keyMap = val; + return; + break; default: name = optMap[name]; } @@ -489,6 +494,8 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib case 'indentWithTabs': name = optMap[name]; return !val; + case 'keyMap': + return this.state.$keyMap; } return aceOpt ? val : this.state[name]; }; @@ -542,7 +549,7 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib return this.ace.getValue(); }; this.setValue = function(v) { - return this.ace.setValue(v); + return this.ace.setValue(v, -1); }; this.getTokenTypeAt = function(pos) { var token = this.ace.session.getTokenAt(pos.line, pos.ch); @@ -565,7 +572,7 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib return toCmPos(this.ace.session.doc.indexToPosition(index)); }; this.focus = function(index) { - return this.ace.focus(); + return this.ace.textInput.focus(); }; this.blur = function(index) { return this.ace.blur(); @@ -575,10 +582,11 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib }; this.scanForBracket = function(pos, dir, _, options) { var re = options.bracketRegex.source; + var tokenRe = /paren|text|operator|tag/; if (dir == 1) { - var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), /paren|text/); + var m = this.ace.session.$findClosingBracket(re.slice(1, 2), toAcePos(pos), tokenRe); } else { - var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), {row: pos.line, column: pos.ch + 1}, /paren|text/); + var m = this.ace.session.$findOpeningBracket(re.slice(-2, -1), {row: pos.line, column: pos.ch + 1}, tokenRe); } return m && {pos: toCmPos(m)}; }; @@ -587,7 +595,10 @@ ace.define("ace/keyboard/vim",["require","exports","module","ace/range","ace/lib }; this.getMode = function() { return { name : this.getOption("mode") }; - } + }; + this.execCommand = function() { + + }; }).call(CodeMirror.prototype); function toAcePos(cmPos) { return {row: cmPos.line, column: cmPos.ch}; @@ -666,28 +677,29 @@ CodeMirror.defineExtension = function(name, fn) { CodeMirror.prototype[name] = fn; }; dom.importCssString(".normal-mode .ace_cursor{\ - border: 1px solid red;\ - background-color: red;\ - opacity: 0.5;\ + border: none;\ + background-color: rgba(255,0,0,0.5);\ }\ .normal-mode .ace_hidden-cursors .ace_cursor{\ background-color: transparent;\ + border: 1px solid red;\ + opacity: 0.7\ }\ .ace_dialog {\ position: absolute;\ left: 0; right: 0;\ - background: white;\ + background: inherit;\ z-index: 15;\ padding: .1em .8em;\ overflow: hidden;\ - color: #333;\ + color: inherit;\ }\ .ace_dialog-top {\ - border-bottom: 1px solid #eee;\ + border-bottom: 1px solid #444;\ top: 0;\ }\ .ace_dialog-bottom {\ - border-top: 1px solid #eee;\ + border-top: 1px solid #444;\ bottom: 0;\ }\ .ace_dialog input {\ @@ -730,11 +742,19 @@ dom.importCssString(".normal-mode .ace_cursor{\ var dialog = dialogDiv(this, template, options.bottom); var closed = false, me = this; + this.state.dialog = dialog; function close(newVal) { if (typeof newVal == 'string') { inp.value = newVal; } else { if (closed) return; + + if (newVal && newVal.type == "blur") { + if (document.activeElement === inp) + return; + } + + me.state.dialog = null; closed = true; dialog.parentNode.removeChild(dialog); me.focus(); @@ -747,7 +767,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ if (inp) { if (options.value) { inp.value = options.value; - if (options.select !== false) inp.select(); + if (options.selectValueOnOpen !== false) inp.select(); } if (options.onInput) @@ -757,12 +777,12 @@ dom.importCssString(".normal-mode .ace_cursor{\ CodeMirror.on(inp, "keydown", function(e) { if (options && options.onKeyDown && options.onKeyDown(e, inp.value, close)) { return; } + if (e.keyCode == 13) callback(inp.value); if (e.keyCode == 27 || (options.closeOnEnter !== false && e.keyCode == 13)) { inp.blur(); CodeMirror.e_stop(e); close(); } - if (e.keyCode == 13) callback(inp.value); }); if (options.closeOnBlur !== false) CodeMirror.on(inp, "blur", close); @@ -815,6 +835,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: '', type: 'keyToKey', toKeys: 'j' }, { keys: '', type: 'keyToKey', toKeys: 'l' }, { keys: '', type: 'keyToKey', toKeys: 'h', context: 'normal'}, + { keys: '', type: 'keyToKey', toKeys: 'x', context: 'normal'}, { keys: '', type: 'keyToKey', toKeys: 'W' }, { keys: '', type: 'keyToKey', toKeys: 'B', context: 'normal' }, { keys: '', type: 'keyToKey', toKeys: 'w' }, @@ -834,6 +855,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: '', type: 'keyToKey', toKeys: '' }, { keys: '', type: 'keyToKey', toKeys: '' }, { keys: '', type: 'keyToKey', toKeys: 'j^', context: 'normal' }, + { keys: '', type: 'action', action: 'toggleOverwrite', context: 'insert' }, { keys: 'H', type: 'motion', motion: 'moveToTopLine', motionArgs: { linewise: true, toJumplist: true }}, { keys: 'M', type: 'motion', motion: 'moveToMiddleLine', motionArgs: { linewise: true, toJumplist: true }}, { keys: 'L', type: 'motion', motion: 'moveToBottomLine', motionArgs: { linewise: true, toJumplist: true }}, @@ -853,6 +875,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: 'gE', type: 'motion', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: true, bigWord: true, inclusive: true }}, { keys: '{', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: false, toJumplist: true }}, { keys: '}', type: 'motion', motion: 'moveByParagraph', motionArgs: { forward: true, toJumplist: true }}, + { keys: '(', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: false }}, + { keys: ')', type: 'motion', motion: 'moveBySentence', motionArgs: { forward: true }}, { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: true }}, { keys: '', type: 'motion', motion: 'moveByPage', motionArgs: { forward: false }}, { keys: '', type: 'motion', motion: 'moveByScroll', motionArgs: { forward: true, explicitRepeat: true }}, @@ -888,6 +912,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: 'd', type: 'operator', operator: 'delete' }, { keys: 'y', type: 'operator', operator: 'yank' }, { keys: 'c', type: 'operator', operator: 'change' }, + { keys: '=', type: 'operator', operator: 'indentAuto' }, { keys: '>', type: 'operator', operator: 'indent', operatorArgs: { indentRight: true }}, { keys: '<', type: 'operator', operator: 'indent', operatorArgs: { indentRight: false }}, { keys: 'g~', type: 'operator', operator: 'changeCase' }, @@ -899,13 +924,14 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: 'X', type: 'operatorMotion', operator: 'delete', motion: 'moveByCharacters', motionArgs: { forward: false }, operatorMotionArgs: { visualLine: true }}, { keys: 'D', type: 'operatorMotion', operator: 'delete', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, { keys: 'D', type: 'operator', operator: 'delete', operatorArgs: { linewise: true }, context: 'visual'}, - { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, + { keys: 'Y', type: 'operatorMotion', operator: 'yank', motion: 'expandToLine', motionArgs: { linewise: true }, context: 'normal'}, { keys: 'Y', type: 'operator', operator: 'yank', operatorArgs: { linewise: true }, context: 'visual'}, { keys: 'C', type: 'operatorMotion', operator: 'change', motion: 'moveToEol', motionArgs: { inclusive: true }, context: 'normal'}, { keys: 'C', type: 'operator', operator: 'change', operatorArgs: { linewise: true }, context: 'visual'}, { keys: '~', type: 'operatorMotion', operator: 'changeCase', motion: 'moveByCharacters', motionArgs: { forward: true }, operatorArgs: { shouldMoveCursor: true }, context: 'normal'}, { keys: '~', type: 'operator', operator: 'changeCase', context: 'visual'}, { keys: '', type: 'operatorMotion', operator: 'delete', motion: 'moveByWords', motionArgs: { forward: false, wordEnd: false }, context: 'insert' }, + { keys: '', type: 'idle', context: 'normal' }, { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: true }}, { keys: '', type: 'action', action: 'jumpListWalk', actionArgs: { forward: false }}, { keys: '', type: 'action', action: 'scroll', actionArgs: { forward: true, linewise: true }}, @@ -929,7 +955,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: 'r', type: 'action', action: 'replace', isEdit: true }, { keys: '@', type: 'action', action: 'replayMacro' }, { keys: 'q', type: 'action', action: 'enterMacroRecordMode' }, - { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }}, + { keys: 'R', type: 'action', action: 'enterInsertMode', isEdit: true, actionArgs: { replace: true }, context: 'normal'}, + { keys: 'R', type: 'operator', operator: 'change', operatorArgs: { linewise: true, fullLine: true }, context: 'visual', exitVisualBlock: true}, { keys: 'u', type: 'action', action: 'undo', context: 'normal' }, { keys: 'u', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: true}, context: 'visual', isEdit: true }, { keys: 'U', type: 'operator', operator: 'changeCase', operatorArgs: {toLower: false}, context: 'visual', isEdit: true }, @@ -945,6 +972,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: '.', type: 'action', action: 'repeatLastEdit' }, { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: true, backtrack: false}}, { keys: '', type: 'action', action: 'incrementNumberToken', isEdit: true, actionArgs: {increase: false, backtrack: false}}, + { keys: '', type: 'action', action: 'indent', actionArgs: { indentRight: true }, context: 'insert' }, + { keys: '', type: 'action', action: 'indent', actionArgs: { indentRight: false }, context: 'insert' }, { keys: 'a', type: 'motion', motion: 'textObjectManipulation' }, { keys: 'i', type: 'motion', motion: 'textObjectManipulation', motionArgs: { textObjectInner: true }}, { keys: '/', type: 'search', searchArgs: { forward: true, querySrc: 'prompt', toJumplist: true }}, @@ -955,6 +984,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ { keys: 'g#', type: 'search', searchArgs: { forward: false, querySrc: 'wordUnderCursor', toJumplist: true }}, { keys: ':', type: 'ex' } ]; + var defaultKeymapLength = defaultKeymap.length; var defaultExCommandMap = [ { name: 'colorscheme', shortName: 'colo' }, { name: 'map' }, @@ -972,6 +1002,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ { name: 'sort', shortName: 'sor' }, { name: 'substitute', shortName: 's', possiblyAsync: true }, { name: 'nohlsearch', shortName: 'noh' }, + { name: 'yank', shortName: 'y' }, { name: 'delmarks', shortName: 'delm' }, { name: 'registers', shortName: 'reg', excludeFromCommandHistory: true }, { name: 'global', shortName: 'g' } @@ -1001,7 +1032,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ CodeMirror.rmClass(cm.getWrapperElement(), "cm-fat-cursor"); if (!next || next.attach != attachVimMap) - leaveVimMode(cm, false); + leaveVimMode(cm); } function attachVimMap(cm, prev) { if (this == CodeMirror.keyMap.vim) @@ -1019,6 +1050,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ function cmKey(key, cm) { if (!cm) { return undefined; } + if (this[key]) { return this[key]; } var vimKey = cmKeyToVimKey(key); if (!vimKey) { return false; @@ -1031,7 +1063,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ } var modifiers = {'Shift': 'S', 'Ctrl': 'C', 'Alt': 'A', 'Cmd': 'D', 'Mod': 'A'}; - var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del'}; + var specialKeys = {Enter:'CR',Backspace:'BS',Delete:'Del',Insert:'Ins'}; function cmKeyToVimKey(key) { if (key.charAt(0) == '\'') { return key.charAt(1); @@ -1109,6 +1141,9 @@ dom.importCssString(".normal-mode .ace_cursor{\ function isWhiteSpaceString(k) { return (/^\s*$/).test(k); } + function isEndOfSentenceSymbol(k) { + return '.?!'.indexOf(k) != -1; + } function inArray(val, arr) { for (var i = 0; i < arr.length; i++) { if (arr[i] == val) { @@ -1144,11 +1179,11 @@ dom.importCssString(".normal-mode .ace_cursor{\ cfg = cfg || {}; var scope = cfg.scope; if (!option) { - throw Error('Unknown option: ' + name); + return new Error('Unknown option: ' + name); } if (option.type == 'boolean') { if (value && value !== true) { - throw Error('Invalid argument: ' + name + '=' + value); + return new Error('Invalid argument: ' + name + '=' + value); } else if (value !== false) { value = true; } @@ -1175,7 +1210,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ cfg = cfg || {}; var scope = cfg.scope; if (!option) { - throw Error('Unknown option: ' + name); + return new Error('Unknown option: ' + name); } if (option.callback) { var local = cm && option.callback(undefined, cm); @@ -1344,10 +1379,10 @@ dom.importCssString(".normal-mode .ace_cursor{\ lastSubstituteReplacePart: undefined, jumpList: createCircularJumpList(), macroModeState: new MacroModeState, - lastChararacterSearch: {increment:0, forward:true, selectedCharacter:''}, + lastCharacterSearch: {increment:0, forward:true, selectedCharacter:''}, registerController: new RegisterController({}), - searchHistoryController: new HistoryController({}), - exCommandHistoryController : new HistoryController({}) + searchHistoryController: new HistoryController(), + exCommandHistoryController : new HistoryController() }; for (var optionName in options) { var option = options[optionName]; @@ -1377,6 +1412,62 @@ dom.importCssString(".normal-mode .ace_cursor{\ unmap: function(lhs, ctx) { exCommandDispatcher.unmap(lhs, ctx); }, + noremap: function(lhs, rhs, ctx) { + function toCtxArray(ctx) { + return ctx ? [ctx] : ['normal', 'insert', 'visual']; + } + var ctxsToMap = toCtxArray(ctx); + var actualLength = defaultKeymap.length, origLength = defaultKeymapLength; + for (var i = actualLength - origLength; + i < actualLength && ctxsToMap.length; + i++) { + var mapping = defaultKeymap[i]; + if (mapping.keys == rhs && + (!ctx || !mapping.context || mapping.context === ctx) && + mapping.type.substr(0, 2) !== 'ex' && + mapping.type.substr(0, 3) !== 'key') { + var newMapping = {}; + for (var key in mapping) { + newMapping[key] = mapping[key]; + } + newMapping.keys = lhs; + if (ctx && !newMapping.context) { + newMapping.context = ctx; + } + this._mapCommand(newMapping); + var mappedCtxs = toCtxArray(mapping.context); + ctxsToMap = ctxsToMap.filter(function(el) { return mappedCtxs.indexOf(el) === -1; }); + } + } + }, + mapclear: function(ctx) { + var actualLength = defaultKeymap.length, + origLength = defaultKeymapLength; + var userKeymap = defaultKeymap.slice(0, actualLength - origLength); + defaultKeymap = defaultKeymap.slice(actualLength - origLength); + if (ctx) { + for (var i = userKeymap.length - 1; i >= 0; i--) { + var mapping = userKeymap[i]; + if (ctx !== mapping.context) { + if (mapping.context) { + this._mapCommand(mapping); + } else { + var contexts = ['normal', 'insert', 'visual']; + for (var j in contexts) { + if (contexts[j] !== ctx) { + var newMapping = {}; + for (var key in mapping) { + newMapping[key] = mapping[key]; + } + newMapping.context = contexts[j]; + this._mapCommand(newMapping); + } + } + } + } + } + } + }, setOption: setOption, getOption: getOption, defineOption: defineOption, @@ -1489,7 +1580,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ if (vim.insertMode) { command = handleKeyInsertMode(); } else { command = handleKeyNonInsertMode(); } if (command === false) { - return undefined; + return undefined; //ace_patch } else if (command === true) { return function() { return true; }; } else { @@ -1608,7 +1699,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ } }; function defineRegister(name, register) { - var registers = vimGlobalState.registerController.registers[name]; + var registers = vimGlobalState.registerController.registers; if (!name || name.length != 1) { throw Error('Register name must be 1 character'); } @@ -1624,9 +1715,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ } RegisterController.prototype = { pushText: function(registerName, operator, text, linewise, blockwise) { - if (linewise && text.charAt(0) == '\n') { - text = text.slice(1) + '\n'; - } if (linewise && text.charAt(text.length - 1) !== '\n'){ text += '\n'; } @@ -1679,7 +1767,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ }; function HistoryController() { this.historyBuffer = []; - this.iterator; + this.iterator = 0; this.initialPrefix = null; } HistoryController.prototype = { @@ -1730,7 +1818,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ } if (bestMatch.keys.slice(-11) == '') { var character = lastChar(keys); - if (//.test(character)) return {type: 'none'}; + if (//.test(character) || !character) return {type: 'none'}; //ace_patch inputState.selectedCharacter = character; } return {type: 'full', command: bestMatch}; @@ -1780,6 +1868,10 @@ dom.importCssString(".normal-mode .ace_cursor{\ } inputState.operator = command.operator; inputState.operatorArgs = copyArgs(command.operatorArgs); + if (command.exitVisualBlock) { + vim.visualBlock = false; + updateCmSelection(cm); + } if (vim.visualMode) { this.evalInput(cm, vim); } @@ -1851,7 +1943,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ }); } function onPromptClose(query) { - cm.scrollTo(originalScrollPos.left, originalScrollPos.top); handleQuery(query, true /** ignoreCase */, true /** smartCase */); var macroModeState = vimGlobalState.macroModeState; if (macroModeState.isRecording) { @@ -1859,11 +1950,13 @@ dom.importCssString(".normal-mode .ace_cursor{\ } } function onPromptKeyUp(e, query, close) { - var keyName = CodeMirror.keyName(e), up; + var keyName = CodeMirror.keyName(e), up, offset; if (keyName == 'Up' || keyName == 'Down') { up = keyName == 'Up' ? true : false; + offset = e.target ? e.target.selectionEnd : 0; query = vimGlobalState.searchHistoryController.nextMatch(query, up) || ''; close(query); + if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length); } else { if ( keyName != 'Left' && keyName != 'Right' && keyName != 'Ctrl' && keyName != 'Alt' && keyName != 'Shift') vimGlobalState.searchHistoryController.reset(); @@ -1894,6 +1987,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ clearInputState(cm); close(); cm.focus(); + } else if (keyName == 'Up' || keyName == 'Down') { + CodeMirror.e_stop(e); } else if (keyName == 'Ctrl-U') { CodeMirror.e_stop(e); close(''); @@ -1950,7 +2045,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ exCommandDispatcher.processCommand(cm, input); } function onPromptKeyDown(e, input, close) { - var keyName = CodeMirror.keyName(e), up; + var keyName = CodeMirror.keyName(e), up, offset; if (keyName == 'Esc' || keyName == 'Ctrl-C' || keyName == 'Ctrl-[' || (keyName == 'Backspace' && input == '')) { vimGlobalState.exCommandHistoryController.pushInput(input); @@ -1961,9 +2056,12 @@ dom.importCssString(".normal-mode .ace_cursor{\ cm.focus(); } if (keyName == 'Up' || keyName == 'Down') { + CodeMirror.e_stop(e); up = keyName == 'Up' ? true : false; + offset = e.target ? e.target.selectionEnd : 0; input = vimGlobalState.exCommandHistoryController.nextMatch(input, up) || ''; close(input); + if (offset && e.target) e.target.selectionEnd = e.target.selectionStart = Math.min(offset, e.target.value.length); } else if (keyName == 'Ctrl-U') { CodeMirror.e_stop(e); close(''); @@ -1977,7 +2075,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ } else { if (vim.visualMode) { showPrompt(cm, { onClose: onPromptClose, prefix: ':', value: '\'<,\'>', - onKeyDown: onPromptKeyDown}); + onKeyDown: onPromptKeyDown, selectValueOnOpen: false}); } else { showPrompt(cm, { onClose: onPromptClose, prefix: ':', onKeyDown: onPromptKeyDown}); @@ -2165,6 +2263,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ vim.lastEditActionCommand = actionCommand; macroModeState.lastInsertModeChanges.changes = []; macroModeState.lastInsertModeChanges.expectCursorActivityForChange = false; + macroModeState.lastInsertModeChanges.visualBlock = vim.visualBlock ? vim.sel.head.line - vim.sel.anchor.line : 0; } }; var motions = { @@ -2197,9 +2296,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ return findNext(cm, prev/** prev */, query, motionArgs.repeat); }, goToMark: function(cm, _head, motionArgs, vim) { - var mark = vim.marks[motionArgs.selectedCharacter]; - if (mark) { - var pos = mark.find(); + var pos = getMarkPos(cm, vim, motionArgs.selectedCharacter); + if (pos) { return motionArgs.linewise ? { line: pos.line, ch: findFirstNonWhiteSpaceCharacter(cm.getLine(pos.line)) } : pos; } return null; @@ -2274,9 +2372,10 @@ dom.importCssString(".normal-mode .ace_cursor{\ var line = motionArgs.forward ? cur.line + repeat : cur.line - repeat; var first = cm.firstLine(); var last = cm.lastLine(); - if ((line < first && cur.line == first) || - (line > last && cur.line == last)) { - return; + if (line < first && cur.line == first){ + return this.moveToStartOfLine(cm, head, motionArgs, vim); + }else if (line > last && cur.line == last){ + return this.moveToEol(cm, head, motionArgs, vim, true); } var fold = cm.ace.session.getFoldLine(line); if (fold) { @@ -2331,6 +2430,10 @@ dom.importCssString(".normal-mode .ace_cursor{\ var dir = motionArgs.forward ? 1 : -1; return findParagraph(cm, head, motionArgs.repeat, dir); }, + moveBySentence: function(cm, head, motionArgs) { + var dir = motionArgs.forward ? 1 : -1; + return findSentence(cm, head, motionArgs.repeat, dir); + }, moveByScroll: function(cm, head, motionArgs, vim) { var scrollbox = cm.getScrollInfo(); var curEnd = null; @@ -2379,13 +2482,15 @@ dom.importCssString(".normal-mode .ace_cursor{\ vim.lastHSPos = cm.charCoords(head,'div').left; return moveToColumn(cm, repeat); }, - moveToEol: function(cm, head, motionArgs, vim) { + moveToEol: function(cm, head, motionArgs, vim, keepHPos) { var cur = head; - vim.lastHPos = Infinity; var retval= Pos(cur.line + motionArgs.repeat - 1, Infinity); var end=cm.clipPos(retval); end.ch--; - vim.lastHSPos = cm.charCoords(end,'div').left; + if (!keepHPos) { + vim.lastHPos = Infinity; + vim.lastHSPos = cm.charCoords(end,'div').left; + } return retval; }, moveToFirstNonWhiteSpaceCharacter: function(cm, head) { @@ -2399,17 +2504,18 @@ dom.importCssString(".normal-mode .ace_cursor{\ var ch = cursor.ch; var lineText = cm.getLine(line); var symbol; - do { - symbol = lineText.charAt(ch++); + for (; ch < lineText.length; ch++) { + symbol = lineText.charAt(ch); if (symbol && isMatchableSymbol(symbol)) { - var style = cm.getTokenTypeAt(Pos(line, ch)); + var style = cm.getTokenTypeAt(Pos(line, ch + 1)); if (style !== "string" && style !== "comment") { break; } } - } while (symbol); - if (symbol) { - var matched = cm.findMatchingBracket(Pos(line, ch)); + } + if (ch < lineText.length) { + var re = /[<>]/.test(lineText[ch]) ? /[(){}[\]<>]/ : /[(){}[\]]/; + var matched = cm.findMatchingBracket(Pos(line, ch+1), {bracketRegex: re}); return matched.to; } else { return cursor; @@ -2429,8 +2535,9 @@ dom.importCssString(".normal-mode .ace_cursor{\ textObjectManipulation: function(cm, head, motionArgs, vim) { var mirroredPairs = {'(': ')', ')': '(', '{': '}', '}': '{', - '[': ']', ']': '['}; - var selfPaired = {'\'': true, '"': true}; + '[': ']', ']': '[', + '<': '>', '>': '<'}; + var selfPaired = {'\'': true, '"': true, '`': true}; var character = motionArgs.selectedCharacter; if (character == 'b') { @@ -2473,7 +2580,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ }, repeatLastCharacterSearch: function(cm, head, motionArgs) { - var lastSearch = vimGlobalState.lastChararacterSearch; + var lastSearch = vimGlobalState.lastCharacterSearch; var repeat = motionArgs.repeat; var forward = motionArgs.forward === lastSearch.forward; var increment = (lastSearch.increment ? 1 : 0) * (forward ? -1 : 1); @@ -2504,10 +2611,9 @@ dom.importCssString(".normal-mode .ace_cursor{\ change: function(cm, args, ranges) { var finalHead, text; var vim = cm.state.vim; - vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock = vim.visualBlock; + var anchor = ranges[0].anchor, + head = ranges[0].head; if (!vim.visualMode) { - var anchor = ranges[0].anchor, - head = ranges[0].head; text = cm.getRange(anchor, head); var lastState = vim.lastEditInputState || {}; if (lastState.motion == "moveByWords" && !isWhiteSpaceString(text)) { @@ -2532,6 +2638,13 @@ dom.importCssString(".normal-mode .ace_cursor{\ anchor.ch = Number.MAX_VALUE; } finalHead = anchor; + } else if (args.fullLine) { + head.ch = Number.MAX_VALUE; + head.line--; + cm.setSelection(anchor, head) + text = cm.getSelection(); + cm.replaceSelections(""); + finalHead = anchor } else { text = cm.getSelection(); var replacement = fillArray('', ranges.length); @@ -2574,7 +2687,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ vimGlobalState.registerController.pushText( args.registerName, 'delete', text, args.linewise, vim.visualBlock); - return clipCursorToContent(cm, finalHead); + var includeLineBreak = vim.insertMode + return clipCursorToContent(cm, finalHead, includeLineBreak); }, indent: function(cm, args, ranges) { var vim = cm.state.vim; @@ -2593,6 +2707,10 @@ dom.importCssString(".normal-mode .ace_cursor{\ } return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); }, + indentAuto: function(cm, _args, ranges) { + cm.execCommand("indentAuto"); + return motions.moveToFirstNonWhiteSpaceCharacter(cm, ranges[0].anchor); + }, changeCase: function(cm, args, ranges, oldAnchor, newHead) { var selections = cm.getSelections(); var swapped = []; @@ -2700,9 +2818,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ switch (actionArgs.position) { case 'center': y = y - (height / 2) + lineHeight; break; - case 'bottom': y = y - height + lineHeight*1.4; - break; - case 'top': y = y + lineHeight*0.4; + case 'bottom': y = y - height + lineHeight; break; } cm.scrollTo(null, y); @@ -2713,6 +2829,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ var macroModeState = vimGlobalState.macroModeState; if (registerName == '@') { registerName = macroModeState.latestRegister; + } else { + macroModeState.latestRegister = registerName; } while(repeat--){ executeMacroRegister(cm, vim, macroModeState, registerName); @@ -2721,7 +2839,20 @@ dom.importCssString(".normal-mode .ace_cursor{\ enterMacroRecordMode: function(cm, actionArgs) { var macroModeState = vimGlobalState.macroModeState; var registerName = actionArgs.selectedCharacter; - macroModeState.enterMacroRecordMode(cm, registerName); + if (vimGlobalState.registerController.isValidRegister(registerName)) { + macroModeState.enterMacroRecordMode(cm, registerName); + } + }, + toggleOverwrite: function(cm) { + if (!cm.state.overwrite) { + cm.toggleOverwrite(true); + cm.setOption('keyMap', 'vim-replace'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); + } else { + cm.toggleOverwrite(false); + cm.setOption('keyMap', 'vim-insert'); + CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); + } }, enterInsertMode: function(cm, actionArgs, vim) { if (cm.getOption('readOnly')) { return; } @@ -2738,6 +2869,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ } else if (insertAt == 'firstNonBlank') { head = motions.moveToFirstNonWhiteSpaceCharacter(cm, head); } else if (insertAt == 'startOfSelectedArea') { + if (!vim.visualMode) + return; if (!vim.visualBlock) { if (sel.head.line < sel.anchor.line) { head = sel.head; @@ -2751,6 +2884,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ height = Math.abs(sel.head.line - sel.anchor.line) + 1; } } else if (insertAt == 'endOfSelectedArea') { + if (!vim.visualMode) + return; if (!vim.visualBlock) { if (sel.head.line >= sel.anchor.line) { head = offsetCursor(sel.head, 0, 1); @@ -2768,13 +2903,13 @@ dom.importCssString(".normal-mode .ace_cursor{\ return; } } - cm.setOption('keyMap', 'vim-insert'); cm.setOption('disableInput', false); if (actionArgs && actionArgs.replace) { cm.toggleOverwrite(true); cm.setOption('keyMap', 'vim-replace'); CodeMirror.signal(cm, "vim-mode-change", {mode: "replace"}); } else { + cm.toggleOverwrite(false); cm.setOption('keyMap', 'vim-insert'); CodeMirror.signal(cm, "vim-mode-change", {mode: "insert"}); } @@ -2932,7 +3067,17 @@ dom.importCssString(".normal-mode .ace_cursor{\ } var linewise = register.linewise; var blockwise = register.blockwise; - if (linewise && !blockwise) { + if (blockwise) { + text = text.split('\n'); + if (linewise) { + text.pop(); + } + for (var i = 0; i < text.length; i++) { + text[i] = (text[i] == '') ? ' ' : text[i]; + } + cur.ch += actionArgs.after ? 1 : 0; + cur.ch = Math.min(lineLength(cm, cur.line), cur.ch); + } else if (linewise) { if(vim.visualMode) { text = vim.visualLine ? text.slice(0, -1) : '\n' + text.slice(0, text.length - 1) + '\n'; } else if (actionArgs.after) { @@ -2942,12 +3087,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ cur.ch = 0; } } else { - if (blockwise) { - text = text.split('\n'); - for (var i = 0; i < text.length; i++) { - text[i] = (text[i] == '') ? ' ' : text[i]; - } - } cur.ch += actionArgs.after ? 1 : 0; } var curPosFinal; @@ -3088,25 +3227,32 @@ dom.importCssString(".normal-mode .ace_cursor{\ incrementNumberToken: function(cm, actionArgs) { var cur = cm.getCursor(); var lineStr = cm.getLine(cur.line); - var re = /-?\d+/g; + var re = /(-?)(?:(0x)([\da-f]+)|(0b|0|)(\d+))/gi; var match; var start; var end; var numberStr; - var token; while ((match = re.exec(lineStr)) !== null) { - token = match[0]; start = match.index; - end = start + token.length; + end = start + match[0].length; if (cur.ch < end)break; } if (!actionArgs.backtrack && (end <= cur.ch))return; - if (token) { + if (match) { + var baseStr = match[2] || match[4] + var digits = match[3] || match[5] var increment = actionArgs.increase ? 1 : -1; - var number = parseInt(token) + (increment * actionArgs.repeat); + var base = {'0b': 2, '0': 8, '': 10, '0x': 16}[baseStr.toLowerCase()]; + var number = parseInt(match[1] + digits, base) + (increment * actionArgs.repeat); + numberStr = number.toString(base); + var zeroPadding = baseStr ? new Array(digits.length - numberStr.length + 1 + match[1].length).join('0') : '' + if (numberStr.charAt(0) === '-') { + numberStr = '-' + baseStr + zeroPadding + numberStr.substr(1); + } else { + numberStr = baseStr + zeroPadding + numberStr; + } var from = Pos(cur.line, start); var to = Pos(cur.line, end); - numberStr = number.toString(); cm.replaceRange(numberStr, from, to); } else { return; @@ -3124,6 +3270,9 @@ dom.importCssString(".normal-mode .ace_cursor{\ } repeatLastEdit(cm, vim, repeat, false /** repeatForInsert */); }, + indent: function(cm, actionArgs) { + cm.indentLine(cm.getCursor().line, actionArgs.indentRight); + }, exitInsertMode: exitInsertMode }; @@ -3153,12 +3302,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ } return Pos(cur.line + offsetLine, cur.ch + offsetCh); } - function getOffset(anchor, head) { - return { - line: head.line - anchor.line, - ch: head.line - anchor.line - }; - } function commandMatches(keys, keyMap, context, inputState) { var match, partial = [], full = []; for (var i = 0; i < keyMap.length; i++) { @@ -3188,7 +3331,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ } } function lastChar(keys) { - var match = /^.*(<[\w\-]+>)$/.exec(keys); + var match = /^.*(<[^>]+>)$/.exec(keys); var selectedCharacter = match ? match[1] : keys.slice(-1); if (selectedCharacter.length > 1){ switch(selectedCharacter){ @@ -3199,6 +3342,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ selectedCharacter=' '; break; default: + selectedCharacter=''; break; } } @@ -3292,7 +3436,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ var range = {anchor: new Pos(line, baseCh), head: new Pos(line, headCh)}; selections.push(range); } - primIndex = head.line == lastLine ? selections.length - 1 : 0; cm.setSelections(selections); selectionEnd.ch = headCh; base.ch = baseCh; @@ -3554,9 +3697,9 @@ dom.importCssString(".normal-mode .ace_cursor{\ } function recordLastCharacterSearch(increment, args) { - vimGlobalState.lastChararacterSearch.increment = increment; - vimGlobalState.lastChararacterSearch.forward = args.forward; - vimGlobalState.lastChararacterSearch.selectedCharacter = args.selectedCharacter; + vimGlobalState.lastCharacterSearch.increment = increment; + vimGlobalState.lastCharacterSearch.forward = args.forward; + vimGlobalState.lastCharacterSearch.selectedCharacter = args.selectedCharacter; } var symbolToMode = { @@ -3730,7 +3873,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ line = cm.getLine(lineNum); pos = (dir > 0) ? 0 : line.length; } - throw new Error('The impossible happened.'); } function moveToWord(cm, cur, repeat, forward, wordEnd, bigWord) { var curStart = copyCursor(cur); @@ -3872,22 +4014,160 @@ dom.importCssString(".normal-mode .ace_cursor{\ start = new Pos(i, 0); return { start: start, end: end }; } + + function findSentence(cm, cur, repeat, dir) { + function nextChar(cm, idx) { + if (idx.pos + idx.dir < 0 || idx.pos + idx.dir >= idx.line.length) { + idx.ln += idx.dir; + if (!isLine(cm, idx.ln)) { + idx.line = null; + idx.ln = null; + idx.pos = null; + return; + } + idx.line = cm.getLine(idx.ln); + idx.pos = (idx.dir > 0) ? 0 : idx.line.length - 1; + } + else { + idx.pos += idx.dir; + } + } + function forward(cm, ln, pos, dir) { + var line = cm.getLine(ln); + var stop = (line === ""); + + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + } + + var last_valid = { + ln: curr.ln, + pos: curr.pos, + } + + var skip_empty_lines = (curr.line === ""); + nextChar(cm, curr); + + while (curr.line !== null) { + last_valid.ln = curr.ln; + last_valid.pos = curr.pos; + + if (curr.line === "" && !skip_empty_lines) { + return { ln: curr.ln, pos: curr.pos, }; + } + else if (stop && curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) { + return { ln: curr.ln, pos: curr.pos, }; + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) + && !stop + && (curr.pos === curr.line.length - 1 + || isWhiteSpaceString(curr.line[curr.pos + 1]))) { + stop = true; + } + + nextChar(cm, curr); + } + var line = cm.getLine(last_valid.ln); + last_valid.pos = 0; + for(var i = line.length - 1; i >= 0; --i) { + if (!isWhiteSpaceString(line[i])) { + last_valid.pos = i; + break; + } + } + + return last_valid; + + } + function reverse(cm, ln, pos, dir) { + var line = cm.getLine(ln); + + var curr = { + line: line, + ln: ln, + pos: pos, + dir: dir, + } + + var last_valid = { + ln: curr.ln, + pos: null, + }; + + var skip_empty_lines = (curr.line === ""); + nextChar(cm, curr); + + while (curr.line !== null) { + + if (curr.line === "" && !skip_empty_lines) { + if (last_valid.pos !== null) { + return last_valid; + } + else { + return { ln: curr.ln, pos: curr.pos }; + } + } + else if (isEndOfSentenceSymbol(curr.line[curr.pos]) + && last_valid.pos !== null + && !(curr.ln === last_valid.ln && curr.pos + 1 === last_valid.pos)) { + return last_valid; + } + else if (curr.line !== "" && !isWhiteSpaceString(curr.line[curr.pos])) { + skip_empty_lines = false; + last_valid = { ln: curr.ln, pos: curr.pos } + } + + nextChar(cm, curr); + } + var line = cm.getLine(last_valid.ln); + last_valid.pos = 0; + for(var i = 0; i < line.length; ++i) { + if (!isWhiteSpaceString(line[i])) { + last_valid.pos = i; + break; + } + } + return last_valid; + } + + var curr_index = { + ln: cur.line, + pos: cur.ch, + }; + + while (repeat > 0) { + if (dir < 0) { + curr_index = reverse(cm, curr_index.ln, curr_index.pos, dir); + } + else { + curr_index = forward(cm, curr_index.ln, curr_index.pos, dir); + } + repeat--; + } + + return Pos(curr_index.ln, curr_index.pos); + } function selectCompanionObject(cm, head, symb, inclusive) { var cur = head, start, end; var bracketRegexp = ({ '(': /[()]/, ')': /[()]/, '[': /[[\]]/, ']': /[[\]]/, - '{': /[{}]/, '}': /[{}]/})[symb]; + '{': /[{}]/, '}': /[{}]/, + '<': /[<>]/, '>': /[<>]/})[symb]; var openSym = ({ '(': '(', ')': '(', '[': '[', ']': '[', - '{': '{', '}': '{'})[symb]; + '{': '{', '}': '{', + '<': '<', '>': '<'})[symb]; var curChar = cm.getLine(cur.line).charAt(cur.ch); var offset = curChar === openSym ? 1 : 0; - start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, null, {'bracketRegex': bracketRegexp}); - end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, null, {'bracketRegex': bracketRegexp}); + start = cm.scanForBracket(Pos(cur.line, cur.ch + offset), -1, undefined, {'bracketRegex': bracketRegexp}); + end = cm.scanForBracket(Pos(cur.line, cur.ch + offset), 1, undefined, {'bracketRegex': bracketRegexp}); if (!start || !end) { return { start: cur, end: cur }; @@ -3988,14 +4268,27 @@ dom.importCssString(".normal-mode .ace_cursor{\ if (cm.openDialog) { cm.openDialog(template, onClose, { bottom: true, value: options.value, onKeyDown: options.onKeyDown, onKeyUp: options.onKeyUp, - selectValueOnOpen: false}); + selectValueOnOpen: false, onClose: function() { + if (cm.state.vim) { + cm.state.vim.status = ""; + cm.ace.renderer.$loop.schedule(cm.ace.renderer.CHANGE_CURSOR); + } + }}); } else { onClose(prompt(shortText, '')); } } function splitBySlash(argString) { - var slashes = findUnescapedSlashes(argString) || []; + return splitBySeparator(argString, '/'); + } + + function findUnescapedSlashes(argString) { + return findUnescapedSeparators(argString, '/'); + } + + function splitBySeparator(argString, separator) { + var slashes = findUnescapedSeparators(argString, separator) || []; if (!slashes.length) return []; var tokens = []; if (slashes[0] !== 0) return; @@ -4006,12 +4299,15 @@ dom.importCssString(".normal-mode .ace_cursor{\ return tokens; } - function findUnescapedSlashes(str) { + function findUnescapedSeparators(str, separator) { + if (!separator) + separator = '/'; + var escapeNextChar = false; var slashes = []; for (var i = 0; i < str.length; i++) { var c = str.charAt(i); - if (!escapeNextChar && c == '/') { + if (!escapeNextChar && c == separator) { slashes.push(i); } escapeNextChar = !escapeNextChar && (c == '\\'); @@ -4143,17 +4439,10 @@ dom.importCssString(".normal-mode .ace_cursor{\ } } function makePrompt(prefix, desc) { - var raw = ''; - if (prefix) { - raw += '' + prefix + ''; - } - raw += ' ' + - ''; - if (desc) { - raw += ''; - raw += desc; - raw += ''; - } + var raw = '' + + (prefix || "") + ''; + if (desc) + raw += ' ' + desc + ''; return raw; } var searchPromptDesc = '(Javascript regexp)'; @@ -4293,6 +4582,12 @@ dom.importCssString(".normal-mode .ace_cursor{\ } } + function getMarkPos(cm, vim, markName) { + + var mark = vim.marks[markName]; + return mark && mark.find(); + } + var ExCommandDispatcher = function() { this.buildCommandMap_(); }; @@ -4387,20 +4682,35 @@ dom.importCssString(".normal-mode .ace_cursor{\ } switch (inputStream.next()) { case '.': - return cm.getCursor().line; + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); case '$': - return cm.lastLine(); + return this.parseLineSpecOffset_(inputStream, cm.lastLine()); case '\'': - var mark = cm.state.vim.marks[inputStream.next()]; - if (mark && mark.find()) { - return mark.find().line; - } - throw new Error('Mark not set'); + var markName = inputStream.next(); + var markPos = getMarkPos(cm, cm.state.vim, markName); + if (!markPos) throw new Error('Mark not set'); + return this.parseLineSpecOffset_(inputStream, markPos.line); + case '-': + case '+': + inputStream.backUp(1); + return this.parseLineSpecOffset_(inputStream, cm.getCursor().line); default: inputStream.backUp(1); return undefined; } }, + parseLineSpecOffset_: function(inputStream, line) { + var offsetMatch = inputStream.match(/^([+-])?(\d+)/); + if (offsetMatch) { + var offset = parseInt(offsetMatch[2], 10); + if (offsetMatch[1] == "-") { + line -= offset; + } else { + line += offset; + } + } + return line; + }, parseCommandArgs_: function(inputStream, params, command) { if (inputStream.eol()) { return; @@ -4456,16 +4766,15 @@ dom.importCssString(".normal-mode .ace_cursor{\ var mapping = { keys: lhs, type: 'keyToEx', - exArgs: { input: rhs.substring(1) }, - user: true}; + exArgs: { input: rhs.substring(1) } + }; if (ctx) { mapping.context = ctx; } defaultKeymap.unshift(mapping); } else { var mapping = { keys: lhs, type: 'keyToKey', - toKeys: rhs, - user: true + toKeys: rhs }; if (ctx) { mapping.context = ctx; } defaultKeymap.unshift(mapping); @@ -4484,8 +4793,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ var keys = lhs; for (var i = 0; i < defaultKeymap.length; i++) { if (keys == defaultKeymap[i].keys - && defaultKeymap[i].context === ctx - && defaultKeymap[i].user) { + && defaultKeymap[i].context === ctx) { defaultKeymap.splice(i, 1); return; } @@ -4563,13 +4871,18 @@ dom.importCssString(".normal-mode .ace_cursor{\ } if (!optionIsBoolean && value === undefined || forceGet) { var oldValue = getOption(optionName, cm, setCfg); - if (oldValue === true || oldValue === false) { + if (oldValue instanceof Error) { + showConfirm(cm, oldValue.message); + } else if (oldValue === true || oldValue === false) { showConfirm(cm, ' ' + (oldValue ? '' : 'no') + optionName); } else { showConfirm(cm, ' ' + optionName + '=' + oldValue); } } else { - setOption(optionName, value, cm, setCfg); + var setOptionReturn = setOption(optionName, value, cm, setCfg); + if (setOptionReturn instanceof Error) { + showConfirm(cm, setOptionReturn.message); + } } }, setlocal: function (cm, params) { @@ -4606,25 +4919,27 @@ dom.importCssString(".normal-mode .ace_cursor{\ showConfirm(cm, regInfo); }, sort: function(cm, params) { - var reverse, ignoreCase, unique, number; + var reverse, ignoreCase, unique, number, pattern; function parseArgs() { if (params.argString) { var args = new CodeMirror.StringStream(params.argString); if (args.eat('!')) { reverse = true; } if (args.eol()) { return; } if (!args.eatSpace()) { return 'Invalid arguments'; } - var opts = args.match(/[a-z]+/); - if (opts) { - opts = opts[0]; - ignoreCase = opts.indexOf('i') != -1; - unique = opts.indexOf('u') != -1; - var decimal = opts.indexOf('d') != -1 && 1; - var hex = opts.indexOf('x') != -1 && 1; - var octal = opts.indexOf('o') != -1 && 1; + var opts = args.match(/([dinuox]+)?\s*(\/.+\/)?\s*/); + if (!opts && !args.eol()) { return 'Invalid arguments'; } + if (opts[1]) { + ignoreCase = opts[1].indexOf('i') != -1; + unique = opts[1].indexOf('u') != -1; + var decimal = opts[1].indexOf('d') != -1 || opts[1].indexOf('n') != -1 && 1; + var hex = opts[1].indexOf('x') != -1 && 1; + var octal = opts[1].indexOf('o') != -1 && 1; if (decimal + hex + octal > 1) { return 'Invalid arguments'; } number = decimal && 'decimal' || hex && 'hex' || octal && 'octal'; } - if (args.match(/\/.*\//)) { return 'patterns not supported'; } + if (opts[2]) { + pattern = new RegExp(opts[2].substr(1, opts[2].length - 2), ignoreCase ? 'i' : ''); + } } } var err = parseArgs(); @@ -4638,14 +4953,18 @@ dom.importCssString(".normal-mode .ace_cursor{\ var curStart = Pos(lineStart, 0); var curEnd = Pos(lineEnd, lineLength(cm, lineEnd)); var text = cm.getRange(curStart, curEnd).split('\n'); - var numberRegex = (number == 'decimal') ? /(-?)([\d]+)/ : + var numberRegex = pattern ? pattern : + (number == 'decimal') ? /(-?)([\d]+)/ : (number == 'hex') ? /(-?)(?:0x)?([0-9a-f]+)/i : (number == 'octal') ? /([0-7]+)/ : null; var radix = (number == 'decimal') ? 10 : (number == 'hex') ? 16 : (number == 'octal') ? 8 : null; var numPart = [], textPart = []; - if (number) { + if (number || pattern) { for (var i = 0; i < text.length; i++) { - if (numberRegex.exec(text[i])) { + var matchPart = pattern ? text[i].match(pattern) : null; + if (matchPart && matchPart[0] != '') { + numPart.push(matchPart); + } else if (!pattern && numberRegex.exec(text[i])) { numPart.push(text[i]); } else { textPart.push(text[i]); @@ -4664,8 +4983,17 @@ dom.importCssString(".normal-mode .ace_cursor{\ bnum = parseInt((bnum[1] + bnum[2]).toLowerCase(), radix); return anum - bnum; } - numPart.sort(compareFn); - textPart.sort(compareFn); + function comparePatternFn(a, b) { + if (reverse) { var tmp; tmp = a; a = b; b = tmp; } + if (ignoreCase) { a[0] = a[0].toLowerCase(); b[0] = b[0].toLowerCase(); } + return (a[0] < b[0]) ? -1 : 1; + } + numPart.sort(pattern ? comparePatternFn : compareFn); + if (pattern) { + for (var i = 0; i < numPart.length; i++) { + numPart[i] = numPart[i].input; + } + } else if (!number) { textPart.sort(compareFn); } text = (!reverse) ? textPart.concat(numPart) : numPart.concat(textPart); if (unique) { // Remove duplicate lines var textOld = text; @@ -4734,13 +5062,17 @@ dom.importCssString(".normal-mode .ace_cursor{\ 'any other getSearchCursor implementation.'); } var argString = params.argString; - var tokens = argString ? splitBySlash(argString) : []; + var tokens = argString ? splitBySeparator(argString, argString[0]) : []; var regexPart, replacePart = '', trailing, flagsPart, count; var confirm = false; // Whether to confirm each replace. var global = false; // True to replace all instances on a line, false to replace only 1. if (tokens.length) { regexPart = tokens[0]; replacePart = tokens[1]; + if (regexPart && regexPart[regexPart.length - 1] === '$') { + regexPart = regexPart.slice(0, regexPart.length - 1) + '\\n'; + replacePart = replacePart ? replacePart + '\n' : '\n'; + } if (replacePart !== undefined) { if (getOption('pcre')) { replacePart = unescapeRegexReplace(replacePart); @@ -4769,7 +5101,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ global = true; flagsPart.replace('g', ''); } - regexPart = regexPart + '/' + flagsPart; + regexPart = regexPart.replace(/\//g, "\\/") + '/' + flagsPart; } } if (regexPart) { @@ -4806,13 +5138,20 @@ dom.importCssString(".normal-mode .ace_cursor{\ write: function(cm) { if (CodeMirror.commands.save) { CodeMirror.commands.save(cm); - } else { + } else if (cm.save) { cm.save(); } }, nohlsearch: function(cm) { clearSearchHighlight(cm); }, + yank: function (cm) { + var cur = copyCursor(cm.getCursor()); + var line = cur.line; + var lineText = cm.getLine(line); + vimGlobalState.registerController.pushText( + '0', 'yank', lineText, true, true); + }, delmarks: function(cm, params) { if (!params.argString || !trim(params.argString)) { showConfirm(cm, 'Argument required'); @@ -4961,21 +5300,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ var insertModeChangeRegister = vimGlobalState.registerController.getRegister('.'); var isPlaying = macroModeState.isPlaying; var lastChange = macroModeState.lastInsertModeChanges; - var text = []; if (!isPlaying) { - var selLength = lastChange.inVisualBlock ? vim.lastSelection.visualBlock.height : 1; - var changes = lastChange.changes; - var text = []; - var i = 0; - while (i < changes.length) { - text.push(changes[i]); - if (changes[i] instanceof InsertModeKey) { - i++; - } else { - i+= selLength; - } - } - lastChange.changes = text; cm.off('change', onChange); CodeMirror.off(cm.getInputField(), 'keydown', onKeyEventTargetKeyDown); } @@ -4989,8 +5314,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ cm.setCursor(cm.getCursor().line, cm.getCursor().ch-1); cm.setOption('keyMap', 'vim'); cm.setOption('disableInput', true); - - lastChange.overwrite = cm.state.overwrite; cm.toggleOverwrite(false); // exit replace mode if we were in it. insertModeChangeRegister.setText(lastChange.changes.join('')); CodeMirror.signal(cm, "vim-mode-change", {mode: "normal"}); @@ -5014,13 +5337,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ defineOption('insertModeEscKeysTimeout', 200, 'number'); CodeMirror.keyMap['vim-insert'] = { - 'Ctrl-N': 'autocomplete', - 'Ctrl-P': 'autocomplete', - 'Enter': function(cm) { - var fn = CodeMirror.commands.newlineAndIndentContinueComment || - CodeMirror.commands.newlineAndIndent; - fn(cm); - }, fallthrough: ['default'], attach: attachVimMap, detach: detachVimMap, @@ -5094,20 +5410,31 @@ dom.importCssString(".normal-mode .ace_cursor{\ register.pushSearchQuery(query); } } - function onChange(_cm, changeObj) { + function onChange(cm, changeObj) { var macroModeState = vimGlobalState.macroModeState; var lastChange = macroModeState.lastInsertModeChanges; if (!macroModeState.isPlaying) { while(changeObj) { lastChange.expectCursorActivityForChange = true; - if (changeObj.origin == '+input' || changeObj.origin == 'paste' + if (lastChange.ignoreCount > 1) { + lastChange.ignoreCount--; + } else if (changeObj.origin == '+input' || changeObj.origin == 'paste' || changeObj.origin === undefined /* only in testing */) { + var selectionCount = cm.listSelections().length; + if (selectionCount > 1) + lastChange.ignoreCount = selectionCount; var text = changeObj.text.join('\n'); if (lastChange.maybeReset) { lastChange.changes = []; lastChange.maybeReset = false; } - lastChange.changes.push(text); + if (text) { + if (cm.state.overwrite && !/\n/.test(text)) { + lastChange.changes.push([text]); + } else { + lastChange.changes.push(text); + } + } } changeObj = changeObj.next; } @@ -5140,7 +5467,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ } vim.fakeCursor = cm.markText(from, to, {className: 'cm-animate-fat-cursor'}); } - function handleExternalSelection(cm, vim) { + function handleExternalSelection(cm, vim, keepHPos) { var anchor = cm.getCursor('anchor'); var head = cm.getCursor('head'); if (vim.visualMode && !cm.somethingSelected()) { @@ -5161,7 +5488,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ }; updateMark(cm, vim, '<', cursorMin(head, anchor)); updateMark(cm, vim, '>', cursorMax(head, anchor)); - } else if (!vim.insertMode) { + } else if (!vim.insertMode && !keepHPos) { vim.lastHPos = cm.getCursor().ch; } } @@ -5201,7 +5528,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ if (macroModeState.lastInsertModeChanges.changes.length > 0) { repeat = !vim.lastEditActionCommand ? 1 : repeat; var changeObject = macroModeState.lastInsertModeChanges; - repeatInsertModeChanges(cm, changeObject.changes, repeat, changeObject.overwrite); + repeatInsertModeChanges(cm, changeObject.changes, repeat); } } vim.inputState = vim.lastEditInputState; @@ -5223,7 +5550,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ macroModeState.isPlaying = false; } - function repeatInsertModeChanges(cm, changes, repeat, overwrite) { + function repeatInsertModeChanges(cm, changes, repeat) { function keyHandler(binding) { if (typeof binding == 'string') { CodeMirror.commands[binding](cm); @@ -5233,34 +5560,31 @@ dom.importCssString(".normal-mode .ace_cursor{\ return true; } var head = cm.getCursor('head'); - var inVisualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.inVisualBlock; - if (inVisualBlock) { - var vim = cm.state.vim; - var lastSel = vim.lastSelection; - var offset = getOffset(lastSel.anchor, lastSel.head); - selectForInsert(cm, head, offset.line + 1); + var visualBlock = vimGlobalState.macroModeState.lastInsertModeChanges.visualBlock; + if (visualBlock) { + selectForInsert(cm, head, visualBlock + 1); repeat = cm.listSelections().length; cm.setCursor(head); } for (var i = 0; i < repeat; i++) { - if (inVisualBlock) { + if (visualBlock) { cm.setCursor(offsetCursor(head, i, 0)); } for (var j = 0; j < changes.length; j++) { var change = changes[j]; if (change instanceof InsertModeKey) { CodeMirror.lookupKey(change.keyName, 'vim-insert', keyHandler); - } else { + } else if (typeof change == "string") { var cur = cm.getCursor(); - var end = cur; - if (overwrite && !/\n/.test(change)) { - end = offsetCursor(cur, 0, change.length); - } - cm.replaceRange(change, cur, end); + cm.replaceRange(change, cur, cur); + } else { + var start = cm.getCursor(); + var end = offsetCursor(start, 0, change[0].length); + cm.replaceRange(change[0], start, end); } } } - if (inVisualBlock) { + if (visualBlock) { cm.setCursor(offsetCursor(head, 0, 1)); } } @@ -5282,7 +5606,7 @@ dom.importCssString(".normal-mode .ace_cursor{\ var name = ''; if (e.ctrlKey) { name += 'C-'; } if (e.altKey) { name += 'A-'; } - if (e.shiftKey) { name += 'S-'; } + if ((name || key.length > 1) && e.shiftKey) { name += 'S-'; } name += key; if (name.length > 1) { name = '<' + name + '>'; } @@ -5316,15 +5640,17 @@ dom.importCssString(".normal-mode .ace_cursor{\ var isHandled = false; var vim = Vim.maybeInitVimState_(cm); var visualBlock = vim.visualBlock || vim.wasInVisualBlock; - if (vim.wasInVisualBlock && !cm.ace.inMultiSelectMode) { + + var wasMultiselect = cm.ace.inMultiSelectMode; + if (vim.wasInVisualBlock && !wasMultiselect) { vim.wasInVisualBlock = false; - } else if (cm.ace.inMultiSelectMode && vim.visualBlock) { + } else if (wasMultiselect && vim.visualBlock) { vim.wasInVisualBlock = true; } - if (key == '' && !vim.insertMode && !vim.visualMode && cm.ace.inMultiSelectMode) { + if (key == '' && !vim.insertMode && !vim.visualMode && wasMultiselect) { cm.ace.exitMultiSelectMode(); - } else if (visualBlock || !cm.ace.inMultiSelectMode || cm.ace.inVirtualSelectionMode) { + } else if (visualBlock || !wasMultiselect || cm.ace.inVirtualSelectionMode) { isHandled = Vim.handleKey(cm, key, origin); } else { var old = cloneVimState(vim); @@ -5351,13 +5677,16 @@ dom.importCssString(".normal-mode .ace_cursor{\ cm.curOp.cursorActivity = false; }, true); } + if (isHandled && !vim.visualMode && !vim.insert && vim.visualMode != cm.somethingSelected()) { + handleExternalSelection(cm, vim, true); + } return isHandled; } exports.CodeMirror = CodeMirror; var getVim = Vim.maybeInitVimState_; exports.handler = { $id: "ace/keyboard/vim", - drawCursor: function(style, pixelPos, config, sel, session) { + drawCursor: function(element, pixelPos, config, sel, session) { var vim = this.state.vim || {}; var w = config.characterWidth; var h = config.lineHeight; @@ -5374,17 +5703,41 @@ dom.importCssString(".normal-mode .ace_cursor{\ h = h / 2; top += h; } - style.left = left + "px"; - style.top = top + "px"; - style.width = w + "px"; - style.height = h + "px"; + dom.translate(element, left, top); + dom.setStyle(element.style, "width", w + "px"); + dom.setStyle(element.style, "height", h + "px"); }, handleKeyboard: function(data, hashId, key, keyCode, e) { var editor = data.editor; var cm = editor.state.cm; var vim = getVim(cm); if (keyCode == -1) return; - + if (!vim.insertMode) { + if (hashId == -1) { + if (key.charCodeAt(0) > 0xFF) { + if (data.inputKey) { + key = data.inputKey; + if (key && data.inputHash == 4) + key = key.toUpperCase(); + } + } + data.inputChar = key; + } + else if (hashId == 4 || hashId == 0) { + if (data.inputKey == key && data.inputHash == hashId && data.inputChar) { + key = data.inputChar; + hashId = -1 + } + else { + data.inputChar = null; + data.inputKey = key; + data.inputHash = hashId; + } + } + else { + data.inputChar = data.inputKey = null; + } + } if (key == "c" && hashId == 1) { // key == "ctrl-c" if (!useragent.isMac && editor.getCopyText()) { editor.once("copy", function() { @@ -5392,11 +5745,12 @@ dom.importCssString(".normal-mode .ace_cursor{\ }); return {command: "null", passEvent: true}; } - } else if (!vim.insertMode) { - if (useragent.isMac && this.handleMacRepeat(data, hashId, key)) { - hashId = -1; - key = data.inputChar; - } + } + + if (key == "esc" && !vim.insertMode && !vim.visualMode && !cm.ace.inMultiSelectMode) { + var searchState = getSearchState(cm); + var overlay = searchState.getOverlay(); + if (overlay) cm.removeOverlay(overlay); } if (hashId == -1 || hashId & 1 || hashId === 0 && key.length > 1) { @@ -5435,12 +5789,18 @@ dom.importCssString(".normal-mode .ace_cursor{\ }); cm.on("vim-mode-change", function() { if (cm.virtualSelectionMode()) return; - cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode); + updateInputMode(); cm._signal("changeStatus"); }); - cm.ace.renderer.setStyle("normal-mode", !getVim(cm).insertMode); + function updateInputMode() { + var isIntsert = getVim(cm).insertMode; + cm.ace.renderer.setStyle("normal-mode", !isIntsert); + editor.textInput.setCommandMode(!isIntsert); + editor.renderer.$keepTextAreaAtCursor = isIntsert; + editor.renderer.$blockCursor = !isIntsert; + } + updateInputMode(); editor.renderer.$cursorLayer.drawCursor = this.drawCursor.bind(cm); - this.updateMacCompositionHandlers(editor, true); }, detach: function(editor) { var cm = editor.state.cm; @@ -5450,7 +5810,8 @@ dom.importCssString(".normal-mode .ace_cursor{\ editor.$vimModeHandler = null; editor.renderer.$cursorLayer.drawCursor = null; editor.renderer.setStyle("normal-mode", false); - this.updateMacCompositionHandlers(editor, false); + editor.textInput.setCommandMode(false); + editor.renderer.$keepTextAreaAtCursor = true; }, getStatusText: function(editor) { var cm = editor.state.cm; @@ -5468,77 +5829,6 @@ dom.importCssString(".normal-mode .ace_cursor{\ if (vim.status) status += (status ? " " : "") + vim.status; return status; - }, - handleMacRepeat: function(data, hashId, key) { - if (hashId == -1) { - data.inputChar = key; - data.lastEvent = "input"; - } else if (data.inputChar && data.$lastHash == hashId && data.$lastKey == key) { - if (data.lastEvent == "input") { - data.lastEvent = "input1"; - } else if (data.lastEvent == "input1") { - return true; - } - } else { - data.$lastHash = hashId; - data.$lastKey = key; - data.lastEvent = "keypress"; - } - }, - updateMacCompositionHandlers: function(editor, enable) { - var onCompositionUpdateOverride = function(text) { - var cm = editor.state.cm; - var vim = getVim(cm); - if (!vim.insertMode) { - var el = this.textInput.getElement(); - el.blur(); - el.focus(); - el.value = text; - } else { - this.onCompositionUpdateOrig(text); - } - }; - var onCompositionStartOverride = function(text) { - var cm = editor.state.cm; - var vim = getVim(cm); - if (!vim.insertMode) { - this.onCompositionStartOrig(text); - } - }; - if (enable) { - if (!editor.onCompositionUpdateOrig) { - editor.onCompositionUpdateOrig = editor.onCompositionUpdate; - editor.onCompositionUpdate = onCompositionUpdateOverride; - editor.onCompositionStartOrig = editor.onCompositionStart; - editor.onCompositionStart = onCompositionStartOverride; - } - } else { - if (editor.onCompositionUpdateOrig) { - editor.onCompositionUpdate = editor.onCompositionUpdateOrig; - editor.onCompositionUpdateOrig = null; - editor.onCompositionStart = editor.onCompositionStartOrig; - editor.onCompositionStartOrig = null; - } - } - } - }; - var renderVirtualNumbers = { - getText: function(session, row) { - return (Math.abs(session.selection.lead.row - row) || (row + 1 + (row < 9? "\xb7" : "" ))) + ""; - }, - getWidth: function(session, lastLineNumber, config) { - return session.getLength().toString().length * config.characterWidth; - }, - update: function(e, editor) { - editor.renderer.$loop.schedule(editor.renderer.CHANGE_GUTTER); - }, - attach: function(editor) { - editor.renderer.$gutterLayer.$renderer = this; - editor.on("changeSelection", this.update); - }, - detach: function(editor) { - editor.renderer.$gutterLayer.$renderer = null; - editor.off("changeSelection", this.update); } }; Vim.defineOption({ @@ -5593,6 +5883,11 @@ dom.importCssString(".normal-mode .ace_cursor{\ exports.handler.defaultKeymap = defaultKeymap; exports.handler.actions = actions; exports.Vim = Vim; - - Vim.map("Y", "yy", "normal"); -}); +}); (function() { + window.require(["ace/keyboard/vim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-abap.js b/htdocs/includes/ace/src/mode-abap.js similarity index 90% rename from htdocs/includes/ace/mode-abap.js rename to htdocs/includes/ace/src/mode-abap.js index 343481fe8f7..7f02be14b4f 100644 --- a/htdocs/includes/ace/mode-abap.js +++ b/htdocs/includes/ace/src/mode-abap.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/abap_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -73,7 +73,7 @@ var AbapHighlightRules = function() { {token : "constant.numeric", regex: "[+-]?\\d+\\b"}, {token : "variable.parameter", regex : /sy|pa?\d\d\d\d\|t\d\d\d\.|innnn/}, {token : "keyword", regex : compoundKeywords}, - {token : "variable.parameter", regex : /\w+-\w+(?:-\w+)*/}, + {token : "variable.parameter", regex : /\w+-\w[\-\w]*/}, {token : keywordMapper, regex : "\\b\\w+\\b"}, {caseInsensitive: true} ], @@ -94,7 +94,7 @@ oop.inherits(AbapHighlightRules, TextHighlightRules); exports.AbapHighlightRules = AbapHighlightRules; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -181,7 +181,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module) { +define("ace/mode/abap",["require","exports","module","ace/mode/abap_highlight_rules","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/lib/oop"], function(require, exports, module) { "use strict"; var Rules = require("./abap_highlight_rules").AbapHighlightRules; @@ -199,7 +199,7 @@ oop.inherits(Mode, TextMode); (function() { - this.lineCommentStart = '"' + this.lineCommentStart = '"'; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); @@ -211,4 +211,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/abap"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-abc.js b/htdocs/includes/ace/src/mode-abc.js similarity index 89% rename from htdocs/includes/ace/mode-abc.js rename to htdocs/includes/ace/src/mode-abc.js index c03859dbaab..94cb1605ec2 100644 --- a/htdocs/includes/ace/mode-abc.js +++ b/htdocs/includes/ace/src/mode-abc.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { +define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -98,7 +98,7 @@ ace.define("ace/mode/abc_highlight_rules",["require","exports","module","ace/lib exports.ABCHighlightRules = ABCHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -119,8 +119,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -238,7 +238,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { +define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/abc_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -254,8 +254,15 @@ ace.define("ace/mode/abc",["require","exports","module","ace/lib/oop","ace/mode/ oop.inherits(Mode, TextMode); (function () { - this.$id = "ace/mode/abc" + this.$id = "ace/mode/abc"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/abc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-actionscript.js b/htdocs/includes/ace/src/mode-actionscript.js similarity index 95% rename from htdocs/includes/ace/mode-actionscript.js rename to htdocs/includes/ace/src/mode-actionscript.js index c1af16370ae..f23c9d3ceb4 100644 --- a/htdocs/includes/ace/mode-actionscript.js +++ b/htdocs/includes/ace/src/mode-actionscript.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/actionscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -86,7 +86,7 @@ var ActionScriptHighlightRules = function() { 'storage.modifier.extends.actionscript.2', 'meta.class.actionscript.2', 'entity.other.inherited-class.actionscript.2' ], - regex: '\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?' } ] } + regex: '\\b(class)(\\s+)([a-zA-Z_](?:\\w|\\.)*)(?:(\\s+)(extends)(\\s+)([a-zA-Z_](?:\\w|\\.)*))?' } ] }; this.normalizeRules(); }; @@ -94,7 +94,7 @@ var ActionScriptHighlightRules = function() { ActionScriptHighlightRules.metaData = { fileTypes: [ 'as' ], keyEquivalent: '^~A', name: 'ActionScript', - scopeName: 'source.actionscript.2' } + scopeName: 'source.actionscript.2' }; oop.inherits(ActionScriptHighlightRules, TextHighlightRules); @@ -102,7 +102,7 @@ oop.inherits(ActionScriptHighlightRules, TextHighlightRules); exports.ActionScriptHighlightRules = ActionScriptHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -123,8 +123,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -242,7 +242,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/actionscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/actionscript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -264,4 +264,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/actionscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-ada.js b/htdocs/includes/ace/src/mode-ada.js similarity index 55% rename from htdocs/includes/ace/mode-ada.js rename to htdocs/includes/ace/src/mode-ada.js index da059886539..25f9d7b171a 100644 --- a/htdocs/includes/ace/mode-ada.js +++ b/htdocs/includes/ace/src/mode-ada.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/ada_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -33,8 +33,8 @@ var keywords = "abort|else|new|return|abs|elsif|not|reverse|abstract|end|null|ac token : "string", // " string regex : '".*?"' }, { - token : "string", // ' string - regex : "'.*?'" + token : "string", // character + regex : "'.'" }, { token : "constant.numeric", // float regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" @@ -62,12 +62,13 @@ oop.inherits(AdaHighlightRules, TextHighlightRules); exports.AdaHighlightRules = AdaHighlightRules; }); -ace.define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules"], function(require, exports, module) { +define("ace/mode/ada",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ada_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var AdaHighlightRules = require("./ada_highlight_rules").AdaHighlightRules; +var Range = require("../range").Range; var Mode = function() { this.HighlightRules = AdaHighlightRules; @@ -79,9 +80,58 @@ oop.inherits(Mode, TextMode); this.lineCommentStart = "--"; + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + if (state == "start") { + var match = line.match(/^.*(begin|loop|then|is|do)\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + var complete_line = line + input; + if (complete_line.match(/^\s*(begin|end)$/)) { + return true; + } + + return false; + }; + + this.autoOutdent = function(state, session, row) { + + var line = session.getLine(row); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine).length; + var indent = this.$getIndent(line).length; + if (indent <= prevIndent) { + return; + } + + session.outdentRows(new Range(row, 0, row + 2, 0)); + }; + + this.$id = "ace/mode/ada"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/ada"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-apache_conf.js b/htdocs/includes/ace/src/mode-apache_conf.js similarity index 94% rename from htdocs/includes/ace/mode-apache_conf.js rename to htdocs/includes/ace/src/mode-apache_conf.js index bb6566a9f83..9a7b17732b0 100644 --- a/htdocs/includes/ace/mode-apache_conf.js +++ b/htdocs/includes/ace/src/mode-apache_conf.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/apache_conf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -163,7 +163,7 @@ var ApacheConfHighlightRules = function() { 'string.flag.apacheconf', 'punctuation.definition.flag.apacheconf', 'text' ], - regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] } + regex: '(\\s)(\\[)(.*?)(\\])(\\s)' } ] }; this.normalizeRules(); }; @@ -184,7 +184,7 @@ ApacheConfHighlightRules.metaData = { fileTypes: '.htpasswd', '.HTPASSWD' ], name: 'Apache Conf', - scopeName: 'source.apacheconf' } + scopeName: 'source.apacheconf' }; oop.inherits(ApacheConfHighlightRules, TextHighlightRules); @@ -192,7 +192,7 @@ oop.inherits(ApacheConfHighlightRules, TextHighlightRules); exports.ApacheConfHighlightRules = ApacheConfHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -213,8 +213,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -332,7 +332,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/apache_conf",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apache_conf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -353,4 +353,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/apache_conf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-apex.js b/htdocs/includes/ace/src/mode-apex.js new file mode 100644 index 00000000000..83b91a7ea9e --- /dev/null +++ b/htdocs/includes/ace/src/mode-apex.js @@ -0,0 +1,457 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/apex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/doc_comment_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("../mode/text_highlight_rules").TextHighlightRules; +var DocCommentHighlightRules = require("../mode/doc_comment_highlight_rules").DocCommentHighlightRules; + +var ApexHighlightRules = function() { + var mainKeywordMapper = this.createKeywordMapper({ + "variable.language": "activate|any|autonomous|begin|bigdecimal|byte|cast|char|collect|const" + + "|end|exit|export|float|goto|group|having|hint|import|inner|into|join|loop|number|object|of|outer" + + "|parallel|pragma|retrieve|returning|search|short|stat|synchronized|then|this_month" + + "|transaction|type|when", + "keyword": "private|protected|public|native|synchronized|abstract|threadsafe|transient|static|final" + + "|and|array|as|asc|break|bulk|by|catch|class|commit|continue|convertcurrency" + + "|delete|desc|do|else|enum|extends|false|final|finally|for|from|future|global" + + "|if|implements|in|insert|instanceof|interface|last_90_days|last_month" + + "|last_n_days|last_week|like|limit|list|map|merge|new|next_90_days|next_month|next_n_days" + + "|next_week|not|null|nulls|on|or|override|package|return" + + "|rollback|savepoint|select|set|sort|super|testmethod|this|this_week|throw|today" + + "|tolabel|tomorrow|trigger|true|try|undelete|update|upsert|using|virtual|webservice" + + "|where|while|yesterday|switch|case|default", + "storage.type": + "def|boolean|byte|char|short|int|float|pblob|date|datetime|decimal|double|id|integer|long|string|time|void|blob|Object", + "constant.language": + "true|false|null|after|before|count|excludes|first|includes|last|order|sharing|with", + "support.function": + "system|apex|label|apexpages|userinfo|schema" + }, "identifier", true); + function keywordMapper(value) { + if (value.slice(-3) == "__c") return "support.function"; + return mainKeywordMapper(value); + } + + function string(start, options) { + return { + regex: start + (options.multiline ? "" : "(?=.)"), + token: "string.start", + next: [{ + regex: options.escape, + token: "character.escape" + }, { + regex: options.error, + token: "error.invalid" + }, { + regex: start + (options.multiline ? "" : "|$"), + token: "string.end", + next: options.next || "start" + }, { + defaultToken: "string" + }] + }; + } + + function comments() { + return [{ + token : "comment", + regex : "\\/\\/(?=.)", + next : [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : "start"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : /\/\*/, + next : [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : "start"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; + } + + this.$rules = { + start: [ + string("'", { + escape: /\\[nb'"\\]/, + error: /\\./, + multiline: false + }), + comments("c"), + { + type: "decoration", + token: [ + "meta.package.apex", + "keyword.other.package.apex", + "meta.package.apex", + "storage.modifier.package.apex", + "meta.package.apex", + "punctuation.terminator.apex" + ], + regex: /^(\s*)(package)\b(?:(\s*)([^ ;$]+)(\s*)((?:;)?))?/ + }, { + regex: /@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, + token: "constant.language" + }, + { + regex: /[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, + token: keywordMapper + }, + { + regex: "`#%", + token: "error.invalid" + }, { + token : "constant.numeric", // float + regex : /[+-]?\d+(?:(?:\.\d*)?(?:[LlDdEe][+-]?\d+)?)\b|\.\d+[LlDdEe]/ + }, { + token : "keyword.operator", + regex : /--|\+\+|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\|\||\?\:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[]/, + next : "maybe_soql", + merge : false + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start", + merge : false + }, { + token : "paren.rparen", + regex : /[\])}]/, + merge : false + } + ], + maybe_soql: [{ + regex: /\s+/, + token: "text" + }, { + regex: /(SELECT|FIND)\b/, + token: "keyword", + caseInsensitive: true, + next: "soql" + }, { + regex: "", + token: "none", + next: "start" + }], + soql: [{ + regex: "(:?ASC|BY|CATEGORY|CUBE|DATA|DESC|END|FIND|FIRST|FOR|FROM|GROUP|HAVING|IN|LAST" + + "|LIMIT|NETWORK|NULLS|OFFSET|ORDER|REFERENCE|RETURNING|ROLLUP|SCOPE|SELECT" + + "|SNIPPET|TRACKING|TYPEOF|UPDATE|USING|VIEW|VIEWSTAT|WHERE|WITH|AND|OR)\\b", + token: "keyword", + caseInsensitive: true + }, { + regex: "(:?target_length|toLabel|convertCurrency|count|Contact|Account|User|FIELDS)\\b", + token: "support.function", + caseInsensitive: true + }, { + token : "paren.rparen", + regex : /[\]]/, + next : "start", + merge : false + }, + string("'", { + escape: /\\[nb'"\\]/, + error: /\\./, + multiline: false, + next: "soql" + }), + string('"', { + escape: /\\[nb'"\\]/, + error: /\\./, + multiline: false, + next: "soql" + }), + { + regex: /\\./, + token: "character.escape" + }, + { + regex : /[\?\&\|\!\{\}\[\]\(\)\^\~\*\:\"\'\+\-\,\.=\\\/]/, + token : "keyword.operator" + }], + + "log-start" : [ { + token : "timestamp.invisible", + regex : /^[\d:.() ]+\|/, + next: "log-header" + }, { + token : "timestamp.invisible", + regex : /^ (Number of|Maximum)[^:]*:/, + next: "log-comment" + }, { + token : "invisible", + regex : /^Execute Anonymous:/, + next: "log-comment" + }, { + defaultToken: "text" + }], + "log-comment": [{ + token : "log-comment", + regex : /.*$/, + next: "log-start" + }], + "log-header": [{ + token : "timestamp.invisible", + regex : /((USER_DEBUG|\[\d+\]|DEBUG)\|)+/ + }, + { + token : "keyword", + regex: "(?:EXECUTION_FINISHED|EXECUTION_STARTED|CODE_UNIT_STARTED" + + "|CUMULATIVE_LIMIT_USAGE|LIMIT_USAGE_FOR_NS" + + "|CUMULATIVE_LIMIT_USAGE_END|CODE_UNIT_FINISHED)" + }, { + regex: "", + next: "log-start" + }] + }; + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); + + + this.normalizeRules(); +}; + + +oop.inherits(ApexHighlightRules, TextHighlightRules); + +exports.ApexHighlightRules = ApexHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/apex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/apex_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("../mode/text").Mode; +var ApexHighlightRules = require("./apex_highlight_rules").ApexHighlightRules; +var FoldMode = require("../mode/folding/cstyle").FoldMode; +var CstyleBehaviour = require("../mode/behaviour/cstyle").CstyleBehaviour; + +function ApexMode() { + TextMode.call(this); + + this.HighlightRules = ApexHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = new CstyleBehaviour(); +} + +oop.inherits(ApexMode, TextMode); + +ApexMode.prototype.lineCommentStart = "//"; + +ApexMode.prototype.blockComment = { + start: "/*", + end: "*/" +}; + +exports.Mode = ApexMode; + +}); (function() { + window.require(["ace/mode/apex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-applescript.js b/htdocs/includes/ace/src/mode-applescript.js similarity index 90% rename from htdocs/includes/ace/mode-applescript.js rename to htdocs/includes/ace/src/mode-applescript.js index 936ce2f7bc4..a030f408767 100644 --- a/htdocs/includes/ace/mode-applescript.js +++ b/htdocs/includes/ace/src/mode-applescript.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/applescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -96,7 +96,7 @@ var AppleScriptHighlightRules = function() { defaultToken: "comment" } ] - } + }; this.normalizeRules(); }; @@ -106,7 +106,7 @@ oop.inherits(AppleScriptHighlightRules, TextHighlightRules); exports.AppleScriptHighlightRules = AppleScriptHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -127,8 +127,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -246,7 +246,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/applescript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/applescript_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -268,4 +268,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/applescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-aql.js b/htdocs/includes/ace/src/mode-aql.js new file mode 100644 index 00000000000..42d08fad0a8 --- /dev/null +++ b/htdocs/includes/ace/src/mode-aql.js @@ -0,0 +1,102 @@ +define("ace/mode/aql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + + var AqlHighlightRules = function() { + + var keywords = ( + "for|search|outbound|inbound|any|graph|prune|options|shortest_path|to|in|return|filter|sort|limit|let|collect|remove|update|replace|insers|upsert|with" + ); + + var builtinConstants = ( + "true|false" + ); + + var builtinFunctions = ( + "append|contains_array|count|count_distinct|count_unique|first|flatten|intersection|last|length|minus|nth|outersection|pop|position|push|remove_nth|remove_value|remove_values|reverse|shift|slice|sorted|sorted_unique|union|union_distinct|unique|unshift|" + + "date_now|date_iso8601|date_timestamp|is_datestring|date_dayofweek|date_year|date_month|date_day|date_hour|date_minute|date_second|date_millisecond|date_dayofyear|date_isoweek|date_leapyear|date_quarter|date_days_in_month|date_trunc|date_format|date_add|date_subtract|date_diff|date_compare|" + + "attributes|count|has|is_same_collection|keep|length|matches|merge|merge_recursive|parse_identifier|translate|unset|unset_recursive|values|zip|" + + "fulltext|" + + "distance|geo_contains|geo_distance|geo_equals|geo_intersects|is_in_polygon|" + + "not_null|first_list|first_document|check_document|collection_count|collections|count|current_user|document|length|hash|apply|assert|/ warn|call|fail|noopt|passthru|sleep|v8|version|" + + "abs|acos|asin|atan|atan2|average|avg|ceil|cos|degrees|exp|exp2|floor|log|log2|log10|max|median|min|percentile|pi|pow|radians|rand|range|round|sin|sqrt|stddev_population|stddev_sample|stddev|sum|tan|variance_population|variance_sample|variance|" + + "char_length|concat|concat_separator|contains|count|encode_uri_component|find_first|find_last|json_parse|json_stringify|left|length|levenshtein_distance|like|lower|ltrim|md5|random_token|regex_matches|regex_split|regex_test|regex_replace|reverse|right|rtrim|sha1|sha512|split|soundex|substitute|substring|tokens|to_base64|to_hex|trim|upper|uuid|" + + "to_bool|to_number|to_string|to_array|to_list|is_null|is_bool|is_number|is_string|is_array|is_list|is_object|is_document|is_datestring|is_key|typename|" + ); + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords, + "constant.language": builtinConstants + }, "identifier", true); + + this.$rules = { + "start" : [ { + token : "comment", + regex : "//.*$" + }, { + token : "string", // " string + regex : '".*?"' + }, { + token : "string", // ' string + regex : "'.*?'" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\/|\\/\\/|%|<@>|@>|<@|&|\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } ] + }; + this.normalizeRules(); + }; + + oop.inherits(AqlHighlightRules, TextHighlightRules); + + exports.AqlHighlightRules = AqlHighlightRules; + }); + +define("ace/mode/aql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/aql_highlight_rules"], function(require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var TextMode = require("./text").Mode; + var AqlHighlightRules = require("./aql_highlight_rules").AqlHighlightRules; + + var Mode = function() { + this.HighlightRules = AqlHighlightRules; + this.$behaviour = this.$defaultBehaviour; + }; + oop.inherits(Mode, TextMode); + + (function() { + + this.lineCommentStart = "//"; + + this.$id = "ace/mode/aql"; + }).call(Mode.prototype); + + exports.Mode = Mode; + + }); (function() { + window.require(["ace/mode/aql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-asciidoc.js b/htdocs/includes/ace/src/mode-asciidoc.js similarity index 93% rename from htdocs/includes/ace/mode-asciidoc.js rename to htdocs/includes/ace/src/mode-asciidoc.js index f112cec398c..cdb49c258e1 100644 --- a/htdocs/includes/ace/mode-asciidoc.js +++ b/htdocs/includes/ace/src/mode-asciidoc.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/asciidoc_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -193,7 +193,7 @@ oop.inherits(AsciidocHighlightRules, TextHighlightRules); exports.AsciidocHighlightRules = AsciidocHighlightRules; }); -ace.define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -210,7 +210,7 @@ oop.inherits(FoldMode, BaseFoldMode); this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); if (!this.foldingStartMarker.test(line)) - return "" + return ""; if (line[0] == "=") { if (this.singleLineHeadingRe.test(line)) @@ -306,7 +306,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module) { +define("ace/mode/asciidoc",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asciidoc_highlight_rules","ace/mode/folding/asciidoc"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -339,4 +339,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/asciidoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-asl.js b/htdocs/includes/ace/src/mode-asl.js new file mode 100644 index 00000000000..58c82631449 --- /dev/null +++ b/htdocs/includes/ace/src/mode-asl.js @@ -0,0 +1,421 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/asl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; + var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + + var ASLHighlightRules = function() { + var keywords = ( + "Default|DefinitionBlock|Device|Method|Else|ElseIf|For|Function|If|Include|Method|Return|" + + "Scope|Switch|Case|While|Break|BreakPoint|Continue|NoOp|Wait" + ); + + var keywordOperators = ( + "Add|And|Decrement|Divide|Increment|Index|LAnd|LEqual|LGreater|LGreaterEqual|" + + "LLess|LLessEqual|LNot|LNotEqual|LOr|Mod|Multiply|NAnd|NOr|Not|Or|RefOf|Revision|" + + "ShiftLeft|ShiftRight|Subtract|XOr|DerefOf" + ); + + var buildinFunctions = ( + "AccessAs|Acquire|Alias|BankField|Buffer|Concatenate|ConcatenateResTemplate|" + + "CondRefOf|Connection|CopyObject|CreateBitField|CreateByteField|CreateDWordField|" + + "CreateField|CreateQWordField|CreateWordField|DataTableRegion|Debug|" + + "DMA|DWordIO|DWordMemory|DWordSpace|EisaId|EISAID|EndDependentFn|Event|ExtendedIO|" + + "ExtendedMemory|ExtendedSpace|External|Fatal|Field|FindSetLeftBit|FindSetRightBit|" + + "FixedDMA|FixedIO|Fprintf|FromBCD|GpioInt|GpioIo|I2CSerialBusV2|IndexField|" + + "Interrupt|IO|IRQ|IRQNoFlags|Load|LoadTable|Match|Memory32|Memory32Fixed|" + + "Mid|Mutex|Name|Notify|Offset|ObjectType|OperationRegion|Package|PowerResource|Printf|" + + "QWordIO|QWordMemory|QWordSpace|RawDataBuffer|Register|Release|Reset|ResourceTemplate|" + + "Signal|SizeOf|Sleep|SPISerialBusV2|Stall|StartDependentFn|StartDependentFnNoPri|" + + "Store|ThermalZone|Timer|ToBCD|ToBuffer|ToDecimalString|ToInteger|ToPLD|ToString|" + + "ToUUID|UARTSerialBusV2|Unicode|Unload|VendorLong|VendorShort|WordBusNumber|WordIO|" + + "WordSpace" + ); + + var flags = ( + "AttribQuick|AttribSendReceive|AttribByte|AttribBytes|AttribRawBytes|" + + "AttribRawProcessBytes|AttribWord|AttribBlock|AttribProcessCall|AttribBlockProcessCall|" + + "AnyAcc|ByteAcc|WordAcc|DWordAcc|QWordAcc|BufferAcc|" + + "AddressRangeMemory|AddressRangeReserved|AddressRangeNVS|AddressRangeACPI|" + + "RegionSpaceKeyword|FFixedHW|PCC|" + + "AddressingMode7Bit|AddressingMode10Bit|" + + "DataBitsFive|DataBitsSix|DataBitsSeven|DataBitsEight|DataBitsNine|" + + "BusMaster|NotBusMaster|" + + "ClockPhaseFirst|ClockPhaseSecond|ClockPolarityLow|ClockPolarityHigh|" + + "SubDecode|PosDecode|" + + "BigEndianing|LittleEndian|" + + "FlowControlNone|FlowControlXon|FlowControlHardware|" + + "Edge|Level|ActiveHigh|ActiveLow|ActiveBoth|Decode16|Decode10|" + + "IoRestrictionNone|IoRestrictionInputOnly|IoRestrictionOutputOnly|" + + "IoRestrictionNoneAndPreserve|Lock|NoLock|MTR|MEQ|MLE|MLT|MGE|MGT|" + + "MaxFixed|MaxNotFixed|Cacheable|WriteCombining|Prefetchable|NonCacheable|" + + "MinFixed|MinNotFixed|" + + "ParityTypeNone|ParityTypeSpace|ParityTypeMark|ParityTypeOdd|ParityTypeEven|" + + "PullDefault|PullUp|PullDown|PullNone|PolarityHigh|PolarityLow|" + + "ISAOnlyRanges|NonISAOnlyRanges|EntireRange|ReadWrite|ReadOnly|" + + "UserDefRegionSpace|SystemIO|SystemMemory|PCI_Config|EmbeddedControl|" + + "SMBus|SystemCMOS|PciBarTarget|IPMI|GeneralPurposeIO|GenericSerialBus|" + + "ResourceConsumer|ResourceProducer|Serialized|NotSerialized|" + + "Shared|Exclusive|SharedAndWake|ExclusiveAndWake|ControllerInitiated|DeviceInitiated|" + + "StopBitsZero|StopBitsOne|StopBitsOnePlusHalf|StopBitsTwo|" + + "Width8Bit|Width16Bit|Width32Bit|Width64Bit|Width128Bit|Width256Bit|" + + "SparseTranslation|DenseTranslation|TypeTranslation|TypeStatic|" + + "Preserve|WriteAsOnes|WriteAsZeros|Transfer8|Transfer16|Transfer8_16|" + + "ThreeWireMode|FourWireMode" + ); + + var storageTypes = ( + "UnknownObj|IntObj|StrObj|BuffObj|PkgObj|FieldUnitObj|DeviceObj|" + + "EventObj|MethodObj|MutexObj|OpRegionObj|PowerResObj|ProcessorObj|" + + "ThermalZoneObj|BuffFieldObj|DDBHandleObj" + ); + + var buildinConstants = ( + "__FILE__|__PATH__|__LINE__|__DATE__|__IASL__" + ); + + var deprecated = ( + "Memory24|Processor" + ); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "keyword.operator": keywordOperators, + "function.buildin": buildinFunctions, + "constant.language": buildinConstants, + "storage.type": storageTypes, + "constant.character": flags, + "invalid.deprecated": deprecated + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // ignored fields / comments + regex : "\\\[", + next : "ignoredfield" + }, { + token : "variable", + regex : "\\Local[0-7]|\\Arg[0-6]" + }, { + token : "keyword", // pre-compiler directives + regex : "#\\s*(?:define|elif|else|endif|error|if|ifdef|ifndef|include|includebuffer|line|pragma|undef|warning)\\b", + next : "directive" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "constant.character", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : /0[xX][0-9a-fA-F]+\b/ + }, { + token : "constant.numeric", + regex : /(One(s)?|Zero|True|False|[0-9]+)\b/ + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "/|!|\\$|%|&|\\||\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|\\^|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\|=" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "\\*\\/", + next : "start" + }, { + defaultToken : "comment" + } + ], + "ignoredfield" : [ + { + token : "comment", // closing ignored fields / comments + regex : "\\\]", + next : "start" + }, { + defaultToken : "comment" + } + ], + "directive" : [ + { + token : "constant.other.multiline", + regex : /\\/ + }, + { + token : "constant.other.multiline", + regex : /.*\\/ + }, + { + token : "constant.other", + regex : "\\s*<.+?>*s", + next : "start" + }, + { + token : "constant.other", // single line + regex : '\\s*["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]*s', + next : "start" + }, + { + token : "constant.other", // single line + regex : "\\s*['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']", + next : "start" + }, + { + token : "constant.other", + regex : /[^\\\/]+/, + next : "start" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); + }; + + oop.inherits(ASLHighlightRules, TextHighlightRules); + + exports.ASLHighlightRules = ASLHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/asl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/asl_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var TextMode = require("./text").Mode; + var ASLHighlightRules = require("./asl_highlight_rules").ASLHighlightRules; + var FoldMode = require("./folding/cstyle").FoldMode; + + var Mode = function () { + this.HighlightRules = ASLHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; + }; + oop.inherits(Mode, TextMode); + + (function () { + this.$id = "ace/mode/asl"; + }).call(Mode.prototype); + + exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/asl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-assembly_x86.js b/htdocs/includes/ace/src/mode-assembly_x86.js similarity index 92% rename from htdocs/includes/ace/mode-assembly_x86.js rename to htdocs/includes/ace/src/mode-assembly_x86.js index f6a56f1be07..5564ce2bf68 100644 --- a/htdocs/includes/ace/mode-assembly_x86.js +++ b/htdocs/includes/ace/src/mode-assembly_x86.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/assembly_x86_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -60,14 +60,14 @@ var AssemblyX86HighlightRules = function() { { token: 'entity.name.function.assembly', regex: '^[\\w.]+?:' }, { token: 'entity.name.function.assembly', regex: '^[\\w.]+?\\b' }, { token: 'comment.assembly', regex: ';.*$' } ] - } + }; this.normalizeRules(); }; AssemblyX86HighlightRules.metaData = { fileTypes: [ 'asm' ], name: 'Assembly x86', - scopeName: 'source.assembly' } + scopeName: 'source.assembly' }; oop.inherits(AssemblyX86HighlightRules, TextHighlightRules); @@ -75,7 +75,7 @@ oop.inherits(AssemblyX86HighlightRules, TextHighlightRules); exports.AssemblyX86HighlightRules = AssemblyX86HighlightRules; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -162,7 +162,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +define("ace/mode/assembly_x86",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/assembly_x86_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -178,9 +178,16 @@ var Mode = function() { oop.inherits(Mode, TextMode); (function() { - this.lineCommentStart = ";"; + this.lineCommentStart = [";"]; this.$id = "ace/mode/assembly_x86"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/assembly_x86"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-autohotkey.js b/htdocs/includes/ace/src/mode-autohotkey.js similarity index 98% rename from htdocs/includes/ace/mode-autohotkey.js rename to htdocs/includes/ace/src/mode-autohotkey.js index 538e6fd7864..9952b029fc8 100644 --- a/htdocs/includes/ace/mode-autohotkey.js +++ b/htdocs/includes/ace/src/mode-autohotkey.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/autohotkey_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -9,8 +9,8 @@ var AutoHotKeyHighlightRules = function() { 'Abs|ACos|AdlibDisable|AdlibEnable|Asc|AscW|ASin|Assign|ATan|AutoItSetOption|AutoItWinGetTitle|AutoItWinSetTitle|Beep|Binary|BinaryLen|BinaryMid|BinaryToString|BitAND|BitNOT|BitOR|BitRotate|BitShift|BitXOR|BlockInput|Break|Call|CDTray|Ceiling|Chr|ChrW|ClipGet|ClipPut|ConsoleRead|ConsoleWrite|ConsoleWriteError|ControlClick|ControlCommand|ControlDisable|ControlEnable|ControlFocus|ControlGetFocus|ControlGetHandle|ControlGetPos|ControlGetText|ControlHide|ControlListView|ControlMove|ControlSend|ControlSetText|ControlShow|ControlTreeView|Cos|Dec|DirCopy|DirCreate|DirGetSize|DirMove|DirRemove|DllCall|DllCallbackFree|DllCallbackGetPtr|DllCallbackRegister|DllClose|DllOpen|DllStructCreate|DllStructGetData|DllStructGetPtr|DllStructGetSize|DllStructSetData|DriveGetDrive|DriveGetFileSystem|DriveGetLabel|DriveGetSerial|DriveGetType|DriveMapAdd|DriveMapDel|DriveMapGet|DriveSetLabel|DriveSpaceFree|DriveSpaceTotal|DriveStatus|EnvGet|EnvSet|EnvUpdate|Eval|Execute|Exp|FileChangeDir|FileClose|FileCopy|FileCreateNTFSLink|FileCreateShortcut|FileDelete|FileExists|FileFindFirstFile|FileFindNextFile|FileGetAttrib|FileGetLongName|FileGetShortcut|FileGetShortName|FileGetSize|FileGetTime|FileGetVersion|FileInstall|FileMove|FileOpen|FileOpenDialog|FileRead|FileReadLine|FileRecycle|FileRecycleEmpty|FileSaveDialog|FileSelectFolder|FileSetAttrib|FileSetTime|FileWrite|FileWriteLine|Floor|FtpSetProxy|GUICreate|GUICtrlCreateAvi|GUICtrlCreateButton|GUICtrlCreateCheckbox|GUICtrlCreateCombo|GUICtrlCreateContextMenu|GUICtrlCreateDate|GUICtrlCreateDummy|GUICtrlCreateEdit|GUICtrlCreateGraphic|GUICtrlCreateGroup|GUICtrlCreateIcon|GUICtrlCreateInput|GUICtrlCreateLabel|GUICtrlCreateList|GUICtrlCreateListView|GUICtrlCreateListViewItem|GUICtrlCreateMenu|GUICtrlCreateMenuItem|GUICtrlCreateMonthCal|GUICtrlCreateObj|GUICtrlCreatePic|GUICtrlCreateProgress|GUICtrlCreateRadio|GUICtrlCreateSlider|GUICtrlCreateTab|GUICtrlCreateTabItem|GUICtrlCreateTreeView|GUICtrlCreateTreeViewItem|GUICtrlCreateUpdown|GUICtrlDelete|GUICtrlGetHandle|GUICtrlGetState|GUICtrlRead|GUICtrlRecvMsg|GUICtrlRegisterListViewSort|GUICtrlSendMsg|GUICtrlSendToDummy|GUICtrlSetBkColor|GUICtrlSetColor|GUICtrlSetCursor|GUICtrlSetData|GUICtrlSetFont|GUICtrlSetDefColor|GUICtrlSetDefBkColor|GUICtrlSetGraphic|GUICtrlSetImage|GUICtrlSetLimit|GUICtrlSetOnEvent|GUICtrlSetPos|GUICtrlSetResizing|GUICtrlSetState|GUICtrlSetStyle|GUICtrlSetTip|GUIDelete|GUIGetCursorInfo|GUIGetMsg|GUIGetStyle|GUIRegisterMsg|GUISetAccelerators()|GUISetBkColor|GUISetCoord|GUISetCursor|GUISetFont|GUISetHelp|GUISetIcon|GUISetOnEvent|GUISetState|GUISetStyle|GUIStartGroup|GUISwitch|Hex|HotKeySet|HttpSetProxy|HWnd|InetGet|InetGetSize|IniDelete|IniRead|IniReadSection|IniReadSectionNames|IniRenameSection|IniWrite|IniWriteSection|InputBox|Int|IsAdmin|IsArray|IsBinary|IsBool|IsDeclared|IsDllStruct|IsFloat|IsHWnd|IsInt|IsKeyword|IsNumber|IsObj|IsPtr|IsString|Log|MemGetStats|Mod|MouseClick|MouseClickDrag|MouseDown|MouseGetCursor|MouseGetPos|MouseMove|MouseUp|MouseWheel|MsgBox|Number|ObjCreate|ObjEvent|ObjGet|ObjName|Opt|Ping|PixelChecksum|PixelGetColor|PixelSearch|PluginClose|PluginOpen|ProcessClose|ProcessExists|ProcessGetStats|ProcessList|ProcessSetPriority|ProcessWait|ProcessWaitClose|ProgressOff|ProgressOn|ProgressSet|Ptr|Random|RegDelete|RegEnumKey|RegEnumVal|RegRead|RegWrite|Round|Run|RunAs|RunAsWait|RunWait|Send|SendKeepActive|SetError|SetExtended|ShellExecute|ShellExecuteWait|Shutdown|Sin|Sleep|SoundPlay|SoundSetWaveVolume|SplashImageOn|SplashOff|SplashTextOn|Sqrt|SRandom|StatusbarGetText|StderrRead|StdinWrite|StdioClose|StdoutRead|String|StringAddCR|StringCompare|StringFormat|StringInStr|StringIsAlNum|StringIsAlpha|StringIsASCII|StringIsDigit|StringIsFloat|StringIsInt|StringIsLower|StringIsSpace|StringIsUpper|StringIsXDigit|StringLeft|StringLen|StringLower|StringMid|StringRegExp|StringRegExpReplace|StringReplace|StringRight|StringSplit|StringStripCR|StringStripWS|StringToBinary|StringTrimLeft|StringTrimRight|StringUpper|Tan|TCPAccept|TCPCloseSocket|TCPConnect|TCPListen|TCPNameToIP|TCPRecv|TCPSend|TCPShutdown|TCPStartup|TimerDiff|TimerInit|ToolTip|TrayCreateItem|TrayCreateMenu|TrayGetMsg|TrayItemDelete|TrayItemGetHandle|TrayItemGetState|TrayItemGetText|TrayItemSetOnEvent|TrayItemSetState|TrayItemSetText|TraySetClick|TraySetIcon|TraySetOnEvent|TraySetPauseIcon|TraySetState|TraySetToolTip|TrayTip|UBound|UDPBind|UDPCloseSocket|UDPOpen|UDPRecv|UDPSend|UDPShutdown|UDPStartup|VarGetType|WinActivate|WinActive|WinClose|WinExists|WinFlash|WinGetCaretPos|WinGetClassList|WinGetClientSize|WinGetHandle|WinGetPos|WinGetProcess|WinGetState|WinGetText|WinGetTitle|WinKill|WinList|WinMenuSelectItem|WinMinimizeAll|WinMinimizeAllUndo|WinMove|WinSetOnTop|WinSetState|WinSetTitle|WinSetTrans|WinWait|WinWaitActive|WinWaitClose|WinWaitNotActive|' + 'ArrayAdd|ArrayBinarySearch|ArrayConcatenate|ArrayDelete|ArrayDisplay|ArrayFindAll|ArrayInsert|ArrayMax|ArrayMaxIndex|ArrayMin|ArrayMinIndex|ArrayPop|ArrayPush|ArrayReverse|ArraySearch|ArraySort|ArraySwap|ArrayToClip|ArrayToString|ArrayTrim|ChooseColor|ChooseFont|ClipBoard_ChangeChain|ClipBoard_Close|ClipBoard_CountFormats|ClipBoard_Empty|ClipBoard_EnumFormats|ClipBoard_FormatStr|ClipBoard_GetData|ClipBoard_GetDataEx|ClipBoard_GetFormatName|ClipBoard_GetOpenWindow|ClipBoard_GetOwner|ClipBoard_GetPriorityFormat|ClipBoard_GetSequenceNumber|ClipBoard_GetViewer|ClipBoard_IsFormatAvailable|ClipBoard_Open|ClipBoard_RegisterFormat|ClipBoard_SetData|ClipBoard_SetDataEx|ClipBoard_SetViewer|ClipPutFile|ColorConvertHSLtoRGB|ColorConvertRGBtoHSL|ColorGetBlue|ColorGetGreen|ColorGetRed|Date_Time_CompareFileTime|Date_Time_DOSDateTimeToArray|Date_Time_DOSDateTimeToFileTime|Date_Time_DOSDateTimeToStr|Date_Time_DOSDateToArray|Date_Time_DOSDateToStr|Date_Time_DOSTimeToArray|Date_Time_DOSTimeToStr|Date_Time_EncodeFileTime|Date_Time_EncodeSystemTime|Date_Time_FileTimeToArray|Date_Time_FileTimeToDOSDateTime|Date_Time_FileTimeToLocalFileTime|Date_Time_FileTimeToStr|Date_Time_FileTimeToSystemTime|Date_Time_GetFileTime|Date_Time_GetLocalTime|Date_Time_GetSystemTime|Date_Time_GetSystemTimeAdjustment|Date_Time_GetSystemTimeAsFileTime|Date_Time_GetSystemTimes|Date_Time_GetTickCount|Date_Time_GetTimeZoneInformation|Date_Time_LocalFileTimeToFileTime|Date_Time_SetFileTime|Date_Time_SetLocalTime|Date_Time_SetSystemTime|Date_Time_SetSystemTimeAdjustment|Date_Time_SetTimeZoneInformation|Date_Time_SystemTimeToArray|Date_Time_SystemTimeToDateStr|Date_Time_SystemTimeToDateTimeStr|Date_Time_SystemTimeToFileTime|Date_Time_SystemTimeToTimeStr|Date_Time_SystemTimeToTzSpecificLocalTime|Date_Time_TzSpecificLocalTimeToSystemTime|DateAdd|DateDayOfWeek|DateDaysInMonth|DateDiff|DateIsLeapYear|DateIsValid|DateTimeFormat|DateTimeSplit|DateToDayOfWeek|DateToDayOfWeekISO|DateToDayValue|DateToMonth|DayValueToDate|DebugBugReportEnv|DebugOut|DebugSetup|Degree|EventLog__Backup|EventLog__Clear|EventLog__Close|EventLog__Count|EventLog__DeregisterSource|EventLog__Full|EventLog__Notify|EventLog__Oldest|EventLog__Open|EventLog__OpenBackup|EventLog__Read|EventLog__RegisterSource|EventLog__Report|FileCountLines|FileCreate|FileListToArray|FilePrint|FileReadToArray|FileWriteFromArray|FileWriteLog|FileWriteToLine|GDIPlus_ArrowCapCreate|GDIPlus_ArrowCapDispose|GDIPlus_ArrowCapGetFillState|GDIPlus_ArrowCapGetHeight|GDIPlus_ArrowCapGetMiddleInset|GDIPlus_ArrowCapGetWidth|GDIPlus_ArrowCapSetFillState|GDIPlus_ArrowCapSetHeight|GDIPlus_ArrowCapSetMiddleInset|GDIPlus_ArrowCapSetWidth|GDIPlus_BitmapCloneArea|GDIPlus_BitmapCreateFromFile|GDIPlus_BitmapCreateFromGraphics|GDIPlus_BitmapCreateFromHBITMAP|GDIPlus_BitmapCreateHBITMAPFromBitmap|GDIPlus_BitmapDispose|GDIPlus_BitmapLockBits|GDIPlus_BitmapUnlockBits|GDIPlus_BrushClone|GDIPlus_BrushCreateSolid|GDIPlus_BrushDispose|GDIPlus_BrushGetType|GDIPlus_CustomLineCapDispose|GDIPlus_Decoders|GDIPlus_DecodersGetCount|GDIPlus_DecodersGetSize|GDIPlus_Encoders|GDIPlus_EncodersGetCLSID|GDIPlus_EncodersGetCount|GDIPlus_EncodersGetParamList|GDIPlus_EncodersGetParamListSize|GDIPlus_EncodersGetSize|GDIPlus_FontCreate|GDIPlus_FontDispose|GDIPlus_FontFamilyCreate|GDIPlus_FontFamilyDispose|GDIPlus_GraphicsClear|GDIPlus_GraphicsCreateFromHDC|GDIPlus_GraphicsCreateFromHWND|GDIPlus_GraphicsDispose|GDIPlus_GraphicsDrawArc|GDIPlus_GraphicsDrawBezier|GDIPlus_GraphicsDrawClosedCurve|GDIPlus_GraphicsDrawCurve|GDIPlus_GraphicsDrawEllipse|GDIPlus_GraphicsDrawImage|GDIPlus_GraphicsDrawImageRect|GDIPlus_GraphicsDrawImageRectRect|GDIPlus_GraphicsDrawLine|GDIPlus_GraphicsDrawPie|GDIPlus_GraphicsDrawPolygon|GDIPlus_GraphicsDrawRect|GDIPlus_GraphicsDrawString|GDIPlus_GraphicsDrawStringEx|GDIPlus_GraphicsFillClosedCurve|GDIPlus_GraphicsFillEllipse|GDIPlus_GraphicsFillPie|GDIPlus_GraphicsFillRect|GDIPlus_GraphicsGetDC|GDIPlus_GraphicsGetSmoothingMode|GDIPlus_GraphicsMeasureString|GDIPlus_GraphicsReleaseDC|GDIPlus_GraphicsSetSmoothingMode|GDIPlus_GraphicsSetTransform|GDIPlus_ImageDispose|GDIPlus_ImageGetGraphicsContext|GDIPlus_ImageGetHeight|GDIPlus_ImageGetWidth|GDIPlus_ImageLoadFromFile|GDIPlus_ImageSaveToFile|GDIPlus_ImageSaveToFileEx|GDIPlus_MatrixCreate|GDIPlus_MatrixDispose|GDIPlus_MatrixRotate|GDIPlus_ParamAdd|GDIPlus_ParamInit|GDIPlus_PenCreate|GDIPlus_PenDispose|GDIPlus_PenGetAlignment|GDIPlus_PenGetColor|GDIPlus_PenGetCustomEndCap|GDIPlus_PenGetDashCap|GDIPlus_PenGetDashStyle|GDIPlus_PenGetEndCap|GDIPlus_PenGetWidth|GDIPlus_PenSetAlignment|GDIPlus_PenSetColor|GDIPlus_PenSetCustomEndCap|GDIPlus_PenSetDashCap|GDIPlus_PenSetDashStyle|GDIPlus_PenSetEndCap|GDIPlus_PenSetWidth|GDIPlus_RectFCreate|GDIPlus_Shutdown|GDIPlus_Startup|GDIPlus_StringFormatCreate|GDIPlus_StringFormatDispose|GetIP|GUICtrlAVI_Close|GUICtrlAVI_Create|GUICtrlAVI_Destroy|GUICtrlAVI_Open|GUICtrlAVI_OpenEx|GUICtrlAVI_Play|GUICtrlAVI_Seek|GUICtrlAVI_Show|GUICtrlAVI_Stop|GUICtrlButton_Click|GUICtrlButton_Create|GUICtrlButton_Destroy|GUICtrlButton_Enable|GUICtrlButton_GetCheck|GUICtrlButton_GetFocus|GUICtrlButton_GetIdealSize|GUICtrlButton_GetImage|GUICtrlButton_GetImageList|GUICtrlButton_GetState|GUICtrlButton_GetText|GUICtrlButton_GetTextMargin|GUICtrlButton_SetCheck|GUICtrlButton_SetFocus|GUICtrlButton_SetImage|GUICtrlButton_SetImageList|GUICtrlButton_SetSize|GUICtrlButton_SetState|GUICtrlButton_SetStyle|GUICtrlButton_SetText|GUICtrlButton_SetTextMargin|GUICtrlButton_Show|GUICtrlComboBox_AddDir|GUICtrlComboBox_AddString|GUICtrlComboBox_AutoComplete|GUICtrlComboBox_BeginUpdate|GUICtrlComboBox_Create|GUICtrlComboBox_DeleteString|GUICtrlComboBox_Destroy|GUICtrlComboBox_EndUpdate|GUICtrlComboBox_FindString|GUICtrlComboBox_FindStringExact|GUICtrlComboBox_GetComboBoxInfo|GUICtrlComboBox_GetCount|GUICtrlComboBox_GetCurSel|GUICtrlComboBox_GetDroppedControlRect|GUICtrlComboBox_GetDroppedControlRectEx|GUICtrlComboBox_GetDroppedState|GUICtrlComboBox_GetDroppedWidth|GUICtrlComboBox_GetEditSel|GUICtrlComboBox_GetEditText|GUICtrlComboBox_GetExtendedUI|GUICtrlComboBox_GetHorizontalExtent|GUICtrlComboBox_GetItemHeight|GUICtrlComboBox_GetLBText|GUICtrlComboBox_GetLBTextLen|GUICtrlComboBox_GetList|GUICtrlComboBox_GetListArray|GUICtrlComboBox_GetLocale|GUICtrlComboBox_GetLocaleCountry|GUICtrlComboBox_GetLocaleLang|GUICtrlComboBox_GetLocalePrimLang|GUICtrlComboBox_GetLocaleSubLang|GUICtrlComboBox_GetMinVisible|GUICtrlComboBox_GetTopIndex|GUICtrlComboBox_InitStorage|GUICtrlComboBox_InsertString|GUICtrlComboBox_LimitText|GUICtrlComboBox_ReplaceEditSel|GUICtrlComboBox_ResetContent|GUICtrlComboBox_SelectString|GUICtrlComboBox_SetCurSel|GUICtrlComboBox_SetDroppedWidth|GUICtrlComboBox_SetEditSel|GUICtrlComboBox_SetEditText|GUICtrlComboBox_SetExtendedUI|GUICtrlComboBox_SetHorizontalExtent|GUICtrlComboBox_SetItemHeight|GUICtrlComboBox_SetMinVisible|GUICtrlComboBox_SetTopIndex|GUICtrlComboBox_ShowDropDown|GUICtrlComboBoxEx_AddDir|GUICtrlComboBoxEx_AddString|GUICtrlComboBoxEx_BeginUpdate|GUICtrlComboBoxEx_Create|GUICtrlComboBoxEx_CreateSolidBitMap|GUICtrlComboBoxEx_DeleteString|GUICtrlComboBoxEx_Destroy|GUICtrlComboBoxEx_EndUpdate|GUICtrlComboBoxEx_FindStringExact|GUICtrlComboBoxEx_GetComboBoxInfo|GUICtrlComboBoxEx_GetComboControl|GUICtrlComboBoxEx_GetCount|GUICtrlComboBoxEx_GetCurSel|GUICtrlComboBoxEx_GetDroppedControlRect|GUICtrlComboBoxEx_GetDroppedControlRectEx|GUICtrlComboBoxEx_GetDroppedState|GUICtrlComboBoxEx_GetDroppedWidth|GUICtrlComboBoxEx_GetEditControl|GUICtrlComboBoxEx_GetEditSel|GUICtrlComboBoxEx_GetEditText|GUICtrlComboBoxEx_GetExtendedStyle|GUICtrlComboBoxEx_GetExtendedUI|GUICtrlComboBoxEx_GetImageList|GUICtrlComboBoxEx_GetItem|GUICtrlComboBoxEx_GetItemEx|GUICtrlComboBoxEx_GetItemHeight|GUICtrlComboBoxEx_GetItemImage|GUICtrlComboBoxEx_GetItemIndent|GUICtrlComboBoxEx_GetItemOverlayImage|GUICtrlComboBoxEx_GetItemParam|GUICtrlComboBoxEx_GetItemSelectedImage|GUICtrlComboBoxEx_GetItemText|GUICtrlComboBoxEx_GetItemTextLen|GUICtrlComboBoxEx_GetList|GUICtrlComboBoxEx_GetListArray|GUICtrlComboBoxEx_GetLocale|GUICtrlComboBoxEx_GetLocaleCountry|GUICtrlComboBoxEx_GetLocaleLang|GUICtrlComboBoxEx_GetLocalePrimLang|GUICtrlComboBoxEx_GetLocaleSubLang|GUICtrlComboBoxEx_GetMinVisible|GUICtrlComboBoxEx_GetTopIndex|GUICtrlComboBoxEx_InitStorage|GUICtrlComboBoxEx_InsertString|GUICtrlComboBoxEx_LimitText|GUICtrlComboBoxEx_ReplaceEditSel|GUICtrlComboBoxEx_ResetContent|GUICtrlComboBoxEx_SetCurSel|GUICtrlComboBoxEx_SetDroppedWidth|GUICtrlComboBoxEx_SetEditSel|GUICtrlComboBoxEx_SetEditText|GUICtrlComboBoxEx_SetExtendedStyle|GUICtrlComboBoxEx_SetExtendedUI|GUICtrlComboBoxEx_SetImageList|GUICtrlComboBoxEx_SetItem|GUICtrlComboBoxEx_SetItemEx|GUICtrlComboBoxEx_SetItemHeight|GUICtrlComboBoxEx_SetItemImage|GUICtrlComboBoxEx_SetItemIndent|GUICtrlComboBoxEx_SetItemOverlayImage|GUICtrlComboBoxEx_SetItemParam|GUICtrlComboBoxEx_SetItemSelectedImage|GUICtrlComboBoxEx_SetMinVisible|GUICtrlComboBoxEx_SetTopIndex|GUICtrlComboBoxEx_ShowDropDown|GUICtrlDTP_Create|GUICtrlDTP_Destroy|GUICtrlDTP_GetMCColor|GUICtrlDTP_GetMCFont|GUICtrlDTP_GetMonthCal|GUICtrlDTP_GetRange|GUICtrlDTP_GetRangeEx|GUICtrlDTP_GetSystemTime|GUICtrlDTP_GetSystemTimeEx|GUICtrlDTP_SetFormat|GUICtrlDTP_SetMCColor|GUICtrlDTP_SetMCFont|GUICtrlDTP_SetRange|GUICtrlDTP_SetRangeEx|GUICtrlDTP_SetSystemTime|GUICtrlDTP_SetSystemTimeEx|GUICtrlEdit_AppendText|GUICtrlEdit_BeginUpdate|GUICtrlEdit_CanUndo|GUICtrlEdit_CharFromPos|GUICtrlEdit_Create|GUICtrlEdit_Destroy|GUICtrlEdit_EmptyUndoBuffer|GUICtrlEdit_EndUpdate|GUICtrlEdit_Find|GUICtrlEdit_FmtLines|GUICtrlEdit_GetFirstVisibleLine|GUICtrlEdit_GetLimitText|GUICtrlEdit_GetLine|GUICtrlEdit_GetLineCount|GUICtrlEdit_GetMargins|GUICtrlEdit_GetModify|GUICtrlEdit_GetPasswordChar|GUICtrlEdit_GetRECT|GUICtrlEdit_GetRECTEx|GUICtrlEdit_GetSel|GUICtrlEdit_GetText|GUICtrlEdit_GetTextLen|GUICtrlEdit_HideBalloonTip|GUICtrlEdit_InsertText|GUICtrlEdit_LineFromChar|GUICtrlEdit_LineIndex|GUICtrlEdit_LineLength|GUICtrlEdit_LineScroll|GUICtrlEdit_PosFromChar|GUICtrlEdit_ReplaceSel|GUICtrlEdit_Scroll|GUICtrlEdit_SetLimitText|GUICtrlEdit_SetMargins|GUICtrlEdit_SetModify|GUICtrlEdit_SetPasswordChar|GUICtrlEdit_SetReadOnly|GUICtrlEdit_SetRECT|GUICtrlEdit_SetRECTEx|GUICtrlEdit_SetRECTNP|GUICtrlEdit_SetRectNPEx|GUICtrlEdit_SetSel|GUICtrlEdit_SetTabStops|GUICtrlEdit_SetText|GUICtrlEdit_ShowBalloonTip|GUICtrlEdit_Undo|GUICtrlHeader_AddItem|GUICtrlHeader_ClearFilter|GUICtrlHeader_ClearFilterAll|GUICtrlHeader_Create|GUICtrlHeader_CreateDragImage|GUICtrlHeader_DeleteItem|GUICtrlHeader_Destroy|GUICtrlHeader_EditFilter|GUICtrlHeader_GetBitmapMargin|GUICtrlHeader_GetImageList|GUICtrlHeader_GetItem|GUICtrlHeader_GetItemAlign|GUICtrlHeader_GetItemBitmap|GUICtrlHeader_GetItemCount|GUICtrlHeader_GetItemDisplay|GUICtrlHeader_GetItemFlags|GUICtrlHeader_GetItemFormat|GUICtrlHeader_GetItemImage|GUICtrlHeader_GetItemOrder|GUICtrlHeader_GetItemParam|GUICtrlHeader_GetItemRect|GUICtrlHeader_GetItemRectEx|GUICtrlHeader_GetItemText|GUICtrlHeader_GetItemWidth|GUICtrlHeader_GetOrderArray|GUICtrlHeader_GetUnicodeFormat|GUICtrlHeader_HitTest|GUICtrlHeader_InsertItem|GUICtrlHeader_Layout|GUICtrlHeader_OrderToIndex|GUICtrlHeader_SetBitmapMargin|GUICtrlHeader_SetFilterChangeTimeout|GUICtrlHeader_SetHotDivider|GUICtrlHeader_SetImageList|GUICtrlHeader_SetItem|GUICtrlHeader_SetItemAlign|GUICtrlHeader_SetItemBitmap|GUICtrlHeader_SetItemDisplay|GUICtrlHeader_SetItemFlags|GUICtrlHeader_SetItemFormat|GUICtrlHeader_SetItemImage|GUICtrlHeader_SetItemOrder|GUICtrlHeader_SetItemParam|GUICtrlHeader_SetItemText|GUICtrlHeader_SetItemWidth|GUICtrlHeader_SetOrderArray|GUICtrlHeader_SetUnicodeFormat|GUICtrlIpAddress_ClearAddress|GUICtrlIpAddress_Create|GUICtrlIpAddress_Destroy|GUICtrlIpAddress_Get|GUICtrlIpAddress_GetArray|GUICtrlIpAddress_GetEx|GUICtrlIpAddress_IsBlank|GUICtrlIpAddress_Set|GUICtrlIpAddress_SetArray|GUICtrlIpAddress_SetEx|GUICtrlIpAddress_SetFocus|GUICtrlIpAddress_SetFont|GUICtrlIpAddress_SetRange|GUICtrlIpAddress_ShowHide|GUICtrlListBox_AddFile|GUICtrlListBox_AddString|GUICtrlListBox_BeginUpdate|GUICtrlListBox_Create|GUICtrlListBox_DeleteString|GUICtrlListBox_Destroy|GUICtrlListBox_Dir|GUICtrlListBox_EndUpdate|GUICtrlListBox_FindInText|GUICtrlListBox_FindString|GUICtrlListBox_GetAnchorIndex|GUICtrlListBox_GetCaretIndex|GUICtrlListBox_GetCount|GUICtrlListBox_GetCurSel|GUICtrlListBox_GetHorizontalExtent|GUICtrlListBox_GetItemData|GUICtrlListBox_GetItemHeight|GUICtrlListBox_GetItemRect|GUICtrlListBox_GetItemRectEx|GUICtrlListBox_GetListBoxInfo|GUICtrlListBox_GetLocale|GUICtrlListBox_GetLocaleCountry|GUICtrlListBox_GetLocaleLang|GUICtrlListBox_GetLocalePrimLang|GUICtrlListBox_GetLocaleSubLang|GUICtrlListBox_GetSel|GUICtrlListBox_GetSelCount|GUICtrlListBox_GetSelItems|GUICtrlListBox_GetSelItemsText|GUICtrlListBox_GetText|GUICtrlListBox_GetTextLen|GUICtrlListBox_GetTopIndex|GUICtrlListBox_InitStorage|GUICtrlListBox_InsertString|GUICtrlListBox_ItemFromPoint|GUICtrlListBox_ReplaceString|GUICtrlListBox_ResetContent|GUICtrlListBox_SelectString|GUICtrlListBox_SelItemRange|GUICtrlListBox_SelItemRangeEx|GUICtrlListBox_SetAnchorIndex|GUICtrlListBox_SetCaretIndex|GUICtrlListBox_SetColumnWidth|GUICtrlListBox_SetCurSel|GUICtrlListBox_SetHorizontalExtent|GUICtrlListBox_SetItemData|GUICtrlListBox_SetItemHeight|GUICtrlListBox_SetLocale|GUICtrlListBox_SetSel|GUICtrlListBox_SetTabStops|GUICtrlListBox_SetTopIndex|GUICtrlListBox_Sort|GUICtrlListBox_SwapString|GUICtrlListBox_UpdateHScroll|GUICtrlListView_AddArray|GUICtrlListView_AddColumn|GUICtrlListView_AddItem|GUICtrlListView_AddSubItem|GUICtrlListView_ApproximateViewHeight|GUICtrlListView_ApproximateViewRect|GUICtrlListView_ApproximateViewWidth|GUICtrlListView_Arrange|GUICtrlListView_BeginUpdate|GUICtrlListView_CancelEditLabel|GUICtrlListView_ClickItem|GUICtrlListView_CopyItems|GUICtrlListView_Create|GUICtrlListView_CreateDragImage|GUICtrlListView_CreateSolidBitMap|GUICtrlListView_DeleteAllItems|GUICtrlListView_DeleteColumn|GUICtrlListView_DeleteItem|GUICtrlListView_DeleteItemsSelected|GUICtrlListView_Destroy|GUICtrlListView_DrawDragImage|GUICtrlListView_EditLabel|GUICtrlListView_EnableGroupView|GUICtrlListView_EndUpdate|GUICtrlListView_EnsureVisible|GUICtrlListView_FindInText|GUICtrlListView_FindItem|GUICtrlListView_FindNearest|GUICtrlListView_FindParam|GUICtrlListView_FindText|GUICtrlListView_GetBkColor|GUICtrlListView_GetBkImage|GUICtrlListView_GetCallbackMask|GUICtrlListView_GetColumn|GUICtrlListView_GetColumnCount|GUICtrlListView_GetColumnOrder|GUICtrlListView_GetColumnOrderArray|GUICtrlListView_GetColumnWidth|GUICtrlListView_GetCounterPage|GUICtrlListView_GetEditControl|GUICtrlListView_GetExtendedListViewStyle|GUICtrlListView_GetGroupInfo|GUICtrlListView_GetGroupViewEnabled|GUICtrlListView_GetHeader|GUICtrlListView_GetHotCursor|GUICtrlListView_GetHotItem|GUICtrlListView_GetHoverTime|GUICtrlListView_GetImageList|GUICtrlListView_GetISearchString|GUICtrlListView_GetItem|GUICtrlListView_GetItemChecked|GUICtrlListView_GetItemCount|GUICtrlListView_GetItemCut|GUICtrlListView_GetItemDropHilited|GUICtrlListView_GetItemEx|GUICtrlListView_GetItemFocused|GUICtrlListView_GetItemGroupID|GUICtrlListView_GetItemImage|GUICtrlListView_GetItemIndent|GUICtrlListView_GetItemParam|GUICtrlListView_GetItemPosition|GUICtrlListView_GetItemPositionX|GUICtrlListView_GetItemPositionY|GUICtrlListView_GetItemRect|GUICtrlListView_GetItemRectEx|GUICtrlListView_GetItemSelected|GUICtrlListView_GetItemSpacing|GUICtrlListView_GetItemSpacingX|GUICtrlListView_GetItemSpacingY|GUICtrlListView_GetItemState|GUICtrlListView_GetItemStateImage|GUICtrlListView_GetItemText|GUICtrlListView_GetItemTextArray|GUICtrlListView_GetItemTextString|GUICtrlListView_GetNextItem|GUICtrlListView_GetNumberOfWorkAreas|GUICtrlListView_GetOrigin|GUICtrlListView_GetOriginX|GUICtrlListView_GetOriginY|GUICtrlListView_GetOutlineColor|GUICtrlListView_GetSelectedColumn|GUICtrlListView_GetSelectedCount|GUICtrlListView_GetSelectedIndices|GUICtrlListView_GetSelectionMark|GUICtrlListView_GetStringWidth|GUICtrlListView_GetSubItemRect|GUICtrlListView_GetTextBkColor|GUICtrlListView_GetTextColor|GUICtrlListView_GetToolTips|GUICtrlListView_GetTopIndex|GUICtrlListView_GetUnicodeFormat|GUICtrlListView_GetView|GUICtrlListView_GetViewDetails|GUICtrlListView_GetViewLarge|GUICtrlListView_GetViewList|GUICtrlListView_GetViewRect|GUICtrlListView_GetViewSmall|GUICtrlListView_GetViewTile|GUICtrlListView_HideColumn|GUICtrlListView_HitTest|GUICtrlListView_InsertColumn|GUICtrlListView_InsertGroup|GUICtrlListView_InsertItem|GUICtrlListView_JustifyColumn|GUICtrlListView_MapIDToIndex|GUICtrlListView_MapIndexToID|GUICtrlListView_RedrawItems|GUICtrlListView_RegisterSortCallBack|GUICtrlListView_RemoveAllGroups|GUICtrlListView_RemoveGroup|GUICtrlListView_Scroll|GUICtrlListView_SetBkColor|GUICtrlListView_SetBkImage|GUICtrlListView_SetCallBackMask|GUICtrlListView_SetColumn|GUICtrlListView_SetColumnOrder|GUICtrlListView_SetColumnOrderArray|GUICtrlListView_SetColumnWidth|GUICtrlListView_SetExtendedListViewStyle|GUICtrlListView_SetGroupInfo|GUICtrlListView_SetHotItem|GUICtrlListView_SetHoverTime|GUICtrlListView_SetIconSpacing|GUICtrlListView_SetImageList|GUICtrlListView_SetItem|GUICtrlListView_SetItemChecked|GUICtrlListView_SetItemCount|GUICtrlListView_SetItemCut|GUICtrlListView_SetItemDropHilited|GUICtrlListView_SetItemEx|GUICtrlListView_SetItemFocused|GUICtrlListView_SetItemGroupID|GUICtrlListView_SetItemImage|GUICtrlListView_SetItemIndent|GUICtrlListView_SetItemParam|GUICtrlListView_SetItemPosition|GUICtrlListView_SetItemPosition32|GUICtrlListView_SetItemSelected|GUICtrlListView_SetItemState|GUICtrlListView_SetItemStateImage|GUICtrlListView_SetItemText|GUICtrlListView_SetOutlineColor|GUICtrlListView_SetSelectedColumn|GUICtrlListView_SetSelectionMark|GUICtrlListView_SetTextBkColor|GUICtrlListView_SetTextColor|GUICtrlListView_SetToolTips|GUICtrlListView_SetUnicodeFormat|GUICtrlListView_SetView|GUICtrlListView_SetWorkAreas|GUICtrlListView_SimpleSort|GUICtrlListView_SortItems|GUICtrlListView_SubItemHitTest|GUICtrlListView_UnRegisterSortCallBack|GUICtrlMenu_AddMenuItem|GUICtrlMenu_AppendMenu|GUICtrlMenu_CheckMenuItem|GUICtrlMenu_CheckRadioItem|GUICtrlMenu_CreateMenu|GUICtrlMenu_CreatePopup|GUICtrlMenu_DeleteMenu|GUICtrlMenu_DestroyMenu|GUICtrlMenu_DrawMenuBar|GUICtrlMenu_EnableMenuItem|GUICtrlMenu_FindItem|GUICtrlMenu_FindParent|GUICtrlMenu_GetItemBmp|GUICtrlMenu_GetItemBmpChecked|GUICtrlMenu_GetItemBmpUnchecked|GUICtrlMenu_GetItemChecked|GUICtrlMenu_GetItemCount|GUICtrlMenu_GetItemData|GUICtrlMenu_GetItemDefault|GUICtrlMenu_GetItemDisabled|GUICtrlMenu_GetItemEnabled|GUICtrlMenu_GetItemGrayed|GUICtrlMenu_GetItemHighlighted|GUICtrlMenu_GetItemID|GUICtrlMenu_GetItemInfo|GUICtrlMenu_GetItemRect|GUICtrlMenu_GetItemRectEx|GUICtrlMenu_GetItemState|GUICtrlMenu_GetItemStateEx|GUICtrlMenu_GetItemSubMenu|GUICtrlMenu_GetItemText|GUICtrlMenu_GetItemType|GUICtrlMenu_GetMenu|GUICtrlMenu_GetMenuBackground|GUICtrlMenu_GetMenuBarInfo|GUICtrlMenu_GetMenuContextHelpID|GUICtrlMenu_GetMenuData|GUICtrlMenu_GetMenuDefaultItem|GUICtrlMenu_GetMenuHeight|GUICtrlMenu_GetMenuInfo|GUICtrlMenu_GetMenuStyle|GUICtrlMenu_GetSystemMenu|GUICtrlMenu_InsertMenuItem|GUICtrlMenu_InsertMenuItemEx|GUICtrlMenu_IsMenu|GUICtrlMenu_LoadMenu|GUICtrlMenu_MapAccelerator|GUICtrlMenu_MenuItemFromPoint|GUICtrlMenu_RemoveMenu|GUICtrlMenu_SetItemBitmaps|GUICtrlMenu_SetItemBmp|GUICtrlMenu_SetItemBmpChecked|GUICtrlMenu_SetItemBmpUnchecked|GUICtrlMenu_SetItemChecked|GUICtrlMenu_SetItemData|GUICtrlMenu_SetItemDefault|GUICtrlMenu_SetItemDisabled|GUICtrlMenu_SetItemEnabled|GUICtrlMenu_SetItemGrayed|GUICtrlMenu_SetItemHighlighted|GUICtrlMenu_SetItemID|GUICtrlMenu_SetItemInfo|GUICtrlMenu_SetItemState|GUICtrlMenu_SetItemSubMenu|GUICtrlMenu_SetItemText|GUICtrlMenu_SetItemType|GUICtrlMenu_SetMenu|GUICtrlMenu_SetMenuBackground|GUICtrlMenu_SetMenuContextHelpID|GUICtrlMenu_SetMenuData|GUICtrlMenu_SetMenuDefaultItem|GUICtrlMenu_SetMenuHeight|GUICtrlMenu_SetMenuInfo|GUICtrlMenu_SetMenuStyle|GUICtrlMenu_TrackPopupMenu|GUICtrlMonthCal_Create|GUICtrlMonthCal_Destroy|GUICtrlMonthCal_GetColor|GUICtrlMonthCal_GetColorArray|GUICtrlMonthCal_GetCurSel|GUICtrlMonthCal_GetCurSelStr|GUICtrlMonthCal_GetFirstDOW|GUICtrlMonthCal_GetFirstDOWStr|GUICtrlMonthCal_GetMaxSelCount|GUICtrlMonthCal_GetMaxTodayWidth|GUICtrlMonthCal_GetMinReqHeight|GUICtrlMonthCal_GetMinReqRect|GUICtrlMonthCal_GetMinReqRectArray|GUICtrlMonthCal_GetMinReqWidth|GUICtrlMonthCal_GetMonthDelta|GUICtrlMonthCal_GetMonthRange|GUICtrlMonthCal_GetMonthRangeMax|GUICtrlMonthCal_GetMonthRangeMaxStr|GUICtrlMonthCal_GetMonthRangeMin|GUICtrlMonthCal_GetMonthRangeMinStr|GUICtrlMonthCal_GetMonthRangeSpan|GUICtrlMonthCal_GetRange|GUICtrlMonthCal_GetRangeMax|GUICtrlMonthCal_GetRangeMaxStr|GUICtrlMonthCal_GetRangeMin|GUICtrlMonthCal_GetRangeMinStr|GUICtrlMonthCal_GetSelRange|GUICtrlMonthCal_GetSelRangeMax|GUICtrlMonthCal_GetSelRangeMaxStr|GUICtrlMonthCal_GetSelRangeMin|GUICtrlMonthCal_GetSelRangeMinStr|GUICtrlMonthCal_GetToday|GUICtrlMonthCal_GetTodayStr|GUICtrlMonthCal_GetUnicodeFormat|GUICtrlMonthCal_HitTest|GUICtrlMonthCal_SetColor|GUICtrlMonthCal_SetCurSel|GUICtrlMonthCal_SetDayState|GUICtrlMonthCal_SetFirstDOW|GUICtrlMonthCal_SetMaxSelCount|GUICtrlMonthCal_SetMonthDelta|GUICtrlMonthCal_SetRange|GUICtrlMonthCal_SetSelRange|GUICtrlMonthCal_SetToday|GUICtrlMonthCal_SetUnicodeFormat|GUICtrlRebar_AddBand|GUICtrlRebar_AddToolBarBand|GUICtrlRebar_BeginDrag|GUICtrlRebar_Create|GUICtrlRebar_DeleteBand|GUICtrlRebar_Destroy|GUICtrlRebar_DragMove|GUICtrlRebar_EndDrag|GUICtrlRebar_GetBandBackColor|GUICtrlRebar_GetBandBorders|GUICtrlRebar_GetBandBordersEx|GUICtrlRebar_GetBandChildHandle|GUICtrlRebar_GetBandChildSize|GUICtrlRebar_GetBandCount|GUICtrlRebar_GetBandForeColor|GUICtrlRebar_GetBandHeaderSize|GUICtrlRebar_GetBandID|GUICtrlRebar_GetBandIdealSize|GUICtrlRebar_GetBandLength|GUICtrlRebar_GetBandLParam|GUICtrlRebar_GetBandMargins|GUICtrlRebar_GetBandMarginsEx|GUICtrlRebar_GetBandRect|GUICtrlRebar_GetBandRectEx|GUICtrlRebar_GetBandStyle|GUICtrlRebar_GetBandStyleBreak|GUICtrlRebar_GetBandStyleChildEdge|GUICtrlRebar_GetBandStyleFixedBMP|GUICtrlRebar_GetBandStyleFixedSize|GUICtrlRebar_GetBandStyleGripperAlways|GUICtrlRebar_GetBandStyleHidden|GUICtrlRebar_GetBandStyleHideTitle|GUICtrlRebar_GetBandStyleNoGripper|GUICtrlRebar_GetBandStyleTopAlign|GUICtrlRebar_GetBandStyleUseChevron|GUICtrlRebar_GetBandStyleVariableHeight|GUICtrlRebar_GetBandText|GUICtrlRebar_GetBarHeight|GUICtrlRebar_GetBKColor|GUICtrlRebar_GetColorScheme|GUICtrlRebar_GetRowCount|GUICtrlRebar_GetRowHeight|GUICtrlRebar_GetTextColor|GUICtrlRebar_GetToolTips|GUICtrlRebar_GetUnicodeFormat|GUICtrlRebar_HitTest|GUICtrlRebar_IDToIndex|GUICtrlRebar_MaximizeBand|GUICtrlRebar_MinimizeBand|GUICtrlRebar_MoveBand|GUICtrlRebar_SetBandBackColor|GUICtrlRebar_SetBandForeColor|GUICtrlRebar_SetBandHeaderSize|GUICtrlRebar_SetBandID|GUICtrlRebar_SetBandIdealSize|GUICtrlRebar_SetBandLength|GUICtrlRebar_SetBandLParam|GUICtrlRebar_SetBandStyle|GUICtrlRebar_SetBandStyleBreak|GUICtrlRebar_SetBandStyleChildEdge|GUICtrlRebar_SetBandStyleFixedBMP|GUICtrlRebar_SetBandStyleFixedSize|GUICtrlRebar_SetBandStyleGripperAlways|GUICtrlRebar_SetBandStyleHidden|GUICtrlRebar_SetBandStyleHideTitle|GUICtrlRebar_SetBandStyleNoGripper|GUICtrlRebar_SetBandStyleTopAlign|GUICtrlRebar_SetBandStyleUseChevron|GUICtrlRebar_SetBandStyleVariableHeight|GUICtrlRebar_SetBandText|GUICtrlRebar_SetBKColor|GUICtrlRebar_SetColorScheme|GUICtrlRebar_SetTextColor|GUICtrlRebar_SetToolTips|GUICtrlRebar_SetUnicodeFormat|GUICtrlRebar_ShowBand|GUICtrlSlider_ClearSel|GUICtrlSlider_ClearTics|GUICtrlSlider_Create|GUICtrlSlider_Destroy|GUICtrlSlider_GetBuddy|GUICtrlSlider_GetChannelRect|GUICtrlSlider_GetLineSize|GUICtrlSlider_GetNumTics|GUICtrlSlider_GetPageSize|GUICtrlSlider_GetPos|GUICtrlSlider_GetPTics|GUICtrlSlider_GetRange|GUICtrlSlider_GetRangeMax|GUICtrlSlider_GetRangeMin|GUICtrlSlider_GetSel|GUICtrlSlider_GetSelEnd|GUICtrlSlider_GetSelStart|GUICtrlSlider_GetThumbLength|GUICtrlSlider_GetThumbRect|GUICtrlSlider_GetThumbRectEx|GUICtrlSlider_GetTic|GUICtrlSlider_GetTicPos|GUICtrlSlider_GetToolTips|GUICtrlSlider_GetUnicodeFormat|GUICtrlSlider_SetBuddy|GUICtrlSlider_SetLineSize|GUICtrlSlider_SetPageSize|GUICtrlSlider_SetPos|GUICtrlSlider_SetRange|GUICtrlSlider_SetRangeMax|GUICtrlSlider_SetRangeMin|GUICtrlSlider_SetSel|GUICtrlSlider_SetSelEnd|GUICtrlSlider_SetSelStart|GUICtrlSlider_SetThumbLength|GUICtrlSlider_SetTic|GUICtrlSlider_SetTicFreq|GUICtrlSlider_SetTipSide|GUICtrlSlider_SetToolTips|GUICtrlSlider_SetUnicodeFormat|GUICtrlStatusBar_Create|GUICtrlStatusBar_Destroy|GUICtrlStatusBar_EmbedControl|GUICtrlStatusBar_GetBorders|GUICtrlStatusBar_GetBordersHorz|GUICtrlStatusBar_GetBordersRect|GUICtrlStatusBar_GetBordersVert|GUICtrlStatusBar_GetCount|GUICtrlStatusBar_GetHeight|GUICtrlStatusBar_GetIcon|GUICtrlStatusBar_GetParts|GUICtrlStatusBar_GetRect|GUICtrlStatusBar_GetRectEx|GUICtrlStatusBar_GetText|GUICtrlStatusBar_GetTextFlags|GUICtrlStatusBar_GetTextLength|GUICtrlStatusBar_GetTextLengthEx|GUICtrlStatusBar_GetTipText|GUICtrlStatusBar_GetUnicodeFormat|GUICtrlStatusBar_GetWidth|GUICtrlStatusBar_IsSimple|GUICtrlStatusBar_Resize|GUICtrlStatusBar_SetBkColor|GUICtrlStatusBar_SetIcon|GUICtrlStatusBar_SetMinHeight|GUICtrlStatusBar_SetParts|GUICtrlStatusBar_SetSimple|GUICtrlStatusBar_SetText|GUICtrlStatusBar_SetTipText|GUICtrlStatusBar_SetUnicodeFormat|GUICtrlStatusBar_ShowHide|GUICtrlTab_Create|GUICtrlTab_DeleteAllItems|GUICtrlTab_DeleteItem|GUICtrlTab_DeselectAll|GUICtrlTab_Destroy|GUICtrlTab_FindTab|GUICtrlTab_GetCurFocus|GUICtrlTab_GetCurSel|GUICtrlTab_GetDisplayRect|GUICtrlTab_GetDisplayRectEx|GUICtrlTab_GetExtendedStyle|GUICtrlTab_GetImageList|GUICtrlTab_GetItem|GUICtrlTab_GetItemCount|GUICtrlTab_GetItemImage|GUICtrlTab_GetItemParam|GUICtrlTab_GetItemRect|GUICtrlTab_GetItemRectEx|GUICtrlTab_GetItemState|GUICtrlTab_GetItemText|GUICtrlTab_GetRowCount|GUICtrlTab_GetToolTips|GUICtrlTab_GetUnicodeFormat|GUICtrlTab_HighlightItem|GUICtrlTab_HitTest|GUICtrlTab_InsertItem|GUICtrlTab_RemoveImage|GUICtrlTab_SetCurFocus|GUICtrlTab_SetCurSel|GUICtrlTab_SetExtendedStyle|GUICtrlTab_SetImageList|GUICtrlTab_SetItem|GUICtrlTab_SetItemImage|GUICtrlTab_SetItemParam|GUICtrlTab_SetItemSize|GUICtrlTab_SetItemState|GUICtrlTab_SetItemText|GUICtrlTab_SetMinTabWidth|GUICtrlTab_SetPadding|GUICtrlTab_SetToolTips|GUICtrlTab_SetUnicodeFormat|GUICtrlToolbar_AddBitmap|GUICtrlToolbar_AddButton|GUICtrlToolbar_AddButtonSep|GUICtrlToolbar_AddString|GUICtrlToolbar_ButtonCount|GUICtrlToolbar_CheckButton|GUICtrlToolbar_ClickAccel|GUICtrlToolbar_ClickButton|GUICtrlToolbar_ClickIndex|GUICtrlToolbar_CommandToIndex|GUICtrlToolbar_Create|GUICtrlToolbar_Customize|GUICtrlToolbar_DeleteButton|GUICtrlToolbar_Destroy|GUICtrlToolbar_EnableButton|GUICtrlToolbar_FindToolbar|GUICtrlToolbar_GetAnchorHighlight|GUICtrlToolbar_GetBitmapFlags|GUICtrlToolbar_GetButtonBitmap|GUICtrlToolbar_GetButtonInfo|GUICtrlToolbar_GetButtonInfoEx|GUICtrlToolbar_GetButtonParam|GUICtrlToolbar_GetButtonRect|GUICtrlToolbar_GetButtonRectEx|GUICtrlToolbar_GetButtonSize|GUICtrlToolbar_GetButtonState|GUICtrlToolbar_GetButtonStyle|GUICtrlToolbar_GetButtonText|GUICtrlToolbar_GetColorScheme|GUICtrlToolbar_GetDisabledImageList|GUICtrlToolbar_GetExtendedStyle|GUICtrlToolbar_GetHotImageList|GUICtrlToolbar_GetHotItem|GUICtrlToolbar_GetImageList|GUICtrlToolbar_GetInsertMark|GUICtrlToolbar_GetInsertMarkColor|GUICtrlToolbar_GetMaxSize|GUICtrlToolbar_GetMetrics|GUICtrlToolbar_GetPadding|GUICtrlToolbar_GetRows|GUICtrlToolbar_GetString|GUICtrlToolbar_GetStyle|GUICtrlToolbar_GetStyleAltDrag|GUICtrlToolbar_GetStyleCustomErase|GUICtrlToolbar_GetStyleFlat|GUICtrlToolbar_GetStyleList|GUICtrlToolbar_GetStyleRegisterDrop|GUICtrlToolbar_GetStyleToolTips|GUICtrlToolbar_GetStyleTransparent|GUICtrlToolbar_GetStyleWrapable|GUICtrlToolbar_GetTextRows|GUICtrlToolbar_GetToolTips|GUICtrlToolbar_GetUnicodeFormat|GUICtrlToolbar_HideButton|GUICtrlToolbar_HighlightButton|GUICtrlToolbar_HitTest|GUICtrlToolbar_IndexToCommand|GUICtrlToolbar_InsertButton|GUICtrlToolbar_InsertMarkHitTest|GUICtrlToolbar_IsButtonChecked|GUICtrlToolbar_IsButtonEnabled|GUICtrlToolbar_IsButtonHidden|GUICtrlToolbar_IsButtonHighlighted|GUICtrlToolbar_IsButtonIndeterminate|GUICtrlToolbar_IsButtonPressed|GUICtrlToolbar_LoadBitmap|GUICtrlToolbar_LoadImages|GUICtrlToolbar_MapAccelerator|GUICtrlToolbar_MoveButton|GUICtrlToolbar_PressButton|GUICtrlToolbar_SetAnchorHighlight|GUICtrlToolbar_SetBitmapSize|GUICtrlToolbar_SetButtonBitMap|GUICtrlToolbar_SetButtonInfo|GUICtrlToolbar_SetButtonInfoEx|GUICtrlToolbar_SetButtonParam|GUICtrlToolbar_SetButtonSize|GUICtrlToolbar_SetButtonState|GUICtrlToolbar_SetButtonStyle|GUICtrlToolbar_SetButtonText|GUICtrlToolbar_SetButtonWidth|GUICtrlToolbar_SetCmdID|GUICtrlToolbar_SetColorScheme|GUICtrlToolbar_SetDisabledImageList|GUICtrlToolbar_SetDrawTextFlags|GUICtrlToolbar_SetExtendedStyle|GUICtrlToolbar_SetHotImageList|GUICtrlToolbar_SetHotItem|GUICtrlToolbar_SetImageList|GUICtrlToolbar_SetIndent|GUICtrlToolbar_SetIndeterminate|GUICtrlToolbar_SetInsertMark|GUICtrlToolbar_SetInsertMarkColor|GUICtrlToolbar_SetMaxTextRows|GUICtrlToolbar_SetMetrics|GUICtrlToolbar_SetPadding|GUICtrlToolbar_SetParent|GUICtrlToolbar_SetRows|GUICtrlToolbar_SetStyle|GUICtrlToolbar_SetStyleAltDrag|GUICtrlToolbar_SetStyleCustomErase|GUICtrlToolbar_SetStyleFlat|GUICtrlToolbar_SetStyleList|GUICtrlToolbar_SetStyleRegisterDrop|GUICtrlToolbar_SetStyleToolTips|GUICtrlToolbar_SetStyleTransparent|GUICtrlToolbar_SetStyleWrapable|GUICtrlToolbar_SetToolTips|GUICtrlToolbar_SetUnicodeFormat|GUICtrlToolbar_SetWindowTheme|GUICtrlTreeView_Add|GUICtrlTreeView_AddChild|GUICtrlTreeView_AddChildFirst|GUICtrlTreeView_AddFirst|GUICtrlTreeView_BeginUpdate|GUICtrlTreeView_ClickItem|GUICtrlTreeView_Create|GUICtrlTreeView_CreateDragImage|GUICtrlTreeView_CreateSolidBitMap|GUICtrlTreeView_Delete|GUICtrlTreeView_DeleteAll|GUICtrlTreeView_DeleteChildren|GUICtrlTreeView_Destroy|GUICtrlTreeView_DisplayRect|GUICtrlTreeView_DisplayRectEx|GUICtrlTreeView_EditText|GUICtrlTreeView_EndEdit|GUICtrlTreeView_EndUpdate|GUICtrlTreeView_EnsureVisible|GUICtrlTreeView_Expand|GUICtrlTreeView_ExpandedOnce|GUICtrlTreeView_FindItem|GUICtrlTreeView_FindItemEx|GUICtrlTreeView_GetBkColor|GUICtrlTreeView_GetBold|GUICtrlTreeView_GetChecked|GUICtrlTreeView_GetChildCount|GUICtrlTreeView_GetChildren|GUICtrlTreeView_GetCount|GUICtrlTreeView_GetCut|GUICtrlTreeView_GetDropTarget|GUICtrlTreeView_GetEditControl|GUICtrlTreeView_GetExpanded|GUICtrlTreeView_GetFirstChild|GUICtrlTreeView_GetFirstItem|GUICtrlTreeView_GetFirstVisible|GUICtrlTreeView_GetFocused|GUICtrlTreeView_GetHeight|GUICtrlTreeView_GetImageIndex|GUICtrlTreeView_GetImageListIconHandle|GUICtrlTreeView_GetIndent|GUICtrlTreeView_GetInsertMarkColor|GUICtrlTreeView_GetISearchString|GUICtrlTreeView_GetItemByIndex|GUICtrlTreeView_GetItemHandle|GUICtrlTreeView_GetItemParam|GUICtrlTreeView_GetLastChild|GUICtrlTreeView_GetLineColor|GUICtrlTreeView_GetNext|GUICtrlTreeView_GetNextChild|GUICtrlTreeView_GetNextSibling|GUICtrlTreeView_GetNextVisible|GUICtrlTreeView_GetNormalImageList|GUICtrlTreeView_GetParentHandle|GUICtrlTreeView_GetParentParam|GUICtrlTreeView_GetPrev|GUICtrlTreeView_GetPrevChild|GUICtrlTreeView_GetPrevSibling|GUICtrlTreeView_GetPrevVisible|GUICtrlTreeView_GetScrollTime|GUICtrlTreeView_GetSelected|GUICtrlTreeView_GetSelectedImageIndex|GUICtrlTreeView_GetSelection|GUICtrlTreeView_GetSiblingCount|GUICtrlTreeView_GetState|GUICtrlTreeView_GetStateImageIndex|GUICtrlTreeView_GetStateImageList|GUICtrlTreeView_GetText|GUICtrlTreeView_GetTextColor|GUICtrlTreeView_GetToolTips|GUICtrlTreeView_GetTree|GUICtrlTreeView_GetUnicodeFormat|GUICtrlTreeView_GetVisible|GUICtrlTreeView_GetVisibleCount|GUICtrlTreeView_HitTest|GUICtrlTreeView_HitTestEx|GUICtrlTreeView_HitTestItem|GUICtrlTreeView_Index|GUICtrlTreeView_InsertItem|GUICtrlTreeView_IsFirstItem|GUICtrlTreeView_IsParent|GUICtrlTreeView_Level|GUICtrlTreeView_SelectItem|GUICtrlTreeView_SelectItemByIndex|GUICtrlTreeView_SetBkColor|GUICtrlTreeView_SetBold|GUICtrlTreeView_SetChecked|GUICtrlTreeView_SetCheckedByIndex|GUICtrlTreeView_SetChildren|GUICtrlTreeView_SetCut|GUICtrlTreeView_SetDropTarget|GUICtrlTreeView_SetFocused|GUICtrlTreeView_SetHeight|GUICtrlTreeView_SetIcon|GUICtrlTreeView_SetImageIndex|GUICtrlTreeView_SetIndent|GUICtrlTreeView_SetInsertMark|GUICtrlTreeView_SetInsertMarkColor|GUICtrlTreeView_SetItemHeight|GUICtrlTreeView_SetItemParam|GUICtrlTreeView_SetLineColor|GUICtrlTreeView_SetNormalImageList|GUICtrlTreeView_SetScrollTime|GUICtrlTreeView_SetSelected|GUICtrlTreeView_SetSelectedImageIndex|GUICtrlTreeView_SetState|GUICtrlTreeView_SetStateImageIndex|GUICtrlTreeView_SetStateImageList|GUICtrlTreeView_SetText|GUICtrlTreeView_SetTextColor|GUICtrlTreeView_SetToolTips|GUICtrlTreeView_SetUnicodeFormat|GUICtrlTreeView_Sort|GUIImageList_Add|GUIImageList_AddBitmap|GUIImageList_AddIcon|GUIImageList_AddMasked|GUIImageList_BeginDrag|GUIImageList_Copy|GUIImageList_Create|GUIImageList_Destroy|GUIImageList_DestroyIcon|GUIImageList_DragEnter|GUIImageList_DragLeave|GUIImageList_DragMove|GUIImageList_Draw|GUIImageList_DrawEx|GUIImageList_Duplicate|GUIImageList_EndDrag|GUIImageList_GetBkColor|GUIImageList_GetIcon|GUIImageList_GetIconHeight|GUIImageList_GetIconSize|GUIImageList_GetIconSizeEx|GUIImageList_GetIconWidth|GUIImageList_GetImageCount|GUIImageList_GetImageInfoEx|GUIImageList_Remove|GUIImageList_ReplaceIcon|GUIImageList_SetBkColor|GUIImageList_SetIconSize|GUIImageList_SetImageCount|GUIImageList_Swap|GUIScrollBars_EnableScrollBar|GUIScrollBars_GetScrollBarInfoEx|GUIScrollBars_GetScrollBarRect|GUIScrollBars_GetScrollBarRGState|GUIScrollBars_GetScrollBarXYLineButton|GUIScrollBars_GetScrollBarXYThumbBottom|GUIScrollBars_GetScrollBarXYThumbTop|GUIScrollBars_GetScrollInfo|GUIScrollBars_GetScrollInfoEx|GUIScrollBars_GetScrollInfoMax|GUIScrollBars_GetScrollInfoMin|GUIScrollBars_GetScrollInfoPage|GUIScrollBars_GetScrollInfoPos|GUIScrollBars_GetScrollInfoTrackPos|GUIScrollBars_GetScrollPos|GUIScrollBars_GetScrollRange|GUIScrollBars_Init|GUIScrollBars_ScrollWindow|GUIScrollBars_SetScrollInfo|GUIScrollBars_SetScrollInfoMax|GUIScrollBars_SetScrollInfoMin|GUIScrollBars_SetScrollInfoPage|GUIScrollBars_SetScrollInfoPos|GUIScrollBars_SetScrollRange|GUIScrollBars_ShowScrollBar|GUIToolTip_Activate|GUIToolTip_AddTool|GUIToolTip_AdjustRect|GUIToolTip_BitsToTTF|GUIToolTip_Create|GUIToolTip_DelTool|GUIToolTip_Destroy|GUIToolTip_EnumTools|GUIToolTip_GetBubbleHeight|GUIToolTip_GetBubbleSize|GUIToolTip_GetBubbleWidth|GUIToolTip_GetCurrentTool|GUIToolTip_GetDelayTime|GUIToolTip_GetMargin|GUIToolTip_GetMarginEx|GUIToolTip_GetMaxTipWidth|GUIToolTip_GetText|GUIToolTip_GetTipBkColor|GUIToolTip_GetTipTextColor|GUIToolTip_GetTitleBitMap|GUIToolTip_GetTitleText|GUIToolTip_GetToolCount|GUIToolTip_GetToolInfo|GUIToolTip_HitTest|GUIToolTip_NewToolRect|GUIToolTip_Pop|GUIToolTip_PopUp|GUIToolTip_SetDelayTime|GUIToolTip_SetMargin|GUIToolTip_SetMaxTipWidth|GUIToolTip_SetTipBkColor|GUIToolTip_SetTipTextColor|GUIToolTip_SetTitle|GUIToolTip_SetToolInfo|GUIToolTip_SetWindowTheme|GUIToolTip_ToolExists|GUIToolTip_ToolToArray|GUIToolTip_TrackActivate|GUIToolTip_TrackPosition|GUIToolTip_TTFToBits|GUIToolTip_Update|GUIToolTip_UpdateTipText|HexToString|IE_Example|IE_Introduction|IE_VersionInfo|IEAction|IEAttach|IEBodyReadHTML|IEBodyReadText|IEBodyWriteHTML|IECreate|IECreateEmbedded|IEDocGetObj|IEDocInsertHTML|IEDocInsertText|IEDocReadHTML|IEDocWriteHTML|IEErrorHandlerDeRegister|IEErrorHandlerRegister|IEErrorNotify|IEFormElementCheckBoxSelect|IEFormElementGetCollection|IEFormElementGetObjByName|IEFormElementGetValue|IEFormElementOptionSelect|IEFormElementRadioSelect|IEFormElementSetValue|IEFormGetCollection|IEFormGetObjByName|IEFormImageClick|IEFormReset|IEFormSubmit|IEFrameGetCollection|IEFrameGetObjByName|IEGetObjById|IEGetObjByName|IEHeadInsertEventScript|IEImgClick|IEImgGetCollection|IEIsFrameSet|IELinkClickByIndex|IELinkClickByText|IELinkGetCollection|IELoadWait|IELoadWaitTimeout|IENavigate|IEPropertyGet|IEPropertySet|IEQuit|IETableGetCollection|IETableWriteToArray|IETagNameAllGetCollection|IETagNameGetCollection|Iif|INetExplorerCapable|INetGetSource|INetMail|INetSmtpMail|IsPressed|MathCheckDiv|Max|MemGlobalAlloc|MemGlobalFree|MemGlobalLock|MemGlobalSize|MemGlobalUnlock|MemMoveMemory|MemMsgBox|MemShowError|MemVirtualAlloc|MemVirtualAllocEx|MemVirtualFree|MemVirtualFreeEx|Min|MouseTrap|NamedPipes_CallNamedPipe|NamedPipes_ConnectNamedPipe|NamedPipes_CreateNamedPipe|NamedPipes_CreatePipe|NamedPipes_DisconnectNamedPipe|NamedPipes_GetNamedPipeHandleState|NamedPipes_GetNamedPipeInfo|NamedPipes_PeekNamedPipe|NamedPipes_SetNamedPipeHandleState|NamedPipes_TransactNamedPipe|NamedPipes_WaitNamedPipe|Net_Share_ConnectionEnum|Net_Share_FileClose|Net_Share_FileEnum|Net_Share_FileGetInfo|Net_Share_PermStr|Net_Share_ResourceStr|Net_Share_SessionDel|Net_Share_SessionEnum|Net_Share_SessionGetInfo|Net_Share_ShareAdd|Net_Share_ShareCheck|Net_Share_ShareDel|Net_Share_ShareEnum|Net_Share_ShareGetInfo|Net_Share_ShareSetInfo|Net_Share_StatisticsGetSvr|Net_Share_StatisticsGetWrk|Now|NowCalc|NowCalcDate|NowDate|NowTime|PathFull|PathMake|PathSplit|ProcessGetName|ProcessGetPriority|Radian|ReplaceStringInFile|RunDOS|ScreenCapture_Capture|ScreenCapture_CaptureWnd|ScreenCapture_SaveImage|ScreenCapture_SetBMPFormat|ScreenCapture_SetJPGQuality|ScreenCapture_SetTIFColorDepth|ScreenCapture_SetTIFCompression|Security__AdjustTokenPrivileges|Security__GetAccountSid|Security__GetLengthSid|Security__GetTokenInformation|Security__ImpersonateSelf|Security__IsValidSid|Security__LookupAccountName|Security__LookupAccountSid|Security__LookupPrivilegeValue|Security__OpenProcessToken|Security__OpenThreadToken|Security__OpenThreadTokenEx|Security__SetPrivilege|Security__SidToStringSid|Security__SidTypeStr|Security__StringSidToSid|SendMessage|SendMessageA|SetDate|SetTime|Singleton|SoundClose|SoundLength|SoundOpen|SoundPause|SoundPlay|SoundPos|SoundResume|SoundSeek|SoundStatus|SoundStop|SQLite_Changes|SQLite_Close|SQLite_Display2DResult|SQLite_Encode|SQLite_ErrCode|SQLite_ErrMsg|SQLite_Escape|SQLite_Exec|SQLite_FetchData|SQLite_FetchNames|SQLite_GetTable|SQLite_GetTable2d|SQLite_LastInsertRowID|SQLite_LibVersion|SQLite_Open|SQLite_Query|SQLite_QueryFinalize|SQLite_QueryReset|SQLite_QuerySingleRow|SQLite_SaveMode|SQLite_SetTimeout|SQLite_Shutdown|SQLite_SQLiteExe|SQLite_Startup|SQLite_TotalChanges|StringAddComma|StringBetween|StringEncrypt|StringInsert|StringProper|StringRepeat|StringReverse|StringSplit|StringToHex|TCPIpToName|TempFile|TicksToTime|Timer_Diff|Timer_GetTimerID|Timer_Init|Timer_KillAllTimers|Timer_KillTimer|Timer_SetTimer|TimeToTicks|VersionCompare|viClose|viExecCommand|viFindGpib|viGpibBusReset|viGTL|viOpen|viSetAttribute|viSetTimeout|WeekNumberISO|WinAPI_AttachConsole|WinAPI_AttachThreadInput|WinAPI_Beep|WinAPI_BitBlt|WinAPI_CallNextHookEx|WinAPI_Check|WinAPI_ClientToScreen|WinAPI_CloseHandle|WinAPI_CommDlgExtendedError|WinAPI_CopyIcon|WinAPI_CreateBitmap|WinAPI_CreateCompatibleBitmap|WinAPI_CreateCompatibleDC|WinAPI_CreateEvent|WinAPI_CreateFile|WinAPI_CreateFont|WinAPI_CreateFontIndirect|WinAPI_CreateProcess|WinAPI_CreateSolidBitmap|WinAPI_CreateSolidBrush|WinAPI_CreateWindowEx|WinAPI_DefWindowProc|WinAPI_DeleteDC|WinAPI_DeleteObject|WinAPI_DestroyIcon|WinAPI_DestroyWindow|WinAPI_DrawEdge|WinAPI_DrawFrameControl|WinAPI_DrawIcon|WinAPI_DrawIconEx|WinAPI_DrawText|WinAPI_EnableWindow|WinAPI_EnumDisplayDevices|WinAPI_EnumWindows|WinAPI_EnumWindowsPopup|WinAPI_EnumWindowsTop|WinAPI_ExpandEnvironmentStrings|WinAPI_ExtractIconEx|WinAPI_FatalAppExit|WinAPI_FillRect|WinAPI_FindExecutable|WinAPI_FindWindow|WinAPI_FlashWindow|WinAPI_FlashWindowEx|WinAPI_FloatToInt|WinAPI_FlushFileBuffers|WinAPI_FormatMessage|WinAPI_FrameRect|WinAPI_FreeLibrary|WinAPI_GetAncestor|WinAPI_GetAsyncKeyState|WinAPI_GetClassName|WinAPI_GetClientHeight|WinAPI_GetClientRect|WinAPI_GetClientWidth|WinAPI_GetCurrentProcess|WinAPI_GetCurrentProcessID|WinAPI_GetCurrentThread|WinAPI_GetCurrentThreadId|WinAPI_GetCursorInfo|WinAPI_GetDC|WinAPI_GetDesktopWindow|WinAPI_GetDeviceCaps|WinAPI_GetDIBits|WinAPI_GetDlgCtrlID|WinAPI_GetDlgItem|WinAPI_GetFileSizeEx|WinAPI_GetFocus|WinAPI_GetForegroundWindow|WinAPI_GetIconInfo|WinAPI_GetLastError|WinAPI_GetLastErrorMessage|WinAPI_GetModuleHandle|WinAPI_GetMousePos|WinAPI_GetMousePosX|WinAPI_GetMousePosY|WinAPI_GetObject|WinAPI_GetOpenFileName|WinAPI_GetOverlappedResult|WinAPI_GetParent|WinAPI_GetProcessAffinityMask|WinAPI_GetSaveFileName|WinAPI_GetStdHandle|WinAPI_GetStockObject|WinAPI_GetSysColor|WinAPI_GetSysColorBrush|WinAPI_GetSystemMetrics|WinAPI_GetTextExtentPoint32|WinAPI_GetWindow|WinAPI_GetWindowDC|WinAPI_GetWindowHeight|WinAPI_GetWindowLong|WinAPI_GetWindowRect|WinAPI_GetWindowText|WinAPI_GetWindowThreadProcessId|WinAPI_GetWindowWidth|WinAPI_GetXYFromPoint|WinAPI_GlobalMemStatus|WinAPI_GUIDFromString|WinAPI_GUIDFromStringEx|WinAPI_HiWord|WinAPI_InProcess|WinAPI_IntToFloat|WinAPI_InvalidateRect|WinAPI_IsClassName|WinAPI_IsWindow|WinAPI_IsWindowVisible|WinAPI_LoadBitmap|WinAPI_LoadImage|WinAPI_LoadLibrary|WinAPI_LoadLibraryEx|WinAPI_LoadShell32Icon|WinAPI_LoadString|WinAPI_LocalFree|WinAPI_LoWord|WinAPI_MakeDWord|WinAPI_MAKELANGID|WinAPI_MAKELCID|WinAPI_MakeLong|WinAPI_MessageBeep|WinAPI_Mouse_Event|WinAPI_MoveWindow|WinAPI_MsgBox|WinAPI_MulDiv|WinAPI_MultiByteToWideChar|WinAPI_MultiByteToWideCharEx|WinAPI_OpenProcess|WinAPI_PointFromRect|WinAPI_PostMessage|WinAPI_PrimaryLangId|WinAPI_PtInRect|WinAPI_ReadFile|WinAPI_ReadProcessMemory|WinAPI_RectIsEmpty|WinAPI_RedrawWindow|WinAPI_RegisterWindowMessage|WinAPI_ReleaseCapture|WinAPI_ReleaseDC|WinAPI_ScreenToClient|WinAPI_SelectObject|WinAPI_SetBkColor|WinAPI_SetCapture|WinAPI_SetCursor|WinAPI_SetDefaultPrinter|WinAPI_SetDIBits|WinAPI_SetEvent|WinAPI_SetFocus|WinAPI_SetFont|WinAPI_SetHandleInformation|WinAPI_SetLastError|WinAPI_SetParent|WinAPI_SetProcessAffinityMask|WinAPI_SetSysColors|WinAPI_SetTextColor|WinAPI_SetWindowLong|WinAPI_SetWindowPos|WinAPI_SetWindowsHookEx|WinAPI_SetWindowText|WinAPI_ShowCursor|WinAPI_ShowError|WinAPI_ShowMsg|WinAPI_ShowWindow|WinAPI_StringFromGUID|WinAPI_SubLangId|WinAPI_SystemParametersInfo|WinAPI_TwipsPerPixelX|WinAPI_TwipsPerPixelY|WinAPI_UnhookWindowsHookEx|WinAPI_UpdateLayeredWindow|WinAPI_UpdateWindow|WinAPI_ValidateClassName|WinAPI_WaitForInputIdle|WinAPI_WaitForMultipleObjects|WinAPI_WaitForSingleObject|WinAPI_WideCharToMultiByte|WinAPI_WindowFromPoint|WinAPI_WriteConsole|WinAPI_WriteFile|WinAPI_WriteProcessMemory|WinNet_AddConnection|WinNet_AddConnection2|WinNet_AddConnection3|WinNet_CancelConnection|WinNet_CancelConnection2|WinNet_CloseEnum|WinNet_ConnectionDialog|WinNet_ConnectionDialog1|WinNet_DisconnectDialog|WinNet_DisconnectDialog1|WinNet_EnumResource|WinNet_GetConnection|WinNet_GetConnectionPerformance|WinNet_GetLastError|WinNet_GetNetworkInformation|WinNet_GetProviderName|WinNet_GetResourceInformation|WinNet_GetResourceParent|WinNet_GetUniversalName|WinNet_GetUser|WinNet_OpenEnum|WinNet_RestoreConnection|WinNet_UseConnection|Word_VersionInfo|WordAttach|WordCreate|WordDocAdd|WordDocAddLink|WordDocAddPicture|WordDocClose|WordDocFindReplace|WordDocGetCollection|WordDocLinkGetCollection|WordDocOpen|WordDocPrint|WordDocPropertyGet|WordDocPropertySet|WordDocSave|WordDocSaveAs|WordErrorHandlerDeRegister|WordErrorHandlerRegister|WordErrorNotify|WordMacroRun|WordPropertyGet|WordPropertySet|WordQuit|' + 'ce|comments-end|comments-start|cs|include|include-once|NoTrayIcon|RequireAdmin|' + - 'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters' - var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR' + 'AutoIt3Wrapper_Au3Check_Parameters|AutoIt3Wrapper_Au3Check_Stop_OnWarning|AutoIt3Wrapper_Change2CUI|AutoIt3Wrapper_Compression|AutoIt3Wrapper_cvsWrapper_Parameters|AutoIt3Wrapper_Icon|AutoIt3Wrapper_Outfile|AutoIt3Wrapper_Outfile_Type|AutoIt3Wrapper_Plugin_Funcs|AutoIt3Wrapper_Res_Comment|AutoIt3Wrapper_Res_Description|AutoIt3Wrapper_Res_Field|AutoIt3Wrapper_Res_File_Add|AutoIt3Wrapper_Res_Fileversion|AutoIt3Wrapper_Res_FileVersion_AutoIncrement|AutoIt3Wrapper_Res_Icon_Add|AutoIt3Wrapper_Res_Language|AutoIt3Wrapper_Res_LegalCopyright|AutoIt3Wrapper_res_requestedExecutionLevel|AutoIt3Wrapper_Res_SaveSource|AutoIt3Wrapper_Run_After|AutoIt3Wrapper_Run_Au3check|AutoIt3Wrapper_Run_Before|AutoIt3Wrapper_Run_cvsWrapper|AutoIt3Wrapper_Run_Debug_Mode|AutoIt3Wrapper_Run_Obfuscator|AutoIt3Wrapper_Run_Tidy|AutoIt3Wrapper_Tidy_Stop_OnError|AutoIt3Wrapper_UseAnsi|AutoIt3Wrapper_UseUpx|AutoIt3Wrapper_UseX64|AutoIt3Wrapper_Version|EndRegion|forceref|Obfuscator_Ignore_Funcs|Obfuscator_Ignore_Variables|Obfuscator_Parameters|Region|Tidy_Parameters'; + var atKeywords = 'AppDataCommonDir|AppDataDir|AutoItExe|AutoItPID|AutoItUnicode|AutoItVersion|AutoItX64|COM_EventObj|CommonFilesDir|Compiled|ComputerName|ComSpec|CR|CRLF|DesktopCommonDir|DesktopDepth|DesktopDir|DesktopHeight|DesktopRefresh|DesktopWidth|DocumentsCommonDir|error|exitCode|exitMethod|extended|FavoritesCommonDir|FavoritesDir|GUI_CtrlHandle|GUI_CtrlId|GUI_DragFile|GUI_DragId|GUI_DropId|GUI_WinHandle|HomeDrive|HomePath|HomeShare|HotKeyPressed|HOUR|InetGetActive|InetGetBytesRead|IPAddress1|IPAddress2|IPAddress3|IPAddress4|KBLayout|LF|LogonDNSDomain|LogonDomain|LogonServer|MDAY|MIN|MON|MyDocumentsDir|NumParams|OSBuild|OSLang|OSServicePack|OSTYPE|OSVersion|ProcessorArch|ProgramFilesDir|ProgramsCommonDir|ProgramsDir|ScriptDir|ScriptFullPath|ScriptLineNumber|ScriptName|SEC|StartMenuCommonDir|StartMenuDir|StartupCommonDir|StartupDir|SW_DISABLE|SW_ENABLE|SW_HIDE|SW_LOCK|SW_MAXIMIZE|SW_MINIMIZE|SW_RESTORE|SW_SHOW|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWMINNOACTIVE|SW_SHOWNA|SW_SHOWNOACTIVATE|SW_SHOWNORMAL|SW_UNLOCK|SystemDir|TAB|TempDir|TRAY_ID|TrayIconFlashing|TrayIconVisible|UserName|UserProfileDir|WDAY|WindowsDir|WorkingDir|YDAY|YEAR'; this.$rules = { start: [ { token: 'comment.line.ahk', regex: '(?:^| );.*$' }, @@ -46,14 +46,16 @@ var AutoHotKeyHighlightRules = function() { { token: 'keyword.operator.ahk', regex: '=|==|<>|:=|<|>|\\*|\\/|\\+|:|\\?|\\-' }, { token: 'punctuation.ahk', - regex: '#|`|::|,|\\{|\\}|\\(|\\)|\\%' }, + regex: /#|`|::|,|%/ }, + { token: 'paren', + regex: /[{}()]/ }, { token: [ 'punctuation.quote.double', 'string.quoted.ahk', 'punctuation.quote.double' ], regex: '(")((?:[^"]|"")*)(")' }, { token: [ 'label.ahk', 'punctuation.definition.label.ahk' ], - regex: '^([^: ]+)(:)(?!:)' } ] } + regex: '^([^: ]+)(:)(?!:)' } ] }; this.normalizeRules(); }; @@ -62,7 +64,7 @@ AutoHotKeyHighlightRules.metaData = { name: 'AutoHotKey', scopeName: 'source.ahk', fileTypes: [ 'ahk' ], foldingStartMarker: '^\\s*/\\*|^(?![^{]*?;|[^{]*?/\\*(?!.*?\\*/.*?\\{)).*?\\{\\s*($|;|/\\*(?!.*?\\*/.*\\S))', - foldingStopMarker: '^\\s*\\*/|^\\s*\\}' } + foldingStopMarker: '^\\s*\\*/|^\\s*\\}' }; oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules); @@ -70,7 +72,7 @@ oop.inherits(AutoHotKeyHighlightRules, TextHighlightRules); exports.AutoHotKeyHighlightRules = AutoHotKeyHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -91,8 +93,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -210,7 +212,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/autohotkey",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/autohotkey_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -232,4 +234,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/autohotkey"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-batchfile.js b/htdocs/includes/ace/src/mode-batchfile.js similarity index 87% rename from htdocs/includes/ace/mode-batchfile.js rename to htdocs/includes/ace/src/mode-batchfile.js index 3f31ce121fc..be07412b998 100644 --- a/htdocs/includes/ace/mode-batchfile.js +++ b/htdocs/includes/ace/src/mode-batchfile.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/batchfile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -43,14 +43,14 @@ var BatchFileHighlightRules = function() { { token: 'constant.numeric', regex: '%%\\w+|%[*\\d]|%\\w+%'}, { token: 'constant.numeric', regex: '%~\\d+'}, { token: ['markup.list', 'constant.other', 'markup.list'], - regex: '(%)(\\w+)(%?)' }]} + regex: '(%)(\\w+)(%?)' }]}; this.normalizeRules(); }; BatchFileHighlightRules.metaData = { name: 'Batch File', scopeName: 'source.dosbatch', - fileTypes: [ 'bat' ] } + fileTypes: [ 'bat' ] }; oop.inherits(BatchFileHighlightRules, TextHighlightRules); @@ -58,7 +58,7 @@ oop.inherits(BatchFileHighlightRules, TextHighlightRules); exports.BatchFileHighlightRules = BatchFileHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -79,8 +79,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -198,7 +198,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/batchfile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/batchfile_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -220,4 +220,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/batchfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-bro.js b/htdocs/includes/ace/src/mode-bro.js similarity index 91% rename from htdocs/includes/ace/mode-bro.js rename to htdocs/includes/ace/src/mode-bro.js index dd259ebee88..86521764689 100644 --- a/htdocs/includes/ace/mode-bro.js +++ b/htdocs/includes/ace/src/mode-bro.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/bro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/bro_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -145,7 +145,7 @@ var BroHighlightRules = function() { token: "invalid.illegal.placeholder.bro", regex: /%/ }] - } + }; this.normalizeRules(); }; @@ -157,7 +157,7 @@ BroHighlightRules.metaData = { keyEquivalent: "@B", name: "Bro", scopeName: "source.bro" -} +}; oop.inherits(BroHighlightRules, TextHighlightRules); @@ -165,7 +165,7 @@ oop.inherits(BroHighlightRules, TextHighlightRules); exports.BroHighlightRules = BroHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -186,8 +186,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -305,7 +305,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/bro",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bro_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/bro",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/bro_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -320,8 +320,15 @@ var Mode = function() { oop.inherits(Mode, TextMode); (function() { - this.$id = "ace/mode/bro" + this.$id = "ace/mode/bro"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/bro"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-c9search.js b/htdocs/includes/ace/src/mode-c9search.js similarity index 89% rename from htdocs/includes/ace/mode-c9search.js rename to htdocs/includes/ace/src/mode-c9search.js index aad3dc1963b..c6c6a15f068 100644 --- a/htdocs/includes/ace/mode-c9search.js +++ b/htdocs/includes/ace/src/mode-c9search.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/c9search_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -64,7 +64,7 @@ var C9SearchHighlightRules = function() { if (parts.length < 3) return "text"; - var options, search, replace; + var options, search; var i = 0; var tokens = [{ @@ -78,7 +78,6 @@ var C9SearchHighlightRules = function() { type: "text" }]; if (parts[2] !== " in") { - replace = parts[i]; tokens.push({ value: "'" + parts[i++] + "'", type: "text" @@ -156,7 +155,7 @@ exports.C9SearchHighlightRules = C9SearchHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -196,7 +195,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/c9search",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -248,7 +247,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module) { +define("ace/mode/c9search",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c9search_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/c9search"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -284,4 +283,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/c9search"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-c_cpp.js b/htdocs/includes/ace/src/mode-c_cpp.js similarity index 90% rename from htdocs/includes/ace/mode-c_cpp.js rename to htdocs/includes/ace/src/mode-c_cpp.js index ea6d2229329..4e653ebe028 100644 --- a/htdocs/includes/ace/mode-c_cpp.js +++ b/htdocs/includes/ace/src/mode-c_cpp.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,13 +48,13 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" +var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; var c_cppHighlightRules = function() { @@ -76,7 +76,7 @@ var c_cppHighlightRules = function() { ); var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); @@ -95,6 +95,14 @@ var c_cppHighlightRules = function() { var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type this.$rules = { "start" : [ @@ -122,7 +130,7 @@ var c_cppHighlightRules = function() { next: [ { token: "string", regex: /\\\s*$/, next: "qqstring" }, { token: "constant.language.escape", regex: escapeRe }, - { token: "constant.language.escape", regex: /%[^'"\\]/ }, + { token: "constant.language.escape", regex: formatRe }, { token: "string.end", regex: '"|$', next: "start" }, { defaultToken: "string"} ] @@ -234,7 +242,7 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -274,7 +282,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -295,8 +303,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -414,7 +422,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -484,4 +492,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/c_cpp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-cirru.js b/htdocs/includes/ace/src/mode-cirru.js similarity index 85% rename from htdocs/includes/ace/mode-cirru.js rename to htdocs/includes/ace/src/mode-cirru.js index 9d3bab85983..36be8ad9ba9 100644 --- a/htdocs/includes/ace/mode-cirru.js +++ b/htdocs/includes/ace/src/mode-cirru.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/cirru_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -21,7 +21,7 @@ var CirruHighlightRules = function() { next: 'line' }, { token: 'support.function', - regex: /[^\(\)"\s]+/, + regex: /[^\(\)"\s{}\[\]]+/, next: 'line' }, { token: 'string.quoted.double', @@ -66,7 +66,7 @@ var CirruHighlightRules = function() { next: 'start' }, { token: 'variable.parameter', - regex: /[^\(\)"\s]+/ + regex: /[^\(\)"\s{}\[\]]+/ }, { token: 'storage.modifier', regex: /\(/, @@ -83,7 +83,7 @@ var CirruHighlightRules = function() { regex: /"/, next: 'string' }] - } + }; }; @@ -92,7 +92,7 @@ oop.inherits(CirruHighlightRules, TextHighlightRules); exports.CirruHighlightRules = CirruHighlightRules; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -179,7 +179,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +define("ace/mode/cirru",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cirru_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -200,4 +200,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/cirru"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-clojure.js b/htdocs/includes/ace/src/mode-clojure.js similarity index 93% rename from htdocs/includes/ace/mode-clojure.js rename to htdocs/includes/ace/src/mode-clojure.js index c8f7a0d5036..1f7f41841a7 100644 --- a/htdocs/includes/ace/mode-clojure.js +++ b/htdocs/includes/ace/src/mode-clojure.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/clojure_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -166,7 +166,7 @@ oop.inherits(ClojureHighlightRules, TextHighlightRules); exports.ClojureHighlightRules = ClojureHighlightRules; }); -ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -211,7 +211,7 @@ var MatchingParensOutdent = function() {}; exports.MatchingParensOutdent = MatchingParensOutdent; }); -ace.define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) { +define("ace/mode/clojure",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -304,4 +304,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/clojure"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-cobol.js b/htdocs/includes/ace/src/mode-cobol.js similarity index 82% rename from htdocs/includes/ace/mode-cobol.js rename to htdocs/includes/ace/src/mode-cobol.js index 89367e00563..20163c20370 100644 --- a/htdocs/includes/ace/mode-cobol.js +++ b/htdocs/includes/ace/src/mode-cobol.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/cobol_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -69,7 +69,7 @@ oop.inherits(CobolHighlightRules, TextHighlightRules); exports.CobolHighlightRules = CobolHighlightRules; }); -ace.define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"], function(require, exports, module) { +define("ace/mode/cobol",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/cobol_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -91,4 +91,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/cobol"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-coffee.js b/htdocs/includes/ace/src/mode-coffee.js similarity index 92% rename from htdocs/includes/ace/mode-coffee.js rename to htdocs/includes/ace/src/mode-coffee.js index 5ba85894f10..75d19d4d3ff 100644 --- a/htdocs/includes/ace/mode-coffee.js +++ b/htdocs/includes/ace/src/mode-coffee.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -13,7 +13,7 @@ ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/ "this|throw|then|try|typeof|super|switch|return|break|by|continue|" + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + - "or|on|unless|until|and|yes" + "or|on|unless|until|and|yes|yield|export|import|default" ); var langConstant = ( @@ -21,8 +21,8 @@ ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/ ); var illegal = ( - "case|const|default|function|var|void|with|enum|export|implements|" + - "interface|let|package|private|protected|public|static|yield" + "case|const|function|var|void|with|enum|implements|" + + "interface|let|package|private|protected|public|static" ); var supportClass = ( @@ -199,7 +199,7 @@ ace.define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/ exports.CoffeeHighlightRules = CoffeeHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -239,7 +239,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -326,7 +326,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module) { +define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module) { "use strict"; var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; @@ -389,4 +389,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/coffee"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-coldfusion.js b/htdocs/includes/ace/src/mode-coldfusion.js similarity index 93% rename from htdocs/includes/ace/mode-coldfusion.js rename to htdocs/includes/ace/src/mode-coldfusion.js index edbdb5b49c6..8b85c12e940 100644 --- a/htdocs/includes/ace/mode-coldfusion.js +++ b/htdocs/includes/ace/src/mode-coldfusion.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && //, + next: "pop" + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + defaultToken: "string" + }] + }, { + stateName: "ppstring", + token: "string.start", + regex: /%[Qx]?\|/, + push: [{ + token: "constant.language.escape", + regex: extEscapeExspresssion + }, { + token: "string.end", + regex: /\|/, + next: "pop" + }, { + token: "paren.start", + regex: /#{/, + push: "start" + }, { + defaultToken: "string" + }] + }, { + stateName: "rpqstring", + token: "string.start", + regex: /%[qwir]\(/, + push: [{ + token: "string.start", + regex: /\(/, + push: "rpqstring" + }, { + token: "string.end", + regex: /\)/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + stateName: "spqstring", + token: "string.start", + regex: /%[qwir]\[/, + push: [{ + token: "string.start", + regex: /\[/, + push: "spqstring" + }, { + token: "string.end", + regex: /]/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + stateName: "fpqstring", + token: "string.start", + regex: /%[qwir]{/, + push: [{ + token: "string.start", + regex: /{/, + push: "fpqstring" + }, { + token: "string.end", + regex: /}/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + stateName: "tpqstring", + token: "string.start", + regex: /%[qwir]/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + stateName: "ppqstring", + token: "string.start", + regex: /%[qwir]\|/, + push: [{ + token: "string.end", + regex: /\|/, + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string.start", + regex: /'/, + push: [{ + token: "constant.language.escape", + regex: escapeExpression + }, { + token: "string.end", + regex: /'|$/, + next: "pop" + }, { + defaultToken: "string" + }] + }], { + token: "text", // namespaces aren't symbols + regex: "::" + }, { + token: "variable.instance", // instance variable + regex: "@{1,2}[a-zA-Z_\\d]+" + }, { + token: "variable.fresh", // fresh variable + regex: "%[a-zA-Z_\\d]+" + }, { + token: "support.class", // class name + regex: "[A-Z][a-zA-Z_\\d]+" + }, { + token: "constant.other.symbol", // symbol + regex: "[:](?:(?:===|<=>|\\[]\\?|\\[]=|\\[]|>>|\\*\\*|<<|==|!=|>=|<=|!~|=~|<|\\+|-|\\*|\\/|%|&|\\||\\^|>|!|~)|(?:(?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?))" + }, { + token: "constant.numeric", // float + regex: "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?(?:_?[fF](?:32|64))?\\b" + }, { + token: "constant.numeric", + regex: intNumber + }, { + token: "constant.other.symbol", + regex: ':"', + push: [{ + token: "constant.language.escape", + regex: extEscapeExspresssion + }, { + token: "constant.other.symbol", + regex: '"', + next: "pop" + }, { + defaultToken: "constant.other.symbol" + }] + }, { + token: "constant.language.boolean", + regex: "(?:true|false)\\b" + }, { + token: "support.function", + regex: "(?:is_a\\?|nil\\?|responds_to\\?|as\\?)" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$!?]*\\b" + }, { + token: "variable.system", + regex: "\\$\\!|\\$\\?" + }, { + token: "punctuation.separator.key-value", + regex: "=>" + }, { + stateName: "heredoc", + onMatch: function (value, currentState, stack) { + var next = "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + {type: "constant", value: tokens[1]}, + {type: "string", value: tokens[2]}, + {type: "support.class", value: tokens[3]}, + {type: "string", value: tokens[4]} + ]; + }, + regex: "(<<-)([']?)([\\w]+)([']?)", + rules: { + heredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function (value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex: "$", + token: "empty", + next: function (currentState, stack) { + if (stack[0] === "heredoc") + return stack[0]; + return currentState; + } + }, { + token: "punctuation.operator", + regex: /[.]\s*(?![.])/, + push: [{ + token : "punctuation.operator", + regex : /[.]\s*(?![.])/ + }, { + token : "support.function", + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + regex: "", + token: "empty", + next: "pop" + }] + }, { + token: "keyword.operator", + regex: "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|\\?|\\:|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\^|\\|" + }, { + token: "punctuation.operator", + regex: /[?:,;.]/ + }, { + token: "paren.lparen", + regex: "[[({]" + }, { + token: "paren.rparen", + regex: "[\\])}]" + }, { + token: "text", + regex: "\\s+" + } + ] + }; + + this.normalizeRules(); + }; + + oop.inherits(CrystalHighlightRules, TextHighlightRules); + + exports.CrystalHighlightRules = CrystalHighlightRules; +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/crystal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/crystal_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CrystalHighlightRules = require("./crystal_highlight_rules").CrystalHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var FoldMode = require("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = CrystalHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else|when)\s*/); + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, session, row) { + var line = session.getLine(row); + if (/}/.test(line)) + return this.$outdent.autoOutdent(session, row); + var indent = this.$getIndent(line); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine); + var tab = session.getTabString(); + if (prevIndent.length <= indent.length) { + if (indent.slice(-tab.length) == tab) + session.remove(new Range(row, indent.length-tab.length, row, indent.length)); + } + }; + + this.$id = "ace/mode/crystal"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/crystal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-csharp.js b/htdocs/includes/ace/src/mode-csharp.js similarity index 87% rename from htdocs/includes/ace/mode-csharp.js rename to htdocs/includes/ace/src/mode-csharp.js index d91e99853a1..4ebef016651 100644 --- a/htdocs/includes/ace/mode-csharp.js +++ b/htdocs/includes/ace/src/mode-csharp.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/csharp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -58,7 +58,7 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var CSharpHighlightRules = function() { var keywordMapper = this.createKeywordMapper({ "variable.language": "this", - "keyword": "abstract|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", + "keyword": "abstract|async|await|event|new|struct|as|explicit|null|switch|base|extern|object|this|bool|false|operator|throw|break|finally|out|true|byte|fixed|override|try|case|float|params|typeof|catch|for|private|uint|char|foreach|protected|ulong|checked|goto|public|unchecked|class|if|readonly|unsafe|const|implicit|ref|ushort|continue|in|return|using|decimal|int|sbyte|virtual|default|interface|sealed|volatile|delegate|internal|partial|short|void|do|is|sizeof|while|double|lock|stackalloc|else|long|static|enum|namespace|string|var|dynamic", "constant.language": "null|true|false" }, "identifier"); @@ -144,7 +144,7 @@ oop.inherits(CSharpHighlightRules, TextHighlightRules); exports.CSharpHighlightRules = CSharpHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -184,7 +184,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -205,8 +205,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -324,7 +324,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/folding/csharp",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -360,7 +360,7 @@ oop.inherits(FoldMode, CFoldMode); var prev = session.getLine(row - 1); var next = session.getLine(row + 1); if (!usingRe.test(prev) && usingRe.test(next)) - return "start" + return "start"; } } return fw; @@ -432,7 +432,7 @@ oop.inherits(FoldMode, CFoldMode); }); -ace.define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"], function(require, exports, module) { +define("ace/mode/csharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csharp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/csharp"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -492,4 +492,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/csharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-csound_document.js b/htdocs/includes/ace/src/mode-csound_document.js new file mode 100644 index 00000000000..b4495c6892f --- /dev/null +++ b/htdocs/includes/ace/src/mode-csound_document.js @@ -0,0 +1,4001 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) { + + this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix; + + this.semicolonComments = { + token : "comment.line.semicolon.csound", + regex : ";.*$" + }; + + this.comments = [ + { + token : "punctuation.definition.comment.begin.csound", + regex : "/\\*", + push : [ + { + token : "punctuation.definition.comment.end.csound", + regex : "\\*/", + next : "pop" + }, { + defaultToken: "comment.block.csound" + } + ] + }, { + token : "comment.line.double-slash.csound", + regex : "//.*$" + }, + this.semicolonComments + ]; + + this.macroUses = [ + { + token : ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"], + regex : /(\$[A-Z_a-z]\w*\.?)(\()/, + next : "macro parameter value list" + }, { + token : "entity.name.function.preprocessor.csound", + regex : /\$[A-Z_a-z]\w*(?:\.|\b)/ + } + ]; + + this.numbers = [ + { + token : "constant.numeric.float.csound", + regex : /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/ + }, { + token : ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"], + regex : /(0[Xx])([0-9A-Fa-f]+)/ + }, { + token : "constant.numeric.integer.decimal.csound", + regex : /\d+/ + } + ]; + + this.bracedStringContents = [ + { + token : "constant.character.escape.csound", + regex : /\\(?:[\\abnrt"]|[0-7]{1,3})/ + }, + { + token : "constant.character.placeholder.csound", + regex : /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/ + }, { + token : "constant.character.escape.csound", + regex : /%%/ + } + ]; + + this.quotedStringContents = [ + this.macroUses, + this.bracedStringContents + ]; + + var start = [ + this.comments, + + { + token : "keyword.preprocessor.csound", + regex : /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/ + }, { + token : "keyword.preprocessor.csound", + regex : /#include/, + push : [ + this.comments, + { + token : "string.csound", + regex : /([^ \t])(?:.*?\1)/, + next : "pop" + } + ] + }, { + token : "keyword.preprocessor.csound", + regex : /#includestr/, + push : [ + this.comments, + { + token : "string.csound", + regex : /([^ \t])(?:.*?\1)/, + next : "pop" + } + ] + }, { + token : "keyword.preprocessor.csound", + regex : /#[ \t]*define/, + next : "define directive" + }, { + token : "keyword.preprocessor.csound", + regex : /#(?:ifn?def|undef)\b/, + next : "macro directive" + }, + + this.macroUses + ]; + + this.$rules = { + "start": start, + + "define directive": [ + this.comments, + { + token : "entity.name.function.preprocessor.csound", + regex : /[A-Z_a-z]\w*/ + }, { + token : "punctuation.definition.macro-parameter-name-list.begin.csound", + regex : /\(/, + next : "macro parameter name list" + }, { + token : "punctuation.definition.macro.begin.csound", + regex : /#/, + next : "macro body" + } + ], + "macro parameter name list": [ + { + token : "variable.parameter.preprocessor.csound", + regex : /[A-Z_a-z]\w*/ + }, { + token : "punctuation.definition.macro-parameter-name-list.end.csound", + regex : /\)/, + next : "define directive" + } + ], + "macro body": [ + { + token : "constant.character.escape.csound", + regex : /\\#/ + }, { + token : "punctuation.definition.macro.end.csound", + regex : /#/, + next : "start" + }, + start + ], + + "macro directive": [ + this.comments, + { + token : "entity.name.function.preprocessor.csound", + regex : /[A-Z_a-z]\w*/, + next : "start" + } + ], + + "macro parameter value list": [ + { + token : "punctuation.definition.macro-parameter-value-list.end.csound", + regex : /\)/, + next : "start" + }, { + token : "punctuation.definition.string.begin.csound", + regex : /"/, + next : "macro parameter value quoted string" + }, this.pushRule({ + token : "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex : /\(/, + next : "macro parameter value parenthetical" + }), { + token : "punctuation.macro-parameter-value-separator.csound", + regex : "[#']" + } + ], + "macro parameter value quoted string": [ + { + token : "constant.character.escape.csound", + regex : /\\[#'()]/ + }, { + token : "invalid.illegal.csound", + regex : /[#'()]/ + }, { + token : "punctuation.definition.string.end.csound", + regex : /"/, + next : "macro parameter value list" + }, + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "macro parameter value parenthetical": [ + { + token : "constant.character.escape.csound", + regex : /\\\)/ + }, this.popRule({ + token : "punctuation.macro-parameter-value-parenthetical.end.csound", + regex : /\)/ + }), this.pushRule({ + token : "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex : /\(/, + next : "macro parameter value parenthetical" + }), + start + ] + }; +}; + +oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules); + +(function() { + + this.pushRule = function(params) { + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + params.next[i] = this.embeddedRulePrefix + params.next[i]; + } + } + + return { + regex : params.regex, onMatch: function(value, currentState, stack, line) { + if (stack.length === 0) + stack.push(currentState); + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + stack.push(params.next[i]); + } + } else { + stack.push(params.next); + } + this.next = stack[stack.length - 1]; + return params.token; + }, + + get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; }, + set next(next) { + if (!Array.isArray(params.next)) { + params.next = next; + } + }, + + get token() { return params.token; } + }; + }; + + this.popRule = function(params) { + if (params.next) { + params.next = this.embeddedRulePrefix + params.next; + } + + return { + regex : params.regex, onMatch: function(value, currentState, stack, line) { + stack.pop(); + if (params.next) { + stack.push(params.next); + this.next = stack[stack.length - 1]; + } else { + this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop(); + } + return params.token; + } + }; + }; + +}).call(CsoundPreprocessorHighlightRules.prototype); + +exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules; +}); + +define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; + +var CsoundScoreHighlightRules = function(embeddedRulePrefix) { + + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + + this.quotedStringContents.push({ + token : "invalid.illegal.csound-score", + regex : /[^"]*$/ + }); + + var start = this.$rules.start; + start.push( + { + token : "keyword.control.csound-score", + regex : /[abCdefiqstvxy]/ + }, { + token : "invalid.illegal.csound-score", + regex : /w/ + }, { + token : "constant.numeric.language.csound-score", + regex : /z/ + }, { + token : ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"], + regex : /([nNpP][pP])(\d+)/ + }, { + token : "keyword.other.csound-score", + regex : /[mn]/, + push : [ + { + token : "empty", + regex : /$/, + next : "pop" + }, + this.comments, + { + token : "entity.name.label.csound-score", + regex : /[A-Z_a-z]\w*/ + } + ] + }, { + token : "keyword.preprocessor.csound-score", + regex : /r\b/, + next : "repeat section" + }, + + this.numbers, + + { + token : "keyword.operator.csound-score", + regex : "[!+\\-*/^%&|<>#~.]" + }, + + this.pushRule({ + token : "punctuation.definition.string.begin.csound-score", + regex : /"/, + next : "quoted string" + }), + + this.pushRule({ + token : "punctuation.braced-loop.begin.csound-score", + regex : /{/, + next : "loop after left brace" + }) + ); + + this.addRules({ + "repeat section": [ + { + token : "empty", + regex : /$/, + next : "start" + }, + this.comments, + { + token : "constant.numeric.integer.decimal.csound-score", + regex : /\d+/, + next : "repeat section before label" + } + ], + "repeat section before label": [ + { + token : "empty", + regex : /$/, + next : "start" + }, + this.comments, + { + token : "entity.name.label.csound-score", + regex : /[A-Z_a-z]\w*/, + next : "start" + } + ], + + "quoted string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound-score", + regex : /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound-score" + } + ], + + "loop after left brace": [ + this.popRule({ + token : "constant.numeric.integer.decimal.csound-score", + regex : /\d+/, + next : "loop after repeat count" + }), + this.comments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ], + "loop after repeat count": [ + this.popRule({ + token : "entity.name.function.preprocessor.csound-score", + regex : /[A-Z_a-z]\w*\b/, + next : "loop after macro name" + }), + this.comments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ], + "loop after macro name": [ + start, + this.popRule({ + token : "punctuation.braced-loop.end.csound-score", + regex : /}/ + }) + ] + }); + + this.normalizeRules(); +}; + +oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules); + +exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules; +}); + +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var LuaHighlightRules = function() { + + var keywords = ( + "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ + "return|then|until|while|or|and|not" + ); + + var builtinConstants = ("true|false|nil|_G|_VERSION"); + + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|require|"+ + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ + "collectgarbage|getmetatable|module|rawset|math|debug|"+ + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ + "load|error|loadfile|"+ + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ + "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ + "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ + "lines|write|close|flush|open|output|type|read|stderr|"+ + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ + "status|wrap|create|running|"+ + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" + ); + + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "keyword.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "variable.language": "self" + }, "identifier"); + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + + this.$rules = { + "start" : [{ + stateName: "bracketedComment", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex : /\-\-\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "comment"; + }, + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "comment" + } + ] + }, + + { + token : "comment", + regex : "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length, currentState); + return "string.start"; + }, + regex : /\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "string.end"; + }, + + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "string" + } + ] + }, + { + token : "string", // " string + regex : '"(?:[^\\\\]|\\\\.)*?"' + }, { + token : "string", // ' string + regex : "'(?:[^\\\\]|\\\\.)*?'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+|\\w+" + } ] + }; + + this.normalizeRules(); +}; + +oop.inherits(LuaHighlightRules, TextHighlightRules); + +exports.LuaHighlightRules = LuaHighlightRules; +}); + +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var PythonHighlightRules = function() { + + var keywords = ( + "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield|async|await|nonlocal" + ); + + var builtinConstants = ( + "True|False|None|NotImplemented|Ellipsis|__debug__" + ); + + var builtinFunctions = ( + "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "variable.language": "self|cls", + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + + this.$rules = { + "start" : [ { + token : "comment", + regex : "#.*$" + }, { + token : "string", // multi line """ string start + regex : strPre + '"{3}', + next : "qqstring3" + }, { + token : "string", // " string + regex : strPre + '"(?=.)', + next : "qqstring" + }, { + token : "string", // multi line ''' string start + regex : strPre + "'{3}", + next : "qstring3" + }, { + token : "string", // ' string + regex : strPre + "'(?=.)", + next : "qstring" + }, { + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" + }, { + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" + }, { + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" + }, { + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" + }, { + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" + }, { + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" + }, { + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" + }, { + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + },{ + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" + }, { + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" + }, { + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" + }, { + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{//TODO: nested {} + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'(.)*'" + }, { + token: "string", + regex: '"(.)*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + },{ + token: 'paren.rparen', + regex: "}", + next: 'pop' + },{ + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"],// method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; + +oop.inherits(PythonHighlightRules, TextHighlightRules); + +exports.PythonHighlightRules = PythonHighlightRules; +}); + +define("ace/mode/csound_orchestra_highlight_rules",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/lua_highlight_rules","ace/mode/python_highlight_rules"], function(require, exports, module) { +"use strict"; + +var lang = require("../lib/lang"); +var oop = require("../lib/oop"); + +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; +var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; +var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; + +var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) { + + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + var opcodes = [ + "ATSadd", + "ATSaddnz", + "ATSbufread", + "ATScross", + "ATSinfo", + "ATSinterpread", + "ATSpartialtap", + "ATSread", + "ATSreadnz", + "ATSsinnoi", + "FLbox", + "FLbutBank", + "FLbutton", + "FLcloseButton", + "FLcolor", + "FLcolor2", + "FLcount", + "FLexecButton", + "FLgetsnap", + "FLgroup", + "FLgroupEnd", + "FLgroup_end", + "FLhide", + "FLhvsBox", + "FLhvsBoxSetValue", + "FLjoy", + "FLkeyIn", + "FLknob", + "FLlabel", + "FLloadsnap", + "FLmouse", + "FLpack", + "FLpackEnd", + "FLpack_end", + "FLpanel", + "FLpanelEnd", + "FLpanel_end", + "FLprintk", + "FLprintk2", + "FLroller", + "FLrun", + "FLsavesnap", + "FLscroll", + "FLscrollEnd", + "FLscroll_end", + "FLsetAlign", + "FLsetBox", + "FLsetColor", + "FLsetColor2", + "FLsetFont", + "FLsetPosition", + "FLsetSize", + "FLsetSnapGroup", + "FLsetText", + "FLsetTextColor", + "FLsetTextSize", + "FLsetTextType", + "FLsetVal", + "FLsetVal_i", + "FLsetVali", + "FLsetsnap", + "FLshow", + "FLslidBnk", + "FLslidBnk2", + "FLslidBnk2Set", + "FLslidBnk2Setk", + "FLslidBnkGetHandle", + "FLslidBnkSet", + "FLslidBnkSetk", + "FLslider", + "FLtabs", + "FLtabsEnd", + "FLtabs_end", + "FLtext", + "FLupdate", + "FLvalue", + "FLvkeybd", + "FLvslidBnk", + "FLvslidBnk2", + "FLxyin", + "JackoAudioIn", + "JackoAudioInConnect", + "JackoAudioOut", + "JackoAudioOutConnect", + "JackoFreewheel", + "JackoInfo", + "JackoInit", + "JackoMidiInConnect", + "JackoMidiOut", + "JackoMidiOutConnect", + "JackoNoteOut", + "JackoOn", + "JackoTransport", + "K35_hpf", + "K35_lpf", + "MixerClear", + "MixerGetLevel", + "MixerReceive", + "MixerSend", + "MixerSetLevel", + "MixerSetLevel_i", + "OSCbundle", + "OSCcount", + "OSCinit", + "OSCinitM", + "OSClisten", + "OSCraw", + "OSCsend", + "OSCsend_lo", + "S", + "STKBandedWG", + "STKBeeThree", + "STKBlowBotl", + "STKBlowHole", + "STKBowed", + "STKBrass", + "STKClarinet", + "STKDrummer", + "STKFMVoices", + "STKFlute", + "STKHevyMetl", + "STKMandolin", + "STKModalBar", + "STKMoog", + "STKPercFlut", + "STKPlucked", + "STKResonate", + "STKRhodey", + "STKSaxofony", + "STKShakers", + "STKSimple", + "STKSitar", + "STKStifKarp", + "STKTubeBell", + "STKVoicForm", + "STKWhistle", + "STKWurley", + "a", + "abs", + "active", + "adsr", + "adsyn", + "adsynt", + "adsynt2", + "aftouch", + "alpass", + "alwayson", + "ampdb", + "ampdbfs", + "ampmidi", + "ampmidid", + "areson", + "aresonk", + "atone", + "atonek", + "atonex", + "babo", + "balance", + "balance2", + "bamboo", + "barmodel", + "bbcutm", + "bbcuts", + "beadsynt", + "beosc", + "betarand", + "bexprnd", + "bformdec1", + "bformenc1", + "binit", + "biquad", + "biquada", + "birnd", + "bpf", + "bpfcos", + "bqrez", + "butbp", + "butbr", + "buthp", + "butlp", + "butterbp", + "butterbr", + "butterhp", + "butterlp", + "button", + "buzz", + "c2r", + "cabasa", + "cauchy", + "cauchyi", + "cbrt", + "ceil", + "cell", + "cent", + "centroid", + "ceps", + "cepsinv", + "chanctrl", + "changed", + "changed2", + "chani", + "chano", + "chebyshevpoly", + "checkbox", + "chn_S", + "chn_a", + "chn_k", + "chnclear", + "chnexport", + "chnget", + "chngetks", + "chnmix", + "chnparams", + "chnset", + "chnsetks", + "chuap", + "clear", + "clfilt", + "clip", + "clockoff", + "clockon", + "cmp", + "cmplxprod", + "comb", + "combinv", + "compilecsd", + "compileorc", + "compilestr", + "compress", + "compress2", + "connect", + "control", + "convle", + "convolve", + "copya2ftab", + "copyf2array", + "cos", + "cosh", + "cosinv", + "cosseg", + "cossegb", + "cossegr", + "cps2pch", + "cpsmidi", + "cpsmidib", + "cpsmidinn", + "cpsoct", + "cpspch", + "cpstmid", + "cpstun", + "cpstuni", + "cpsxpch", + "cpumeter", + "cpuprc", + "cross2", + "crossfm", + "crossfmi", + "crossfmpm", + "crossfmpmi", + "crosspm", + "crosspmi", + "crunch", + "ctlchn", + "ctrl14", + "ctrl21", + "ctrl7", + "ctrlinit", + "cuserrnd", + "dam", + "date", + "dates", + "db", + "dbamp", + "dbfsamp", + "dcblock", + "dcblock2", + "dconv", + "dct", + "dctinv", + "deinterleave", + "delay", + "delay1", + "delayk", + "delayr", + "delayw", + "deltap", + "deltap3", + "deltapi", + "deltapn", + "deltapx", + "deltapxw", + "denorm", + "diff", + "diode_ladder", + "directory", + "diskgrain", + "diskin", + "diskin2", + "dispfft", + "display", + "distort", + "distort1", + "divz", + "doppler", + "dot", + "downsamp", + "dripwater", + "dssiactivate", + "dssiaudio", + "dssictls", + "dssiinit", + "dssilist", + "dumpk", + "dumpk2", + "dumpk3", + "dumpk4", + "duserrnd", + "dust", + "dust2", + "envlpx", + "envlpxr", + "ephasor", + "eqfil", + "evalstr", + "event", + "event_i", + "exciter", + "exitnow", + "exp", + "expcurve", + "expon", + "exprand", + "exprandi", + "expseg", + "expsega", + "expsegb", + "expsegba", + "expsegr", + "fareylen", + "fareyleni", + "faustaudio", + "faustcompile", + "faustctl", + "faustdsp", + "faustgen", + "faustplay", + "fft", + "fftinv", + "ficlose", + "filebit", + "filelen", + "filenchnls", + "filepeak", + "filescal", + "filesr", + "filevalid", + "fillarray", + "filter2", + "fin", + "fini", + "fink", + "fiopen", + "flanger", + "flashtxt", + "flooper", + "flooper2", + "floor", + "fmanal", + "fmax", + "fmb3", + "fmbell", + "fmin", + "fmmetal", + "fmod", + "fmpercfl", + "fmrhode", + "fmvoice", + "fmwurlie", + "fof", + "fof2", + "fofilter", + "fog", + "fold", + "follow", + "follow2", + "foscil", + "foscili", + "fout", + "fouti", + "foutir", + "foutk", + "fprintks", + "fprints", + "frac", + "fractalnoise", + "framebuffer", + "freeverb", + "ftaudio", + "ftchnls", + "ftconv", + "ftcps", + "ftfree", + "ftgen", + "ftgenonce", + "ftgentmp", + "ftlen", + "ftload", + "ftloadk", + "ftlptim", + "ftmorf", + "ftom", + "ftprint", + "ftresize", + "ftresizei", + "ftsamplebank", + "ftsave", + "ftsavek", + "ftslice", + "ftsr", + "gain", + "gainslider", + "gauss", + "gaussi", + "gausstrig", + "gbuzz", + "genarray", + "genarray_i", + "gendy", + "gendyc", + "gendyx", + "getcfg", + "getcol", + "getftargs", + "getrow", + "getrowlin", + "getseed", + "gogobel", + "grain", + "grain2", + "grain3", + "granule", + "guiro", + "harmon", + "harmon2", + "harmon3", + "harmon4", + "hdf5read", + "hdf5write", + "hilbert", + "hilbert2", + "hrtfearly", + "hrtfmove", + "hrtfmove2", + "hrtfreverb", + "hrtfstat", + "hsboscil", + "hvs1", + "hvs2", + "hvs3", + "hypot", + "i", + "ihold", + "imagecreate", + "imagefree", + "imagegetpixel", + "imageload", + "imagesave", + "imagesetpixel", + "imagesize", + "in", + "in32", + "inch", + "inh", + "init", + "initc14", + "initc21", + "initc7", + "inleta", + "inletf", + "inletk", + "inletkid", + "inletv", + "ino", + "inq", + "inrg", + "ins", + "insglobal", + "insremot", + "int", + "integ", + "interleave", + "interp", + "invalue", + "inx", + "inz", + "jacktransport", + "jitter", + "jitter2", + "joystick", + "jspline", + "k", + "la_i_add_mc", + "la_i_add_mr", + "la_i_add_vc", + "la_i_add_vr", + "la_i_assign_mc", + "la_i_assign_mr", + "la_i_assign_t", + "la_i_assign_vc", + "la_i_assign_vr", + "la_i_conjugate_mc", + "la_i_conjugate_mr", + "la_i_conjugate_vc", + "la_i_conjugate_vr", + "la_i_distance_vc", + "la_i_distance_vr", + "la_i_divide_mc", + "la_i_divide_mr", + "la_i_divide_vc", + "la_i_divide_vr", + "la_i_dot_mc", + "la_i_dot_mc_vc", + "la_i_dot_mr", + "la_i_dot_mr_vr", + "la_i_dot_vc", + "la_i_dot_vr", + "la_i_get_mc", + "la_i_get_mr", + "la_i_get_vc", + "la_i_get_vr", + "la_i_invert_mc", + "la_i_invert_mr", + "la_i_lower_solve_mc", + "la_i_lower_solve_mr", + "la_i_lu_det_mc", + "la_i_lu_det_mr", + "la_i_lu_factor_mc", + "la_i_lu_factor_mr", + "la_i_lu_solve_mc", + "la_i_lu_solve_mr", + "la_i_mc_create", + "la_i_mc_set", + "la_i_mr_create", + "la_i_mr_set", + "la_i_multiply_mc", + "la_i_multiply_mr", + "la_i_multiply_vc", + "la_i_multiply_vr", + "la_i_norm1_mc", + "la_i_norm1_mr", + "la_i_norm1_vc", + "la_i_norm1_vr", + "la_i_norm_euclid_mc", + "la_i_norm_euclid_mr", + "la_i_norm_euclid_vc", + "la_i_norm_euclid_vr", + "la_i_norm_inf_mc", + "la_i_norm_inf_mr", + "la_i_norm_inf_vc", + "la_i_norm_inf_vr", + "la_i_norm_max_mc", + "la_i_norm_max_mr", + "la_i_print_mc", + "la_i_print_mr", + "la_i_print_vc", + "la_i_print_vr", + "la_i_qr_eigen_mc", + "la_i_qr_eigen_mr", + "la_i_qr_factor_mc", + "la_i_qr_factor_mr", + "la_i_qr_sym_eigen_mc", + "la_i_qr_sym_eigen_mr", + "la_i_random_mc", + "la_i_random_mr", + "la_i_random_vc", + "la_i_random_vr", + "la_i_size_mc", + "la_i_size_mr", + "la_i_size_vc", + "la_i_size_vr", + "la_i_subtract_mc", + "la_i_subtract_mr", + "la_i_subtract_vc", + "la_i_subtract_vr", + "la_i_t_assign", + "la_i_trace_mc", + "la_i_trace_mr", + "la_i_transpose_mc", + "la_i_transpose_mr", + "la_i_upper_solve_mc", + "la_i_upper_solve_mr", + "la_i_vc_create", + "la_i_vc_set", + "la_i_vr_create", + "la_i_vr_set", + "la_k_a_assign", + "la_k_add_mc", + "la_k_add_mr", + "la_k_add_vc", + "la_k_add_vr", + "la_k_assign_a", + "la_k_assign_f", + "la_k_assign_mc", + "la_k_assign_mr", + "la_k_assign_t", + "la_k_assign_vc", + "la_k_assign_vr", + "la_k_conjugate_mc", + "la_k_conjugate_mr", + "la_k_conjugate_vc", + "la_k_conjugate_vr", + "la_k_current_f", + "la_k_current_vr", + "la_k_distance_vc", + "la_k_distance_vr", + "la_k_divide_mc", + "la_k_divide_mr", + "la_k_divide_vc", + "la_k_divide_vr", + "la_k_dot_mc", + "la_k_dot_mc_vc", + "la_k_dot_mr", + "la_k_dot_mr_vr", + "la_k_dot_vc", + "la_k_dot_vr", + "la_k_f_assign", + "la_k_get_mc", + "la_k_get_mr", + "la_k_get_vc", + "la_k_get_vr", + "la_k_invert_mc", + "la_k_invert_mr", + "la_k_lower_solve_mc", + "la_k_lower_solve_mr", + "la_k_lu_det_mc", + "la_k_lu_det_mr", + "la_k_lu_factor_mc", + "la_k_lu_factor_mr", + "la_k_lu_solve_mc", + "la_k_lu_solve_mr", + "la_k_mc_set", + "la_k_mr_set", + "la_k_multiply_mc", + "la_k_multiply_mr", + "la_k_multiply_vc", + "la_k_multiply_vr", + "la_k_norm1_mc", + "la_k_norm1_mr", + "la_k_norm1_vc", + "la_k_norm1_vr", + "la_k_norm_euclid_mc", + "la_k_norm_euclid_mr", + "la_k_norm_euclid_vc", + "la_k_norm_euclid_vr", + "la_k_norm_inf_mc", + "la_k_norm_inf_mr", + "la_k_norm_inf_vc", + "la_k_norm_inf_vr", + "la_k_norm_max_mc", + "la_k_norm_max_mr", + "la_k_qr_eigen_mc", + "la_k_qr_eigen_mr", + "la_k_qr_factor_mc", + "la_k_qr_factor_mr", + "la_k_qr_sym_eigen_mc", + "la_k_qr_sym_eigen_mr", + "la_k_random_mc", + "la_k_random_mr", + "la_k_random_vc", + "la_k_random_vr", + "la_k_subtract_mc", + "la_k_subtract_mr", + "la_k_subtract_vc", + "la_k_subtract_vr", + "la_k_t_assign", + "la_k_trace_mc", + "la_k_trace_mr", + "la_k_upper_solve_mc", + "la_k_upper_solve_mr", + "la_k_vc_set", + "la_k_vr_set", + "lenarray", + "lfo", + "limit", + "limit1", + "lincos", + "line", + "linen", + "linenr", + "lineto", + "link_beat_force", + "link_beat_get", + "link_beat_request", + "link_create", + "link_enable", + "link_is_enabled", + "link_metro", + "link_peers", + "link_tempo_get", + "link_tempo_set", + "linlin", + "linrand", + "linseg", + "linsegb", + "linsegr", + "liveconv", + "locsend", + "locsig", + "log", + "log10", + "log2", + "logbtwo", + "logcurve", + "loopseg", + "loopsegp", + "looptseg", + "loopxseg", + "lorenz", + "loscil", + "loscil3", + "loscil3phs", + "loscilphs", + "loscilx", + "lowpass2", + "lowres", + "lowresx", + "lpf18", + "lpform", + "lpfreson", + "lphasor", + "lpinterp", + "lposcil", + "lposcil3", + "lposcila", + "lposcilsa", + "lposcilsa2", + "lpread", + "lpreson", + "lpshold", + "lpsholdp", + "lpslot", + "lua_exec", + "lua_iaopcall", + "lua_iaopcall_off", + "lua_ikopcall", + "lua_ikopcall_off", + "lua_iopcall", + "lua_iopcall_off", + "lua_opdef", + "mac", + "maca", + "madsr", + "mags", + "mandel", + "mandol", + "maparray", + "maparray_i", + "marimba", + "massign", + "max", + "max_k", + "maxabs", + "maxabsaccum", + "maxaccum", + "maxalloc", + "maxarray", + "mclock", + "mdelay", + "median", + "mediank", + "metro", + "mfb", + "midglobal", + "midiarp", + "midic14", + "midic21", + "midic7", + "midichannelaftertouch", + "midichn", + "midicontrolchange", + "midictrl", + "mididefault", + "midifilestatus", + "midiin", + "midinoteoff", + "midinoteoncps", + "midinoteonkey", + "midinoteonoct", + "midinoteonpch", + "midion", + "midion2", + "midiout", + "midiout_i", + "midipgm", + "midipitchbend", + "midipolyaftertouch", + "midiprogramchange", + "miditempo", + "midremot", + "min", + "minabs", + "minabsaccum", + "minaccum", + "minarray", + "mincer", + "mirror", + "mode", + "modmatrix", + "monitor", + "moog", + "moogladder", + "moogladder2", + "moogvcf", + "moogvcf2", + "moscil", + "mp3bitrate", + "mp3in", + "mp3len", + "mp3nchnls", + "mp3scal", + "mp3sr", + "mpulse", + "mrtmsg", + "mtof", + "mton", + "multitap", + "mute", + "mvchpf", + "mvclpf1", + "mvclpf2", + "mvclpf3", + "mvclpf4", + "mxadsr", + "nchnls_hw", + "nestedap", + "nlalp", + "nlfilt", + "nlfilt2", + "noise", + "noteoff", + "noteon", + "noteondur", + "noteondur2", + "notnum", + "nreverb", + "nrpn", + "nsamp", + "nstance", + "nstrnum", + "ntom", + "ntrpol", + "nxtpow2", + "octave", + "octcps", + "octmidi", + "octmidib", + "octmidinn", + "octpch", + "olabuffer", + "oscbnk", + "oscil", + "oscil1", + "oscil1i", + "oscil3", + "oscili", + "oscilikt", + "osciliktp", + "oscilikts", + "osciln", + "oscils", + "oscilx", + "out", + "out32", + "outc", + "outch", + "outh", + "outiat", + "outic", + "outic14", + "outipat", + "outipb", + "outipc", + "outkat", + "outkc", + "outkc14", + "outkpat", + "outkpb", + "outkpc", + "outleta", + "outletf", + "outletk", + "outletkid", + "outletv", + "outo", + "outq", + "outq1", + "outq2", + "outq3", + "outq4", + "outrg", + "outs", + "outs1", + "outs2", + "outvalue", + "outx", + "outz", + "p", + "p5gconnect", + "p5gdata", + "pan", + "pan2", + "pareq", + "part2txt", + "partials", + "partikkel", + "partikkelget", + "partikkelset", + "partikkelsync", + "passign", + "paulstretch", + "pcauchy", + "pchbend", + "pchmidi", + "pchmidib", + "pchmidinn", + "pchoct", + "pchtom", + "pconvolve", + "pcount", + "pdclip", + "pdhalf", + "pdhalfy", + "peak", + "pgmassign", + "pgmchn", + "phaser1", + "phaser2", + "phasor", + "phasorbnk", + "phs", + "pindex", + "pinker", + "pinkish", + "pitch", + "pitchac", + "pitchamdf", + "planet", + "platerev", + "plltrack", + "pluck", + "poisson", + "pol2rect", + "polyaft", + "polynomial", + "port", + "portk", + "poscil", + "poscil3", + "pow", + "powershape", + "powoftwo", + "pows", + "prealloc", + "prepiano", + "print", + "print_type", + "printarray", + "printf", + "printf_i", + "printk", + "printk2", + "printks", + "printks2", + "prints", + "product", + "pset", + "ptable", + "ptable3", + "ptablei", + "ptableiw", + "ptablew", + "ptrack", + "puts", + "pvadd", + "pvbufread", + "pvcross", + "pvinterp", + "pvoc", + "pvread", + "pvs2array", + "pvs2tab", + "pvsadsyn", + "pvsanal", + "pvsarp", + "pvsbandp", + "pvsbandr", + "pvsbin", + "pvsblur", + "pvsbuffer", + "pvsbufread", + "pvsbufread2", + "pvscale", + "pvscent", + "pvsceps", + "pvscross", + "pvsdemix", + "pvsdiskin", + "pvsdisp", + "pvsenvftw", + "pvsfilter", + "pvsfread", + "pvsfreeze", + "pvsfromarray", + "pvsftr", + "pvsftw", + "pvsfwrite", + "pvsgain", + "pvshift", + "pvsifd", + "pvsin", + "pvsinfo", + "pvsinit", + "pvslock", + "pvsmaska", + "pvsmix", + "pvsmooth", + "pvsmorph", + "pvsosc", + "pvsout", + "pvspitch", + "pvstanal", + "pvstencil", + "pvstrace", + "pvsvoc", + "pvswarp", + "pvsynth", + "pwd", + "pyassign", + "pyassigni", + "pyassignt", + "pycall", + "pycall1", + "pycall1i", + "pycall1t", + "pycall2", + "pycall2i", + "pycall2t", + "pycall3", + "pycall3i", + "pycall3t", + "pycall4", + "pycall4i", + "pycall4t", + "pycall5", + "pycall5i", + "pycall5t", + "pycall6", + "pycall6i", + "pycall6t", + "pycall7", + "pycall7i", + "pycall7t", + "pycall8", + "pycall8i", + "pycall8t", + "pycalli", + "pycalln", + "pycallni", + "pycallt", + "pyeval", + "pyevali", + "pyevalt", + "pyexec", + "pyexeci", + "pyexect", + "pyinit", + "pylassign", + "pylassigni", + "pylassignt", + "pylcall", + "pylcall1", + "pylcall1i", + "pylcall1t", + "pylcall2", + "pylcall2i", + "pylcall2t", + "pylcall3", + "pylcall3i", + "pylcall3t", + "pylcall4", + "pylcall4i", + "pylcall4t", + "pylcall5", + "pylcall5i", + "pylcall5t", + "pylcall6", + "pylcall6i", + "pylcall6t", + "pylcall7", + "pylcall7i", + "pylcall7t", + "pylcall8", + "pylcall8i", + "pylcall8t", + "pylcalli", + "pylcalln", + "pylcallni", + "pylcallt", + "pyleval", + "pylevali", + "pylevalt", + "pylexec", + "pylexeci", + "pylexect", + "pylrun", + "pylruni", + "pylrunt", + "pyrun", + "pyruni", + "pyrunt", + "qinf", + "qnan", + "r2c", + "rand", + "randh", + "randi", + "random", + "randomh", + "randomi", + "rbjeq", + "readclock", + "readf", + "readfi", + "readk", + "readk2", + "readk3", + "readk4", + "readks", + "readscore", + "readscratch", + "rect2pol", + "release", + "remoteport", + "remove", + "repluck", + "reshapearray", + "reson", + "resonk", + "resonr", + "resonx", + "resonxk", + "resony", + "resonz", + "resyn", + "reverb", + "reverb2", + "reverbsc", + "rewindscore", + "rezzy", + "rfft", + "rifft", + "rms", + "rnd", + "rnd31", + "round", + "rspline", + "rtclock", + "s16b14", + "s32b14", + "samphold", + "sandpaper", + "sc_lag", + "sc_lagud", + "sc_phasor", + "sc_trig", + "scale", + "scalearray", + "scanhammer", + "scans", + "scantable", + "scanu", + "schedkwhen", + "schedkwhennamed", + "schedule", + "schedwhen", + "scoreline", + "scoreline_i", + "seed", + "sekere", + "select", + "semitone", + "sense", + "sensekey", + "seqtime", + "seqtime2", + "serialBegin", + "serialEnd", + "serialFlush", + "serialPrint", + "serialRead", + "serialWrite", + "serialWrite_i", + "setcol", + "setctrl", + "setksmps", + "setrow", + "setscorepos", + "sfilist", + "sfinstr", + "sfinstr3", + "sfinstr3m", + "sfinstrm", + "sfload", + "sflooper", + "sfpassign", + "sfplay", + "sfplay3", + "sfplay3m", + "sfplaym", + "sfplist", + "sfpreset", + "shaker", + "shiftin", + "shiftout", + "signum", + "sin", + "sinh", + "sininv", + "sinsyn", + "sleighbells", + "slicearray", + "slicearray_i", + "slider16", + "slider16f", + "slider16table", + "slider16tablef", + "slider32", + "slider32f", + "slider32table", + "slider32tablef", + "slider64", + "slider64f", + "slider64table", + "slider64tablef", + "slider8", + "slider8f", + "slider8table", + "slider8tablef", + "sliderKawai", + "sndloop", + "sndwarp", + "sndwarpst", + "sockrecv", + "sockrecvs", + "socksend", + "socksends", + "sorta", + "sortd", + "soundin", + "space", + "spat3d", + "spat3di", + "spat3dt", + "spdist", + "splitrig", + "sprintf", + "sprintfk", + "spsend", + "sqrt", + "squinewave", + "statevar", + "stix", + "strcat", + "strcatk", + "strchar", + "strchark", + "strcmp", + "strcmpk", + "strcpy", + "strcpyk", + "strecv", + "streson", + "strfromurl", + "strget", + "strindex", + "strindexk", + "strlen", + "strlenk", + "strlower", + "strlowerk", + "strrindex", + "strrindexk", + "strset", + "strsub", + "strsubk", + "strtod", + "strtodk", + "strtol", + "strtolk", + "strupper", + "strupperk", + "stsend", + "subinstr", + "subinstrinit", + "sum", + "sumarray", + "svfilter", + "syncgrain", + "syncloop", + "syncphasor", + "system", + "system_i", + "tab", + "tab2array", + "tab2pvs", + "tab_i", + "tabifd", + "table", + "table3", + "table3kt", + "tablecopy", + "tablefilter", + "tablefilteri", + "tablegpw", + "tablei", + "tableicopy", + "tableigpw", + "tableikt", + "tableimix", + "tableiw", + "tablekt", + "tablemix", + "tableng", + "tablera", + "tableseg", + "tableshuffle", + "tableshufflei", + "tablew", + "tablewa", + "tablewkt", + "tablexkt", + "tablexseg", + "tabmorph", + "tabmorpha", + "tabmorphak", + "tabmorphi", + "tabplay", + "tabrec", + "tabrowlin", + "tabsum", + "tabw", + "tabw_i", + "tambourine", + "tan", + "tanh", + "taninv", + "taninv2", + "tbvcf", + "tempest", + "tempo", + "temposcal", + "tempoval", + "timedseq", + "timeinstk", + "timeinsts", + "timek", + "times", + "tival", + "tlineto", + "tone", + "tonek", + "tonex", + "tradsyn", + "trandom", + "transeg", + "transegb", + "transegr", + "trcross", + "trfilter", + "trhighest", + "trigger", + "trigseq", + "trim", + "trim_i", + "trirand", + "trlowest", + "trmix", + "trscale", + "trshift", + "trsplit", + "turnoff", + "turnoff2", + "turnon", + "tvconv", + "unirand", + "unwrap", + "upsamp", + "urandom", + "urd", + "vactrol", + "vadd", + "vadd_i", + "vaddv", + "vaddv_i", + "vaget", + "valpass", + "vaset", + "vbap", + "vbapg", + "vbapgmove", + "vbaplsinit", + "vbapmove", + "vbapz", + "vbapzmove", + "vcella", + "vco", + "vco2", + "vco2ft", + "vco2ift", + "vco2init", + "vcomb", + "vcopy", + "vcopy_i", + "vdel_k", + "vdelay", + "vdelay3", + "vdelayk", + "vdelayx", + "vdelayxq", + "vdelayxs", + "vdelayxw", + "vdelayxwq", + "vdelayxws", + "vdivv", + "vdivv_i", + "vecdelay", + "veloc", + "vexp", + "vexp_i", + "vexpseg", + "vexpv", + "vexpv_i", + "vibes", + "vibr", + "vibrato", + "vincr", + "vlimit", + "vlinseg", + "vlowres", + "vmap", + "vmirror", + "vmult", + "vmult_i", + "vmultv", + "vmultv_i", + "voice", + "vosim", + "vphaseseg", + "vport", + "vpow", + "vpow_i", + "vpowv", + "vpowv_i", + "vpvoc", + "vrandh", + "vrandi", + "vsubv", + "vsubv_i", + "vtaba", + "vtabi", + "vtabk", + "vtable1k", + "vtablea", + "vtablei", + "vtablek", + "vtablewa", + "vtablewi", + "vtablewk", + "vtabwa", + "vtabwi", + "vtabwk", + "vwrap", + "waveset", + "websocket", + "weibull", + "wgbow", + "wgbowedbar", + "wgbrass", + "wgclar", + "wgflute", + "wgpluck", + "wgpluck2", + "wguide1", + "wguide2", + "wiiconnect", + "wiidata", + "wiirange", + "wiisend", + "window", + "wrap", + "writescratch", + "wterrain", + "xadsr", + "xin", + "xout", + "xscanmap", + "xscans", + "xscansmap", + "xscanu", + "xtratim", + "xyscale", + "zacl", + "zakinit", + "zamod", + "zar", + "zarg", + "zaw", + "zawm", + "zdf_1pole", + "zdf_1pole_mode", + "zdf_2pole", + "zdf_2pole_mode", + "zdf_ladder", + "zfilter2", + "zir", + "ziw", + "ziwm", + "zkcl", + "zkmod", + "zkr", + "zkw", + "zkwm" + ]; + var deprecatedOpcodes = [ + "array", + "bformdec", + "bformenc", + "copy2ftab", + "copy2ttab", + "hrtfer", + "ktableseg", + "lentab", + "maxtab", + "mintab", + "pop", + "pop_f", + "push", + "push_f", + "scalet", + "sndload", + "soundout", + "soundouts", + "specaddm", + "specdiff", + "specdisp", + "specfilt", + "spechist", + "specptrk", + "specscal", + "specsum", + "spectrum", + "stack", + "sumtab", + "tabgen", + "tabmap", + "tabmap_i", + "tabslice", + "tb0", + "tb0_init", + "tb1", + "tb10", + "tb10_init", + "tb11", + "tb11_init", + "tb12", + "tb12_init", + "tb13", + "tb13_init", + "tb14", + "tb14_init", + "tb15", + "tb15_init", + "tb1_init", + "tb2", + "tb2_init", + "tb3", + "tb3_init", + "tb4", + "tb4_init", + "tb5", + "tb5_init", + "tb6", + "tb6_init", + "tb7", + "tb7_init", + "tb8", + "tb8_init", + "tb9", + "tb9_init", + "vbap16", + "vbap4", + "vbap4move", + "vbap8", + "vbap8move", + "xyin" + ]; + + opcodes = lang.arrayToMap(opcodes); + deprecatedOpcodes = lang.arrayToMap(deprecatedOpcodes); + + this.lineContinuations = [ + { + token : "constant.character.escape.line-continuation.csound", + regex : /\\$/ + }, this.pushRule({ + token : "constant.character.escape.line-continuation.csound", + regex : /\\/, + next : "line continuation" + }) + ]; + + this.comments.push(this.lineContinuations); + + this.quotedStringContents.push( + this.lineContinuations, + { + token : "invalid.illegal", + regex : /[^"\\]*$/ + } + ); + + var start = this.$rules.start; + start.splice(1, 0, { + token : ["text.csound", "entity.name.label.csound", "entity.punctuation.label.csound", "text.csound"], + regex : /^([ \t]*)(\w+)(:)([ \t]+|$)/ + }); + start.push( + this.pushRule({ + token : "keyword.function.csound", + regex : /\binstr\b/, + next : "instrument numbers and identifiers" + }), this.pushRule({ + token : "keyword.function.csound", + regex : /\bopcode\b/, + next : "after opcode keyword" + }), { + token : "keyword.other.csound", + regex : /\bend(?:in|op)\b/ + }, + + { + token : "variable.language.csound", + regex : /\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b/ + }, + + this.numbers, + + { + token : "keyword.operator.csound", + regex : "\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~¬]|[=!+\\-*/^%&|<>#?:]" + }, + + this.pushRule({ + token : "punctuation.definition.string.begin.csound", + regex : /"/, + next : "quoted string" + }), this.pushRule({ + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "braced string" + }), + + { + token : "keyword.control.csound", + regex : /\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\b/ + }, + + this.pushRule({ + token : "keyword.control.csound", + regex : /\b[ik]?goto\b/, + next : "goto before label" + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\b(?:r(?:einit|igoto)|tigoto)\b/, + next : "goto before label" + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\bc(?:g|in?|k|nk?)goto\b/, + next : ["goto before label", "goto before argument"] + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\btimout\b/, + next : ["goto before label", "goto before argument", "goto before argument"] + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\bloop_[gl][et]\b/, + next : ["goto before label", "goto before argument", "goto before argument", "goto before argument"] + }), + + this.pushRule({ + token : "support.function.csound", + regex : /\b(?:readscore|scoreline(?:_i)?)\b/, + next : "Csound score opcode" + }), this.pushRule({ + token : "support.function.csound", + regex : /\bpyl?run[it]?\b(?!$)/, + next : "Python opcode" + }), this.pushRule({ + token : "support.function.csound", + regex : /\blua_(?:exec|opdef)\b(?!$)/, + next : "Lua opcode" + }), + + { + token : "support.variable.csound", + regex : /\bp\d+\b/ + }, { + regex : /\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b/, onMatch: function(value, currentState, stack, line) { + var tokens = value.split(this.splitRegex); + var name = tokens[1]; + var type; + if (opcodes.hasOwnProperty(name)) + type = "support.function.csound"; + else if (deprecatedOpcodes.hasOwnProperty(name)) + type = "invalid.deprecated.csound"; + if (type) { + if (tokens[2]) { + return [ + {type: type, value: name}, + {type: "punctuation.type-annotation.csound", value: tokens[2]}, + {type: "type-annotation.storage.type.csound", value: tokens[3]} + ]; + } + return type; + } + return "text.csound"; + } + } + ); + + this.$rules["macro parameter value list"].splice(2, 0, { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "macro parameter value braced string" + }); + + var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-"); + + this.addRules({ + "macro parameter value braced string": [ + { + token : "constant.character.escape.csound", + regex : /\\[#'()]/ + }, { + token : "invalid.illegal.csound.csound", + regex : /[#'()]/ + }, { + token : "punctuation.definition.string.end.csound", + regex : /}}/, + next : "macro parameter value list" + }, { + defaultToken: "string.braced.csound" + } + ], + + "instrument numbers and identifiers": [ + this.comments, + { + token : "entity.name.function.csound", + regex : /\d+|[A-Z_a-z]\w*/ + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "after opcode keyword": [ + this.comments, + this.popRule({ + token : "empty", + regex : /$/ + }), this.popRule({ + token : "entity.name.function.opcode.csound", + regex : /[A-Z_a-z]\w*/, + next : "opcode type signatures" + }) + ], + "opcode type signatures": [ + this.comments, + this.popRule({ + token : "empty", + regex : /$/ + }), { + token : "storage.type.csound", + regex : /\b(?:0|[afijkKoOpPStV\[\]]+)/ + } + ], + + "quoted string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound", + regex : /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "braced string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound", + regex : /}}/ + }), + this.bracedStringContents, + { + defaultToken: "string.braced.csound" + } + ], + + "goto before argument": [ + this.popRule({ + token : "text.csound", + regex : /,/ + }), + start + ], + "goto before label": [ + { + token : "text.csound", + regex : /\s+/ + }, + this.comments, + this.popRule({ + token : "entity.name.label.csound", + regex : /\w+/ + }), this.popRule({ + token : "empty", + regex : /(?!\w)/ + }) + ], + + "Csound score opcode": [ + this.comments, + { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : scoreHighlightRules.embeddedRulePrefix + "start" + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "Python opcode": [ + this.comments, + { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "python-start" + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "Lua opcode": [ + this.comments, + { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "lua-start" + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "line continuation": [ + this.popRule({ + token : "empty", + regex : /$/ + }), + this.semicolonComments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ] + }); + + var rules = [ + this.popRule({ + token : "punctuation.definition.string.end.csound", + regex : /}}/ + }) + ]; + this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, rules); + this.embedRules(PythonHighlightRules, "python-", rules); + this.embedRules(LuaHighlightRules, "lua-", rules); + + this.normalizeRules(); +}; + +oop.inherits(CsoundOrchestraHighlightRules, CsoundPreprocessorHighlightRules); + +exports.CsoundOrchestraHighlightRules = CsoundOrchestraHighlightRules; +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token : "constant.numeric", + regex : numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media": [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + + "comments" : [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }] + }], + + "ruleset" : [{ + regex : "-(webkit|ms|moz|o)-", + token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" + }, { + token : "paren.rparen", + regex : "\\}", + next : "start" + }, { + include : ["strings", "url", "comments"] + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + include: "url" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }], + + url: [{ + token : "support.function", + regex : "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token : "support.function", + regex : "\\)", + next : "pop" + }, { + defaultToken: "string" + }] + }], + + strings: [{ + token : "string.start", + regex : "'", + push : [{ + token : "string.end", + regex : "'|$", + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : '"', + push : [{ + token : "string.end", + regex : '"|$', + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token : "constant.language.escape", + regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; + +var JavaScriptHighlightRules = function(options) { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hexadecimal, octal and binary + regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token : "constant.numeric", // decimal integers and floats + regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "from(?=\\s*('|\"))" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["support.constant"], + regex : /that\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "punctuation.operator", + regex : /[.](?![.])/, + next : "property" + }, { + token : "storage.type", + regex : /=>/, + next : "start" + }, { + token : "keyword.operator", + regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token : "text", + regex : "\\s+" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", + next: "function_arguments" + }, { + token : "punctuation.operator", + regex : /[.](?![.])/ + }, { + token : "support.function", + regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : "support.function.dom", + regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : "support.constant", + regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : "identifier", + regex : identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.quasi.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : escapedRe + }, { + token : "paren.quasi.start", + regex : /\${/, + push : "start" + }, { + token : "string.quasi.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string.quasi" + }] + }); + + if (!options || options.jsx != false) + JSX.call(this); + } + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); + + this.normalizeRules(); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch : function(val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex : "", + onMatch : function(value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{type: this.token, value: value}]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + token : "text.tag-whitespace.xml", + regex : "\\s+" + }, { + token : "string.attribute-value.xml", + regex : "'", + stateName : "jsx_attr_q", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + stateName : "jsx_attr_qq", + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} + +function comments(next) { + return [ + { + token : "comment", // multi line comment + regex : /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "comment", + regex : "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + + this.$rules = { + start : [ + {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction" + }, + {token : "comment.start.xml", regex : "<\\!--", next : "comment"}, + { + token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true + }, + {include : "tag"}, + {token : "text.end-tag-open.xml", regex: "", + next : "start" + }], + + doctype : [ + {include : "whitespace"}, + {include : "string"}, + {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, + {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} + ], + + int_subset : [{ + token : "text.xml", + regex : "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex : "(<\\!)(" + tagRegex + ")", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.markup-decl.xml", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, + {token : "text.xml", regex : "\\s+"}, + {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment.end.xml", regex : "-->", next : "start"}, + {defaultToken : "comment.xml"} + ], + + reference : [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + attr_reference : [{ + token : "constant.language.escape.reference.attribute-value.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + tag : [{ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex : "(?:(<)|(", next : "start"} + ] + }], + + tag_whitespace : [ + {token : "text.tag-whitespace.xml", regex : "\\s+"} + ], + whitespace : [ + {token : "text.whitespace.xml", regex : "\\s+"} + ], + string: [{ + token : "string.xml", + regex : "'", + push : [ + {token : "string.xml", regex: "'", next: "pop"}, + {defaultToken : "string.xml"} + ] + }, { + token : "string.xml", + regex : '"', + push : [ + {token : "string.xml", regex: '"', next: "pop"}, + {defaultToken : "string.xml"} + ] + }], + + attributes: [{ + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + + attribute_value: [{ + token : "string.attribute-value.xml", + regex : "'", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(<)(" + tag + "(?=\\s|>|$))", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ]; + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex : "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex : "\\]\\]>" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "tag_whitespace" + }, { + token : "entity.other.attribute-name.xml", + regex : "[-_a-zA-Z0-9:.]+" + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=", + push : [{ + include: "tag_whitespace" + }, { + token : "string.unquoted.attribute-value.html", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "attribute_value" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex : "(", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +define("ace/mode/csound_document_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_orchestra_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var CsoundOrchestraHighlightRules = require("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var CsoundDocumentHighlightRules = function() { + + var orchestraHighlightRules = new CsoundOrchestraHighlightRules("csound-"); + var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-"); + + this.$rules = { + "start": [ + { + token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : /(<)(CsoundSynthesi[sz]er)(>)/, + next : "synthesizer" + }, + {defaultToken : "text.csound-document"} + ], + + "synthesizer": [ + { + token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "()", + next : "start" + }, { + token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "(<)(CsInstruments)(>)", + next : orchestraHighlightRules.embeddedRulePrefix + "start" + }, { + token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "(<)(CsScore)(>)", + next : scoreHighlightRules.embeddedRulePrefix + "start" + }, { + token : ["meta.tag.punctuation.tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "(<)([Hh][Tt][Mm][Ll])(>)", + next : "html-start" + } + ] + }; + + this.embedRules(orchestraHighlightRules.getRules(), orchestraHighlightRules.embeddedRulePrefix, [{ + token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "()", + next : "synthesizer" + }]); + this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, [{ + token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "()", + next : "synthesizer" + }]); + this.embedRules(HtmlHighlightRules, "html-", [{ + token : ["meta.tag.punctuation.end-tag-open.csound-document", "entity.name.tag.begin.csound-document", "meta.tag.punctuation.tag-close.csound-document"], + regex : "()", + next : "synthesizer" + }]); + + this.normalizeRules(); +}; + +oop.inherits(CsoundDocumentHighlightRules, TextHighlightRules); + +exports.CsoundDocumentHighlightRules = CsoundDocumentHighlightRules; +}); + +define("ace/mode/csound_document",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_document_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CsoundDocumentHighlightRules = require("./csound_document_highlight_rules").CsoundDocumentHighlightRules; + +var Mode = function() { + this.HighlightRules = CsoundDocumentHighlightRules; +}; +oop.inherits(Mode, TextMode); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/csound_document"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-csound_orchestra.js b/htdocs/includes/ace/src/mode-csound_orchestra.js new file mode 100644 index 00000000000..7f1a60442aa --- /dev/null +++ b/htdocs/includes/ace/src/mode-csound_orchestra.js @@ -0,0 +1,2934 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) { + + this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix; + + this.semicolonComments = { + token : "comment.line.semicolon.csound", + regex : ";.*$" + }; + + this.comments = [ + { + token : "punctuation.definition.comment.begin.csound", + regex : "/\\*", + push : [ + { + token : "punctuation.definition.comment.end.csound", + regex : "\\*/", + next : "pop" + }, { + defaultToken: "comment.block.csound" + } + ] + }, { + token : "comment.line.double-slash.csound", + regex : "//.*$" + }, + this.semicolonComments + ]; + + this.macroUses = [ + { + token : ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"], + regex : /(\$[A-Z_a-z]\w*\.?)(\()/, + next : "macro parameter value list" + }, { + token : "entity.name.function.preprocessor.csound", + regex : /\$[A-Z_a-z]\w*(?:\.|\b)/ + } + ]; + + this.numbers = [ + { + token : "constant.numeric.float.csound", + regex : /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/ + }, { + token : ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"], + regex : /(0[Xx])([0-9A-Fa-f]+)/ + }, { + token : "constant.numeric.integer.decimal.csound", + regex : /\d+/ + } + ]; + + this.bracedStringContents = [ + { + token : "constant.character.escape.csound", + regex : /\\(?:[\\abnrt"]|[0-7]{1,3})/ + }, + { + token : "constant.character.placeholder.csound", + regex : /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/ + }, { + token : "constant.character.escape.csound", + regex : /%%/ + } + ]; + + this.quotedStringContents = [ + this.macroUses, + this.bracedStringContents + ]; + + var start = [ + this.comments, + + { + token : "keyword.preprocessor.csound", + regex : /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/ + }, { + token : "keyword.preprocessor.csound", + regex : /#include/, + push : [ + this.comments, + { + token : "string.csound", + regex : /([^ \t])(?:.*?\1)/, + next : "pop" + } + ] + }, { + token : "keyword.preprocessor.csound", + regex : /#includestr/, + push : [ + this.comments, + { + token : "string.csound", + regex : /([^ \t])(?:.*?\1)/, + next : "pop" + } + ] + }, { + token : "keyword.preprocessor.csound", + regex : /#[ \t]*define/, + next : "define directive" + }, { + token : "keyword.preprocessor.csound", + regex : /#(?:ifn?def|undef)\b/, + next : "macro directive" + }, + + this.macroUses + ]; + + this.$rules = { + "start": start, + + "define directive": [ + this.comments, + { + token : "entity.name.function.preprocessor.csound", + regex : /[A-Z_a-z]\w*/ + }, { + token : "punctuation.definition.macro-parameter-name-list.begin.csound", + regex : /\(/, + next : "macro parameter name list" + }, { + token : "punctuation.definition.macro.begin.csound", + regex : /#/, + next : "macro body" + } + ], + "macro parameter name list": [ + { + token : "variable.parameter.preprocessor.csound", + regex : /[A-Z_a-z]\w*/ + }, { + token : "punctuation.definition.macro-parameter-name-list.end.csound", + regex : /\)/, + next : "define directive" + } + ], + "macro body": [ + { + token : "constant.character.escape.csound", + regex : /\\#/ + }, { + token : "punctuation.definition.macro.end.csound", + regex : /#/, + next : "start" + }, + start + ], + + "macro directive": [ + this.comments, + { + token : "entity.name.function.preprocessor.csound", + regex : /[A-Z_a-z]\w*/, + next : "start" + } + ], + + "macro parameter value list": [ + { + token : "punctuation.definition.macro-parameter-value-list.end.csound", + regex : /\)/, + next : "start" + }, { + token : "punctuation.definition.string.begin.csound", + regex : /"/, + next : "macro parameter value quoted string" + }, this.pushRule({ + token : "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex : /\(/, + next : "macro parameter value parenthetical" + }), { + token : "punctuation.macro-parameter-value-separator.csound", + regex : "[#']" + } + ], + "macro parameter value quoted string": [ + { + token : "constant.character.escape.csound", + regex : /\\[#'()]/ + }, { + token : "invalid.illegal.csound", + regex : /[#'()]/ + }, { + token : "punctuation.definition.string.end.csound", + regex : /"/, + next : "macro parameter value list" + }, + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "macro parameter value parenthetical": [ + { + token : "constant.character.escape.csound", + regex : /\\\)/ + }, this.popRule({ + token : "punctuation.macro-parameter-value-parenthetical.end.csound", + regex : /\)/ + }), this.pushRule({ + token : "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex : /\(/, + next : "macro parameter value parenthetical" + }), + start + ] + }; +}; + +oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules); + +(function() { + + this.pushRule = function(params) { + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + params.next[i] = this.embeddedRulePrefix + params.next[i]; + } + } + + return { + regex : params.regex, onMatch: function(value, currentState, stack, line) { + if (stack.length === 0) + stack.push(currentState); + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + stack.push(params.next[i]); + } + } else { + stack.push(params.next); + } + this.next = stack[stack.length - 1]; + return params.token; + }, + + get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; }, + set next(next) { + if (!Array.isArray(params.next)) { + params.next = next; + } + }, + + get token() { return params.token; } + }; + }; + + this.popRule = function(params) { + if (params.next) { + params.next = this.embeddedRulePrefix + params.next; + } + + return { + regex : params.regex, onMatch: function(value, currentState, stack, line) { + stack.pop(); + if (params.next) { + stack.push(params.next); + this.next = stack[stack.length - 1]; + } else { + this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop(); + } + return params.token; + } + }; + }; + +}).call(CsoundPreprocessorHighlightRules.prototype); + +exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules; +}); + +define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; + +var CsoundScoreHighlightRules = function(embeddedRulePrefix) { + + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + + this.quotedStringContents.push({ + token : "invalid.illegal.csound-score", + regex : /[^"]*$/ + }); + + var start = this.$rules.start; + start.push( + { + token : "keyword.control.csound-score", + regex : /[abCdefiqstvxy]/ + }, { + token : "invalid.illegal.csound-score", + regex : /w/ + }, { + token : "constant.numeric.language.csound-score", + regex : /z/ + }, { + token : ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"], + regex : /([nNpP][pP])(\d+)/ + }, { + token : "keyword.other.csound-score", + regex : /[mn]/, + push : [ + { + token : "empty", + regex : /$/, + next : "pop" + }, + this.comments, + { + token : "entity.name.label.csound-score", + regex : /[A-Z_a-z]\w*/ + } + ] + }, { + token : "keyword.preprocessor.csound-score", + regex : /r\b/, + next : "repeat section" + }, + + this.numbers, + + { + token : "keyword.operator.csound-score", + regex : "[!+\\-*/^%&|<>#~.]" + }, + + this.pushRule({ + token : "punctuation.definition.string.begin.csound-score", + regex : /"/, + next : "quoted string" + }), + + this.pushRule({ + token : "punctuation.braced-loop.begin.csound-score", + regex : /{/, + next : "loop after left brace" + }) + ); + + this.addRules({ + "repeat section": [ + { + token : "empty", + regex : /$/, + next : "start" + }, + this.comments, + { + token : "constant.numeric.integer.decimal.csound-score", + regex : /\d+/, + next : "repeat section before label" + } + ], + "repeat section before label": [ + { + token : "empty", + regex : /$/, + next : "start" + }, + this.comments, + { + token : "entity.name.label.csound-score", + regex : /[A-Z_a-z]\w*/, + next : "start" + } + ], + + "quoted string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound-score", + regex : /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound-score" + } + ], + + "loop after left brace": [ + this.popRule({ + token : "constant.numeric.integer.decimal.csound-score", + regex : /\d+/, + next : "loop after repeat count" + }), + this.comments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ], + "loop after repeat count": [ + this.popRule({ + token : "entity.name.function.preprocessor.csound-score", + regex : /[A-Z_a-z]\w*\b/, + next : "loop after macro name" + }), + this.comments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ], + "loop after macro name": [ + start, + this.popRule({ + token : "punctuation.braced-loop.end.csound-score", + regex : /}/ + }) + ] + }); + + this.normalizeRules(); +}; + +oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules); + +exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules; +}); + +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var LuaHighlightRules = function() { + + var keywords = ( + "break|do|else|elseif|end|for|function|if|in|local|repeat|"+ + "return|then|until|while|or|and|not" + ); + + var builtinConstants = ("true|false|nil|_G|_VERSION"); + + var functions = ( + "string|xpcall|package|tostring|print|os|unpack|require|"+ + "getfenv|setmetatable|next|assert|tonumber|io|rawequal|"+ + "collectgarbage|getmetatable|module|rawset|math|debug|"+ + "pcall|table|newproxy|type|coroutine|_G|select|gcinfo|"+ + "pairs|rawget|loadstring|ipairs|_VERSION|dofile|setfenv|"+ + "load|error|loadfile|"+ + + "sub|upper|len|gfind|rep|find|match|char|dump|gmatch|"+ + "reverse|byte|format|gsub|lower|preload|loadlib|loaded|"+ + "loaders|cpath|config|path|seeall|exit|setlocale|date|"+ + "getenv|difftime|remove|time|clock|tmpname|rename|execute|"+ + "lines|write|close|flush|open|output|type|read|stderr|"+ + "stdin|input|stdout|popen|tmpfile|log|max|acos|huge|"+ + "ldexp|pi|cos|tanh|pow|deg|tan|cosh|sinh|random|randomseed|"+ + "frexp|ceil|floor|rad|abs|sqrt|modf|asin|min|mod|fmod|log10|"+ + "atan2|exp|sin|atan|getupvalue|debug|sethook|getmetatable|"+ + "gethook|setmetatable|setlocal|traceback|setfenv|getinfo|"+ + "setupvalue|getlocal|getregistry|getfenv|setn|insert|getn|"+ + "foreachi|maxn|foreach|concat|sort|remove|resume|yield|"+ + "status|wrap|create|running|"+ + "__add|__sub|__mod|__unm|__concat|__lt|__index|__call|__gc|__metatable|"+ + "__mul|__div|__pow|__len|__eq|__le|__newindex|__tostring|__mode|__tonumber" + ); + + var stdLibaries = ("string|package|os|io|math|debug|table|coroutine"); + + var deprecatedIn5152 = ("setn|foreach|foreachi|gcinfo|log10|maxn"); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "support.function": functions, + "keyword.deprecated": deprecatedIn5152, + "constant.library": stdLibaries, + "constant.language": builtinConstants, + "variable.language": "self" + }, "identifier"); + + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var integer = "(?:" + decimalInteger + "|" + hexInteger + ")"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var floatNumber = "(?:" + pointFloat + ")"; + + this.$rules = { + "start" : [{ + stateName: "bracketedComment", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length - 2, currentState); + return "comment"; + }, + regex : /\-\-\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "comment"; + }, + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "comment" + } + ] + }, + + { + token : "comment", + regex : "\\-\\-.*$" + }, + { + stateName: "bracketedString", + onMatch : function(value, currentState, stack){ + stack.unshift(this.next, value.length, currentState); + return "string.start"; + }, + regex : /\[=*\[/, + next : [ + { + onMatch : function(value, currentState, stack) { + if (value.length == stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack.shift(); + } else { + this.next = ""; + } + return "string.end"; + }, + + regex : /\]=*\]/, + next : "start" + }, { + defaultToken : "string" + } + ] + }, + { + token : "string", // " string + regex : '"(?:[^\\\\]|\\\\.)*?"' + }, { + token : "string", // ' string + regex : "'(?:[^\\\\]|\\\\.)*?'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\/|%|\\#|\\^|~|<|>|<=|=>|==|~=|=|\\:|\\.\\.\\.|\\.\\." + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]\\)\\}]" + }, { + token : "text", + regex : "\\s+|\\w+" + } ] + }; + + this.normalizeRules(); +}; + +oop.inherits(LuaHighlightRules, TextHighlightRules); + +exports.LuaHighlightRules = LuaHighlightRules; +}); + +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var PythonHighlightRules = function() { + + var keywords = ( + "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield|async|await|nonlocal" + ); + + var builtinConstants = ( + "True|False|None|NotImplemented|Ellipsis|__debug__" + ); + + var builtinFunctions = ( + "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "variable.language": "self|cls", + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + + this.$rules = { + "start" : [ { + token : "comment", + regex : "#.*$" + }, { + token : "string", // multi line """ string start + regex : strPre + '"{3}', + next : "qqstring3" + }, { + token : "string", // " string + regex : strPre + '"(?=.)', + next : "qqstring" + }, { + token : "string", // multi line ''' string start + regex : strPre + "'{3}", + next : "qstring3" + }, { + token : "string", // ' string + regex : strPre + "'(?=.)", + next : "qstring" + }, { + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" + }, { + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" + }, { + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" + }, { + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" + }, { + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" + }, { + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" + }, { + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" + }, { + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + },{ + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" + }, { + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" + }, { + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" + }, { + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{//TODO: nested {} + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'(.)*'" + }, { + token: "string", + regex: '"(.)*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + },{ + token: 'paren.rparen', + regex: "}", + next: 'pop' + },{ + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"],// method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; + +oop.inherits(PythonHighlightRules, TextHighlightRules); + +exports.PythonHighlightRules = PythonHighlightRules; +}); + +define("ace/mode/csound_orchestra_highlight_rules",["require","exports","module","ace/lib/lang","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules","ace/mode/csound_score_highlight_rules","ace/mode/lua_highlight_rules","ace/mode/python_highlight_rules"], function(require, exports, module) { +"use strict"; + +var lang = require("../lib/lang"); +var oop = require("../lib/oop"); + +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; +var LuaHighlightRules = require("./lua_highlight_rules").LuaHighlightRules; +var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; + +var CsoundOrchestraHighlightRules = function(embeddedRulePrefix) { + + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + var opcodes = [ + "ATSadd", + "ATSaddnz", + "ATSbufread", + "ATScross", + "ATSinfo", + "ATSinterpread", + "ATSpartialtap", + "ATSread", + "ATSreadnz", + "ATSsinnoi", + "FLbox", + "FLbutBank", + "FLbutton", + "FLcloseButton", + "FLcolor", + "FLcolor2", + "FLcount", + "FLexecButton", + "FLgetsnap", + "FLgroup", + "FLgroupEnd", + "FLgroup_end", + "FLhide", + "FLhvsBox", + "FLhvsBoxSetValue", + "FLjoy", + "FLkeyIn", + "FLknob", + "FLlabel", + "FLloadsnap", + "FLmouse", + "FLpack", + "FLpackEnd", + "FLpack_end", + "FLpanel", + "FLpanelEnd", + "FLpanel_end", + "FLprintk", + "FLprintk2", + "FLroller", + "FLrun", + "FLsavesnap", + "FLscroll", + "FLscrollEnd", + "FLscroll_end", + "FLsetAlign", + "FLsetBox", + "FLsetColor", + "FLsetColor2", + "FLsetFont", + "FLsetPosition", + "FLsetSize", + "FLsetSnapGroup", + "FLsetText", + "FLsetTextColor", + "FLsetTextSize", + "FLsetTextType", + "FLsetVal", + "FLsetVal_i", + "FLsetVali", + "FLsetsnap", + "FLshow", + "FLslidBnk", + "FLslidBnk2", + "FLslidBnk2Set", + "FLslidBnk2Setk", + "FLslidBnkGetHandle", + "FLslidBnkSet", + "FLslidBnkSetk", + "FLslider", + "FLtabs", + "FLtabsEnd", + "FLtabs_end", + "FLtext", + "FLupdate", + "FLvalue", + "FLvkeybd", + "FLvslidBnk", + "FLvslidBnk2", + "FLxyin", + "JackoAudioIn", + "JackoAudioInConnect", + "JackoAudioOut", + "JackoAudioOutConnect", + "JackoFreewheel", + "JackoInfo", + "JackoInit", + "JackoMidiInConnect", + "JackoMidiOut", + "JackoMidiOutConnect", + "JackoNoteOut", + "JackoOn", + "JackoTransport", + "K35_hpf", + "K35_lpf", + "MixerClear", + "MixerGetLevel", + "MixerReceive", + "MixerSend", + "MixerSetLevel", + "MixerSetLevel_i", + "OSCbundle", + "OSCcount", + "OSCinit", + "OSCinitM", + "OSClisten", + "OSCraw", + "OSCsend", + "OSCsend_lo", + "S", + "STKBandedWG", + "STKBeeThree", + "STKBlowBotl", + "STKBlowHole", + "STKBowed", + "STKBrass", + "STKClarinet", + "STKDrummer", + "STKFMVoices", + "STKFlute", + "STKHevyMetl", + "STKMandolin", + "STKModalBar", + "STKMoog", + "STKPercFlut", + "STKPlucked", + "STKResonate", + "STKRhodey", + "STKSaxofony", + "STKShakers", + "STKSimple", + "STKSitar", + "STKStifKarp", + "STKTubeBell", + "STKVoicForm", + "STKWhistle", + "STKWurley", + "a", + "abs", + "active", + "adsr", + "adsyn", + "adsynt", + "adsynt2", + "aftouch", + "alpass", + "alwayson", + "ampdb", + "ampdbfs", + "ampmidi", + "ampmidid", + "areson", + "aresonk", + "atone", + "atonek", + "atonex", + "babo", + "balance", + "balance2", + "bamboo", + "barmodel", + "bbcutm", + "bbcuts", + "beadsynt", + "beosc", + "betarand", + "bexprnd", + "bformdec1", + "bformenc1", + "binit", + "biquad", + "biquada", + "birnd", + "bpf", + "bpfcos", + "bqrez", + "butbp", + "butbr", + "buthp", + "butlp", + "butterbp", + "butterbr", + "butterhp", + "butterlp", + "button", + "buzz", + "c2r", + "cabasa", + "cauchy", + "cauchyi", + "cbrt", + "ceil", + "cell", + "cent", + "centroid", + "ceps", + "cepsinv", + "chanctrl", + "changed", + "changed2", + "chani", + "chano", + "chebyshevpoly", + "checkbox", + "chn_S", + "chn_a", + "chn_k", + "chnclear", + "chnexport", + "chnget", + "chngetks", + "chnmix", + "chnparams", + "chnset", + "chnsetks", + "chuap", + "clear", + "clfilt", + "clip", + "clockoff", + "clockon", + "cmp", + "cmplxprod", + "comb", + "combinv", + "compilecsd", + "compileorc", + "compilestr", + "compress", + "compress2", + "connect", + "control", + "convle", + "convolve", + "copya2ftab", + "copyf2array", + "cos", + "cosh", + "cosinv", + "cosseg", + "cossegb", + "cossegr", + "cps2pch", + "cpsmidi", + "cpsmidib", + "cpsmidinn", + "cpsoct", + "cpspch", + "cpstmid", + "cpstun", + "cpstuni", + "cpsxpch", + "cpumeter", + "cpuprc", + "cross2", + "crossfm", + "crossfmi", + "crossfmpm", + "crossfmpmi", + "crosspm", + "crosspmi", + "crunch", + "ctlchn", + "ctrl14", + "ctrl21", + "ctrl7", + "ctrlinit", + "cuserrnd", + "dam", + "date", + "dates", + "db", + "dbamp", + "dbfsamp", + "dcblock", + "dcblock2", + "dconv", + "dct", + "dctinv", + "deinterleave", + "delay", + "delay1", + "delayk", + "delayr", + "delayw", + "deltap", + "deltap3", + "deltapi", + "deltapn", + "deltapx", + "deltapxw", + "denorm", + "diff", + "diode_ladder", + "directory", + "diskgrain", + "diskin", + "diskin2", + "dispfft", + "display", + "distort", + "distort1", + "divz", + "doppler", + "dot", + "downsamp", + "dripwater", + "dssiactivate", + "dssiaudio", + "dssictls", + "dssiinit", + "dssilist", + "dumpk", + "dumpk2", + "dumpk3", + "dumpk4", + "duserrnd", + "dust", + "dust2", + "envlpx", + "envlpxr", + "ephasor", + "eqfil", + "evalstr", + "event", + "event_i", + "exciter", + "exitnow", + "exp", + "expcurve", + "expon", + "exprand", + "exprandi", + "expseg", + "expsega", + "expsegb", + "expsegba", + "expsegr", + "fareylen", + "fareyleni", + "faustaudio", + "faustcompile", + "faustctl", + "faustdsp", + "faustgen", + "faustplay", + "fft", + "fftinv", + "ficlose", + "filebit", + "filelen", + "filenchnls", + "filepeak", + "filescal", + "filesr", + "filevalid", + "fillarray", + "filter2", + "fin", + "fini", + "fink", + "fiopen", + "flanger", + "flashtxt", + "flooper", + "flooper2", + "floor", + "fmanal", + "fmax", + "fmb3", + "fmbell", + "fmin", + "fmmetal", + "fmod", + "fmpercfl", + "fmrhode", + "fmvoice", + "fmwurlie", + "fof", + "fof2", + "fofilter", + "fog", + "fold", + "follow", + "follow2", + "foscil", + "foscili", + "fout", + "fouti", + "foutir", + "foutk", + "fprintks", + "fprints", + "frac", + "fractalnoise", + "framebuffer", + "freeverb", + "ftaudio", + "ftchnls", + "ftconv", + "ftcps", + "ftfree", + "ftgen", + "ftgenonce", + "ftgentmp", + "ftlen", + "ftload", + "ftloadk", + "ftlptim", + "ftmorf", + "ftom", + "ftprint", + "ftresize", + "ftresizei", + "ftsamplebank", + "ftsave", + "ftsavek", + "ftslice", + "ftsr", + "gain", + "gainslider", + "gauss", + "gaussi", + "gausstrig", + "gbuzz", + "genarray", + "genarray_i", + "gendy", + "gendyc", + "gendyx", + "getcfg", + "getcol", + "getftargs", + "getrow", + "getrowlin", + "getseed", + "gogobel", + "grain", + "grain2", + "grain3", + "granule", + "guiro", + "harmon", + "harmon2", + "harmon3", + "harmon4", + "hdf5read", + "hdf5write", + "hilbert", + "hilbert2", + "hrtfearly", + "hrtfmove", + "hrtfmove2", + "hrtfreverb", + "hrtfstat", + "hsboscil", + "hvs1", + "hvs2", + "hvs3", + "hypot", + "i", + "ihold", + "imagecreate", + "imagefree", + "imagegetpixel", + "imageload", + "imagesave", + "imagesetpixel", + "imagesize", + "in", + "in32", + "inch", + "inh", + "init", + "initc14", + "initc21", + "initc7", + "inleta", + "inletf", + "inletk", + "inletkid", + "inletv", + "ino", + "inq", + "inrg", + "ins", + "insglobal", + "insremot", + "int", + "integ", + "interleave", + "interp", + "invalue", + "inx", + "inz", + "jacktransport", + "jitter", + "jitter2", + "joystick", + "jspline", + "k", + "la_i_add_mc", + "la_i_add_mr", + "la_i_add_vc", + "la_i_add_vr", + "la_i_assign_mc", + "la_i_assign_mr", + "la_i_assign_t", + "la_i_assign_vc", + "la_i_assign_vr", + "la_i_conjugate_mc", + "la_i_conjugate_mr", + "la_i_conjugate_vc", + "la_i_conjugate_vr", + "la_i_distance_vc", + "la_i_distance_vr", + "la_i_divide_mc", + "la_i_divide_mr", + "la_i_divide_vc", + "la_i_divide_vr", + "la_i_dot_mc", + "la_i_dot_mc_vc", + "la_i_dot_mr", + "la_i_dot_mr_vr", + "la_i_dot_vc", + "la_i_dot_vr", + "la_i_get_mc", + "la_i_get_mr", + "la_i_get_vc", + "la_i_get_vr", + "la_i_invert_mc", + "la_i_invert_mr", + "la_i_lower_solve_mc", + "la_i_lower_solve_mr", + "la_i_lu_det_mc", + "la_i_lu_det_mr", + "la_i_lu_factor_mc", + "la_i_lu_factor_mr", + "la_i_lu_solve_mc", + "la_i_lu_solve_mr", + "la_i_mc_create", + "la_i_mc_set", + "la_i_mr_create", + "la_i_mr_set", + "la_i_multiply_mc", + "la_i_multiply_mr", + "la_i_multiply_vc", + "la_i_multiply_vr", + "la_i_norm1_mc", + "la_i_norm1_mr", + "la_i_norm1_vc", + "la_i_norm1_vr", + "la_i_norm_euclid_mc", + "la_i_norm_euclid_mr", + "la_i_norm_euclid_vc", + "la_i_norm_euclid_vr", + "la_i_norm_inf_mc", + "la_i_norm_inf_mr", + "la_i_norm_inf_vc", + "la_i_norm_inf_vr", + "la_i_norm_max_mc", + "la_i_norm_max_mr", + "la_i_print_mc", + "la_i_print_mr", + "la_i_print_vc", + "la_i_print_vr", + "la_i_qr_eigen_mc", + "la_i_qr_eigen_mr", + "la_i_qr_factor_mc", + "la_i_qr_factor_mr", + "la_i_qr_sym_eigen_mc", + "la_i_qr_sym_eigen_mr", + "la_i_random_mc", + "la_i_random_mr", + "la_i_random_vc", + "la_i_random_vr", + "la_i_size_mc", + "la_i_size_mr", + "la_i_size_vc", + "la_i_size_vr", + "la_i_subtract_mc", + "la_i_subtract_mr", + "la_i_subtract_vc", + "la_i_subtract_vr", + "la_i_t_assign", + "la_i_trace_mc", + "la_i_trace_mr", + "la_i_transpose_mc", + "la_i_transpose_mr", + "la_i_upper_solve_mc", + "la_i_upper_solve_mr", + "la_i_vc_create", + "la_i_vc_set", + "la_i_vr_create", + "la_i_vr_set", + "la_k_a_assign", + "la_k_add_mc", + "la_k_add_mr", + "la_k_add_vc", + "la_k_add_vr", + "la_k_assign_a", + "la_k_assign_f", + "la_k_assign_mc", + "la_k_assign_mr", + "la_k_assign_t", + "la_k_assign_vc", + "la_k_assign_vr", + "la_k_conjugate_mc", + "la_k_conjugate_mr", + "la_k_conjugate_vc", + "la_k_conjugate_vr", + "la_k_current_f", + "la_k_current_vr", + "la_k_distance_vc", + "la_k_distance_vr", + "la_k_divide_mc", + "la_k_divide_mr", + "la_k_divide_vc", + "la_k_divide_vr", + "la_k_dot_mc", + "la_k_dot_mc_vc", + "la_k_dot_mr", + "la_k_dot_mr_vr", + "la_k_dot_vc", + "la_k_dot_vr", + "la_k_f_assign", + "la_k_get_mc", + "la_k_get_mr", + "la_k_get_vc", + "la_k_get_vr", + "la_k_invert_mc", + "la_k_invert_mr", + "la_k_lower_solve_mc", + "la_k_lower_solve_mr", + "la_k_lu_det_mc", + "la_k_lu_det_mr", + "la_k_lu_factor_mc", + "la_k_lu_factor_mr", + "la_k_lu_solve_mc", + "la_k_lu_solve_mr", + "la_k_mc_set", + "la_k_mr_set", + "la_k_multiply_mc", + "la_k_multiply_mr", + "la_k_multiply_vc", + "la_k_multiply_vr", + "la_k_norm1_mc", + "la_k_norm1_mr", + "la_k_norm1_vc", + "la_k_norm1_vr", + "la_k_norm_euclid_mc", + "la_k_norm_euclid_mr", + "la_k_norm_euclid_vc", + "la_k_norm_euclid_vr", + "la_k_norm_inf_mc", + "la_k_norm_inf_mr", + "la_k_norm_inf_vc", + "la_k_norm_inf_vr", + "la_k_norm_max_mc", + "la_k_norm_max_mr", + "la_k_qr_eigen_mc", + "la_k_qr_eigen_mr", + "la_k_qr_factor_mc", + "la_k_qr_factor_mr", + "la_k_qr_sym_eigen_mc", + "la_k_qr_sym_eigen_mr", + "la_k_random_mc", + "la_k_random_mr", + "la_k_random_vc", + "la_k_random_vr", + "la_k_subtract_mc", + "la_k_subtract_mr", + "la_k_subtract_vc", + "la_k_subtract_vr", + "la_k_t_assign", + "la_k_trace_mc", + "la_k_trace_mr", + "la_k_upper_solve_mc", + "la_k_upper_solve_mr", + "la_k_vc_set", + "la_k_vr_set", + "lenarray", + "lfo", + "limit", + "limit1", + "lincos", + "line", + "linen", + "linenr", + "lineto", + "link_beat_force", + "link_beat_get", + "link_beat_request", + "link_create", + "link_enable", + "link_is_enabled", + "link_metro", + "link_peers", + "link_tempo_get", + "link_tempo_set", + "linlin", + "linrand", + "linseg", + "linsegb", + "linsegr", + "liveconv", + "locsend", + "locsig", + "log", + "log10", + "log2", + "logbtwo", + "logcurve", + "loopseg", + "loopsegp", + "looptseg", + "loopxseg", + "lorenz", + "loscil", + "loscil3", + "loscil3phs", + "loscilphs", + "loscilx", + "lowpass2", + "lowres", + "lowresx", + "lpf18", + "lpform", + "lpfreson", + "lphasor", + "lpinterp", + "lposcil", + "lposcil3", + "lposcila", + "lposcilsa", + "lposcilsa2", + "lpread", + "lpreson", + "lpshold", + "lpsholdp", + "lpslot", + "lua_exec", + "lua_iaopcall", + "lua_iaopcall_off", + "lua_ikopcall", + "lua_ikopcall_off", + "lua_iopcall", + "lua_iopcall_off", + "lua_opdef", + "mac", + "maca", + "madsr", + "mags", + "mandel", + "mandol", + "maparray", + "maparray_i", + "marimba", + "massign", + "max", + "max_k", + "maxabs", + "maxabsaccum", + "maxaccum", + "maxalloc", + "maxarray", + "mclock", + "mdelay", + "median", + "mediank", + "metro", + "mfb", + "midglobal", + "midiarp", + "midic14", + "midic21", + "midic7", + "midichannelaftertouch", + "midichn", + "midicontrolchange", + "midictrl", + "mididefault", + "midifilestatus", + "midiin", + "midinoteoff", + "midinoteoncps", + "midinoteonkey", + "midinoteonoct", + "midinoteonpch", + "midion", + "midion2", + "midiout", + "midiout_i", + "midipgm", + "midipitchbend", + "midipolyaftertouch", + "midiprogramchange", + "miditempo", + "midremot", + "min", + "minabs", + "minabsaccum", + "minaccum", + "minarray", + "mincer", + "mirror", + "mode", + "modmatrix", + "monitor", + "moog", + "moogladder", + "moogladder2", + "moogvcf", + "moogvcf2", + "moscil", + "mp3bitrate", + "mp3in", + "mp3len", + "mp3nchnls", + "mp3scal", + "mp3sr", + "mpulse", + "mrtmsg", + "mtof", + "mton", + "multitap", + "mute", + "mvchpf", + "mvclpf1", + "mvclpf2", + "mvclpf3", + "mvclpf4", + "mxadsr", + "nchnls_hw", + "nestedap", + "nlalp", + "nlfilt", + "nlfilt2", + "noise", + "noteoff", + "noteon", + "noteondur", + "noteondur2", + "notnum", + "nreverb", + "nrpn", + "nsamp", + "nstance", + "nstrnum", + "ntom", + "ntrpol", + "nxtpow2", + "octave", + "octcps", + "octmidi", + "octmidib", + "octmidinn", + "octpch", + "olabuffer", + "oscbnk", + "oscil", + "oscil1", + "oscil1i", + "oscil3", + "oscili", + "oscilikt", + "osciliktp", + "oscilikts", + "osciln", + "oscils", + "oscilx", + "out", + "out32", + "outc", + "outch", + "outh", + "outiat", + "outic", + "outic14", + "outipat", + "outipb", + "outipc", + "outkat", + "outkc", + "outkc14", + "outkpat", + "outkpb", + "outkpc", + "outleta", + "outletf", + "outletk", + "outletkid", + "outletv", + "outo", + "outq", + "outq1", + "outq2", + "outq3", + "outq4", + "outrg", + "outs", + "outs1", + "outs2", + "outvalue", + "outx", + "outz", + "p", + "p5gconnect", + "p5gdata", + "pan", + "pan2", + "pareq", + "part2txt", + "partials", + "partikkel", + "partikkelget", + "partikkelset", + "partikkelsync", + "passign", + "paulstretch", + "pcauchy", + "pchbend", + "pchmidi", + "pchmidib", + "pchmidinn", + "pchoct", + "pchtom", + "pconvolve", + "pcount", + "pdclip", + "pdhalf", + "pdhalfy", + "peak", + "pgmassign", + "pgmchn", + "phaser1", + "phaser2", + "phasor", + "phasorbnk", + "phs", + "pindex", + "pinker", + "pinkish", + "pitch", + "pitchac", + "pitchamdf", + "planet", + "platerev", + "plltrack", + "pluck", + "poisson", + "pol2rect", + "polyaft", + "polynomial", + "port", + "portk", + "poscil", + "poscil3", + "pow", + "powershape", + "powoftwo", + "pows", + "prealloc", + "prepiano", + "print", + "print_type", + "printarray", + "printf", + "printf_i", + "printk", + "printk2", + "printks", + "printks2", + "prints", + "product", + "pset", + "ptable", + "ptable3", + "ptablei", + "ptableiw", + "ptablew", + "ptrack", + "puts", + "pvadd", + "pvbufread", + "pvcross", + "pvinterp", + "pvoc", + "pvread", + "pvs2array", + "pvs2tab", + "pvsadsyn", + "pvsanal", + "pvsarp", + "pvsbandp", + "pvsbandr", + "pvsbin", + "pvsblur", + "pvsbuffer", + "pvsbufread", + "pvsbufread2", + "pvscale", + "pvscent", + "pvsceps", + "pvscross", + "pvsdemix", + "pvsdiskin", + "pvsdisp", + "pvsenvftw", + "pvsfilter", + "pvsfread", + "pvsfreeze", + "pvsfromarray", + "pvsftr", + "pvsftw", + "pvsfwrite", + "pvsgain", + "pvshift", + "pvsifd", + "pvsin", + "pvsinfo", + "pvsinit", + "pvslock", + "pvsmaska", + "pvsmix", + "pvsmooth", + "pvsmorph", + "pvsosc", + "pvsout", + "pvspitch", + "pvstanal", + "pvstencil", + "pvstrace", + "pvsvoc", + "pvswarp", + "pvsynth", + "pwd", + "pyassign", + "pyassigni", + "pyassignt", + "pycall", + "pycall1", + "pycall1i", + "pycall1t", + "pycall2", + "pycall2i", + "pycall2t", + "pycall3", + "pycall3i", + "pycall3t", + "pycall4", + "pycall4i", + "pycall4t", + "pycall5", + "pycall5i", + "pycall5t", + "pycall6", + "pycall6i", + "pycall6t", + "pycall7", + "pycall7i", + "pycall7t", + "pycall8", + "pycall8i", + "pycall8t", + "pycalli", + "pycalln", + "pycallni", + "pycallt", + "pyeval", + "pyevali", + "pyevalt", + "pyexec", + "pyexeci", + "pyexect", + "pyinit", + "pylassign", + "pylassigni", + "pylassignt", + "pylcall", + "pylcall1", + "pylcall1i", + "pylcall1t", + "pylcall2", + "pylcall2i", + "pylcall2t", + "pylcall3", + "pylcall3i", + "pylcall3t", + "pylcall4", + "pylcall4i", + "pylcall4t", + "pylcall5", + "pylcall5i", + "pylcall5t", + "pylcall6", + "pylcall6i", + "pylcall6t", + "pylcall7", + "pylcall7i", + "pylcall7t", + "pylcall8", + "pylcall8i", + "pylcall8t", + "pylcalli", + "pylcalln", + "pylcallni", + "pylcallt", + "pyleval", + "pylevali", + "pylevalt", + "pylexec", + "pylexeci", + "pylexect", + "pylrun", + "pylruni", + "pylrunt", + "pyrun", + "pyruni", + "pyrunt", + "qinf", + "qnan", + "r2c", + "rand", + "randh", + "randi", + "random", + "randomh", + "randomi", + "rbjeq", + "readclock", + "readf", + "readfi", + "readk", + "readk2", + "readk3", + "readk4", + "readks", + "readscore", + "readscratch", + "rect2pol", + "release", + "remoteport", + "remove", + "repluck", + "reshapearray", + "reson", + "resonk", + "resonr", + "resonx", + "resonxk", + "resony", + "resonz", + "resyn", + "reverb", + "reverb2", + "reverbsc", + "rewindscore", + "rezzy", + "rfft", + "rifft", + "rms", + "rnd", + "rnd31", + "round", + "rspline", + "rtclock", + "s16b14", + "s32b14", + "samphold", + "sandpaper", + "sc_lag", + "sc_lagud", + "sc_phasor", + "sc_trig", + "scale", + "scalearray", + "scanhammer", + "scans", + "scantable", + "scanu", + "schedkwhen", + "schedkwhennamed", + "schedule", + "schedwhen", + "scoreline", + "scoreline_i", + "seed", + "sekere", + "select", + "semitone", + "sense", + "sensekey", + "seqtime", + "seqtime2", + "serialBegin", + "serialEnd", + "serialFlush", + "serialPrint", + "serialRead", + "serialWrite", + "serialWrite_i", + "setcol", + "setctrl", + "setksmps", + "setrow", + "setscorepos", + "sfilist", + "sfinstr", + "sfinstr3", + "sfinstr3m", + "sfinstrm", + "sfload", + "sflooper", + "sfpassign", + "sfplay", + "sfplay3", + "sfplay3m", + "sfplaym", + "sfplist", + "sfpreset", + "shaker", + "shiftin", + "shiftout", + "signum", + "sin", + "sinh", + "sininv", + "sinsyn", + "sleighbells", + "slicearray", + "slicearray_i", + "slider16", + "slider16f", + "slider16table", + "slider16tablef", + "slider32", + "slider32f", + "slider32table", + "slider32tablef", + "slider64", + "slider64f", + "slider64table", + "slider64tablef", + "slider8", + "slider8f", + "slider8table", + "slider8tablef", + "sliderKawai", + "sndloop", + "sndwarp", + "sndwarpst", + "sockrecv", + "sockrecvs", + "socksend", + "socksends", + "sorta", + "sortd", + "soundin", + "space", + "spat3d", + "spat3di", + "spat3dt", + "spdist", + "splitrig", + "sprintf", + "sprintfk", + "spsend", + "sqrt", + "squinewave", + "statevar", + "stix", + "strcat", + "strcatk", + "strchar", + "strchark", + "strcmp", + "strcmpk", + "strcpy", + "strcpyk", + "strecv", + "streson", + "strfromurl", + "strget", + "strindex", + "strindexk", + "strlen", + "strlenk", + "strlower", + "strlowerk", + "strrindex", + "strrindexk", + "strset", + "strsub", + "strsubk", + "strtod", + "strtodk", + "strtol", + "strtolk", + "strupper", + "strupperk", + "stsend", + "subinstr", + "subinstrinit", + "sum", + "sumarray", + "svfilter", + "syncgrain", + "syncloop", + "syncphasor", + "system", + "system_i", + "tab", + "tab2array", + "tab2pvs", + "tab_i", + "tabifd", + "table", + "table3", + "table3kt", + "tablecopy", + "tablefilter", + "tablefilteri", + "tablegpw", + "tablei", + "tableicopy", + "tableigpw", + "tableikt", + "tableimix", + "tableiw", + "tablekt", + "tablemix", + "tableng", + "tablera", + "tableseg", + "tableshuffle", + "tableshufflei", + "tablew", + "tablewa", + "tablewkt", + "tablexkt", + "tablexseg", + "tabmorph", + "tabmorpha", + "tabmorphak", + "tabmorphi", + "tabplay", + "tabrec", + "tabrowlin", + "tabsum", + "tabw", + "tabw_i", + "tambourine", + "tan", + "tanh", + "taninv", + "taninv2", + "tbvcf", + "tempest", + "tempo", + "temposcal", + "tempoval", + "timedseq", + "timeinstk", + "timeinsts", + "timek", + "times", + "tival", + "tlineto", + "tone", + "tonek", + "tonex", + "tradsyn", + "trandom", + "transeg", + "transegb", + "transegr", + "trcross", + "trfilter", + "trhighest", + "trigger", + "trigseq", + "trim", + "trim_i", + "trirand", + "trlowest", + "trmix", + "trscale", + "trshift", + "trsplit", + "turnoff", + "turnoff2", + "turnon", + "tvconv", + "unirand", + "unwrap", + "upsamp", + "urandom", + "urd", + "vactrol", + "vadd", + "vadd_i", + "vaddv", + "vaddv_i", + "vaget", + "valpass", + "vaset", + "vbap", + "vbapg", + "vbapgmove", + "vbaplsinit", + "vbapmove", + "vbapz", + "vbapzmove", + "vcella", + "vco", + "vco2", + "vco2ft", + "vco2ift", + "vco2init", + "vcomb", + "vcopy", + "vcopy_i", + "vdel_k", + "vdelay", + "vdelay3", + "vdelayk", + "vdelayx", + "vdelayxq", + "vdelayxs", + "vdelayxw", + "vdelayxwq", + "vdelayxws", + "vdivv", + "vdivv_i", + "vecdelay", + "veloc", + "vexp", + "vexp_i", + "vexpseg", + "vexpv", + "vexpv_i", + "vibes", + "vibr", + "vibrato", + "vincr", + "vlimit", + "vlinseg", + "vlowres", + "vmap", + "vmirror", + "vmult", + "vmult_i", + "vmultv", + "vmultv_i", + "voice", + "vosim", + "vphaseseg", + "vport", + "vpow", + "vpow_i", + "vpowv", + "vpowv_i", + "vpvoc", + "vrandh", + "vrandi", + "vsubv", + "vsubv_i", + "vtaba", + "vtabi", + "vtabk", + "vtable1k", + "vtablea", + "vtablei", + "vtablek", + "vtablewa", + "vtablewi", + "vtablewk", + "vtabwa", + "vtabwi", + "vtabwk", + "vwrap", + "waveset", + "websocket", + "weibull", + "wgbow", + "wgbowedbar", + "wgbrass", + "wgclar", + "wgflute", + "wgpluck", + "wgpluck2", + "wguide1", + "wguide2", + "wiiconnect", + "wiidata", + "wiirange", + "wiisend", + "window", + "wrap", + "writescratch", + "wterrain", + "xadsr", + "xin", + "xout", + "xscanmap", + "xscans", + "xscansmap", + "xscanu", + "xtratim", + "xyscale", + "zacl", + "zakinit", + "zamod", + "zar", + "zarg", + "zaw", + "zawm", + "zdf_1pole", + "zdf_1pole_mode", + "zdf_2pole", + "zdf_2pole_mode", + "zdf_ladder", + "zfilter2", + "zir", + "ziw", + "ziwm", + "zkcl", + "zkmod", + "zkr", + "zkw", + "zkwm" + ]; + var deprecatedOpcodes = [ + "array", + "bformdec", + "bformenc", + "copy2ftab", + "copy2ttab", + "hrtfer", + "ktableseg", + "lentab", + "maxtab", + "mintab", + "pop", + "pop_f", + "push", + "push_f", + "scalet", + "sndload", + "soundout", + "soundouts", + "specaddm", + "specdiff", + "specdisp", + "specfilt", + "spechist", + "specptrk", + "specscal", + "specsum", + "spectrum", + "stack", + "sumtab", + "tabgen", + "tabmap", + "tabmap_i", + "tabslice", + "tb0", + "tb0_init", + "tb1", + "tb10", + "tb10_init", + "tb11", + "tb11_init", + "tb12", + "tb12_init", + "tb13", + "tb13_init", + "tb14", + "tb14_init", + "tb15", + "tb15_init", + "tb1_init", + "tb2", + "tb2_init", + "tb3", + "tb3_init", + "tb4", + "tb4_init", + "tb5", + "tb5_init", + "tb6", + "tb6_init", + "tb7", + "tb7_init", + "tb8", + "tb8_init", + "tb9", + "tb9_init", + "vbap16", + "vbap4", + "vbap4move", + "vbap8", + "vbap8move", + "xyin" + ]; + + opcodes = lang.arrayToMap(opcodes); + deprecatedOpcodes = lang.arrayToMap(deprecatedOpcodes); + + this.lineContinuations = [ + { + token : "constant.character.escape.line-continuation.csound", + regex : /\\$/ + }, this.pushRule({ + token : "constant.character.escape.line-continuation.csound", + regex : /\\/, + next : "line continuation" + }) + ]; + + this.comments.push(this.lineContinuations); + + this.quotedStringContents.push( + this.lineContinuations, + { + token : "invalid.illegal", + regex : /[^"\\]*$/ + } + ); + + var start = this.$rules.start; + start.splice(1, 0, { + token : ["text.csound", "entity.name.label.csound", "entity.punctuation.label.csound", "text.csound"], + regex : /^([ \t]*)(\w+)(:)([ \t]+|$)/ + }); + start.push( + this.pushRule({ + token : "keyword.function.csound", + regex : /\binstr\b/, + next : "instrument numbers and identifiers" + }), this.pushRule({ + token : "keyword.function.csound", + regex : /\bopcode\b/, + next : "after opcode keyword" + }), { + token : "keyword.other.csound", + regex : /\bend(?:in|op)\b/ + }, + + { + token : "variable.language.csound", + regex : /\b(?:0dbfs|A4|k(?:r|smps)|nchnls(?:_i)?|sr)\b/ + }, + + this.numbers, + + { + token : "keyword.operator.csound", + regex : "\\+=|-=|\\*=|/=|<<|>>|<=|>=|==|!=|&&|\\|\\||[~¬]|[=!+\\-*/^%&|<>#?:]" + }, + + this.pushRule({ + token : "punctuation.definition.string.begin.csound", + regex : /"/, + next : "quoted string" + }), this.pushRule({ + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "braced string" + }), + + { + token : "keyword.control.csound", + regex : /\b(?:do|else(?:if)?|end(?:if|until)|fi|i(?:f|then)|kthen|od|r(?:ir)?eturn|then|until|while)\b/ + }, + + this.pushRule({ + token : "keyword.control.csound", + regex : /\b[ik]?goto\b/, + next : "goto before label" + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\b(?:r(?:einit|igoto)|tigoto)\b/, + next : "goto before label" + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\bc(?:g|in?|k|nk?)goto\b/, + next : ["goto before label", "goto before argument"] + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\btimout\b/, + next : ["goto before label", "goto before argument", "goto before argument"] + }), this.pushRule({ + token : "keyword.control.csound", + regex : /\bloop_[gl][et]\b/, + next : ["goto before label", "goto before argument", "goto before argument", "goto before argument"] + }), + + this.pushRule({ + token : "support.function.csound", + regex : /\b(?:readscore|scoreline(?:_i)?)\b/, + next : "Csound score opcode" + }), this.pushRule({ + token : "support.function.csound", + regex : /\bpyl?run[it]?\b(?!$)/, + next : "Python opcode" + }), this.pushRule({ + token : "support.function.csound", + regex : /\blua_(?:exec|opdef)\b(?!$)/, + next : "Lua opcode" + }), + + { + token : "support.variable.csound", + regex : /\bp\d+\b/ + }, { + regex : /\b([A-Z_a-z]\w*)(?:(:)([A-Za-z]))?\b/, onMatch: function(value, currentState, stack, line) { + var tokens = value.split(this.splitRegex); + var name = tokens[1]; + var type; + if (opcodes.hasOwnProperty(name)) + type = "support.function.csound"; + else if (deprecatedOpcodes.hasOwnProperty(name)) + type = "invalid.deprecated.csound"; + if (type) { + if (tokens[2]) { + return [ + {type: type, value: name}, + {type: "punctuation.type-annotation.csound", value: tokens[2]}, + {type: "type-annotation.storage.type.csound", value: tokens[3]} + ]; + } + return type; + } + return "text.csound"; + } + } + ); + + this.$rules["macro parameter value list"].splice(2, 0, { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "macro parameter value braced string" + }); + + var scoreHighlightRules = new CsoundScoreHighlightRules("csound-score-"); + + this.addRules({ + "macro parameter value braced string": [ + { + token : "constant.character.escape.csound", + regex : /\\[#'()]/ + }, { + token : "invalid.illegal.csound.csound", + regex : /[#'()]/ + }, { + token : "punctuation.definition.string.end.csound", + regex : /}}/, + next : "macro parameter value list" + }, { + defaultToken: "string.braced.csound" + } + ], + + "instrument numbers and identifiers": [ + this.comments, + { + token : "entity.name.function.csound", + regex : /\d+|[A-Z_a-z]\w*/ + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "after opcode keyword": [ + this.comments, + this.popRule({ + token : "empty", + regex : /$/ + }), this.popRule({ + token : "entity.name.function.opcode.csound", + regex : /[A-Z_a-z]\w*/, + next : "opcode type signatures" + }) + ], + "opcode type signatures": [ + this.comments, + this.popRule({ + token : "empty", + regex : /$/ + }), { + token : "storage.type.csound", + regex : /\b(?:0|[afijkKoOpPStV\[\]]+)/ + } + ], + + "quoted string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound", + regex : /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "braced string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound", + regex : /}}/ + }), + this.bracedStringContents, + { + defaultToken: "string.braced.csound" + } + ], + + "goto before argument": [ + this.popRule({ + token : "text.csound", + regex : /,/ + }), + start + ], + "goto before label": [ + { + token : "text.csound", + regex : /\s+/ + }, + this.comments, + this.popRule({ + token : "entity.name.label.csound", + regex : /\w+/ + }), this.popRule({ + token : "empty", + regex : /(?!\w)/ + }) + ], + + "Csound score opcode": [ + this.comments, + { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : scoreHighlightRules.embeddedRulePrefix + "start" + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "Python opcode": [ + this.comments, + { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "python-start" + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "Lua opcode": [ + this.comments, + { + token : "punctuation.definition.string.begin.csound", + regex : /{{/, + next : "lua-start" + }, this.popRule({ + token : "empty", + regex : /$/ + }) + ], + + "line continuation": [ + this.popRule({ + token : "empty", + regex : /$/ + }), + this.semicolonComments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ] + }); + + var rules = [ + this.popRule({ + token : "punctuation.definition.string.end.csound", + regex : /}}/ + }) + ]; + this.embedRules(scoreHighlightRules.getRules(), scoreHighlightRules.embeddedRulePrefix, rules); + this.embedRules(PythonHighlightRules, "python-", rules); + this.embedRules(LuaHighlightRules, "lua-", rules); + + this.normalizeRules(); +}; + +oop.inherits(CsoundOrchestraHighlightRules, CsoundPreprocessorHighlightRules); + +exports.CsoundOrchestraHighlightRules = CsoundOrchestraHighlightRules; +}); + +define("ace/mode/csound_orchestra",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_orchestra_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CsoundOrchestraHighlightRules = require("./csound_orchestra_highlight_rules").CsoundOrchestraHighlightRules; + +var Mode = function() { + this.HighlightRules = CsoundOrchestraHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ";"; + this.blockComment = {start: "/*", end: "*/"}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/csound_orchestra"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-csound_score.js b/htdocs/includes/ace/src/mode-csound_score.js new file mode 100644 index 00000000000..e7168662e1a --- /dev/null +++ b/htdocs/includes/ace/src/mode-csound_score.js @@ -0,0 +1,461 @@ +define("ace/mode/csound_preprocessor_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var CsoundPreprocessorHighlightRules = function(embeddedRulePrefix) { + + this.embeddedRulePrefix = embeddedRulePrefix === undefined ? "" : embeddedRulePrefix; + + this.semicolonComments = { + token : "comment.line.semicolon.csound", + regex : ";.*$" + }; + + this.comments = [ + { + token : "punctuation.definition.comment.begin.csound", + regex : "/\\*", + push : [ + { + token : "punctuation.definition.comment.end.csound", + regex : "\\*/", + next : "pop" + }, { + defaultToken: "comment.block.csound" + } + ] + }, { + token : "comment.line.double-slash.csound", + regex : "//.*$" + }, + this.semicolonComments + ]; + + this.macroUses = [ + { + token : ["entity.name.function.preprocessor.csound", "punctuation.definition.macro-parameter-value-list.begin.csound"], + regex : /(\$[A-Z_a-z]\w*\.?)(\()/, + next : "macro parameter value list" + }, { + token : "entity.name.function.preprocessor.csound", + regex : /\$[A-Z_a-z]\w*(?:\.|\b)/ + } + ]; + + this.numbers = [ + { + token : "constant.numeric.float.csound", + regex : /(?:\d+[Ee][+-]?\d+)|(?:\d+\.\d*|\d*\.\d+)(?:[Ee][+-]?\d+)?/ + }, { + token : ["storage.type.number.csound", "constant.numeric.integer.hexadecimal.csound"], + regex : /(0[Xx])([0-9A-Fa-f]+)/ + }, { + token : "constant.numeric.integer.decimal.csound", + regex : /\d+/ + } + ]; + + this.bracedStringContents = [ + { + token : "constant.character.escape.csound", + regex : /\\(?:[\\abnrt"]|[0-7]{1,3})/ + }, + { + token : "constant.character.placeholder.csound", + regex : /%[#0\- +]*\d*(?:\.\d+)?[diuoxXfFeEgGaAcs]/ + }, { + token : "constant.character.escape.csound", + regex : /%%/ + } + ]; + + this.quotedStringContents = [ + this.macroUses, + this.bracedStringContents + ]; + + var start = [ + this.comments, + + { + token : "keyword.preprocessor.csound", + regex : /#(?:e(?:nd(?:if)?|lse)\b|##)|@@?[ \t]*\d+/ + }, { + token : "keyword.preprocessor.csound", + regex : /#include/, + push : [ + this.comments, + { + token : "string.csound", + regex : /([^ \t])(?:.*?\1)/, + next : "pop" + } + ] + }, { + token : "keyword.preprocessor.csound", + regex : /#includestr/, + push : [ + this.comments, + { + token : "string.csound", + regex : /([^ \t])(?:.*?\1)/, + next : "pop" + } + ] + }, { + token : "keyword.preprocessor.csound", + regex : /#[ \t]*define/, + next : "define directive" + }, { + token : "keyword.preprocessor.csound", + regex : /#(?:ifn?def|undef)\b/, + next : "macro directive" + }, + + this.macroUses + ]; + + this.$rules = { + "start": start, + + "define directive": [ + this.comments, + { + token : "entity.name.function.preprocessor.csound", + regex : /[A-Z_a-z]\w*/ + }, { + token : "punctuation.definition.macro-parameter-name-list.begin.csound", + regex : /\(/, + next : "macro parameter name list" + }, { + token : "punctuation.definition.macro.begin.csound", + regex : /#/, + next : "macro body" + } + ], + "macro parameter name list": [ + { + token : "variable.parameter.preprocessor.csound", + regex : /[A-Z_a-z]\w*/ + }, { + token : "punctuation.definition.macro-parameter-name-list.end.csound", + regex : /\)/, + next : "define directive" + } + ], + "macro body": [ + { + token : "constant.character.escape.csound", + regex : /\\#/ + }, { + token : "punctuation.definition.macro.end.csound", + regex : /#/, + next : "start" + }, + start + ], + + "macro directive": [ + this.comments, + { + token : "entity.name.function.preprocessor.csound", + regex : /[A-Z_a-z]\w*/, + next : "start" + } + ], + + "macro parameter value list": [ + { + token : "punctuation.definition.macro-parameter-value-list.end.csound", + regex : /\)/, + next : "start" + }, { + token : "punctuation.definition.string.begin.csound", + regex : /"/, + next : "macro parameter value quoted string" + }, this.pushRule({ + token : "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex : /\(/, + next : "macro parameter value parenthetical" + }), { + token : "punctuation.macro-parameter-value-separator.csound", + regex : "[#']" + } + ], + "macro parameter value quoted string": [ + { + token : "constant.character.escape.csound", + regex : /\\[#'()]/ + }, { + token : "invalid.illegal.csound", + regex : /[#'()]/ + }, { + token : "punctuation.definition.string.end.csound", + regex : /"/, + next : "macro parameter value list" + }, + this.quotedStringContents, + { + defaultToken: "string.quoted.csound" + } + ], + "macro parameter value parenthetical": [ + { + token : "constant.character.escape.csound", + regex : /\\\)/ + }, this.popRule({ + token : "punctuation.macro-parameter-value-parenthetical.end.csound", + regex : /\)/ + }), this.pushRule({ + token : "punctuation.macro-parameter-value-parenthetical.begin.csound", + regex : /\(/, + next : "macro parameter value parenthetical" + }), + start + ] + }; +}; + +oop.inherits(CsoundPreprocessorHighlightRules, TextHighlightRules); + +(function() { + + this.pushRule = function(params) { + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + params.next[i] = this.embeddedRulePrefix + params.next[i]; + } + } + + return { + regex : params.regex, onMatch: function(value, currentState, stack, line) { + if (stack.length === 0) + stack.push(currentState); + if (Array.isArray(params.next)) { + for (var i = 0; i < params.next.length; i++) { + stack.push(params.next[i]); + } + } else { + stack.push(params.next); + } + this.next = stack[stack.length - 1]; + return params.token; + }, + + get next() { return Array.isArray(params.next) ? params.next[params.next.length - 1] : params.next; }, + set next(next) { + if (!Array.isArray(params.next)) { + params.next = next; + } + }, + + get token() { return params.token; } + }; + }; + + this.popRule = function(params) { + if (params.next) { + params.next = this.embeddedRulePrefix + params.next; + } + + return { + regex : params.regex, onMatch: function(value, currentState, stack, line) { + stack.pop(); + if (params.next) { + stack.push(params.next); + this.next = stack[stack.length - 1]; + } else { + this.next = stack.length > 1 ? stack[stack.length - 1] : stack.pop(); + } + return params.token; + } + }; + }; + +}).call(CsoundPreprocessorHighlightRules.prototype); + +exports.CsoundPreprocessorHighlightRules = CsoundPreprocessorHighlightRules; +}); + +define("ace/mode/csound_score_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/csound_preprocessor_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); + +var CsoundPreprocessorHighlightRules = require("./csound_preprocessor_highlight_rules").CsoundPreprocessorHighlightRules; + +var CsoundScoreHighlightRules = function(embeddedRulePrefix) { + + CsoundPreprocessorHighlightRules.call(this, embeddedRulePrefix); + + this.quotedStringContents.push({ + token : "invalid.illegal.csound-score", + regex : /[^"]*$/ + }); + + var start = this.$rules.start; + start.push( + { + token : "keyword.control.csound-score", + regex : /[abCdefiqstvxy]/ + }, { + token : "invalid.illegal.csound-score", + regex : /w/ + }, { + token : "constant.numeric.language.csound-score", + regex : /z/ + }, { + token : ["keyword.control.csound-score", "constant.numeric.integer.decimal.csound-score"], + regex : /([nNpP][pP])(\d+)/ + }, { + token : "keyword.other.csound-score", + regex : /[mn]/, + push : [ + { + token : "empty", + regex : /$/, + next : "pop" + }, + this.comments, + { + token : "entity.name.label.csound-score", + regex : /[A-Z_a-z]\w*/ + } + ] + }, { + token : "keyword.preprocessor.csound-score", + regex : /r\b/, + next : "repeat section" + }, + + this.numbers, + + { + token : "keyword.operator.csound-score", + regex : "[!+\\-*/^%&|<>#~.]" + }, + + this.pushRule({ + token : "punctuation.definition.string.begin.csound-score", + regex : /"/, + next : "quoted string" + }), + + this.pushRule({ + token : "punctuation.braced-loop.begin.csound-score", + regex : /{/, + next : "loop after left brace" + }) + ); + + this.addRules({ + "repeat section": [ + { + token : "empty", + regex : /$/, + next : "start" + }, + this.comments, + { + token : "constant.numeric.integer.decimal.csound-score", + regex : /\d+/, + next : "repeat section before label" + } + ], + "repeat section before label": [ + { + token : "empty", + regex : /$/, + next : "start" + }, + this.comments, + { + token : "entity.name.label.csound-score", + regex : /[A-Z_a-z]\w*/, + next : "start" + } + ], + + "quoted string": [ + this.popRule({ + token : "punctuation.definition.string.end.csound-score", + regex : /"/ + }), + this.quotedStringContents, + { + defaultToken: "string.quoted.csound-score" + } + ], + + "loop after left brace": [ + this.popRule({ + token : "constant.numeric.integer.decimal.csound-score", + regex : /\d+/, + next : "loop after repeat count" + }), + this.comments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ], + "loop after repeat count": [ + this.popRule({ + token : "entity.name.function.preprocessor.csound-score", + regex : /[A-Z_a-z]\w*\b/, + next : "loop after macro name" + }), + this.comments, + { + token : "invalid.illegal.csound", + regex : /\S.*/ + } + ], + "loop after macro name": [ + start, + this.popRule({ + token : "punctuation.braced-loop.end.csound-score", + regex : /}/ + }) + ] + }); + + this.normalizeRules(); +}; + +oop.inherits(CsoundScoreHighlightRules, CsoundPreprocessorHighlightRules); + +exports.CsoundScoreHighlightRules = CsoundScoreHighlightRules; +}); + +define("ace/mode/csound_score",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/csound_score_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CsoundScoreHighlightRules = require("./csound_score_highlight_rules").CsoundScoreHighlightRules; + +var Mode = function() { + this.HighlightRules = CsoundScoreHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ";"; + this.blockComment = {start: "/*", end: "*/"}; + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/csound_score"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-csp.js b/htdocs/includes/ace/src/mode-csp.js new file mode 100644 index 00000000000..32872ad76fd --- /dev/null +++ b/htdocs/includes/ace/src/mode-csp.js @@ -0,0 +1,59 @@ +define("ace/mode/csp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + + var CspHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "constant.language": "child-src|connect-src|default-src|font-src|frame-src|img-src|manifest-src|media-src|object-src" + + "|script-src|style-src|worker-src|base-uri|plugin-types|sandbox|disown-opener|form-action|frame-ancestors|report-uri" + + "|report-to|upgrade-insecure-requests|block-all-mixed-content|require-sri-for|reflected-xss|referrer|policy-uri", + "variable": "'none'|'self'|'unsafe-inline'|'unsafe-eval'|'strict-dynamic'|'unsafe-hashed-attributes'" + }, "identifier", true); + + this.$rules = { + start: [{ + token: "string.link", + regex: /https?:[^;\s]*/ + }, { + token: "operator.punctuation", + regex: /;/ + }, { + token: keywordMapper, + regex: /[^\s;]+/ + }] + }; + }; + + oop.inherits(CspHighlightRules, TextHighlightRules); + + exports.CspHighlightRules = CspHighlightRules; +}); + +define("ace/mode/csp",["require","exports","module","ace/mode/text","ace/mode/csp_highlight_rules","ace/lib/oop"], function(require, exports, module) { + "use strict"; + + var TextMode = require("./text").Mode; + var CspHighlightRules = require("./csp_highlight_rules").CspHighlightRules; + var oop = require("../lib/oop"); + + var Mode = function() { + this.HighlightRules = CspHighlightRules; + }; + + oop.inherits(Mode, TextMode); + + (function() { + this.$id = "ace/mode/csp"; + }).call(Mode.prototype); + + exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/csp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-css.js b/htdocs/includes/ace/src/mode-css.js similarity index 89% rename from htdocs/includes/ace/mode-css.js rename to htdocs/includes/ace/src/mode-css.js index b7a418502d5..5ccc1ae304c 100644 --- a/htdocs/includes/ace/mode-css.js +++ b/htdocs/includes/ace/src/mode-css.js @@ -1,12 +1,12 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -36,7 +36,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -59,7 +59,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -96,6 +96,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -104,7 +107,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -128,7 +131,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -140,7 +143,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -178,7 +181,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -190,7 +193,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -230,7 +233,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -342,18 +345,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -372,9 +371,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -394,7 +393,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -404,7 +403,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -417,7 +416,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -431,13 +430,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -464,7 +463,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -472,18 +471,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -504,8 +517,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -623,7 +636,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -696,4 +709,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/css"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-curly.js b/htdocs/includes/ace/src/mode-curly.js similarity index 93% rename from htdocs/includes/ace/mode-curly.js rename to htdocs/includes/ace/src/mode-curly.js index d6d9d1cb10f..c408fed95ed 100644 --- a/htdocs/includes/ace/mode-curly.js +++ b/htdocs/includes/ace/src/mode-curly.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1038,7 +1042,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1059,8 +1063,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -1178,7 +1182,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1265,7 +1269,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1377,18 +1381,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1407,9 +1407,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1429,7 +1429,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1439,7 +1439,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1452,7 +1452,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1466,13 +1466,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1499,7 +1499,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1507,18 +1507,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && /\\]' + }, + { + token: "comment", + regex: '//.*$' + }, + { + token: "comment.start", + regex: /\(\*(?!\))/, + push: "blockComment" + }, + { + token: "string", + regex: "'.'" + }, + { + token: "string", + regex: '"""', + next : [{ + token : "constant.language.escape", + regex : /\\./, + next : "qqstring" + }, { + token : "string", + regex : '"""', + next : "start" + }, { + defaultToken: "string" + }] + }, + { + token: "string", + regex: '"', + next : [{ + token : "constant.language.escape", + regex : /\\./, + next : "qqstring" + }, { + token : "string", + regex : '"', + next : "start" + }, { + defaultToken: "string" + }] + }, + { + token: ["verbatim.string", "string"], + regex: '(@?)(")', + stateName : "qqstring", + next : [{ + token : "constant.language.escape", + regex : '""' + }, { + token : "string", + regex : '"', + next : "start" + }, { + defaultToken: "string" + }] + }, + { + token: "constant.float", + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, + { + token: "constant.float", + regex: floatNumber + }, + { + token: "constant.integer", + regex: "(?:(?:(?:[1-9]\\d*)|(?:0))|(?:0[oO]?[0-7]+)|(?:0[xX][\\dA-Fa-f]+)|(?:0[bB][01]+))\\b" + }, + { + token: ["keyword.type", "variable"], + regex: "(type\\s)([a-zA-Z0-9_$\-]*\\b)" + }, + { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token: "keyword.operator", + regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|\\(\\*\\)" + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + } + ], + blockComment: [{ + regex: /\(\*\)/, + token: "comment" + }, { + regex: /\(\*(?!\))/, + token: "comment.start", + push: "blockComment" + }, { + regex: /\*\)/, + token: "comment.end", + next: "pop" + }, { + defaultToken: "comment" + }] + }; + this.normalizeRules(); +}; + + +oop.inherits(FSharpHighlightRules, TextHighlightRules); + +exports.FSharpHighlightRules = FSharpHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/fsharp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsharp_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var TextMode = require("./text").Mode; + var FSharpHighlightRules = require("./fsharp_highlight_rules").FSharpHighlightRules; + var CStyleFoldMode = require("./folding/cstyle").FoldMode; + + var Mode = function () { + TextMode.call(this); + this.HighlightRules = FSharpHighlightRules; + this.foldingRules = new CStyleFoldMode(); + }; + + oop.inherits(Mode, TextMode); + + + (function () { + this.lineCommentStart = "//"; + this.blockComment = {start: "(*", end: "*)", nestable: true}; + + + this.$id = "ace/mode/fsharp"; + }).call(Mode.prototype); + + exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/fsharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-mipsassembler.js b/htdocs/includes/ace/src/mode-fsl.js similarity index 54% rename from htdocs/includes/ace/mode-mipsassembler.js rename to htdocs/includes/ace/src/mode-fsl.js index 42ad657b8e8..9bfde7ebaba 100644 --- a/htdocs/includes/ace/mode-mipsassembler.js +++ b/htdocs/includes/ace/src/mode-fsl.js @@ -1,39 +1,93 @@ -ace.define("ace/mode/mipsassembler_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/fsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var mipsassemblerHighlightRules = function() { +var FSLHighlightRules = function() { this.$rules = { - start: [{ - token: "string.start", - regex: '"', - next: "qstring" - }], - qstring: [{ - token: "escape", - regex: /\\./, + start: [{ + token: "punctuation.definition.comment.mn", + regex: /\/\*/, + push: [{ + token: "punctuation.definition.comment.mn", + regex: /\*\//, + next: "pop" }, { - token: "string.end", - regex: '"', - next: "start" + defaultToken: "comment.block.fsl" + }] + }, { + token: "comment.line.fsl", + regex: /\/\//, + push: [{ + token: "comment.line.fsl", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.line.fsl" + }] + }, { + token: "entity.name.function", + regex: /\${/, + push: [{ + token: "entity.name.function", + regex: /}/, + next: "pop" + }, { + defaultToken: "keyword.other" }], - } - + comment: "js outcalls" + }, { + token: "constant.numeric", + regex: /[0-9]*\.[0-9]*\.[0-9]*/, + comment: "semver" + }, { + token: "constant.language.fslLanguage", + regex: "(?:" + + "graph_layout|machine_name|machine_author|machine_license|machine_comment|machine_language" + + "|machine_version|machine_reference|npm_name|graph_layout|on_init|on_halt|on_end|on_terminate|on_finalize|on_transition" + + "|on_action|on_stochastic_action|on_legal|on_main|on_forced|on_validation|on_validation_failure|on_transition_refused|on_forced_transition_refused" + + "|on_action_refused|on_enter|on_exit|start_states|end_states|terminal_states|final_states|fsl_version" + + ")\\s*:" + }, { + token: "keyword.control.transition.fslArrow", + regex: /<->|<-|->|<=>|=>|<=|<~>|~>|<~|<-=>|<=->|<-~>|<~->|<=~>|<~=>/ + }, { + token: "constant.numeric.fslProbability", + regex: /[0-9]+%/, + comment: "edge probability annotation" + }, { + token: "constant.character.fslAction", + regex: /\'[^']*\'/, + comment: "action annotation" + }, { + token: "string.quoted.double.fslLabel.doublequoted", + regex: /\"[^"]*\"/, + comment: "fsl label annotation" + }, { + token: "entity.name.tag.fslLabel.atom", + regex: /[a-zA-Z0-9_.+&()#@!?,]/, + comment: "fsl label annotation" + }] + }; + this.normalizeRules(); }; -mipsassemblerHighlightRules.metaData = +FSLHighlightRules.metaData = { + fileTypes: ["fsl", "fsl_state"], + name: "FSL", + scopeName: "source.fsl" +}; -oop.inherits(mipsassemblerHighlightRules, TextHighlightRules); +oop.inherits(FSLHighlightRules, TextHighlightRules); -exports.mipsassemblerHighlightRules = mipsassemblerHighlightRules; +exports.FSLHighlightRules = FSLHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -54,11 +108,11 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; - this.startRegionRe = /^\s*(\/\*|\/\/)#region\b/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; this._getFoldWidgetBase = this.getFoldWidget; this.getFoldWidget = function(session, foldStyle, row) { var line = session.getLine(row); @@ -146,13 +200,12 @@ oop.inherits(FoldMode, BaseFoldMode); return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); }; - this.getCommentRegionBlock = function(session, line, row) { var startColumn = line.search(/\s*$/); var maxRow = session.getLength(); var startRow = row; - var re = /^\s*(?:\/\*|\/\/)#(end)?region\b/; + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; var depth = 1; while (++row < maxRow) { line = session.getLine(row); @@ -174,23 +227,32 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/mipsassembler",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mipsassembler_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/fsl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/fsl_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; -var HighlightRules = require("./mipsassembler_highlight_rules").HighlightRules; +var FSLHighlightRules = require("./fsl_highlight_rules").FSLHighlightRules; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { - this.HighlightRules = HighlightRules; + this.HighlightRules = FSLHighlightRules; this.foldingRules = new FoldMode(); }; oop.inherits(Mode, TextMode); (function() { - this.$id = "ace/mode/mipsassembler" + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + this.$id = "ace/mode/fsl"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/fsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-ftl.js b/htdocs/includes/ace/src/mode-ftl.js similarity index 94% rename from htdocs/includes/ace/mode-ftl.js rename to htdocs/includes/ace/src/mode-ftl.js index dbca4fd1928..c6182a94be2 100644 --- a/htdocs/includes/ace/mode-ftl.js +++ b/htdocs/includes/ace/src/mode-ftl.js @@ -1,12 +1,12 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -36,7 +36,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -59,7 +59,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -96,6 +96,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -104,7 +107,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -128,7 +131,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -140,7 +143,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -178,7 +181,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -190,7 +193,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -217,7 +220,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -240,7 +243,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -373,7 +376,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/ftl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1160,7 +1164,7 @@ oop.inherits(FtlHighlightRules, HtmlHighlightRules); exports.FtlHighlightRules = FtlHighlightRules; }); -ace.define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module) { +define("ace/mode/ftl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ftl_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1179,4 +1183,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/ftl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-gcode.js b/htdocs/includes/ace/src/mode-gcode.js similarity index 79% rename from htdocs/includes/ace/mode-gcode.js rename to htdocs/includes/ace/src/mode-gcode.js index a648426c9ba..6b4d64dfbfe 100644 --- a/htdocs/includes/ace/mode-gcode.js +++ b/htdocs/includes/ace/src/mode-gcode.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -63,7 +63,7 @@ ace.define("ace/mode/gcode_highlight_rules",["require","exports","module","ace/l exports.GcodeHighlightRules = GcodeHighlightRules; }); -ace.define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) { +define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gcode_highlight_rules","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -83,4 +83,11 @@ ace.define("ace/mode/gcode",["require","exports","module","ace/lib/oop","ace/mod exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/gcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-gherkin.js b/htdocs/includes/ace/src/mode-gherkin.js similarity index 86% rename from htdocs/includes/ace/mode-gherkin.js rename to htdocs/includes/ace/src/mode-gherkin.js index 322dbe40058..1e50e8cff3e 100644 --- a/htdocs/includes/ace/mode-gherkin.js +++ b/htdocs/includes/ace/src/mode-gherkin.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/gherkin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; @@ -103,14 +103,14 @@ var GherkinHighlightRules = function() { }] }; this.normalizeRules(); -} +}; oop.inherits(GherkinHighlightRules, TextHighlightRules); exports.GherkinHighlightRules = GherkinHighlightRules; }); -ace.define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module) { +define("ace/mode/gherkin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gherkin_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; @@ -133,8 +133,6 @@ oop.inherits(Mode, TextMode); var tokenizedLine = this.getTokenizer().getLineTokens(line, state); var tokens = tokenizedLine.tokens; - console.log(state) - if(line.match("[ ]*\\|")) { indent += "| "; } @@ -160,4 +158,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/gherkin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-gitignore.js b/htdocs/includes/ace/src/mode-gitignore.js similarity index 63% rename from htdocs/includes/ace/mode-gitignore.js rename to htdocs/includes/ace/src/mode-gitignore.js index c3eac55939e..23accea2fd8 100644 --- a/htdocs/includes/ace/mode-gitignore.js +++ b/htdocs/includes/ace/src/mode-gitignore.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/gitignore_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -30,7 +30,7 @@ oop.inherits(GitignoreHighlightRules, TextHighlightRules); exports.GitignoreHighlightRules = GitignoreHighlightRules; }); -ace.define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) { +define("ace/mode/gitignore",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/gitignore_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -49,4 +49,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/gitignore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-glsl.js b/htdocs/includes/ace/src/mode-glsl.js similarity index 89% rename from htdocs/includes/ace/mode-glsl.js rename to htdocs/includes/ace/src/mode-glsl.js index ee95feea441..b5bc6e699e1 100644 --- a/htdocs/includes/ace/mode-glsl.js +++ b/htdocs/includes/ace/src/mode-glsl.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,13 +48,13 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" +var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; var c_cppHighlightRules = function() { @@ -76,7 +76,7 @@ var c_cppHighlightRules = function() { ); var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); @@ -95,6 +95,14 @@ var c_cppHighlightRules = function() { var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type this.$rules = { "start" : [ @@ -122,7 +130,7 @@ var c_cppHighlightRules = function() { next: [ { token: "string", regex: /\\\s*$/, next: "qqstring" }, { token: "constant.language.escape", regex: escapeRe }, - { token: "constant.language.escape", regex: /%[^'"\\]/ }, + { token: "constant.language.escape", regex: formatRe }, { token: "string.end", regex: '"|$', next: "start" }, { defaultToken: "string"} ] @@ -234,7 +242,7 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -274,7 +282,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -295,8 +303,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -414,7 +422,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -486,7 +494,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { +define("ace/mode/glsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -528,7 +536,7 @@ var glslHighlightRules = function() { this.$rules.start.forEach(function(rule) { if (typeof rule.token == "function") rule.token = keywordMapper; - }) + }); }; oop.inherits(glslHighlightRules, c_cppHighlightRules); @@ -536,7 +544,7 @@ oop.inherits(glslHighlightRules, c_cppHighlightRules); exports.glslHighlightRules = glslHighlightRules; }); -ace.define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/glsl",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/glsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -561,4 +569,11 @@ oop.inherits(Mode, CMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/glsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-gobstones.js b/htdocs/includes/ace/src/mode-gobstones.js similarity index 70% rename from htdocs/includes/ace/mode-gobstones.js rename to htdocs/includes/ace/src/mode-gobstones.js index 746b341357c..1ab66a8b898 100644 --- a/htdocs/includes/ace/mode-gobstones.js +++ b/htdocs/includes/ace/src/mode-gobstones.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,106 +789,264 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/gobstones_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports) { "use strict"; var oop = require("../lib/oop"); -var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var GobstonesHighlightRules = function() { - var keywords = ( - "program|procedure|function|interactive|if|then|else|switch|repeat|while|foreach|in|not|div|mod|Skip|return" - ); + var definitions = { + standard: "program|procedure|function|interactive|return|let", + type: "type|is|variant|record|field|case" + }; - var buildinConstants = ( - "False|True" - ); + var control = { + commands: { + repetitions: "repeat|while|foreach|in", + alternatives: "if|elseif|else|switch" + }, + expressions: { + alternatives: "choose|when|otherwise|matching|select|on" + } + }; + var values = { + colors: "Verde|Rojo|Azul|Negro", + cardinals: "Norte|Sur|Este|Oeste", + booleans: "True|False", + numbers: /([-]?)([0-9]+)\b/, + strings: '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }; - var langClasses = ( - "Poner|Sacar|Mover|IrAlBorde|VaciarTablero|" + - "nroBolitas|hayBolitas|puedeMover|siguiente|previo|opuesto|minBool|maxBool|" + - "minDir|maxDir|minColor|maxColor" - ); + var primitives = { + commands: "Poner|Sacar|Mover|IrAlBorde|VaciarTablero|BOOM", + expressions: "nroBolitas|hayBolitas|puedeMover|"+ + "siguiente|previo|opuesto|"+ + "minBool|maxBool|minDir|maxDir|minColor|maxColor|"+ + "primero|sinElPrimero|esVacía|"+ + "boom", + keys: "K_A|K_B|K_C|K_D|K_E|K_F|K_G|K_G|K_H|K_I|K_J|K_K|K_L|K_M|K_N|K_Ñ|"+ + "K_O|K_P|K_Q|K_R|K_S|K_T|K_U|K_V|K_W|K_X|K_Y|K_Z|"+ + "K_0|K_1|K_2|K_3|K_4|K_5|K_6|K_7|K_8|K_9|"+ + "K_F1|K_F2|K_F3|K_F4|K_F5|K_F6|K_F7|K_F8|K_F9|K_F10|K_F11|K_12|"+ + "K_UP|K_DOWN|K_LEFT|K_RIGHT|K_RETURN|K_BACKSPACE|K_TAB|K_SPACE|K_ESCAPE"+ - var supportType = ( - "Verde|Rojo|Azul|Negro|Norte|Sur|Este|Oeste" - ); + "K_CTRL_A|K_CTRL_B|K_CTRL_C|K_CTRL_D|K_CTRL_E|K_CTRL_F|K_CTRL_G|K_CTRL_G|"+ + "K_CTRL_H|K_CTRL_I|K_CTRL_J|K_CTRL_K|K_CTRL_L|K_CTRL_M|K_CTRL_N|K_CTRL_Ñ|"+ + "K_CTRL_O|K_CTRL_P|K_CTRL_Q|K_CTRL_R|K_CTRL_S|K_CTRL_T|K_CTRL_U|K_CTRL_V|"+ + "K_CTRL_W|K_CTRL_X|K_CTRL_Y|K_CTRL_Z|"+ + "K_CTRL_0|K_CTRL_1|K_CTRL_2|K_CTRL_3|K_CTRL_4|K_CTRL_5|K_CTRL_6|K_CTRL_7|K_CTRL_8|K_CTRL_9|"+ + "K_CTRL_F1|K_CTRL_F2|K_CTRL_F3|K_CTRL_F4|K_CTRL_F5|K_CTRL_F6|K_CTRL_F7|"+ + "K_CTRL_F8|K_CTRL_F9|K_CTRL_F10|K_CTRL_F11|K_CTRL_F12|"+ + "K_CTRL_UP|K_CTRL_DOWN|K_CTRL_LEFT|K_CTRL_RIGHT|K_CTRL_RETURN|"+ + "K_CTRL_BACKSPACE|K_CTRL_TAB|K_CTRL_SPACE|K_CTRL_ESCAPE"+ - var keywordMapper = this.createKeywordMapper({ - "keyword": keywords, - "constant.language": buildinConstants, - "support.function": langClasses, - "support.type": supportType - }, "identifier"); + "K_ALT_A|K_ALT_B|K_ALT_C|K_ALT_D|K_ALT_E|K_ALT_F|K_ALT_G|K_ALT_G|K_ALT_H|"+ + "K_ALT_I|K_ALT_J|K_ALT_K|K_ALT_L|K_ALT_M|K_ALT_N|K_ALT_Ñ|K_ALT_O|K_ALT_P|"+ + "K_ALT_Q|K_ALT_R|K_ALT_S|K_ALT_T|K_ALT_U|K_ALT_V|K_ALT_W|K_ALT_X|K_ALT_Y|K_ALT_Z|"+ + "K_ALT_0|K_ALT_1|K_ALT_2|K_ALT_3|K_ALT_4|K_ALT_5|K_ALT_6|K_ALT_7|K_ALT_8|K_ALT_9|"+ + "K_ALT_F1|K_ALT_F2|K_ALT_F3|K_ALT_F4|K_ALT_F5|K_ALT_F6|K_ALT_F7|K_ALT_F8|"+ + "K_ALT_F9|K_ALT_F10|K_ALT_F11|K_ALT_F12|"+ + "K_ALT_UP|K_ALT_DOWN|K_ALT_LEFT|K_ALT_RIGHT|K_ALT_RETURN|K_ALT_BACKSPACE|"+ + "K_ALT_TAB|K_ALT_SPACE|K_ALT_ESCAPE"+ - this.$rules = { - "start" : [ - { - token : "comment", - regex : "\\/\\/.*$" - }, - { - token : "comment", - regex : "\\-\\-.*$" - }, - { - token : "comment", - regex : "#.*$" - }, - DocCommentHighlightRules.getStartRule("doc-start"), - { - token : "comment", // multi line comment - regex : "\\/\\*", - next : "comment" - }, { + "K_SHIFT_A|K_SHIFT_B|K_SHIFT_C|K_SHIFT_D|K_SHIFT_E|K_SHIFT_F|K_SHIFT_G|"+ + "K_SHIFT_G|K_SHIFT_H|K_SHIFT_I|K_SHIFT_J|K_SHIFT_K|K_SHIFT_L|K_SHIFT_M|"+ + "K_SHIFT_N|K_SHIFT_Ñ|K_SHIFT_O|K_SHIFT_P|K_SHIFT_Q|K_SHIFT_R|K_SHIFT_S|"+ + "K_SHIFT_T|K_SHIFT_U|K_SHIFT_V|K_SHIFT_W|K_SHIFT_X|K_SHIFT_Y|K_SHIFT_Z|"+ + "K_SHIFT_0|K_SHIFT_1|K_SHIFT_2|K_SHIFT_3|K_SHIFT_4|K_SHIFT_5|K_SHIFT_6|"+ + "K_SHIFT_7|K_SHIFT_8|K_SHIFT_9|"+ + "K_SHIFT_F1|K_SHIFT_F2|K_SHIFT_F3|K_SHIFT_F4|K_SHIFT_F5|K_SHIFT_F6|"+ + "K_SHIFT_F7|K_SHIFT_F8|K_SHIFT_F9|K_SHIFT_F10|K_SHIFT_F11|K_SHIFT_F12|"+ + "K_SHIFT_UP|K_SHIFT_DOWN|K_SHIFT_LEFT|K_SHIFT_RIGHT|K_SHIFT_RETURN|"+ + "K_SHIFT_BACKSPACE|K_SHIFT_TAB|K_SHIFT_SPACE|K_SHIFT_ESCAPE"+ - token : "string", // single line - regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' - }, { - token : "string", // single line - regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" - }, { - token : "constant.numeric", // hex - regex : /0(?:[xX][0-9a-fA-F][0-9a-fA-F_]*|[bB][01][01_]*)[LlSsDdFfYy]?\b/ - }, { - token : "constant.numeric", // float - regex : /[+-]?\d[\d_]*(?:(?:\.[\d_]*)?(?:[eE][+-]?[\d_]+)?)?[LlSsDdFfYy]?\b/ - }, { - token : "constant.language.boolean", - regex : "(?:True|False)\\b" - }, { - token : "keyword.operator", - regex : ":=|\\.\\.|,|;|\\|\\||\\/\\/|\\+|\\-|\\^|\\*|>|<|>=|=>|==|&&" - }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" - }, { - token : "lparen", - regex : "[[({]" - }, { - token : "rparen", - regex : "[\\])}]" - }, { - token : "text", - regex : "\\s+" - } - ], - "comment" : [ - { - token : "comment", // closing comment - regex : "\\*\\/", - next : "start" - }, { - defaultToken : "comment" - } - ] - }; + "K_CTRL_ALT_A|K_CTRL_ALT_B|K_CTRL_ALT_C|K_CTRL_ALT_D|K_CTRL_ALT_E|"+ + "K_CTRL_ALT_F|K_CTRL_ALT_G|K_CTRL_ALT_G|K_CTRL_ALT_H|K_CTRL_ALT_I|"+ + "K_CTRL_ALT_J|K_CTRL_ALT_K|K_CTRL_ALT_L|K_CTRL_ALT_M|K_CTRL_ALT_N|"+ + "K_CTRL_ALT_Ñ|K_CTRL_ALT_O|K_CTRL_ALT_P|K_CTRL_ALT_Q|K_CTRL_ALT_R|"+ + "K_CTRL_ALT_S|K_CTRL_ALT_T|K_CTRL_ALT_U|K_CTRL_ALT_V|K_CTRL_ALT_W|"+ + "K_CTRL_ALT_X|K_CTRL_ALT_Y|K_CTRL_ALT_Z|"+ + "K_CTRL_ALT_0|K_CTRL_ALT_1|K_CTRL_ALT_2|K_CTRL_ALT_3|K_CTRL_ALT_4|"+ + "K_CTRL_ALT_5|K_CTRL_ALT_6|K_CTRL_ALT_7|K_CTRL_ALT_8|K_CTRL_ALT_9|"+ + "K_CTRL_ALT_F1|K_CTRL_ALT_F2|K_CTRL_ALT_F3|K_CTRL_ALT_F4|K_CTRL_ALT_F5|"+ + "K_CTRL_ALT_F6|K_CTRL_ALT_F7|K_CTRL_ALT_F8|K_CTRL_ALT_F9|K_CTRL_ALT_F10|"+ + "K_CTRL_ALT_F11|K_CTRL_ALT_F12|"+ + "K_CTRL_ALT_UP|K_CTRL_ALT_DOWN|K_CTRL_ALT_LEFT|K_CTRL_ALT_RIGHT|"+ + "K_CTRL_ALT_RETURN|K_CTRL_ALT_BACKSPACE|K_CTRL_ALT_TAB|K_CTRL_ALT_SPACE|K_CTRL_ALT_ESCAPE"+ - this.embedRules(DocCommentHighlightRules, "doc-", - [ DocCommentHighlightRules.getEndRule("start") ]); + "K_CTRL_SHIFT_A|K_CTRL_SHIFT_B|K_CTRL_SHIFT_C|K_CTRL_SHIFT_D|K_CTRL_SHIFT_E|"+ + "K_CTRL_SHIFT_F|K_CTRL_SHIFT_G|K_CTRL_SHIFT_G|K_CTRL_SHIFT_H|K_CTRL_SHIFT_I|"+ + "K_CTRL_SHIFT_J|K_CTRL_SHIFT_K|K_CTRL_SHIFT_L|K_CTRL_SHIFT_M|K_CTRL_SHIFT_N|"+ + "K_CTRL_SHIFT_Ñ|K_CTRL_SHIFT_O|K_CTRL_SHIFT_P|K_CTRL_SHIFT_Q|K_CTRL_SHIFT_R|"+ + "K_CTRL_SHIFT_S|K_CTRL_SHIFT_T|K_CTRL_SHIFT_U|K_CTRL_SHIFT_V|K_CTRL_SHIFT_W|"+ + "K_CTRL_SHIFT_X|K_CTRL_SHIFT_Y|K_CTRL_SHIFT_Z|"+ + "K_CTRL_SHIFT_0|K_CTRL_SHIFT_1|K_CTRL_SHIFT_2|K_CTRL_SHIFT_3|K_CTRL_SHIFT_4|"+ + "K_CTRL_SHIFT_5|K_CTRL_SHIFT_6|K_CTRL_SHIFT_7|K_CTRL_SHIFT_8|K_CTRL_SHIFT_9|"+ + "K_CTRL_SHIFT_F1|K_CTRL_SHIFT_F2|K_CTRL_SHIFT_F3|K_CTRL_SHIFT_F4|"+ + "K_CTRL_SHIFT_F5|K_CTRL_SHIFT_F6|K_CTRL_SHIFT_F7|K_CTRL_SHIFT_F8|"+ + "K_CTRL_SHIFT_9|K_CTRL_SHIFT_10|K_CTRL_SHIFT_11|K_CTRL_SHIFT_12|"+ + "K_CTRL_SHIFT_UP|K_CTRL_SHIFT_DOWN|K_CTRL_SHIFT_LEFT|K_CTRL_SHIFT_RIGHT|"+ + "K_CTRL_SHIFT_RETURN|K_CTRL_SHIFT_BACKSPACE|K_CTRL_SHIFT_TAB|"+ + "K_CTRL_SHIFT_SPACE|K_CTRL_SHIFT_ESCAPE"+ + + "K_ALT_SHIFT_A|K_ALT_SHIFT_B|K_ALT_SHIFT_C|K_ALT_SHIFT_D|K_ALT_SHIFT_E|"+ + "K_ALT_SHIFT_F|K_ALT_SHIFT_G|K_ALT_SHIFT_G|K_ALT_SHIFT_H|K_ALT_SHIFT_I|"+ + "K_ALT_SHIFT_J|K_ALT_SHIFT_K|K_ALT_SHIFT_L|K_ALT_SHIFT_M|K_ALT_SHIFT_N|"+ + "K_ALT_SHIFT_Ñ|K_ALT_SHIFT_O|K_ALT_SHIFT_P|K_ALT_SHIFT_Q|K_ALT_SHIFT_R|"+ + "K_ALT_SHIFT_S|K_ALT_SHIFT_T|K_ALT_SHIFT_U|K_ALT_SHIFT_V|K_ALT_SHIFT_W|"+ + "K_ALT_SHIFT_X|K_ALT_SHIFT_Y|K_ALT_SHIFT_Z|"+ + "K_ALT_SHIFT_0|K_ALT_SHIFT_1|K_ALT_SHIFT_2|K_ALT_SHIFT_3|K_ALT_SHIFT_4|"+ + "K_ALT_SHIFT_5|K_ALT_SHIFT_6|K_ALT_SHIFT_7|K_ALT_SHIFT_8|K_ALT_SHIFT_9|"+ + "K_ALT_SHIFT_F1|K_ALT_SHIFT_F2|K_ALT_SHIFT_F3|K_ALT_SHIFT_F4|"+ + "K_ALT_SHIFT_F5|K_ALT_SHIFT_F6|K_ALT_SHIFT_F7|K_ALT_SHIFT_F8|"+ + "K_ALT_SHIFT_9|K_ALT_SHIFT_10|K_ALT_SHIFT_11|K_ALT_SHIFT_12|"+ + "K_ALT_SHIFT_UP|K_ALT_SHIFT_DOWN|K_ALT_SHIFT_LEFT|K_ALT_SHIFT_RIGHT|"+ + "K_ALT_SHIFT_RETURN|K_ALT_SHIFT_BACKSPACE|K_ALT_SHIFT_TAB|K_ALT_SHIFT_SPACE|"+ + "K_ALT_SHIFT_ESCAPE"+ + + "K_CTRL_ALT_SHIFT_A|K_CTRL_ALT_SHIFT_B|K_CTRL_ALT_SHIFT_C|K_CTRL_ALT_SHIFT_D|"+ + "K_CTRL_ALT_SHIFT_E|K_CTRL_ALT_SHIFT_F|K_CTRL_ALT_SHIFT_G|K_CTRL_ALT_SHIFT_G|"+ + "K_CTRL_ALT_SHIFT_H|K_CTRL_ALT_SHIFT_I|K_CTRL_ALT_SHIFT_J|K_CTRL_ALT_SHIFT_K|"+ + "K_CTRL_ALT_SHIFT_L|K_CTRL_ALT_SHIFT_M|K_CTRL_ALT_SHIFT_N|K_CTRL_ALT_SHIFT_Ñ|"+ + "K_CTRL_ALT_SHIFT_O|K_CTRL_ALT_SHIFT_P|K_CTRL_ALT_SHIFT_Q|K_CTRL_ALT_SHIFT_R|"+ + "K_CTRL_ALT_SHIFT_S|K_CTRL_ALT_SHIFT_T|K_CTRL_ALT_SHIFT_U|K_CTRL_ALT_SHIFT_V|"+ + "K_CTRL_ALT_SHIFT_W|K_CTRL_ALT_SHIFT_X|K_CTRL_ALT_SHIFT_Y|K_CTRL_ALT_SHIFT_Z|"+ + "K_CTRL_ALT_SHIFT_0|K_CTRL_ALT_SHIFT_1|K_CTRL_ALT_SHIFT_2|K_CTRL_ALT_SHIFT_3|"+ + "K_CTRL_ALT_SHIFT_4|K_CTRL_ALT_SHIFT_5|K_CTRL_ALT_SHIFT_6|K_CTRL_ALT_SHIFT_7|"+ + "K_CTRL_ALT_SHIFT_8|K_CTRL_ALT_SHIFT_9|"+ + "K_CTRL_ALT_SHIFT_F1|K_CTRL_ALT_SHIFT_F2|K_CTRL_ALT_SHIFT_F3|K_CTRL_ALT_SHIFT_F4|"+ + "K_CTRL_ALT_SHIFT_F5|K_CTRL_ALT_SHIFT_F6|K_CTRL_ALT_SHIFT_F7|K_CTRL_ALT_SHIFT_F8|"+ + "K_CTRL_ALT_SHIFT_F9|K_CTRL_ALT_SHIFT_F10|K_CTRL_ALT_SHIFT_F11|K_CTRL_ALT_SHIFT_F12|"+ + "K_CTRL_ALT_SHIFT_UP|K_CTRL_ALT_SHIFT_DOWN|K_CTRL_ALT_SHIFT_LEFT|K_CTRL_ALT_SHIFT_RIGHT|"+ + "K_CTRL_ALT_SHIFT_RETURN|K_CTRL_ALT_SHIFT_BACKSPACE|K_CTRL_ALT_SHIFT_TAB|"+ + "K_CTRL_ALT_SHIFT_SPACE|K_CTRL_ALT_SHIFT_ESCAPE" + }; + + var operations = { + commands: ":=", + expressions: { + numeric: "\\+|\\-|\\*|\\^|div|mod", + comparison: ">=|<=|==|\\/=|>|<", + boolean: "\\|\\||&&|not", + other: "\\+\\+|<\\-|\\[|\\]|\\_|\\->" + } + }; + + var comments = { + line: { + double_slash: "\\/\\/.*$", + double_dash: "\\-\\-.*$", + number_sign: "#.*$" + }, + block: { start: "\\/\\*", end: "\\*\\/" }, + block_alt: { start: "\\{\\-", end: "\\-\\}" } + }; + + this.$rules = { + "start" : [ + { + token : "comment.line.double-slash.gobstones", + regex : comments.line.double_slash + }, + { + token : "comment.line.double-dash.gobstones", + regex : comments.line.double_dash + }, + { + token : "comment.line.number-sign.gobstones", + regex : comments.line.number_sign + }, + { + token : "comment.block.dash-asterisc.gobstones", + regex : comments.block.start, + next : "block_comment_end" + }, + { + token : "comment.block.brace-dash.gobstones", + regex : comments.block_alt.start, + next : "block_comment_alt_end" + }, + { + token : "constant.numeric.gobstones", + regex : values.numbers + }, + { + token : "string.quoted.double.gobstones", + regex : values.strings + }, + { + token : "keyword.operator.other.gobstones", + regex : operations.expressions.other + }, + { + token : "keyword.operator.numeric.gobstones", + regex : operations.expressions.numeric + }, + { + token : "keyword.operator.compare.gobstones", + regex : operations.expressions.comparison + }, + { + token : "keyword.operator.boolean.gobstones", + regex : operations.expressions.boolean + }, + { + token : this.createKeywordMapper({ + "storage.type.definitions.gobstones": definitions.standard, + "storage.type.types.gobstones": definitions.type, + "keyword.control.commands.repetitions.gobstones": control.commands.repetitions, + "keyword.control.commands.alternatives.gobstones": control.commands.alternatives, + "keyword.control.expressions.alternatives.gobstones": control.expressions.alternatives, + "constant.language.colors.gobstones":values.colors, + "constant.language.cardinals.gobstones": values.cardinals, + "constant.language.boolean.gobstones": values.booleans, + "support.function.gobstones": primitives.commands, + "support.variable.gobstones": primitives.expressions, + "variable.language.gobstones": primitives.keys + }, "identifier.gobstones"), + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, + { + token : "comma.gobstones", + regex : "," + }, + { + token : "semicolon.gobstones", + regex : ";" + }, + { + token : "lparen", + regex : "[[({]" + }, + { + token : "rparen", + regex : "[\\])}]" + }, + { + token : "text", + regex : "\\s+" + } + ], + "block_comment_end": [{ + token : "comment.block.dash-asterisc.gobstones", + regex : comments.block.end, + next : "start" + }, { + defaultToken : "comment.block.dash-asterisc.gobstones" + } + ], + "block_comment_alt_end": [{ + token : "comment.block.brace-dash.gobstones", + regex : comments.block_alt.end, + next : "start" + }, { + defaultToken : "comment.block.brace-dash.gobstones" + } + ] + }; }; oop.inherits(GobstonesHighlightRules, TextHighlightRules); @@ -895,7 +1054,7 @@ oop.inherits(GobstonesHighlightRules, TextHighlightRules); exports.GobstonesHighlightRules = GobstonesHighlightRules; }); -ace.define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"], function(require, exports, module) { +define("ace/mode/gobstones",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/gobstones_highlight_rules"], function(require, exports) { "use strict"; var oop = require("../lib/oop"); @@ -910,8 +1069,8 @@ var Mode = function() { oop.inherits(Mode, JavaScriptMode); (function() { - - this.createWorker = function(session) { + + this.createWorker = function() { return null; }; @@ -919,4 +1078,11 @@ oop.inherits(Mode, JavaScriptMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/gobstones"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-golang.js b/htdocs/includes/ace/src/mode-golang.js similarity index 90% rename from htdocs/includes/ace/mode-golang.js rename to htdocs/includes/ace/src/mode-golang.js index cb81eafa48f..f60439bb9ba 100644 --- a/htdocs/includes/ace/mode-golang.js +++ b/htdocs/includes/ace/src/mode-golang.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/golang_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; @@ -168,7 +168,7 @@ ace.define("ace/mode/golang_highlight_rules",["require","exports","module","ace/ exports.GolangHighlightRules = GolangHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -208,7 +208,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -229,8 +229,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -348,7 +348,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/golang",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/golang_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("./text").Mode; @@ -403,4 +403,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/golang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-graphqlschema.js b/htdocs/includes/ace/src/mode-graphqlschema.js similarity index 85% rename from htdocs/includes/ace/mode-graphqlschema.js rename to htdocs/includes/ace/src/mode-graphqlschema.js index 9d2833dd9cc..e252b70c78c 100644 --- a/htdocs/includes/ace/mode-graphqlschema.js +++ b/htdocs/includes/ace/src/mode-graphqlschema.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/graphqlschema_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/graphqlschema_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -43,7 +43,7 @@ oop.inherits(GraphQLSchemaHighlightRules, TextHighlightRules); exports.GraphQLSchemaHighlightRules = GraphQLSchemaHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -64,8 +64,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -183,7 +183,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/graphqlschema",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/graphqlschema_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/graphqlschema",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/graphqlschema_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -203,4 +203,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/graphqlschema"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-groovy.js b/htdocs/includes/ace/src/mode-groovy.js similarity index 95% rename from htdocs/includes/ace/mode-groovy.js rename to htdocs/includes/ace/src/mode-groovy.js index b04ffd9b23a..4c48df1f925 100644 --- a/htdocs/includes/ace/mode-groovy.js +++ b/htdocs/includes/ace/src/mode-groovy.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,7 +789,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/groovy_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -954,7 +955,7 @@ oop.inherits(GroovyHighlightRules, TextHighlightRules); exports.GroovyHighlightRules = GroovyHighlightRules; }); -ace.define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module) { +define("ace/mode/groovy",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/groovy_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -977,4 +978,11 @@ oop.inherits(Mode, JavaScriptMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/groovy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-haml.js b/htdocs/includes/ace/src/mode-haml.js similarity index 95% rename from htdocs/includes/ace/mode-haml.js rename to htdocs/includes/ace/src/mode-haml.js index c4255c54e0b..e6821c8a45e 100644 --- a/htdocs/includes/ace/mode-haml.js +++ b/htdocs/includes/ace/src/mode-haml.js @@ -1,12 +1,12 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -36,7 +36,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -59,7 +59,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -96,6 +96,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -104,7 +107,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -128,7 +131,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -140,7 +143,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -178,7 +181,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -190,7 +193,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -217,7 +220,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -240,7 +243,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -373,7 +376,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1292,7 +1296,7 @@ oop.inherits(RubyHighlightRules, TextHighlightRules); exports.RubyHighlightRules = RubyHighlightRules; }); -ace.define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) { +define("ace/mode/haml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1435,7 +1439,7 @@ oop.inherits(HamlHighlightRules, HtmlHighlightRules); exports.HamlHighlightRules = HamlHighlightRules; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1522,7 +1526,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +define("ace/mode/haml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/haml_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1544,4 +1548,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/haml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-handlebars.js b/htdocs/includes/ace/src/mode-handlebars.js similarity index 93% rename from htdocs/includes/ace/mode-handlebars.js rename to htdocs/includes/ace/src/mode-handlebars.js index c970820e5b2..620074baff2 100644 --- a/htdocs/includes/ace/mode-handlebars.js +++ b/htdocs/includes/ace/src/mode-handlebars.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1363,7 +1367,7 @@ var ElixirHighlightRules = function() { 'comment.line.number-sign.elixir' ], regex: '(?:^|\\s)(#)(\\s[[a-zA-Z0-9,. \\t?!-][^\\x00-\\x7F]]*$)', originalRegex: '(?<=^|\\s)(#)\\s[[a-zA-Z0-9,. \\t?!-][^\\x{00}-\\x{7F}]]*$', - comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] } + comment: 'We are restrictive in what we allow to go after the comment character to avoid false positives, since the availability of comments depend on regexp flags.' } ] }; this.normalizeRules(); }; @@ -1375,7 +1379,7 @@ ElixirHighlightRules.metaData = { comment: 'Textmate bundle for Elixir Programmi foldingStopMarker: '^\\s*((\\}|\\]|after|else|catch|rescue)\\s*$|end\\b)', keyEquivalent: '^~E', name: 'Elixir', - scopeName: 'source.elixir' } + scopeName: 'source.elixir' }; oop.inherits(ElixirHighlightRules, TextHighlightRules); @@ -1383,7 +1387,7 @@ oop.inherits(ElixirHighlightRules, TextHighlightRules); exports.ElixirHighlightRules = ElixirHighlightRules; }); -ace.define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_elixir_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/elixir_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1438,7 +1442,7 @@ ace.define("ace/mode/html_elixir_highlight_rules",["require","exports","module", exports.HtmlElixirHighlightRules = HtmlElixirHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1478,7 +1482,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1499,8 +1503,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -1618,7 +1622,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1705,7 +1709,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1817,18 +1821,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1847,9 +1847,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1869,7 +1869,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1879,7 +1879,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1892,7 +1892,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1906,13 +1906,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1939,7 +1939,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1947,18 +1947,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -2033,7 +2047,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2042,7 +2056,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -2112,14 +2126,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -2200,7 +2219,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2254,7 +2273,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2309,7 +2328,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1292,7 +1296,7 @@ oop.inherits(RubyHighlightRules, TextHighlightRules); exports.RubyHighlightRules = RubyHighlightRules; }); -ace.define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/ruby_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1347,7 +1351,7 @@ ace.define("ace/mode/html_ruby_highlight_rules",["require","exports","module","a exports.HtmlRubyHighlightRules = HtmlRubyHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1387,7 +1391,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1408,8 +1412,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -1527,7 +1531,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1614,7 +1618,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1726,18 +1730,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1756,9 +1756,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1778,7 +1778,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1788,7 +1788,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1801,7 +1801,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1815,13 +1815,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1848,7 +1848,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1856,18 +1856,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1942,7 +1956,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1951,7 +1965,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -2021,14 +2035,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -2109,7 +2128,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2163,7 +2182,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2218,7 +2237,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -702,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -724,199 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var lang = require("../lib/lang"); -var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; -var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; -var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; -var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; - -var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; -var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; -var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; - -var CssHighlightRules = function() { - - var keywordMapper = this.createKeywordMapper({ - "support.function": supportFunction, - "support.constant": supportConstant, - "support.type": supportType, - "support.constant.color": supportConstantColor, - "support.constant.fonts": supportConstantFonts - }, "text", true); - - this.$rules = { - "start" : [{ - include : ["strings", "url", "comments"] - }, { - token: "paren.lparen", - regex: "\\{", - next: "ruleset" - }, { - token: "paren.rparen", - regex: "\\}" - }, { - token: "string", - regex: "@", - next: "media" - }, { - token: "keyword", - regex: "#[a-z0-9-_]+" - }, { - token: "keyword", - regex: "%" - }, { - token: "variable", - regex: "\\.[a-z0-9-_]+" - }, { - token: "string", - regex: ":[a-z0-9-_]+" - }, { - token : "constant.numeric", - regex : numRe - }, { - token: "constant", - regex: "[a-z0-9-_]+" - }, { - caseInsensitive: true - }], - - "media": [{ - include : ["strings", "url", "comments"] - }, { - token: "paren.lparen", - regex: "\\{", - next: "start" - }, { - token: "paren.rparen", - regex: "\\}", - next: "start" - }, { - token: "string", - regex: ";", - next: "start" - }, { - token: "keyword", - regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" - + "|page|font|keyframes|viewport|counter-style|font-feature-values" - + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" - }], - - "comments" : [{ - token: "comment", // multi line comment - regex: "\\/\\*", - push: [{ - token : "comment", - regex : "\\*\\/", - next : "pop" - }, { - defaultToken : "comment" - }] - }], - - "ruleset" : [{ - regex : "-(webkit|ms|moz|o)-", - token : "text" - }, { - token : "paren.rparen", - regex : "\\}", - next : "start" - }, { - include : ["strings", "url", "comments"] - }, { - token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" - }, { - token : "constant.numeric", - regex : numRe - }, { - token : "constant.numeric", // hex6 color - regex : "#[a-f0-9]{6}" - }, { - token : "constant.numeric", // hex3 color - regex : "#[a-f0-9]{3}" - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], - regex : pseudoElements - }, { - token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], - regex : pseudoClasses - }, { - include: "url" - }, { - token : keywordMapper, - regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" - }, { - caseInsensitive: true - }], - - url: [{ - token : "support.function", - regex : "(?:url(:?-prefix)?|domain|regexp)\\(", - push: [{ - token : "support.function", - regex : "\\)", - next : "pop" - }, { - defaultToken: "string" - }] - }], - - strings: [{ - token : "string.start", - regex : "'", - push : [{ - token : "string.end", - regex : "'|$", - next: "pop" - }, { - include : "escapes" - }, { - token : "constant.language.escape", - regex : /\\$/, - consumeLineEnd: true - }, { - defaultToken: "string" - }] - }, { - token : "string.start", - regex : '"', - push : [{ - token : "string.end", - regex : '"|$', - next: "pop" - }, { - include : "escapes" - }, { - token : "constant.language.escape", - regex : /\\$/, - consumeLineEnd: true - }, { - defaultToken: "string" - }] - }], - escapes: [{ - token : "constant.language.escape", - regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ - }] - - }; - - this.normalizeRules(); -}; - -oop.inherits(CssHighlightRules, TextHighlightRules); - -exports.CssHighlightRules = CssHighlightRules; - -}); - -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,31 +1002,62 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; +var modes = require("../config").$modes; + var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var escaped = function(ch) { return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; -} - -function github_embed(tag, prefix) { - return { // Github style block - token : "support.function", - regex : "^\\s*```" + tag + "\\s*$", - push : prefix + "start" - }; -} +}; var MarkdownHighlightRules = function() { HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token : "support.function", + regex : /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function(value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next : "githubblock" + }; + var codeBlockRules = [{ + token : "support.function", + regex : ".*", + onMatch: function(value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if ( + m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0] + ) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; this.$rules["start"].unshift({ token : "empty_line", @@ -1038,18 +1073,11 @@ var MarkdownHighlightRules = function() { token : function(value) { return "markup.heading." + value.length; }, - regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, + regex : /^#{1,6}(?=\s|$)/, next : "header" }, - github_embed("(?:javascript|js)", "jscode-"), - github_embed("xml", "xmlcode-"), - github_embed("html", "htmlcode-"), - github_embed("css", "csscode-"), - { // Github style block - token : "support.function", - regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { // block quote + codeBlockStartRule, + { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" @@ -1080,10 +1108,10 @@ var MarkdownHighlightRules = function() { regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" }, { // link by url token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\[)(" + // [ - escaped("]") + // link text + regex : "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" "(\\))" // ) }, { // strong ** __ @@ -1131,11 +1159,9 @@ var MarkdownHighlightRules = function() { next : "listblock-start" }, { include : "basic", noEscape: true - }, { // Github style block - token : "support.function", - regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { + }, + codeBlockStartRule, + { defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly } ], @@ -1153,39 +1179,9 @@ var MarkdownHighlightRules = function() { defaultToken : "string.blockquote" } ], - "githubblock" : [ { - token : "support.function", - regex : "^\\s*```", - next : "start" - }, { - defaultToken : "support.function" - } ] + "githubblock" : codeBlockRules }); - this.embedRules(JavaScriptHighlightRules, "jscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(HtmlHighlightRules, "htmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(CssHighlightRules, "csscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(XmlHighlightRules, "xmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - this.normalizeRules(); }; oop.inherits(MarkdownHighlightRules, TextHighlightRules); @@ -1193,77 +1189,17 @@ oop.inherits(MarkdownHighlightRules, TextHighlightRules); exports.MarkdownHighlightRules = MarkdownHighlightRules; }); -ace.define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); var ScssHighlightRules = function() { - var properties = lang.arrayToMap( (function () { - - var browserPrefix = ("-webkit-|-moz-|-o-|-ms-|-svg-|-pie-|-khtml-").split("|"); - - var prefixProperties = ("appearance|background-clip|background-inline-policy|background-origin|" + - "background-size|binding|border-bottom-colors|border-left-colors|" + - "border-right-colors|border-top-colors|border-end|border-end-color|" + - "border-end-style|border-end-width|border-image|border-start|" + - "border-start-color|border-start-style|border-start-width|box-align|" + - "box-direction|box-flex|box-flexgroup|box-ordinal-group|box-orient|" + - "box-pack|box-sizing|column-count|column-gap|column-width|column-rule|" + - "column-rule-width|column-rule-style|column-rule-color|float-edge|" + - "font-feature-settings|font-language-override|force-broken-image-icon|" + - "image-region|margin-end|margin-start|opacity|outline|outline-color|" + - "outline-offset|outline-radius|outline-radius-bottomleft|" + - "outline-radius-bottomright|outline-radius-topleft|outline-radius-topright|" + - "outline-style|outline-width|padding-end|padding-start|stack-sizing|" + - "tab-size|text-blink|text-decoration-color|text-decoration-line|" + - "text-decoration-style|transform|transform-origin|transition|" + - "transition-delay|transition-duration|transition-property|" + - "transition-timing-function|user-focus|user-input|user-modify|user-select|" + - "window-shadow|border-radius").split("|"); - - var properties = ("azimuth|background-attachment|background-color|background-image|" + - "background-position|background-repeat|background|border-bottom-color|" + - "border-bottom-style|border-bottom-width|border-bottom|border-collapse|" + - "border-color|border-left-color|border-left-style|border-left-width|" + - "border-left|border-right-color|border-right-style|border-right-width|" + - "border-right|border-spacing|border-style|border-top-color|" + - "border-top-style|border-top-width|border-top|border-width|border|bottom|" + - "box-shadow|box-sizing|caption-side|clear|clip|color|content|counter-increment|" + - "counter-reset|cue-after|cue-before|cue|cursor|direction|display|" + - "elevation|empty-cells|float|font-family|font-size-adjust|font-size|" + - "font-stretch|font-style|font-variant|font-weight|font|height|left|" + - "letter-spacing|line-height|list-style-image|list-style-position|" + - "list-style-type|list-style|margin-bottom|margin-left|margin-right|" + - "margin-top|marker-offset|margin|marks|max-height|max-width|min-height|" + - "min-width|opacity|orphans|outline-color|" + - "outline-style|outline-width|outline|overflow|overflow-x|overflow-y|padding-bottom|" + - "padding-left|padding-right|padding-top|padding|page-break-after|" + - "page-break-before|page-break-inside|page|pause-after|pause-before|" + - "pause|pitch-range|pitch|play-during|position|quotes|richness|right|" + - "size|speak-header|speak-numeral|speak-punctuation|speech-rate|speak|" + - "stress|table-layout|text-align|text-decoration|text-indent|" + - "text-shadow|text-transform|top|unicode-bidi|vertical-align|" + - "visibility|voice-family|volume|white-space|widows|width|word-spacing|" + - "z-index").split("|"); - var ret = []; - for (var i=0, ln=browserPrefix.length; i/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,7 +789,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -806,7 +807,8 @@ var JavaHighlightRules = function() { "catch|extends|int|short|try|" + "char|final|interface|static|void|" + "class|finally|long|strictfp|volatile|" + - "const|float|native|super|while" + "const|float|native|super|while|" + + "var" ); var buildinConstants = ("null|Infinity|NaN|undefined"); @@ -872,6 +874,36 @@ var JavaHighlightRules = function() { }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" + }, { + regex: "(open(?:\\s+))?module(?=\\s*\\w)", + token: "keyword", + next: [{ + regex: "{", + token: "paren.lparen", + next: [{ + regex: "}", + token: "paren.rparen", + next: "start" + }, { + regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b", + token: "keyword" + }] + }, { + token : "text", + regex : "\\s+" + }, { + token : "identifier", + regex : "\\w+" + }, { + token : "punctuation.operator", + regex : "." + }, { + token : "text", + regex : "\\s+" + }, { + regex: "", // exit if there is anything else + next: "start" + }] }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" @@ -900,8 +932,10 @@ var JavaHighlightRules = function() { ] }; + this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); + this.normalizeRules(); }; oop.inherits(JavaHighlightRules, TextHighlightRules); @@ -909,16 +943,76 @@ oop.inherits(JavaHighlightRules, TextHighlightRules); exports.JavaHighlightRules = JavaHighlightRules; }); -ace.define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules"], function(require, exports, module) { +define("ace/mode/folding/java",["require","exports","module","ace/lib/oop","ace/mode/folding/cstyle","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var CStyleFoldMode = require("./cstyle").FoldMode; +var Range = require("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, CStyleFoldMode); + +(function() { + this.importRegex = /^import /; + this.getCStyleFoldWidget = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + if (foldStyle === "markbegin") { + var line = session.getLine(row); + if (this.importRegex.test(line)) { + if (row == 0 || !this.importRegex.test(session.getLine(row - 1))) + return "start"; + } + } + + return this.getCStyleFoldWidget(session, foldStyle, row); + }; + + this.getCstyleFoldWidgetRange = this.getFoldWidgetRange; + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + var match = line.match(this.importRegex); + if (!match || foldStyle !== "markbegin") + return this.getCstyleFoldWidgetRange(session, foldStyle, row, forceMultiline); + + var startColumn = match[0].length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + var line = session.getLine(row); + if (line.match(/^\s*$/)) + continue; + + if (!line.match(this.importRegex)) + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/java",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/java_highlight_rules","ace/mode/folding/java"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptMode = require("./javascript").Mode; var JavaHighlightRules = require("./java_highlight_rules").JavaHighlightRules; +var JavaFoldMode = require("./folding/java").FoldMode; var Mode = function() { JavaScriptMode.call(this); this.HighlightRules = JavaHighlightRules; + this.foldingRules = new JavaFoldMode(); }; oop.inherits(Mode, JavaScriptMode); @@ -932,4 +1026,11 @@ oop.inherits(Mode, JavaScriptMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/java"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-javascript.js b/htdocs/includes/ace/src/mode-javascript.js similarity index 95% rename from htdocs/includes/ace/mode-javascript.js rename to htdocs/includes/ace/src/mode-javascript.js index 0e4a81ac673..f9640e85d95 100644 --- a/htdocs/includes/ace/mode-javascript.js +++ b/htdocs/includes/ace/src/mode-javascript.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -786,4 +787,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/javascript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-json.js b/htdocs/includes/ace/src/mode-json.js similarity index 88% rename from htdocs/includes/ace/mode-json.js rename to htdocs/includes/ace/src/mode-json.js index 6be2035eb97..5ade1857f98 100644 --- a/htdocs/includes/ace/mode-json.js +++ b/htdocs/includes/ace/src/mode-json.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -74,7 +74,7 @@ oop.inherits(JsonHighlightRules, TextHighlightRules); exports.JsonHighlightRules = JsonHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -114,7 +114,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -135,8 +135,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -254,7 +254,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"], function(require, exports, module) { +define("ace/mode/json",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -316,4 +316,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/json"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-jsoniq.js b/htdocs/includes/ace/src/mode-jsoniq.js similarity index 99% rename from htdocs/includes/ace/mode-jsoniq.js rename to htdocs/includes/ace/src/mode-jsoniq.js index c533c91644e..2d717609bd9 100644 --- a/htdocs/includes/ace/mode-jsoniq.js +++ b/htdocs/includes/ace/src/mode-jsoniq.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) { +define("ace/mode/xquery/jsoniq_lexer",["require","exports","module"], function(require, exports, module) { module.exports = (function outer (modules, cache, entry) { var previousRequire = typeof require == "function" && require; function newRequire(name, jumped){ @@ -2085,7 +2085,7 @@ exports.Lexer = function(Tokenizer, Rules) { }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2094,7 +2094,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -2164,14 +2164,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -2252,7 +2257,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2296,7 +2301,7 @@ function hasType(token, type) { } var previous = iterator.stepBackward(); if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { - return + return; } var tag = token.value.substring(1); if (atCursor){ @@ -2306,17 +2311,17 @@ function hasType(token, type) { return { text: '>' + '', selection: [1, 1] - } + }; } }); - } + }; oop.inherits(XQueryBehaviour, Behaviour); exports.XQueryBehaviour = XQueryBehaviour; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2337,8 +2342,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -2456,7 +2461,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { +define("ace/mode/jsoniq",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/jsoniq_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { "use strict"; var WorkerClient = require("../worker/worker_client").WorkerClient; @@ -2616,4 +2621,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/jsoniq"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-jsp.js b/htdocs/includes/ace/src/mode-jsp.js similarity index 92% rename from htdocs/includes/ace/mode-jsp.js rename to htdocs/includes/ace/src/mode-jsp.js index ad13aed5f79..42cc5f54321 100644 --- a/htdocs/includes/ace/mode-jsp.js +++ b/htdocs/includes/ace/src/mode-jsp.js @@ -1,12 +1,12 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -36,7 +36,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -59,7 +59,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -96,6 +96,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -104,7 +107,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -128,7 +131,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -140,7 +143,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -178,7 +181,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -190,7 +193,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -217,7 +220,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -240,7 +243,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -373,7 +376,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/java_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1016,7 +1020,8 @@ var JavaHighlightRules = function() { "catch|extends|int|short|try|" + "char|final|interface|static|void|" + "class|finally|long|strictfp|volatile|" + - "const|float|native|super|while" + "const|float|native|super|while|" + + "var" ); var buildinConstants = ("null|Infinity|NaN|undefined"); @@ -1082,6 +1087,36 @@ var JavaHighlightRules = function() { }, { token : "constant.language.boolean", regex : "(?:true|false)\\b" + }, { + regex: "(open(?:\\s+))?module(?=\\s*\\w)", + token: "keyword", + next: [{ + regex: "{", + token: "paren.lparen", + next: [{ + regex: "}", + token: "paren.rparen", + next: "start" + }, { + regex: "\\b(requires|transitive|exports|opens|to|uses|provides|with)\\b", + token: "keyword" + }] + }, { + token : "text", + regex : "\\s+" + }, { + token : "identifier", + regex : "\\w+" + }, { + token : "punctuation.operator", + regex : "." + }, { + token : "text", + regex : "\\s+" + }, { + regex: "", // exit if there is anything else + next: "start" + }] }, { token : keywordMapper, regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" @@ -1110,8 +1145,10 @@ var JavaHighlightRules = function() { ] }; + this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); + this.normalizeRules(); }; oop.inherits(JavaHighlightRules, TextHighlightRules); @@ -1119,7 +1156,7 @@ oop.inherits(JavaHighlightRules, TextHighlightRules); exports.JavaHighlightRules = JavaHighlightRules; }); -ace.define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"], function(require, exports, module) { +define("ace/mode/jsp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules","ace/mode/java_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1181,7 +1218,7 @@ oop.inherits(JspHighlightRules, HtmlHighlightRules); exports.JspHighlightRules = JspHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1221,7 +1258,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1242,8 +1279,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -1361,7 +1398,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/jsp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsp_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1385,4 +1422,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/jsp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-jssm.js b/htdocs/includes/ace/src/mode-jssm.js new file mode 100644 index 00000000000..1cc42174e48 --- /dev/null +++ b/htdocs/includes/ace/src/mode-jssm.js @@ -0,0 +1,325 @@ +define("ace/mode/jssm_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var JSSMHighlightRules = function() { + + this.$rules = { + start: [{ + token: "punctuation.definition.comment.mn", + regex: /\/\*/, + push: [{ + token: "punctuation.definition.comment.mn", + regex: /\*\//, + next: "pop" + }, { + defaultToken: "comment.block.jssm" + }], + comment: "block comment" + }, { + token: "comment.line.jssm", + regex: /\/\//, + push: [{ + token: "comment.line.jssm", + regex: /$/, + next: "pop" + }, { + defaultToken: "comment.line.jssm" + }], + comment: "block comment" + }, { + token: "entity.name.function", + regex: /\${/, + push: [{ + token: "entity.name.function", + regex: /}/, + next: "pop" + }, { + defaultToken: "keyword.other" + }], + comment: "js outcalls" + }, { + token: "constant.numeric", + regex: /[0-9]*\.[0-9]*\.[0-9]*/, + comment: "semver" + }, { + token: "constant.language.jssmLanguage", + regex: /graph_layout\s*:/, + comment: "jssm language tokens" + }, { + token: "constant.language.jssmLanguage", + regex: /machine_name\s*:/, + comment: "jssm language tokens" + }, { + token: "constant.language.jssmLanguage", + regex: /machine_version\s*:/, + comment: "jssm language tokens" + }, { + token: "constant.language.jssmLanguage", + regex: /jssm_version\s*:/, + comment: "jssm language tokens" + }, { + token: "keyword.control.transition.jssmArrow.legal_legal", + regex: /<->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.legal_none", + regex: /<-/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.none_legal", + regex: /->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_main", + regex: /<=>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.none_main", + regex: /=>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_none", + regex: /<=/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_forced", + regex: /<~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.none_forced", + regex: /~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_none", + regex: /<~/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.legal_main", + regex: /<-=>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_legal", + regex: /<=->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.legal_forced", + regex: /<-~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_legal", + regex: /<~->/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.main_forced", + regex: /<=~>/, + comment: "transitions" + }, { + token: "keyword.control.transition.jssmArrow.forced_main", + regex: /<~=>/, + comment: "transitions" + }, { + token: "constant.numeric.jssmProbability", + regex: /[0-9]+%/, + comment: "edge probability annotation" + }, { + token: "constant.character.jssmAction", + regex: /\'[^']*\'/, + comment: "action annotation" + }, { + token: "entity.name.tag.jssmLabel.doublequoted", + regex: /\"[^"]*\"/, + comment: "jssm label annotation" + }, { + token: "entity.name.tag.jssmLabel.atom", + regex: /[a-zA-Z0-9_.+&()#@!?,]/, + comment: "jssm label annotation" + }] + }; + + this.normalizeRules(); +}; + +JSSMHighlightRules.metaData = { + fileTypes: ["jssm", "jssm_state"], + name: "JSSM", + scopeName: "source.jssm" +}; + + +oop.inherits(JSSMHighlightRules, TextHighlightRules); + +exports.JSSMHighlightRules = JSSMHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/jssm",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jssm_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JSSMHighlightRules = require("./jssm_highlight_rules").JSSMHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JSSMHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + this.$id = "ace/mode/jssm"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/jssm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-jsx.js b/htdocs/includes/ace/src/mode-jsx.js similarity index 90% rename from htdocs/includes/ace/mode-jsx.js rename to htdocs/includes/ace/src/mode-jsx.js index 3f3d3e4bfa0..c3178a834fc 100644 --- a/htdocs/includes/ace/mode-jsx.js +++ b/htdocs/includes/ace/src/mode-jsx.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/jsx_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; @@ -166,7 +166,7 @@ oop.inherits(JsxHighlightRules, TextHighlightRules); exports.JsxHighlightRules = JsxHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -206,7 +206,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -227,8 +227,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -346,7 +346,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/jsx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/jsx_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -401,4 +401,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/jsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-julia.js b/htdocs/includes/ace/src/mode-julia.js similarity index 91% rename from htdocs/includes/ace/mode-julia.js rename to htdocs/includes/ace/src/mode-julia.js index ee1e88abe78..9cb6fb00b23 100644 --- a/htdocs/includes/ace/mode-julia.js +++ b/htdocs/includes/ace/src/mode-julia.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/julia_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -113,7 +113,7 @@ var JuliaHighlightRules = function() { 'entity.other.inherited-class.julia' ], regex: '(type|immutable)(\\s+)([a-zA-Z0-9_]+)(?:(\\s*)(<:)(\\s*[.a-zA-Z0-9_:]+))?' }, { token: [ 'other.typed-variable.julia', 'support.type.julia' ], - regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] } + regex: '([a-zA-Z0-9_]+)(::[a-zA-Z0-9_{}]+)' } ] }; this.normalizeRules(); }; @@ -123,7 +123,7 @@ JuliaHighlightRules.metaData = { fileTypes: [ 'jl' ], foldingStartMarker: '^\\s*(?:if|while|for|begin|function|macro|module|baremodule|type|immutable|let)\\b(?!.*\\bend\\b).*$', foldingStopMarker: '^\\s*(?:end)\\b.*$', name: 'Julia', - scopeName: 'source.julia' } + scopeName: 'source.julia' }; oop.inherits(JuliaHighlightRules, TextHighlightRules); @@ -131,7 +131,7 @@ oop.inherits(JuliaHighlightRules, TextHighlightRules); exports.JuliaHighlightRules = JuliaHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -152,8 +152,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -271,7 +271,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/julia",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/julia_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -293,4 +293,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/julia"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-kotlin.js b/htdocs/includes/ace/src/mode-kotlin.js similarity index 95% rename from htdocs/includes/ace/mode-kotlin.js rename to htdocs/includes/ace/src/mode-kotlin.js index 2621bae8681..11021b5890a 100644 --- a/htdocs/includes/ace/mode-kotlin.js +++ b/htdocs/includes/ace/src/mode-kotlin.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/kotlin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/kotlin_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -607,7 +607,7 @@ var KotlinHighlightRules = function() { }] }] }] - } + }; this.normalizeRules(); }; @@ -616,7 +616,7 @@ KotlinHighlightRules.metaData = { fileTypes: ["kt", "kts"], name: "Kotlin", scopeName: "source.Kotlin" -} +}; oop.inherits(KotlinHighlightRules, TextHighlightRules); @@ -624,7 +624,7 @@ oop.inherits(KotlinHighlightRules, TextHighlightRules); exports.KotlinHighlightRules = KotlinHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -645,8 +645,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -764,23 +764,32 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/kotlin",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/kotlin_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; var KotlinHighlightRules = require("./kotlin_highlight_rules").KotlinHighlightRules; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; var FoldMode = require("./folding/cstyle").FoldMode; var Mode = function() { this.HighlightRules = KotlinHighlightRules; this.foldingRules = new FoldMode(); + this.$behaviour = new CstyleBehaviour(); }; oop.inherits(Mode, TextMode); (function() { - this.$id = "ace/mode/kotlin" + this.$id = "ace/mode/kotlin"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/kotlin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-latex.js b/htdocs/includes/ace/src/mode-latex.js similarity index 63% rename from htdocs/includes/ace/mode-latex.js rename to htdocs/includes/ace/src/mode-latex.js index cfdf56f3cc1..edc3dc86a5c 100644 --- a/htdocs/includes/ace/mode-latex.js +++ b/htdocs/includes/ace/src/mode-latex.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/latex_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -18,7 +18,23 @@ var LatexHighlightRules = function() { regex : "(\\\\(?:label|v?ref|cite(?:[^{]*)))(?:({)([^}]*)(}))?" }, { token : ["storage.type", "lparen", "variable.parameter", "rparen"], - regex : "(\\\\(?:begin|end))({)(\\w*)(})" + regex : "(\\\\begin)({)(verbatim)(})", + next : "verbatim" + }, { + token : ["storage.type", "lparen", "variable.parameter", "rparen"], + regex : "(\\\\begin)({)(lstlisting)(})", + next : "lstlisting" + }, { + token : ["storage.type", "lparen", "variable.parameter", "rparen"], + regex : "(\\\\(?:begin|end))({)([\\w*]*)(})" + }, { + token : "storage.type", + regex : /\\verb\b\*?/, + next : [{ + token : ["keyword.operator", "string", "keyword.operator"], + regex : "(.)(.*?)(\\1|$)|", + next : "start" + }] }, { token : "storage.type", regex : "\\\\[a-zA-Z]+" @@ -52,9 +68,24 @@ var LatexHighlightRules = function() { next : "start" }, { defaultToken : "string" + }], + "verbatim": [{ + token : ["storage.type", "lparen", "variable.parameter", "rparen"], + regex : "(\\\\end)({)(verbatim)(})", + next : "start" + }, { + defaultToken : "text" + }], + "lstlisting": [{ + token : ["storage.type", "lparen", "variable.parameter", "rparen"], + regex : "(\\\\end)({)(lstlisting)(})", + next : "start" + }, { + defaultToken : "text" }] - }; + + this.normalizeRules(); }; oop.inherits(LatexHighlightRules, TextHighlightRules); @@ -62,13 +93,25 @@ exports.LatexHighlightRules = LatexHighlightRules; }); -ace.define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/latex",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); var BaseFoldMode = require("./fold_mode").FoldMode; var Range = require("../../range").Range; var TokenIterator = require("../../token_iterator").TokenIterator; +var keywordLevels = { + "\\subparagraph": 1, + "\\paragraph": 2, + "\\subsubsubsection": 3, + "\\subsubsection": 4, + "\\subsection": 5, + "\\section": 6, + "\\chapter": 7, + "\\part": 8, + "\\begin": 9, + "\\end": 10 +}; var FoldMode = exports.FoldMode = function() {}; @@ -76,7 +119,7 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /^\s*\\(begin)|(section|subsection|paragraph)\b|{\s*$/; + this.foldingStartMarker = /^\s*\\(begin)|\s*\\(part|chapter|(?:sub)*(?:section|paragraph))\b|{\s*$/; this.foldingStopMarker = /^\s*\\(end)\b|^\s*}/; this.getFoldWidgetRange = function(session, foldStyle, row) { @@ -100,7 +143,7 @@ oop.inherits(FoldMode, BaseFoldMode); } }; - this.latexBlock = function(session, row, column) { + this.latexBlock = function(session, row, column, returnRange) { var keywords = { "\\begin": 1, "\\end": -1 @@ -144,37 +187,43 @@ oop.inherits(FoldMode, BaseFoldMode); if (stack.length) return; + + if (dir == 1) { + stream.stepBackward(); + stream.stepBackward(); + } + + if (returnRange) + return stream.getCurrentTokenRange(); var row = stream.getCurrentTokenRow(); if (dir === -1) return new Range(row, session.getLine(row).length, startRow, startColumn); - stream.stepBackward(); - return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); + else + return new Range(startRow, startColumn, row, stream.getCurrentTokenColumn()); }; this.latexSection = function(session, row, column) { - var keywords = ["\\subsection", "\\section", "\\begin", "\\end", "\\paragraph"]; - var stream = new TokenIterator(session, row, column); var token = stream.getCurrentToken(); if (!token || token.type != "storage.type") return; - var startLevel = keywords.indexOf(token.value); - var stackDepth = 0 + var startLevel = keywordLevels[token.value] || 0; + var stackDepth = 0; var endRow = row; while(token = stream.stepForward()) { if (token.type !== "storage.type") continue; - var level = keywords.indexOf(token.value); + var level = keywordLevels[token.value] || 0; - if (level >= 2) { + if (level >= 9) { if (!stackDepth) endRow = stream.getCurrentTokenRow() - 1; - stackDepth += level == 2 ? 1 : - 1; + stackDepth += level == 9 ? 1 : - 1; if (stackDepth < 0) - break + break; } else if (level >= startLevel) break; } @@ -195,7 +244,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/latex"], function(require, exports, module) { +define("ace/mode/latex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/latex_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/latex"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -217,8 +266,31 @@ oop.inherits(Mode, TextMode); this.lineCommentStart = "%"; this.$id = "ace/mode/latex"; + + this.getMatching = function(session, row, column) { + if (row == undefined) + row = session.selection.lead; + if (typeof row == "object") { + column = row.column; + row = row.row; + } + + var startToken = session.getTokenAt(row, column); + if (!startToken) + return; + if (startToken.value == "\\begin" || startToken.value == "\\end") { + return this.foldingRules.latexBlock(session, row, column, true); + } + }; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/latex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-less.js b/htdocs/includes/ace/src/mode-less.js similarity index 89% rename from htdocs/includes/ace/mode-less.js rename to htdocs/includes/ace/src/mode-less.js index c407a0979aa..acda129b135 100644 --- a/htdocs/includes/ace/mode-less.js +++ b/htdocs/includes/ace/src/mode-less.js @@ -1,12 +1,12 @@ -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -36,7 +36,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -59,7 +59,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -96,6 +96,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -104,7 +107,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -128,7 +131,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -140,7 +143,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -178,7 +181,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -190,7 +193,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -325,7 +328,7 @@ exports.LessHighlightRules = LessHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -365,7 +368,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -378,7 +381,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -392,13 +395,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -425,7 +428,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -433,18 +436,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -556,18 +573,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -586,9 +599,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -608,7 +621,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -618,7 +631,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -639,8 +652,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -758,7 +771,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -816,4 +829,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/less"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-liquid.js b/htdocs/includes/ace/src/mode-liquid.js new file mode 100644 index 00000000000..6bbf7d1e9d6 --- /dev/null +++ b/htdocs/includes/ace/src/mode-liquid.js @@ -0,0 +1,2738 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; + +var JavaScriptHighlightRules = function(options) { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hexadecimal, octal and binary + regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token : "constant.numeric", // decimal integers and floats + regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "from(?=\\s*('|\"))" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["support.constant"], + regex : /that\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "punctuation.operator", + regex : /[.](?![.])/, + next : "property" + }, { + token : "storage.type", + regex : /=>/, + next : "start" + }, { + token : "keyword.operator", + regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token : "text", + regex : "\\s+" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", + next: "function_arguments" + }, { + token : "punctuation.operator", + regex : /[.](?![.])/ + }, { + token : "support.function", + regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : "support.function.dom", + regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : "support.constant", + regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : "identifier", + regex : identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.quasi.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : escapedRe + }, { + token : "paren.quasi.start", + regex : /\${/, + push : "start" + }, { + token : "string.quasi.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string.quasi" + }] + }); + + if (!options || options.jsx != false) + JSX.call(this); + } + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); + + this.normalizeRules(); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch : function(val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex : "", + onMatch : function(value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{type: this.token, value: value}]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + token : "text.tag-whitespace.xml", + regex : "\\s+" + }, { + token : "string.attribute-value.xml", + regex : "'", + stateName : "jsx_attr_q", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + stateName : "jsx_attr_qq", + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} + +function comments(next) { + return [ + { + token : "comment", // multi line comment + regex : /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "comment", + regex : "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + this.$quotes = {'"': '"', "'": "'", "`": "`"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/javascript"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token : "constant.numeric", + regex : numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media": [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + + "comments" : [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }] + }], + + "ruleset" : [{ + regex : "-(webkit|ms|moz|o)-", + token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" + }, { + token : "paren.rparen", + regex : "\\}", + next : "start" + }, { + include : ["strings", "url", "comments"] + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + include: "url" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }], + + url: [{ + token : "support.function", + regex : "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token : "support.function", + regex : "\\)", + next : "pop" + }, { + defaultToken: "string" + }] + }], + + strings: [{ + token : "string.start", + regex : "'", + push : [{ + token : "string.end", + regex : "'|$", + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : '"', + push : [{ + token : "string.end", + regex : '"|$', + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token : "constant.language.escape", + regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var propertyMap = { + "background": {"#$0": 1}, + "background-color": {"#$0": 1, "transparent": 1, "fixed": 1}, + "background-image": {"url('/$0')": 1}, + "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1}, + "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2}, + "background-attachment": {"scroll": 1, "fixed": 1}, + "background-size": {"cover": 1, "contain": 1}, + "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1}, + "border-color": {"#$0": 1}, + "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2}, + "border-collapse": {"collapse": 1, "separate": 1}, + "bottom": {"px": 1, "em": 1, "%": 1}, + "clear": {"left": 1, "right": 1, "both": 1, "none": 1}, + "color": {"#$0": 1, "rgb(#$00,0,0)": 1}, + "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1}, + "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1}, + "empty-cells": {"show": 1, "hide": 1}, + "float": {"left": 1, "right": 1, "none": 1}, + "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1}, + "font-size": {"px": 1, "em": 1, "%": 1}, + "font-weight": {"bold": 1, "normal": 1}, + "font-style": {"italic": 1, "normal": 1}, + "font-variant": {"normal": 1, "small-caps": 1}, + "height": {"px": 1, "em": 1, "%": 1}, + "left": {"px": 1, "em": 1, "%": 1}, + "letter-spacing": {"normal": 1}, + "line-height": {"normal": 1}, + "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1}, + "margin": {"px": 1, "em": 1, "%": 1}, + "margin-right": {"px": 1, "em": 1, "%": 1}, + "margin-left": {"px": 1, "em": 1, "%": 1}, + "margin-top": {"px": 1, "em": 1, "%": 1}, + "margin-bottom": {"px": 1, "em": 1, "%": 1}, + "max-height": {"px": 1, "em": 1, "%": 1}, + "max-width": {"px": 1, "em": 1, "%": 1}, + "min-height": {"px": 1, "em": 1, "%": 1}, + "min-width": {"px": 1, "em": 1, "%": 1}, + "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "padding": {"px": 1, "em": 1, "%": 1}, + "padding-top": {"px": 1, "em": 1, "%": 1}, + "padding-right": {"px": 1, "em": 1, "%": 1}, + "padding-bottom": {"px": 1, "em": 1, "%": 1}, + "padding-left": {"px": 1, "em": 1, "%": 1}, + "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1}, + "right": {"px": 1, "em": 1, "%": 1}, + "table-layout": {"fixed": 1, "auto": 1}, + "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1}, + "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1}, + "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1}, + "top": {"px": 1, "em": 1, "%": 1}, + "vertical-align": {"top": 1, "bottom": 1}, + "visibility": {"hidden": 1, "visible": 1}, + "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1}, + "width": {"px": 1, "em": 1, "%": 1}, + "word-spacing": {"normal": 1}, + "filter": {"alpha(opacity=$0100)": 1}, + + "text-shadow": {"$02px 2px 2px #777": 1}, + "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1}, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 } +}; + +var CssCompletions = function() { + +}; + +(function() { + + this.completionsDefined = false; + + this.defineCompletions = function() { + if (document) { + var style = document.createElement('c').style; + + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + + var name = i.replace(/[A-Z]/g, function(x) { + return '-' + x.toLowerCase(); + }); + + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + + this.completionsDefined = true; + }; + + this.getCompletions = function(state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + + return this.getPropertyValueCompletions(state, session, pos, prefix); + } else { + return this.getPropertyCompletions(state, session, pos, prefix); + } + } + + return []; + }; + + this.getPropertyCompletions = function(state, session, pos, prefix) { + var properties = Object.keys(propertyMap); + return properties.map(function(property){ + return { + caption: property, + snippet: property + ': $0;', + meta: "property", + score: 1000000 + }; + }); + }; + + this.getPropertyValueCompletions = function(state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; + +}).call(CssCompletions.prototype); + +exports.CssCompletions = CssCompletions; +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/css"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + + this.$rules = { + start : [ + {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction" + }, + {token : "comment.start.xml", regex : "<\\!--", next : "comment"}, + { + token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true + }, + {include : "tag"}, + {token : "text.end-tag-open.xml", regex: "", + next : "start" + }], + + doctype : [ + {include : "whitespace"}, + {include : "string"}, + {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, + {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} + ], + + int_subset : [{ + token : "text.xml", + regex : "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex : "(<\\!)(" + tagRegex + ")", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.markup-decl.xml", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, + {token : "text.xml", regex : "\\s+"}, + {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment.end.xml", regex : "-->", next : "start"}, + {defaultToken : "comment.xml"} + ], + + reference : [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + attr_reference : [{ + token : "constant.language.escape.reference.attribute-value.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + tag : [{ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex : "(?:(<)|(", next : "start"} + ] + }], + + tag_whitespace : [ + {token : "text.tag-whitespace.xml", regex : "\\s+"} + ], + whitespace : [ + {token : "text.whitespace.xml", regex : "\\s+"} + ], + string: [{ + token : "string.xml", + regex : "'", + push : [ + {token : "string.xml", regex: "'", next: "pop"}, + {defaultToken : "string.xml"} + ] + }, { + token : "string.xml", + regex : '"', + push : [ + {token : "string.xml", regex: '"', next: "pop"}, + {defaultToken : "string.xml"} + ] + }], + + attributes: [{ + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + + attribute_value: [{ + token : "string.attribute-value.xml", + regex : "'", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(<)(" + tag + "(?=\\s|>|$))", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ]; + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex : "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex : "\\]\\]>" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "tag_whitespace" + }, { + token : "entity.other.attribute-name.xml", + regex : "[-_a-zA-Z0-9:.]+" + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=", + push : [{ + include: "tag_whitespace" + }, { + token : "string.unquoted.attribute-value.html", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "attribute_value" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex : "(", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var lang = require("../../lib/lang"); + +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} + +var XmlBehaviour = function () { + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + + if (!token) + token = iterator.stepBackward(); + + if (!token) + return; + + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + + if (this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (token && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + + if (!token) { + return; + } + + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + + if (this.voidElements && !this.voidElements[tag]) { + var nextToken = session.getTokenAt(cursor.row, cursor.column+1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + + if (nextToken && nextToken.value === " -1; +} + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (!tag) + return this.getCommentFoldWidget(session, row); + + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + + return "start"; + }; + + this.getCommentFoldWidget = function(session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + + return null; + }; + + this._findEndTagInLine = function(session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + iterator.stepForward(); + return tag; + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + iterator.stepBackward(); + return tag; + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag) { + return this.getCommentFoldWidget(session, row) + && session.getCommentFoldRange(row, session.getLine(row).length); + } + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.start.column); + var start = { + row: row, + column: firstTag.start.column + firstTag.tagName.length + 2 + }; + if (firstTag.start.row == firstTag.end.row) + start.column = firstTag.end.column; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag); + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.end.column); + var end = { + row: row, + column: firstTag.start.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) + tag.start.column = tag.end.column; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag); + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; + +var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; + +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var TokenIterator = require("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1}, + "abbr": {}, + "address": {}, + "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1}, + "article": {"pubdate": 1}, + "aside": {}, + "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }}, + "b": {}, + "base": {"href": 1, "target": 1}, + "bdi": {}, + "bdo": {}, + "blockquote": {"cite": 1}, + "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1}, + "br": {}, + "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}}, + "canvas": {"width": 1, "height": 1}, + "caption": {}, + "cite": {}, + "code": {}, + "col": {"span": 1}, + "colgroup": {"span": 1}, + "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1}, + "data": {}, + "datalist": {}, + "dd": {}, + "del": {"cite": 1, "datetime": 1}, + "details": {"open": 1}, + "dfn": {}, + "dialog": {"open": 1}, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": {"src": 1, "height": 1, "width": 1, "type": 1}, + "fieldset": {"disabled": 1, "form": 1, "name": 1}, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}}, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": {"manifest": 1}, + "i": {}, + "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}}, + "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1}, + "input": { + "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1}, + "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1}, + "ins": {"cite": 1, "datetime": 1}, + "kbd": {}, + "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1}, + "label": {"form": 1, "for": 1}, + "legend": {}, + "li": {"value": 1}, + "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1}, + "main": {}, + "map": {"name": 1}, + "mark": {}, + "math": {}, + "menu": {"type": 1, "label": 1}, + "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1}, + "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1}, + "nav": {}, + "noscript": {"href": 1}, + "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1}, + "ol": {"start": 1, "reversed": 1}, + "optgroup": {"disabled": 1, "label": 1}, + "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1}, + "output": {"for": 1, "form": 1, "name": 1}, + "p": {}, + "param": {"name": 1, "value": 1}, + "pre": {}, + "progress": {"value": 1, "max": 1}, + "q": {"cite": 1}, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1}, + "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}}, + "small": {}, + "source": {"src": 1, "type": 1, "media": 1}, + "span": {}, + "strong": {}, + "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1}, + "sub": {}, + "sup": {}, + "svg": {}, + "table": {"summary": 1}, + "tbody": {}, + "td": {"headers": 1, "rowspan": 1, "colspan": 1}, + "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}}, + "tfoot": {}, + "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1}, + "thead": {}, + "time": {"datetime": 1}, + "title": {}, + "tr": {}, + "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1}, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}}, + "wbr": {} +}; + +var elements = Object.keys(attributeMap); + +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + return elements.map(function(element){ + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + + this.getAttributeCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + + this.getAttributeValueCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + + this.getHTMLEntityCompletions = function(state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; + +var Mode = function(options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.voidElements = lang.arrayToMap(voidElements); + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + if (this.fragmentContext) + worker.call("setOptions", [{context: this.fragmentContext}]); + + worker.on("error", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/html"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/behaviour/liquid",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/xml","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { + "use strict"; + + var oop = require("../../lib/oop"); + var Behaviour = require("../behaviour").Behaviour; + var XmlBehaviour = require("./xml").XmlBehaviour; + var TokenIterator = require("../../token_iterator").TokenIterator; + var lang = require("../../lib/lang"); + + function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; + } + + var LiquidBehaviour = function () { + XmlBehaviour.call(this); + this.add("autoBraceTagClosing","insertion", function (state, action, editor, session, text) { + if (text == '}') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !( token.value.trim() === '%' || is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + if (/{%\s*%/.test(session.getLine(position.row))) return; + if (/^\s*}/.test(session.getLine(position.row).slice(position.column))) + return; + while (!token.type != 'keyword.block') { + token = iterator.stepBackward(); + if (token.value == '{%') { + while(true) { + token = iterator.stepForward(); + + if (token.type === 'keyword.block') { + break; + } else if (token.value.trim() == '%') { + token = null; + break; + } + } + break; + } + } + if (!token ) return ; + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + + if (this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + return { + text: "}" + "{% end" + element + " %}", + selection: [1, 1] + }; + } + }); + + }; + + oop.inherits(LiquidBehaviour, Behaviour); + + exports.LiquidBehaviour = LiquidBehaviour; + }); + +define("ace/mode/liquid_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; + +var LiquidHighlightRules = function() { + HtmlHighlightRules.call(this); + var functions = ( + "date|capitalize|downcase|upcase|first|last|join|sort|map|size|escape|" + + "escape_once|strip_html|strip_newlines|newline_to_br|replace|replace_first|" + + "truncate|truncatewords|prepend|append|minus|plus|times|divided_by|split" + ); + + var keywords = ( + "capture|endcapture|case|endcase|when|comment|endcomment|" + + "cycle|for|endfor|in|reversed|if|endif|else|elsif|include|endinclude|unless|endunless|" + + "style|text|image|widget|plugin|marker|endmarker|tablerow|endtablerow" + ); + var blocks = 'for|if|case|capture|unless|tablerow|marker|comment'; + + var builtinVariables = 'forloop|tablerowloop'; + + var definitions = ("assign"); + + var keywordMapper = this.createKeywordMapper({ + "variable.language": builtinVariables, + "keyword": keywords, + "keyword.block": blocks, + "support.function": functions, + "keyword.definition": definitions + }, "identifier"); + for (var rule in this.$rules) { + this.$rules[rule].unshift({ + token : "variable", + regex : "{%", + push : "liquid-start" + }, { + token : "variable", + regex : "{{", + push : "liquid-start" + }); + } + + this.addRules({ + "liquid-start" : [{ + token: "variable", + regex: "}}", + next: "pop" + }, { + token: "variable", + regex: "%}", + next: "pop" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "keyword.operator", + regex : "/|\\*|\\-|\\+|=|!=|\\?\\:" + }, { + token : "paren.lparen", + regex : /[\[\({]/ + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token : "text", + regex : "\\s+" + }] + }); + + this.normalizeRules(); +}; +oop.inherits(LiquidHighlightRules, TextHighlightRules); + +exports.LiquidHighlightRules = LiquidHighlightRules; +}); + +define("ace/mode/liquid",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/html","ace/mode/html_completions","ace/mode/behaviour/liquid","ace/mode/liquid_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var HtmlMode = require("./html").Mode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var LiquidBehaviour = require("./behaviour/liquid").LiquidBehaviour; +var LiquidHighlightRules = require("./liquid_highlight_rules").LiquidHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function() { + this.HighlightRules = LiquidHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new LiquidBehaviour(); + this.$completer = new HtmlCompletions(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.blockComment = {start: ""}; + this.voidElements = new HtmlMode().voidElements; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.$id = "ace/mode/liquid"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/liquid"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-lisp.js b/htdocs/includes/ace/src/mode-lisp.js similarity index 81% rename from htdocs/includes/ace/mode-lisp.js rename to htdocs/includes/ace/src/mode-lisp.js index fb0897d9da5..f8d91aefd71 100644 --- a/htdocs/includes/ace/mode-lisp.js +++ b/htdocs/includes/ace/src/mode-lisp.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/lisp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -72,7 +72,7 @@ var LispHighlightRules = function() { next : "start" } ] -} +}; }; @@ -81,7 +81,7 @@ oop.inherits(LispHighlightRules, TextHighlightRules); exports.LispHighlightRules = LispHighlightRules; }); -ace.define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) { +define("ace/mode/lisp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lisp_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -102,4 +102,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/lisp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-livescript.js b/htdocs/includes/ace/src/mode-livescript.js similarity index 91% rename from htdocs/includes/ace/mode-livescript.js rename to htdocs/includes/ace/src/mode-livescript.js index 0e480a9133a..0db73b29bf9 100644 --- a/htdocs/includes/ace/mode-livescript.js +++ b/htdocs/includes/ace/src/mode-livescript.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -38,7 +38,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/text"], function(require, exports, module){ +define("ace/mode/livescript",["require","exports","module","ace/tokenizer","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/text"], function(require, exports, module){ var identifier, LiveScriptMode, keywordend, stringfill; identifier = '(?![\\d\\s])[$\\w\\xAA-\\uFFDC](?:(?!\\s)[$\\w\\xAA-\\uFFDC]|-[A-Za-z])*'; exports.Mode = LiveScriptMode = (function(superclass){ @@ -50,6 +50,7 @@ ace.define("ace/mode/livescript",["require","exports","module","ace/tokenizer"," this.$outdent = new that.MatchingBraceOutdent; } this.$id = "ace/mode/livescript"; + this.$behaviour = new (require("./behaviour/cstyle").CstyleBehaviour)(); } indenter = RegExp('(?:[({[=:]|[-~]>|\\b(?:e(?:lse|xport)|d(?:o|efault)|t(?:ry|hen)|finally|import(?:\\s*all)?|const|var|let|new|catch(?:\\s*' + identifier + ')?))\\s*$'); prototype.getNextLineIndent = function(state, line, tab){ @@ -268,4 +269,11 @@ function import$(obj, src){ for (var key in src) if (own.call(src, key)) obj[key] = src[key]; return obj; } -}); +}); (function() { + window.require(["ace/mode/livescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-logiql.js b/htdocs/includes/ace/src/mode-logiql.js similarity index 89% rename from htdocs/includes/ace/mode-logiql.js rename to htdocs/includes/ace/src/mode-logiql.js index f4ea30d0190..68364c79774 100644 --- a/htdocs/includes/ace/mode-logiql.js +++ b/htdocs/includes/ace/src/mode-logiql.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/logiql_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -62,7 +62,7 @@ var LogiQLHighlightRules = function() { }, { token: 'variable.parameter', regex: '([a-zA-Z][a-zA-Z_0-9]*|_)\\s*(?=(,|\\.|<-|->|\\)|\\]|=))' - } ] } + } ] }; this.normalizeRules(); }; @@ -72,7 +72,7 @@ oop.inherits(LogiQLHighlightRules, TextHighlightRules); exports.LogiQLHighlightRules = LogiQLHighlightRules; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -159,7 +159,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -199,7 +199,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/behaviour/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/logiql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/logiql_highlight_rules","ace/mode/folding/coffee","ace/token_iterator","ace/range","ace/mode/behaviour/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -272,7 +272,7 @@ oop.inherits(Mode, TextMode); this.getMatching = function(session, row, column) { if (row == undefined) - row = session.selection.lead + row = session.selection.lead; if (typeof row == "object") { column = row.column; row = row.row; @@ -307,4 +307,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/logiql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-logtalk.js b/htdocs/includes/ace/src/mode-logtalk.js new file mode 100644 index 00000000000..b647e1ee605 --- /dev/null +++ b/htdocs/includes/ace/src/mode-logtalk.js @@ -0,0 +1,352 @@ +define("ace/mode/logtalk_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var LogtalkHighlightRules = function() { + + this.$rules = { start: + [ { token: 'punctuation.definition.comment.logtalk', + regex: '/\\*', + push: + [ { token: 'punctuation.definition.comment.logtalk', + regex: '\\*/', + next: 'pop' }, + { defaultToken: 'comment.block.logtalk' } ] }, + { todo: 'fix grouping', + token: + [ 'comment.line.percentage.logtalk', + 'punctuation.definition.comment.logtalk' ], + regex: '%.*$\\n?' }, + { todo: 'fix grouping', + token: + [ 'storage.type.opening.logtalk', + 'punctuation.definition.storage.type.logtalk' ], + regex: ':-\\s(?:object|protocol|category|module)(?=[(])' }, + { todo: 'fix grouping', + token: + [ 'storage.type.closing.logtalk', + 'punctuation.definition.storage.type.logtalk' ], + regex: ':-\\send_(?:object|protocol|category)(?=[.])' }, + { caseInsensitive: false, + token: 'storage.type.relations.logtalk', + regex: '\\b(?:complements|extends|i(?:nstantiates|mp(?:orts|lements))|specializes)(?=[(])' }, + { caseInsensitive: false, + todo: 'fix grouping', + token: + [ 'storage.modifier.others.logtalk', + 'punctuation.definition.storage.modifier.logtalk' ], + regex: ':-\\s(?:e(?:lse|ndif)|built_in|dynamic|synchronized|threaded)(?=[.])' }, + { caseInsensitive: false, + todo: 'fix grouping', + token: + [ 'storage.modifier.others.logtalk', + 'punctuation.definition.storage.modifier.logtalk' ], + regex: ':-\\s(?:c(?:alls|oinductive)|e(?:lif|n(?:coding|sure_loaded)|xport)|i(?:f|n(?:clude|itialization|fo))|reexport|set_(?:logtalk|prolog)_flag|uses)(?=[(])' }, + { caseInsensitive: false, + todo: 'fix grouping', + token: + [ 'storage.modifier.others.logtalk', + 'punctuation.definition.storage.modifier.logtalk' ], + regex: ':-\\s(?:alias|info|d(?:ynamic|iscontiguous)|m(?:eta_(?:non_terminal|predicate)|ode|ultifile)|p(?:ublic|r(?:otected|ivate))|op|use(?:s|_module)|synchronized)(?=[(])' }, + { token: 'keyword.operator.message-sending.logtalk', + regex: '(:|::|\\^\\^)' }, + { token: 'keyword.operator.external-call.logtalk', + regex: '([{}])' }, + { token: 'keyword.operator.mode.logtalk', regex: '(\\?|@)' }, + { token: 'keyword.operator.comparison.term.logtalk', + regex: '(@=<|@<|@>|@>=|==|\\\\==)' }, + { token: 'keyword.operator.comparison.arithmetic.logtalk', + regex: '(=<|<|>|>=|=:=|=\\\\=)' }, + { token: 'keyword.operator.bitwise.logtalk', + regex: '(<<|>>|/\\\\|\\\\/|\\\\)' }, + { token: 'keyword.operator.evaluable.logtalk', + regex: '\\b(?:e|pi|div|mod|rem)\\b(?![-!(^~])' }, + { token: 'keyword.operator.evaluable.logtalk', + regex: '(\\*\\*|\\+|-|\\*|/|//)' }, + { token: 'keyword.operator.misc.logtalk', + regex: '(:-|!|\\\\+|,|;|-->|->|=|\\=|\\.|=\\.\\.|\\^|\\bas\\b|\\bis\\b)' }, + { caseInsensitive: false, + token: 'support.function.evaluable.logtalk', + regex: '\\b(a(bs|cos|sin|tan|tan2)|c(eiling|os)|div|exp|flo(at(_(integer|fractional)_part)?|or)|log|m(ax|in|od)|r(em|ound)|s(i(n|gn)|qrt)|t(an|runcate)|xor)(?=[(])' }, + { token: 'support.function.control.logtalk', + regex: '\\b(?:true|fa(?:il|lse)|repeat|(?:instantiation|system)_error)\\b(?![-!(^~])' }, + { token: 'support.function.control.logtalk', + regex: '\\b((?:type|domain|existence|permission|representation|evaluation|resource|syntax)_error)(?=[(])' }, + { token: 'support.function.control.logtalk', + regex: '\\b(?:ca(?:ll|tch)|ignore|throw|once)(?=[(])' }, + { token: 'support.function.chars-and-bytes-io.logtalk', + regex: '\\b(?:(?:get|p(?:eek|ut))_(c(?:har|ode)|byte)|nl)(?=[(])' }, + { token: 'support.function.chars-and-bytes-io.logtalk', + regex: '\\bnl\\b' }, + { token: 'support.function.atom-term-processing.logtalk', + regex: '\\b(?:atom_(?:length|c(?:hars|o(?:ncat|des)))|sub_atom|char_code|number_c(?:har|ode)s)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.term-testing.logtalk', + regex: '\\b(?:var|atom(ic)?|integer|float|c(?:allable|ompound)|n(?:onvar|umber)|ground|acyclic_term)(?=[(])' }, + { token: 'support.function.term-comparison.logtalk', + regex: '\\b(compare)(?=[(])' }, + { token: 'support.function.term-io.logtalk', + regex: '\\b(?:read(_term)?|write(?:q|_(?:canonical|term))?|(current_)?(?:char_conversion|op))(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.term-creation-and-decomposition.logtalk', + regex: '\\b(arg|copy_term|functor|numbervars|term_variables)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.term-unification.logtalk', + regex: '\\b(subsumes_term|unify_with_occurs_check)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.stream-selection-and-control.logtalk', + regex: '\\b(?:(?:se|curren)t_(?:in|out)put|open|close|flush_output|stream_property|at_end_of_stream|set_stream_position)(?=[(])' }, + { token: 'support.function.stream-selection-and-control.logtalk', + regex: '\\b(?:flush_output|at_end_of_stream)\\b' }, + { token: 'support.function.prolog-flags.logtalk', + regex: '\\b((?:se|curren)t_prolog_flag)(?=[(])' }, + { token: 'support.function.compiling-and-loading.logtalk', + regex: '\\b(logtalk_(?:compile|l(?:ibrary_path|oad|oad_context)|make(_target_action)?))(?=[(])' }, + { token: 'support.function.compiling-and-loading.logtalk', + regex: '\\b(logtalk_make)\\b' }, + { caseInsensitive: false, + token: 'support.function.event-handling.logtalk', + regex: '\\b(?:(?:abolish|define)_events|current_event)(?=[(])' }, + { token: 'support.function.implementation-defined-hooks.logtalk', + regex: '\\b(?:(?:create|current|set)_logtalk_flag|halt)(?=[(])' }, + { token: 'support.function.implementation-defined-hooks.logtalk', + regex: '\\b(halt)\\b' }, + { token: 'support.function.sorting.logtalk', + regex: '\\b((key)?(sort))(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.entity-creation-and-abolishing.logtalk', + regex: '\\b((c(?:reate|urrent)|abolish)_(?:object|protocol|category))(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.reflection.logtalk', + regex: '\\b((object|protocol|category)_property|co(mplements_object|nforms_to_protocol)|extends_(object|protocol|category)|imp(orts_category|lements_protocol)|(instantiat|specializ)es_class)(?=[(])' }, + { token: 'support.function.logtalk', + regex: '\\b((?:for|retract)all)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.execution-context.logtalk', + regex: '\\b(?:context|parameter|se(?:lf|nder)|this)(?=[(])' }, + { token: 'support.function.database.logtalk', + regex: '\\b(?:a(?:bolish|ssert(?:a|z))|clause|retract(all)?)(?=[(])' }, + { token: 'support.function.all-solutions.logtalk', + regex: '\\b((?:bag|set)of|f(?:ind|or)all)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.multi-threading.logtalk', + regex: '\\b(threaded(_(call|once|ignore|exit|peek|wait|notify))?)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.engines.logtalk', + regex: '\\b(threaded_engine(_(create|destroy|self|next(?:_reified)?|yield|post|fetch))?)(?=[(])' }, + { caseInsensitive: false, + token: 'support.function.reflection.logtalk', + regex: '\\b(?:current_predicate|predicate_property)(?=[(])' }, + { token: 'support.function.event-handler.logtalk', + regex: '\\b(?:before|after)(?=[(])' }, + { token: 'support.function.message-forwarding-handler.logtalk', + regex: '\\b(forward)(?=[(])' }, + { token: 'support.function.grammar-rule.logtalk', + regex: '\\b(?:expand_(?:goal|term)|(?:goal|term)_expansion|phrase)(?=[(])' }, + { token: 'punctuation.definition.string.begin.logtalk', + regex: '\'', + push: + [ { token: 'constant.character.escape.logtalk', + regex: '\\\\([\\\\abfnrtv"\']|(x[a-fA-F0-9]+|[0-7]+)\\\\)' }, + { token: 'punctuation.definition.string.end.logtalk', + regex: '\'', + next: 'pop' }, + { defaultToken: 'string.quoted.single.logtalk' } ] }, + { token: 'punctuation.definition.string.begin.logtalk', + regex: '"', + push: + [ { token: 'constant.character.escape.logtalk', regex: '\\\\.' }, + { token: 'punctuation.definition.string.end.logtalk', + regex: '"', + next: 'pop' }, + { defaultToken: 'string.quoted.double.logtalk' } ] }, + { token: 'constant.numeric.logtalk', + regex: '\\b(0b[0-1]+|0o[0-7]+|0x[0-9a-fA-F]+)\\b' }, + { token: 'constant.numeric.logtalk', + regex: '\\b(0\'\\\\.|0\'.|0\'\'|0\'")' }, + { token: 'constant.numeric.logtalk', + regex: '\\b(\\d+\\.?\\d*((e|E)(\\+|-)?\\d+)?)\\b' }, + { token: 'variable.other.logtalk', + regex: '\\b([A-Z_][A-Za-z0-9_]*)\\b' } ] }; + + this.normalizeRules(); +}; + +oop.inherits(LogtalkHighlightRules, TextHighlightRules); + +exports.LogtalkHighlightRules = LogtalkHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/logtalk",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/logtalk_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var Tokenizer = require("../tokenizer").Tokenizer; +var LogtalkHighlightRules = require("./logtalk_highlight_rules").LogtalkHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = LogtalkHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "%"; + this.blockComment = {start: "/*", end: "*/"}; + this.$id = "ace/mode/logtalk"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/logtalk"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-lsl.js b/htdocs/includes/ace/src/mode-lsl.js similarity index 96% rename from htdocs/includes/ace/mode-lsl.js rename to htdocs/includes/ace/src/mode-lsl.js index 2531f6e1361..f6d7a7497f5 100644 --- a/htdocs/includes/ace/mode-lsl.js +++ b/htdocs/includes/ace/src/mode-lsl.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/lsl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -91,7 +91,7 @@ function LSLHighlightRules() { exports.LSLHighlightRules = LSLHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -131,7 +131,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -152,8 +152,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -271,7 +271,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module) { +define("ace/mode/lsl",["require","exports","module","ace/mode/lsl_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/lib/oop"], function(require, exports, module) { "use strict"; var Rules = require("./lsl_highlight_rules").LSLHighlightRules; @@ -332,4 +332,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/lsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-lua.js b/htdocs/includes/ace/src/mode-lua.js similarity index 86% rename from htdocs/includes/ace/mode-lua.js rename to htdocs/includes/ace/src/mode-lua.js index bcf4daa5875..e96b6c37a9b 100644 --- a/htdocs/includes/ace/mode-lua.js +++ b/htdocs/includes/ace/src/mode-lua.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/lua_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -150,14 +150,14 @@ var LuaHighlightRules = function() { }; this.normalizeRules(); -} +}; oop.inherits(LuaHighlightRules, TextHighlightRules); exports.LuaHighlightRules = LuaHighlightRules; }); -ace.define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/lua",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -237,7 +237,7 @@ oop.inherits(FoldMode, BaseFoldMode); } }; - this.luaBlock = function(session, row, column) { + this.luaBlock = function(session, row, column, tokenRange) { var stream = new TokenIterator(session, row, column); var indentKeywords = { "function": 1, @@ -280,6 +280,12 @@ oop.inherits(FoldMode, BaseFoldMode); } } + if (!token) + return null; + + if (tokenRange) + return stream.getCurrentTokenRange(); + var row = stream.getCurrentTokenRow(); if (dir === -1) return new Range(row, session.getLine(row).length, startRow, startColumn); @@ -291,7 +297,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) { +define("ace/mode/lua",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lua_highlight_rules","ace/mode/folding/lua","ace/range","ace/worker/worker_client"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -389,17 +395,31 @@ oop.inherits(Mode, TextMode); return (tokens[0].type == "keyword" && outdentKeywords.indexOf(tokens[0].value) != -1); }; - this.autoOutdent = function(state, session, row) { - var prevLine = session.getLine(row - 1); - var prevIndent = this.$getIndent(prevLine).length; - var prevTokens = this.getTokenizer().getLineTokens(prevLine, "start").tokens; - var tabLength = session.getTabString().length; - var expectedIndent = prevIndent + tabLength * getNetIndentLevel(prevTokens); - var curIndent = this.$getIndent(session.getLine(row)).length; - if (curIndent <= expectedIndent) { - return; + this.getMatching = function(session, row, column) { + if (row == undefined) { + var pos = session.selection.lead; + column = pos.column; + row = pos.row; + } + + var startToken = session.getTokenAt(row, column); + if (startToken && startToken.value in indentKeywords) + return this.foldingRules.luaBlock(session, row, column, true); + }; + + this.autoOutdent = function(state, session, row) { + var line = session.getLine(row); + var column = line.match(/^\s*/)[0].length; + if (!column || !row) return; + + var startRange = this.getMatching(session, row, column + 1); + if (!startRange || startRange.start.row == row) + return; + var indent = this.$getIndent(session.getLine(startRange.start.row)); + if (indent.length != column) { + session.replace(new Range(row, 0, row, column), indent); + session.outdentRows(new Range(row + 1, 0, row + 1, 0)); } - session.outdentRows(new Range(row, 0, row + 2, 0)); }; this.createWorker = function(session) { @@ -421,4 +441,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/lua"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-luapage.js b/htdocs/includes/ace/src/mode-luapage.js similarity index 92% rename from htdocs/includes/ace/mode-luapage.js rename to htdocs/includes/ace/src/mode-luapage.js index be6b0922450..5f5ecce9079 100644 --- a/htdocs/includes/ace/mode-luapage.js +++ b/htdocs/includes/ace/src/mode-luapage.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && /<=^]/ + }, { + token: "constant.numeric", + regex: /\d[\d.-]*/ + }, { + token: "string", + regex: /"(?:\\"|[^"])*"/ + }, { + token: "keyword", + regex: /(?:\\.|[^\s\-+&|!(){}\[\]^"~*?:\\])+:/, + next: "maybeRegex" + }, { + token: "term", + regex: /\w+/ + }, { + token: "text", + regex: /\s+/ + } + ], + "maybeRegex": [{ + token: "text", + regex: /\s+/ + }, { + token: "string.regexp.start", + regex: "/", + next: "regex" + }, { + regex: "", + next: "start" + }], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp.end", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token: "constant.language.escape", + regex: "<\d+-\d+>|[~&@]" + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ] + }; +}; + +oop.inherits(LuceneHighlightRules, TextHighlightRules); + +exports.LuceneHighlightRules = LuceneHighlightRules; +}); + +define("ace/mode/lucene",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/lucene_highlight_rules"], function(require, exports, module) { +'use strict'; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LuceneHighlightRules = require("./lucene_highlight_rules").LuceneHighlightRules; + +var Mode = function() { + this.HighlightRules = LuceneHighlightRules; + this.$behaviour = this.$defaultBehaviour; +}; + +oop.inherits(Mode, TextMode); + +(function() { + this.$id = "ace/mode/lucene"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/lucene"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-makefile.js b/htdocs/includes/ace/src/mode-makefile.js similarity index 92% rename from htdocs/includes/ace/mode-makefile.js rename to htdocs/includes/ace/src/mode-makefile.js index cc6fc653e28..0314c6a216b 100644 --- a/htdocs/includes/ace/mode-makefile.js +++ b/htdocs/includes/ace/src/mode-makefile.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -39,7 +39,7 @@ var ShHighlightRules = function() { var fileDescriptor = "(?:&" + intPart + ")"; var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; - var variable = "(?:" + variableName + "=)"; + var variable = "(?:" + variableName + "(?==))"; var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; @@ -217,7 +217,7 @@ oop.inherits(ShHighlightRules, TextHighlightRules); exports.ShHighlightRules = ShHighlightRules; }); -ace.define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"], function(require, exports, module) { +define("ace/mode/makefile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/sh_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -281,7 +281,7 @@ var MakefileHighlightRules = function() { next : "start" } ] -} +}; }; @@ -290,7 +290,7 @@ oop.inherits(MakefileHighlightRules, TextHighlightRules); exports.MakefileHighlightRules = MakefileHighlightRules; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -377,7 +377,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +define("ace/mode/makefile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/makefile_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -401,4 +401,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/makefile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-markdown.js b/htdocs/includes/ace/src/mode-markdown.js similarity index 84% rename from htdocs/includes/ace/mode-markdown.js rename to htdocs/includes/ace/src/mode-markdown.js index 51df9be7f79..380fab69915 100644 --- a/htdocs/includes/ace/mode-markdown.js +++ b/htdocs/includes/ace/src/mode-markdown.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,7 +789,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -969,7 +970,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -991,7 +992,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1000,7 +1001,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1070,14 +1071,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1158,7 +1164,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1213,7 +1219,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && /= endMarker.length && m[2][0] == endMarker[0] + ) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; this.$rules["start"].unshift({ token : "empty_line", @@ -2565,18 +2615,11 @@ var MarkdownHighlightRules = function() { token : function(value) { return "markup.heading." + value.length; }, - regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, + regex : /^#{1,6}(?=\s|$)/, next : "header" }, - github_embed("(?:javascript|js)", "jscode-"), - github_embed("xml", "xmlcode-"), - github_embed("html", "htmlcode-"), - github_embed("css", "csscode-"), - { // Github style block - token : "support.function", - regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { // block quote + codeBlockStartRule, + { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" @@ -2607,10 +2650,10 @@ var MarkdownHighlightRules = function() { regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" }, { // link by url token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\[)(" + // [ - escaped("]") + // link text + regex : "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" "(\\))" // ) }, { // strong ** __ @@ -2658,11 +2701,9 @@ var MarkdownHighlightRules = function() { next : "listblock-start" }, { include : "basic", noEscape: true - }, { // Github style block - token : "support.function", - regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { + }, + codeBlockStartRule, + { defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly } ], @@ -2680,39 +2721,9 @@ var MarkdownHighlightRules = function() { defaultToken : "string.blockquote" } ], - "githubblock" : [ { - token : "support.function", - regex : "^\\s*```", - next : "start" - }, { - defaultToken : "support.function" - } ] + "githubblock" : codeBlockRules }); - this.embedRules(JavaScriptHighlightRules, "jscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(HtmlHighlightRules, "htmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(CssHighlightRules, "csscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(XmlHighlightRules, "xmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - this.normalizeRules(); }; oop.inherits(MarkdownHighlightRules, TextHighlightRules); @@ -2720,7 +2731,7 @@ oop.inherits(MarkdownHighlightRules, TextHighlightRules); exports.MarkdownHighlightRules = MarkdownHighlightRules; }); -ace.define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2785,7 +2796,7 @@ oop.inherits(FoldMode, BaseFoldMode); var ch = token.value[0]; if (ch == "=") return 6; if (ch == "-") return 5; - return 7 - token.value.search(/[^#]/); + return 7 - token.value.search(/[^#]|$/); } if (isHeading(row)) { @@ -2816,7 +2827,309 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown"], function(require, exports, module) { +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var reservedKeywords = exports.reservedKeywords = ( + '!|{|}|case|do|done|elif|else|'+ + 'esac|fi|for|if|in|then|until|while|'+ + '&|;|export|local|read|typeset|unset|'+ + 'elif|select|set|function|declare|readonly' + ); + +var languageConstructs = exports.languageConstructs = ( + '[|]|alias|bg|bind|break|builtin|'+ + 'cd|command|compgen|complete|continue|'+ + 'dirs|disown|echo|enable|eval|exec|'+ + 'exit|fc|fg|getopts|hash|help|history|'+ + 'jobs|kill|let|logout|popd|printf|pushd|'+ + 'pwd|return|set|shift|shopt|source|'+ + 'suspend|test|times|trap|type|ulimit|'+ + 'umask|unalias|wait' +); + +var ShHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + + var func = "(?:" + variableName + "\\s*\\(\\))"; + + this.$rules = { + "start" : [{ + token : "constant", + regex : /\\./ + }, { + token : ["text", "comment"], + regex : /(^|\s)(#.*)$/ + }, { + token : "string.start", + regex : '"', + push : [{ + token : "constant.language.escape", + regex : /\\(?:[$`"\\]|$)/ + }, { + include : "variables" + }, { + token : "keyword.operator", + regex : /`/ // TODO highlight ` + }, { + token : "string.end", + regex : '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token : "string", + regex : "\\$'", + push : [{ + token : "constant.language.escape", + regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token : "string", + regex : "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex : "<<<", + token : "keyword.operator" + }, { + stateName: "heredoc", + regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + {type:"constant", value: tokens[1]}, + {type:"text", value: tokens[2]}, + {type:"string", value: tokens[3]}, + {type:"support.class", value: tokens[4]}, + {type:"string", value: tokens[5]} + ]; + }, + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : ["keyword", "text", "text", "text", "variable"], + regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token : "variable.language", + regex : builtinVariable + }, { + token : "variable", + regex : variable + }, { + include : "variables" + }, { + token : "support.function", + regex : func + }, { + token : "support.function", + regex : fileDescriptor + }, { + token : "string", // ' string + start : "'", end : "'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token : "punctuation.operator", + regex : ";" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]]" + }, { + token : "paren.rparen", + regex : "[\\)\\}]", + next : "pop" + }], + variables: [{ + token : "variable", + regex : /(\$)(\w+)/ + }, { + token : ["variable", "paren.lparen"], + regex : /(\$)(\()/, + push : "start" + }, { + token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push : "start" + }, { + token : "variable", + regex : /\$[*@#?\-$!0_]/ + }, { + token : ["variable", "paren.lparen"], + regex : /(\$)(\{)/, + push : "start" + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(ShHighlightRules, TextHighlightRules); + +exports.ShHighlightRules = ShHighlightRules; +}); + +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var Range = require("../range").Range; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; + +var Mode = function() { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = new CstyleBehaviour(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + + this.$id = "ace/mode/sh"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -2831,9 +3144,12 @@ var Mode = function() { this.HighlightRules = MarkdownHighlightRules; this.createModeDelegates({ - "js-": JavaScriptMode, - "xml-": XmlMode, - "html-": HtmlMode + javascript: require("./javascript").Mode, + html: require("./html").Mode, + bash: require("./sh").Mode, + sh: require("./sh").Mode, + xml: require("./xml").Mode, + css: require("./css").Mode }); this.foldingRules = new MarkdownFoldMode(); @@ -2844,6 +3160,7 @@ oop.inherits(Mode, TextMode); (function() { this.type = "text"; this.blockComment = {start: ""}; + this.$quotes = {'"': '"', "`": "`"}; this.getNextLineIndent = function(state, line, tab) { if (state == "listblock") { @@ -2862,4 +3179,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/markdown"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-mask.js b/htdocs/includes/ace/src/mode-mask.js similarity index 91% rename from htdocs/includes/ace/mode-mask.js rename to htdocs/includes/ace/src/mode-mask.js index 983d02f8647..83cc5fe70b3 100644 --- a/htdocs/includes/ace/mode-mask.js +++ b/htdocs/includes/ace/src/mode-mask.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,15 +522,15 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -559,7 +560,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -582,7 +583,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -619,6 +620,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -627,7 +631,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -651,7 +655,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -663,7 +667,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -701,7 +705,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -713,7 +717,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,31 +1002,62 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules","ace/mode/html_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; +var modes = require("../config").$modes; + var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; -var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; var escaped = function(ch) { return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; -} - -function github_embed(tag, prefix) { - return { // Github style block - token : "support.function", - regex : "^\\s*```" + tag + "\\s*$", - push : prefix + "start" - }; -} +}; var MarkdownHighlightRules = function() { HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token : "support.function", + regex : /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function(value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next : "githubblock" + }; + var codeBlockRules = [{ + token : "support.function", + regex : ".*", + onMatch: function(value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if ( + m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0] + ) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; this.$rules["start"].unshift({ token : "empty_line", @@ -1038,18 +1073,11 @@ var MarkdownHighlightRules = function() { token : function(value) { return "markup.heading." + value.length; }, - regex : /^#{1,6}(?=\s*[^ #]|\s+#.)/, + regex : /^#{1,6}(?=\s|$)/, next : "header" }, - github_embed("(?:javascript|js)", "jscode-"), - github_embed("xml", "xmlcode-"), - github_embed("html", "htmlcode-"), - github_embed("css", "csscode-"), - { // Github style block - token : "support.function", - regex : "^\\s*```\\s*\\S*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { // block quote + codeBlockStartRule, + { // block quote token : "string.blockquote", regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", next : "blockquote" @@ -1080,10 +1108,10 @@ var MarkdownHighlightRules = function() { regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" }, { // link by url token : ["text", "string", "text", "markup.underline", "string", "text"], - regex : "(\\[)(" + // [ - escaped("]") + // link text + regex : "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text ")(\\]\\()"+ // ]( - '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" "(\\))" // ) }, { // strong ** __ @@ -1131,11 +1159,9 @@ var MarkdownHighlightRules = function() { next : "listblock-start" }, { include : "basic", noEscape: true - }, { // Github style block - token : "support.function", - regex : "^\\s*```\\s*[a-zA-Z]*(?:{.*?\\})?\\s*$", - next : "githubblock" - }, { + }, + codeBlockStartRule, + { defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly } ], @@ -1153,39 +1179,9 @@ var MarkdownHighlightRules = function() { defaultToken : "string.blockquote" } ], - "githubblock" : [ { - token : "support.function", - regex : "^\\s*```", - next : "start" - }, { - defaultToken : "support.function" - } ] + "githubblock" : codeBlockRules }); - this.embedRules(JavaScriptHighlightRules, "jscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(HtmlHighlightRules, "htmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(CssHighlightRules, "csscode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - - this.embedRules(XmlHighlightRules, "xmlcode-", [{ - token : "support.function", - regex : "^\\s*```", - next : "pop" - }]); - this.normalizeRules(); }; oop.inherits(MarkdownHighlightRules, TextHighlightRules); @@ -1193,7 +1189,7 @@ oop.inherits(MarkdownHighlightRules, TextHighlightRules); exports.MarkdownHighlightRules = MarkdownHighlightRules; }); -ace.define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { +define("ace/mode/mask_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/css_highlight_rules","ace/mode/markdown_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; exports.MaskHighlightRules = MaskHighlightRules; @@ -1473,7 +1469,7 @@ function Token(token, rgx, mix) { }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1513,7 +1509,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1526,7 +1522,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1540,13 +1536,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1573,7 +1569,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1581,18 +1577,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1613,8 +1623,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -1732,7 +1742,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/mask",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mask_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1783,4 +1793,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/mask"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-matlab.js b/htdocs/includes/ace/src/mode-matlab.js similarity index 97% rename from htdocs/includes/ace/mode-matlab.js rename to htdocs/includes/ace/src/mode-matlab.js index b8870403b68..6e03112eeb7 100644 --- a/htdocs/includes/ace/mode-matlab.js +++ b/htdocs/includes/ace/src/mode-matlab.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/matlab_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -230,7 +230,7 @@ oop.inherits(MatlabHighlightRules, TextHighlightRules); exports.MatlabHighlightRules = MatlabHighlightRules; }); -ace.define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules"], function(require, exports, module) { +define("ace/mode/matlab",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/matlab_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -253,4 +253,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/matlab"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-maze.js b/htdocs/includes/ace/src/mode-maze.js similarity index 89% rename from htdocs/includes/ace/mode-maze.js rename to htdocs/includes/ace/src/mode-maze.js index cdc8d221606..faa82968572 100644 --- a/htdocs/includes/ace/mode-maze.js +++ b/htdocs/includes/ace/src/mode-maze.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/maze_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/maze_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -120,7 +120,7 @@ oop.inherits(MazeHighlightRules, TextHighlightRules); exports.MazeHighlightRules = MazeHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -141,8 +141,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -260,7 +260,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/maze",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/maze_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/maze",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/maze_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -281,4 +281,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/maze"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-mel.js b/htdocs/includes/ace/src/mode-mel.js similarity index 96% rename from htdocs/includes/ace/mode-mel.js rename to htdocs/includes/ace/src/mode-mel.js index 20de249b1f6..ba76cc3fb9d 100644 --- a/htdocs/includes/ace/mode-mel.js +++ b/htdocs/includes/ace/src/mode-mel.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/mel_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -78,7 +78,7 @@ var MELHighlightRules = function() { next: 'pop' }, { defaultToken: 'meta.function.mel' } ] } - ] } + ] }; this.normalizeRules(); }; @@ -88,7 +88,7 @@ oop.inherits(MELHighlightRules, TextHighlightRules); exports.MELHighlightRules = MELHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -109,8 +109,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -228,7 +228,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/mel",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mel_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -253,4 +253,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/mel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-mixal.js b/htdocs/includes/ace/src/mode-mixal.js new file mode 100644 index 00000000000..0e2885fc8b7 --- /dev/null +++ b/htdocs/includes/ace/src/mode-mixal.js @@ -0,0 +1,122 @@ +define("ace/mode/mixal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var MixalHighlightRules = function() { + var isValidSymbol = function(string) { + return string && string.search(/^[A-Z\u0394\u03a0\u03a30-9]{1,10}$/) > -1 && string.search(/[A-Z\u0394\u03a0\u03a3]/) > -1; + }; + + var isValidOp = function(op) { + return op && [ + 'NOP', 'ADD', 'FADD', 'SUB', 'FSUB', 'MUL', 'FMUL', 'DIV', 'FDIV', 'NUM', 'CHAR', 'HLT', + 'SLA', 'SRA', 'SLAX', 'SRAX', 'SLC', 'SRC', 'MOVE', 'LDA', 'LD1', 'LD2', 'LD3', 'LD4', + 'LD5', 'LD6', 'LDX', 'LDAN', 'LD1N', 'LD2N', 'LD3N', 'LD4N', 'LD5N', 'LD6N', 'LDXN', + 'STA', 'ST1', 'ST2', 'ST3', 'ST4', 'ST5', 'ST6', 'STX', 'STJ', 'STZ', 'JBUS', 'IOC', + 'IN', 'OUT', 'JRED', 'JMP', 'JSJ', 'JOV', 'JNOV', 'JL', 'JE', 'JG', 'JGE', 'JNE', 'JLE', + 'JAN', 'JAZ', 'JAP', 'JANN', 'JANZ', 'JANP', 'J1N', 'J1Z', 'J1P', 'J1NN', 'J1NZ', + 'J1NP', 'J2N', 'J2Z', 'J2P', 'J2NN', 'J2NZ', 'J2NP','J3N', 'J3Z', 'J3P', 'J3NN', 'J3NZ', + 'J3NP', 'J4N', 'J4Z', 'J4P', 'J4NN', 'J4NZ', 'J4NP', 'J5N', 'J5Z', 'J5P', 'J5NN', + 'J5NZ', 'J5NP','J6N', 'J6Z', 'J6P', 'J6NN', 'J6NZ', 'J6NP', 'JXAN', 'JXZ', 'JXP', + 'JXNN', 'JXNZ', 'JXNP', 'INCA', 'DECA', 'ENTA', 'ENNA', 'INC1', 'DEC1', 'ENT1', 'ENN1', + 'INC2', 'DEC2', 'ENT2', 'ENN2', 'INC3', 'DEC3', 'ENT3', 'ENN3', 'INC4', 'DEC4', 'ENT4', + 'ENN4', 'INC5', 'DEC5', 'ENT5', 'ENN5', 'INC6', 'DEC6', 'ENT6', 'ENN6', 'INCX', 'DECX', + 'ENTX', 'ENNX', 'CMPA', 'FCMP', 'CMP1', 'CMP2', 'CMP3', 'CMP4', 'CMP5', 'CMP6', 'CMPX', + 'EQU', 'ORIG', 'CON', 'ALF', 'END' + ].indexOf(op) > -1; + }; + + var containsOnlySupportedCharacters = function(string) { + return string && string.search(/[^ A-Z\u0394\u03a0\u03a30-9.,()+*/=$<>@;:'-]/) == -1; + }; + + this.$rules = { + "start" : [{ + token: "comment.line.character", + regex: /^ *\*.*$/ + }, { + token: function(label, space0, keyword, space1, literal, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + "keyword.control", + "text", + containsOnlySupportedCharacters(literal) ? "text" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(ALF)( )(.{5})(\s+.*)?$/ + }, { + token: function(label, space0, keyword, space1, literal, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + "keyword.control", + "text", + containsOnlySupportedCharacters(literal) ? "text" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(ALF)( )(\S.{4})(\s+.*)?$/ + }, { + token: function(label, space0, op, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + isValidOp(op) ? "keyword.control" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(\S+)(?:\s*)$/ + }, { + token: function(label, space0, op, space1, address, comment) { + return [ + isValidSymbol(label) ? "variable.other" : "invalid.illegal", + "text", + isValidOp(op) ? "keyword.control" : "invalid.illegal", + "text", + containsOnlySupportedCharacters(address) ? "text" : "invalid.illegal", + "comment.line.character" + ]; + }, + regex: /^(\S+)?( +)(\S+)( +)(\S+)(\s+.*)?$/ + }, { + defaultToken: "text" + }] + }; +}; + +oop.inherits(MixalHighlightRules, TextHighlightRules); + +exports.MixalHighlightRules = MixalHighlightRules; + +}); + +define("ace/mode/mixal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mixal_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var MixalHighlightRules = require("./mixal_highlight_rules").MixalHighlightRules; + +var Mode = function() { + this.HighlightRules = MixalHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.$id = "ace/mode/mixal"; + this.lineCommentStart = "*"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/mixal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-mushcode.js b/htdocs/includes/ace/src/mode-mushcode.js similarity index 93% rename from htdocs/includes/ace/mode-mushcode.js rename to htdocs/includes/ace/src/mode-mushcode.js index 5e6b7eaf035..54004fad663 100644 --- a/htdocs/includes/ace/mode-mushcode.js +++ b/htdocs/includes/ace/src/mode-mushcode.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/mushcode_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -564,7 +564,7 @@ oop.inherits(MushCodeRules, TextHighlightRules); exports.MushCodeRules = MushCodeRules; }); -ace.define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -587,13 +587,13 @@ oop.inherits(FoldMode, BaseFoldMode); return this.indentationBlock(session, row, match.index + match[2].length); return this.indentationBlock(session, row); } - } + }; }).call(FoldMode.prototype); }); -ace.define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { +define("ace/mode/mushcode",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mushcode_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -671,4 +671,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/mushcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-mysql.js b/htdocs/includes/ace/src/mode-mysql.js similarity index 89% rename from htdocs/includes/ace/mode-mysql.js rename to htdocs/includes/ace/src/mode-mysql.js index 7abe675c9e3..c1209792ad0 100644 --- a/htdocs/includes/ace/mode-mysql.js +++ b/htdocs/includes/ace/src/mode-mysql.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/mysql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); @@ -58,8 +58,8 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var MysqlHighlightRules = function() { var mySqlKeywords = /*sql*/ "alter|and|as|asc|between|count|create|delete|desc|distinct|drop|from|having|in|insert|into|is|join|like|not|on|or|order|select|set|table|union|update|values|where" + "|accessible|action|add|after|algorithm|all|analyze|asensitive|at|authors|auto_increment|autocommit|avg|avg_row_length|before|binary|binlog|both|btree|cache|call|cascade|cascaded|case|catalog_name|chain|change|changed|character|check|checkpoint|checksum|class_origin|client_statistics|close|coalesce|code|collate|collation|collations|column|columns|comment|commit|committed|completion|concurrent|condition|connection|consistent|constraint|contains|continue|contributors|convert|cross|current_date|current_time|current_timestamp|current_user|cursor|data|database|databases|day_hour|day_microsecond|day_minute|day_second|deallocate|dec|declare|default|delay_key_write|delayed|delimiter|des_key_file|describe|deterministic|dev_pop|dev_samp|deviance|directory|disable|discard|distinctrow|div|dual|dumpfile|each|elseif|enable|enclosed|end|ends|engine|engines|enum|errors|escape|escaped|even|event|events|every|execute|exists|exit|explain|extended|fast|fetch|field|fields|first|flush|for|force|foreign|found_rows|full|fulltext|function|general|global|grant|grants|group|groupby_concat|handler|hash|help|high_priority|hosts|hour_microsecond|hour_minute|hour_second|if|ignore|ignore_server_ids|import|index|index_statistics|infile|inner|innodb|inout|insensitive|insert_method|install|interval|invoker|isolation|iterate|key|keys|kill|language|last|leading|leave|left|level|limit|linear|lines|list|load|local|localtime|localtimestamp|lock|logs|low_priority|master|master_heartbeat_period|master_ssl_verify_server_cert|masters|match|max|max_rows|maxvalue|message_text|middleint|migrate|min|min_rows|minute_microsecond|minute_second|mod|mode|modifies|modify|mutex|mysql_errno|natural|next|no|no_write_to_binlog|offline|offset|one|online|open|optimize|option|optionally|out|outer|outfile|pack_keys|parser|partition|partitions|password|phase|plugin|plugins|prepare|preserve|prev|primary|privileges|procedure|processlist|profile|profiles|purge|query|quick|range|read|read_write|reads|real|rebuild|recover|references|regexp|relaylog|release|remove|rename|reorganize|repair|repeatable|replace|require|resignal|restrict|resume|return|returns|revoke|right|rlike|rollback|rollup|row|row_format|rtree|savepoint|schedule|schema|schema_name|schemas|second_microsecond|security|sensitive|separator|serializable|server|session|share|show|signal|slave|slow|smallint|snapshot|soname|spatial|specific|sql|sql_big_result|sql_buffer_result|sql_cache|sql_calc_found_rows|sql_no_cache|sql_small_result|sqlexception|sqlstate|sqlwarning|ssl|start|starting|starts|status|std|stddev|stddev_pop|stddev_samp|storage|straight_join|subclass_origin|sum|suspend|table_name|table_statistics|tables|tablespace|temporary|terminated|to|trailing|transaction|trigger|triggers|truncate|uncommitted|undo|uninstall|unique|unlock|upgrade|usage|use|use_frm|user|user_resources|user_statistics|using|utc_date|utc_time|utc_timestamp|value|variables|varying|view|views|warnings|when|while|with|work|write|xa|xor|year_month|zerofill|begin|do|then|else|loop|repeat"; - var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl" - var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee" + var builtins = "by|bool|boolean|bit|blob|decimal|double|enum|float|long|longblob|longtext|medium|mediumblob|mediumint|mediumtext|time|timestamp|tinyblob|tinyint|tinytext|text|bigint|int|int1|int2|int3|int4|int8|integer|float|float4|float8|double|char|varbinary|varchar|varcharacter|precision|date|datetime|year|unsigned|signed|numeric|ucase|lcase|mid|len|round|rank|now|format|coalesce|ifnull|isnull|nvl"; + var variable = "charset|clear|connect|edit|ego|exit|go|help|nopager|notee|nowarning|pager|print|prompt|quit|rehash|source|status|system|tee"; var keywordMapper = this.createKeywordMapper({ "support.function": builtins, @@ -137,7 +137,7 @@ oop.inherits(MysqlHighlightRules, TextHighlightRules); exports.MysqlHighlightRules = MysqlHighlightRules; }); -ace.define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules"], function(require, exports, module) { +define("ace/mode/mysql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/mysql_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("../mode/text").Mode; @@ -157,4 +157,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/mysql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-nginx.js b/htdocs/includes/ace/src/mode-nginx.js new file mode 100644 index 00000000000..c5b5d5409d7 --- /dev/null +++ b/htdocs/includes/ace/src/mode-nginx.js @@ -0,0 +1,298 @@ +define("ace/mode/nginx_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NginxHighlightRules = function () { + var keywords = "include|index|absolute_redirect|aio|output_buffers|directio|sendfile|aio_write|alias|root|chunked_transfer_encoding|client_body_buffer_size|client_body_in_file_only|client_body_in_single_buffer|client_body_temp_path|client_body_timeout|client_header_buffer_size|client_header_timeout|client_max_body_size|connection_pool_size|default_type|disable_symlinks|directio_alignment|error_page|etag|if_modified_since|ignore_invalid_headers|internal|keepalive_requests|keepalive_disable|keepalive_timeout|limit_except|large_client_header_buffers|limit_rate|limit_rate_after|lingering_close|lingering_time|lingering_timeout|listen|log_not_found|log_subrequest|max_ranges|merge_slashes|msie_padding|msie_refresh|open_file_cache|open_file_cache_errors|open_file_cache_min_uses|open_file_cache_valid|output_buffers|port_in_redirect|postpone_output|read_ahead|recursive_error_pages|request_pool_size|reset_timedout_connection|resolver|resolver_timeout|satisfy|send_lowat|send_timeout|sendfile|sendfile_max_chunk|server_name|server_name_in_redirect|server_names_hash_bucket_size|server_names_hash_max_size|server_tokens|subrequest_output_buffer_size|tcp_nodelay|tcp_nopush|try_files|types|types_hash_bucket_size|types_hash_max_size|underscores_in_headers|variables_hash_bucket_size|variables_hash_max_size|accept_mutex|accept_mutex_delay|debug_connection|error_log|daemon|debug_points|env|load_module|lock_file|master_process|multi_accept|pcre_jit|pid|ssl_engine|thread_pool|timer_resolution|use|user|worker_aio_requests|worker_connections|worker_cpu_affinity|worker_priority|worker_processes|worker_rlimit_core|worker_rlimit_nofile|worker_shutdown_timeout|working_directory|allow|deny|add_before_body|add_after_body|addition_types|api|status_zone|auth_basic|auth_basic_user_file|auth_jwt|auth_jwt|auth_jwt_claim_set|auth_jwt_header_set|auth_jwt_key_file|auth_jwt_key_request|auth_jwt_leeway|auth_request|auth_request_set|autoindex|autoindex_exact_size|autoindex_format|autoindex_localtime|ancient_browser|ancient_browser_value|modern_browser|modern_browser_value|charset|charset_map|charset_types|override_charset|source_charset|create_full_put_path|dav_access|dav_methods|min_delete_depth|empty_gif|f4f|f4f_buffer_size|fastcgi_bind|fastcgi_buffer_size|fastcgi_buffering|fastcgi_buffers|fastcgi_busy_buffers_size|fastcgi_cache|fastcgi_cache_background_update|fastcgi_cache_bypass|fastcgi_cache_key|fastcgi_cache_lock|fastcgi_cache_lock_age|fastcgi_cache_lock_timeout|fastcgi_cache_max_range_offset|fastcgi_cache_methods|fastcgi_cache_min_uses|fastcgi_cache_min_uses|fastcgi_cache_path|fastcgi_cache_purge|fastcgi_cache_revalidate|fastcgi_cache_use_stale|fastcgi_cache_valid|fastcgi_catch_stderr|fastcgi_connect_timeout|fastcgi_force_ranges|fastcgi_hide_header|fastcgi_ignore_client_abort|fastcgi_ignore_headers|fastcgi_index|fastcgi_intercept_errors|fastcgi_keep_conn|fastcgi_limit_rate|fastcgi_max_temp_file_size|fastcgi_next_upstream|fastcgi_next_upstream_timeout|fastcgi_next_upstream_tries|fastcgi_no_cache|fastcgi_param|fastcgi_pass|fastcgi_pass_header|fastcgi_pass_request_body|fastcgi_pass_request_headers|fastcgi_read_timeout|fastcgi_request_buffering|fastcgi_send_lowat|fastcgi_send_timeout|fastcgi_socket_keepalive|fastcgi_split_path_info|fastcgi_store|fastcgi_store_access|fastcgi_temp_file_write_size|fastcgi_temp_path|flv|geoip_country|geoip_city|geoip_org|geoip_proxy|geoip_proxy_recursive|grpc_bind|grpc_buffer_size|grpc_connect_timeout|grpc_hide_header|grpc_ignore_headers|grpc_intercept_errors|grpc_next_upstream|grpc_next_upstream_timeout|grpc_next_upstream_tries|grpc_pass|grpc_pass_header|grpc_read_timeout|grpc_send_timeout|grpc_set_header|grpc_socket_keepalive|grpc_ssl_certificate|grpc_ssl_certificate_key|grpc_ssl_ciphers|grpc_ssl_crl|grpc_ssl_name|grpc_ssl_password_file|grpc_ssl_protocols|grpc_ssl_server_name|grpc_ssl_session_reuse|grpc_ssl_trusted_certificate|grpc_ssl_verify|grpc_ssl_verify_depth|gunzip|gunzip_buffers|gzip|gzip_buffers|gzip_comp_level|gzip_disable|gzip_http_version|gzip_min_length|gzip_proxied|gzip_types|gzip_vary|gzip_static|add_header|add_trailer|expires|hlshls_buffers|hls_forward_args|hls_fragment|hls_mp4_buffer_size|hls_mp4_max_buffer_size|image_filter|image_filter_buffer|image_filter_interlace|image_filter_jpeg_quality|image_filter_sharpen|image_filter_transparency|image_filter_webp_quality|js_content|js_include|js_set|keyval|keyval_zone|limit_conn|limit_conn_log_level|limit_conn_status|limit_conn_zone|limit_zone|limit_req|limit_req_log_level|limit_req_status|limit_req_zone|access_log|log_format|open_log_file_cache|map_hash_bucket_size|map_hash_max_size|memcached_bind|memcached_buffer_size|memcached_connect_timeout|memcached_force_ranges|memcached_gzip_flag|memcached_next_upstream|memcached_next_upstream_timeout|memcached_next_upstream_tries|memcached_pass|memcached_read_timeout|memcached_send_timeout|memcached_socket_keepalive|mirror|mirror_request_body|mp4|mp4_buffer_size|mp4_max_buffer_size|mp4_limit_rate|mp4_limit_rate_after|perl_modules|perl_require|perl_set|proxy_bind|proxy_buffer_size|proxy_buffering|proxy_buffers|proxy_busy_buffers_size|proxy_cache|proxy_cache_background_update|proxy_cache_bypass|proxy_cache_convert_head|proxy_cache_key|proxy_cache_lock|proxy_cache_lock_age|proxy_cache_lock_timeout|proxy_cache_max_range_offset|proxy_cache_methods|proxy_cache_min_uses|proxy_cache_path|proxy_cache_purge|proxy_cache_revalidate|proxy_cache_use_stale|proxy_cache_valid|proxy_connect_timeout|proxy_cookie_domain|proxy_cookie_path|proxy_force_ranges|proxy_headers_hash_bucket_size|proxy_headers_hash_max_size|proxy_hide_header|proxy_http_version|proxy_ignore_client_abort|proxy_ignore_headers|proxy_intercept_errors|proxy_limit_rate|proxy_max_temp_file_size|proxy_method|proxy_next_upstream|proxy_next_upstream_timeout|proxy_next_upstream_tries|proxy_no_cache|proxy_pass|proxy_pass_header|proxy_pass_request_body|proxy_pass_request_headers|proxy_read_timeout|proxy_redirect|proxy_send_lowat|proxy_send_timeout|proxy_set_body|proxy_set_header|proxy_socket_keepalive|proxy_ssl_certificate|proxy_ssl_certificate_key|proxy_ssl_ciphers|proxy_ssl_crl|proxy_ssl_name|proxy_ssl_password_file|proxy_ssl_protocols|proxy_ssl_server_name|proxy_ssl_session_reuse|proxy_ssl_trusted_certificate|proxy_ssl_verify|proxy_ssl_verify_depth|proxy_store|proxy_store_access|proxy_temp_file_write_size|proxy_temp_path|random_index|set_real_ip_from|real_ip_header|real_ip_recursive|referer_hash_bucket_size|referer_hash_max_size|valid_referers|break|return|rewrite_log|set|uninitialized_variable_warn|scgi_bind|scgi_buffer_size|scgi_buffering|scgi_buffers|scgi_busy_buffers_size|scgi_cache|scgi_cache_background_update|scgi_cache_key|scgi_cache_lock|scgi_cache_lock_age|scgi_cache_lock_timeout|scgi_cache_max_range_offset|scgi_cache_methods|scgi_cache_min_uses|scgi_cache_path|scgi_cache_purge|scgi_cache_revalidate|scgi_cache_use_stale|scgi_cache_valid|scgi_connect_timeout|scgi_force_ranges|scgi_hide_header|scgi_ignore_client_abort|scgi_ignore_headers|scgi_intercept_errors|scgi_limit_rate|scgi_max_temp_file_size|scgi_next_upstream|scgi_next_upstream_timeout|scgi_next_upstream_tries|scgi_no_cache|scgi_param|scgi_pass|scgi_pass_header|scgi_pass_request_body|scgi_pass_request_headers|scgi_read_timeout|scgi_request_buffering|scgi_send_timeout|scgi_socket_keepalive|scgi_store|scgi_store_access|scgi_temp_file_write_size|scgi_temp_path|secure_link|secure_link_md5|secure_link_secret|session_log|session_log_format|session_log_zone|slice|spdy_chunk_size|spdy_headers_comp|ssi|ssi_last_modified|ssi_min_file_chunk|ssi_silent_errors|ssi_types|ssi_value_length|ssl|ssl_buffer_size|ssl_certificate|ssl_certificate_key|ssl_ciphers|ssl_client_certificate|ssl_crl|ssl_dhparam|ssl_early_data|ssl_ecdh_curve|ssl_password_file|ssl_prefer_server_ciphers|ssl_protocols|ssl_session_cache|ssl_session_ticket_key|ssl_session_tickets|ssl_session_timeout|ssl_stapling|ssl_stapling_file|ssl_stapling_responder|ssl_stapling_verify|ssl_trusted_certificate|ssl_verify_client|ssl_verify_depth|status|status_format|status_zone|stub_status|sub_filter|sub_filter_last_modified|sub_filter_once|sub_filter_types|server|zone|state|hash|ip_hash|keepalive|keepalive_requests|keepalive_timeout|ntlm|least_conn|least_time|queue|random|sticky|sticky_cookie_insert|upstream_conf|health_check|userid|userid_domain|userid_expires|userid_mark|userid_name|userid_p3p|userid_path|userid_service|uwsgi_bind|uwsgi_buffer_size|uwsgi_buffering|uwsgi_buffers|uwsgi_busy_buffers_size|uwsgi_cache|uwsgi_cache_background_update|uwsgi_cache_bypass|uwsgi_cache_key|uwsgi_cache_lock|uwsgi_cache_lock_age|uwsgi_cache_lock_timeout|uwsgi_cache_max_range_offset|uwsgi_cache_methods|uwsgi_cache_min_uses|uwsgi_cache_path|uwsgi_cache_purge|uwsgi_cache_revalidate|uwsgi_cache_use_stale|uwsgi_cache_valid|uwsgi_connect_timeout|uwsgi_force_ranges|uwsgi_hide_header|uwsgi_ignore_client_abort|uwsgi_ignore_headers|uwsgi_intercept_errors|uwsgi_limit_rate|uwsgi_max_temp_file_size|uwsgi_modifier1|uwsgi_modifier2|uwsgi_next_upstream|uwsgi_next_upstream_timeout|uwsgi_next_upstream_tries|uwsgi_no_cache|uwsgi_param|uwsgi_pass|uwsgi_pass_header|uwsgi_pass_request_body|uwsgi_pass_request_headers|uwsgi_read_timeout|uwsgi_request_buffering|uwsgi_send_timeout|uwsgi_socket_keepalive|uwsgi_ssl_certificate|uwsgi_ssl_certificate_key|uwsgi_ssl_ciphers|uwsgi_ssl_crl|uwsgi_ssl_name|uwsgi_ssl_password_file|uwsgi_ssl_protocols|uwsgi_ssl_server_name|uwsgi_ssl_session_reuse|uwsgi_ssl_trusted_certificate|uwsgi_ssl_verify|uwsgi_ssl_verify_depth|uwsgi_store|uwsgi_store_access|uwsgi_temp_file_write_size|uwsgi_temp_path|http2_body_preread_size|http2_chunk_size|http2_idle_timeout|http2_max_concurrent_pushes|http2_max_concurrent_streams|http2_max_field_size|http2_max_header_size|http2_max_requests|http2_push|http2_push_preload|http2_recv_buffer_size|http2_recv_timeout|xml_entities|xslt_last_modified|xslt_param|xslt_string_param|xslt_stylesheet|xslt_types|listen|protocol|resolver|resolver_timeout|timeout|auth_http|auth_http_header|auth_http_pass_client_cert|auth_http_timeout|proxy_buffer|proxy_pass_error_message|proxy_timeout|xclient|starttls|imap_auth|imap_capabilities|imap_client_buffer|pop3_auth|pop3_capabilities|smtp_auth|smtp_capabilities|smtp_client_buffer|smtp_greeting_delay|preread_buffer_size|preread_timeout|proxy_protocol_timeout|js_access|js_filter|js_preread|proxy_download_rate|proxy_requests|proxy_responses|proxy_upload_rate|ssl_handshake_timeout|ssl_preread|health_check_timeout|zone_sync|zone_sync_buffers|zone_sync_connect_retry_interval|zone_sync_connect_timeout|zone_sync_interval|zone_sync_recv_buffer_size|zone_sync_server|zone_sync_ssl|zone_sync_ssl_certificate|zone_sync_ssl_certificate_key|zone_sync_ssl_ciphers|zone_sync_ssl_crl|zone_sync_ssl_name|zone_sync_ssl_password_file|zone_sync_ssl_protocols|zone_sync_ssl_server_name|zone_sync_ssl_trusted_certificate|zone_sync_ssl_verify_depth|zone_sync_timeout|google_perftools_profiles|proxy|perl"; + + this.$rules = { + "start": [{ + token: ["storage.type", "text", "string.regexp", "paren.lparen"], + regex: "\\b(location)(\\s+)([\\^]?~[\\*]?\\s+.*?)({)" + }, { + token: ["storage.type", "text", "text", "paren.lparen"], + regex: "\\b(location|match|upstream)(\\s+)(.*?)({)" + }, { + token: ["storage.type", "text", "string", "text", "variable", "text", "paren.lparen"], + regex: '\\b(split_clients|map)(\\s+)(\\".*\\")(\\s+)(\\$[\\w_]+)(\\s*)({)' + }, { + token: ["storage.type", "text", "paren.lparen"], + regex: "\\b(http|events|server|mail|stream)(\\s*)({)" + }, { + token: ["storage.type", "text", "variable", "text", "variable", "text", "paren.lparen"], + regex: '\\b(geo|map)(\\s+)(\\$[\\w_]+)?(\\s*)(\\$[\\w_]+)(\\s*)({)' + }, { + token: "paren.rparen", + regex: "(})" + }, { + token: "paren.lparen", + regex: "({)" + }, { + token: ["storage.type", "text", "paren.lparen"], + regex: "\\b(if)(\\s+)(\\()", + push: [{ + token: "paren.rparen", + regex: "\\)|$", + next: "pop" + }, { + include: "lexical" + }] + }, { + token: "keyword", + regex: "\\b(" + keywords + ")\\b", + push: [{ + token: "punctuation", + regex: ";", + next: "pop" + }, { + include: "lexical" + }] + }, { + token: ["keyword", "text", "string.regexp", "text", "punctuation"], + regex: "\\b(rewrite)(\\s)(\\S*)(\\s.*)(;)" + }, { + include: "lexical" + }, { + include: "comments" + }], + comments: [{ + token: "comment", + regex: '#.*$' + }], + lexical: [{ + token: "string", + regex: "'", + push: [{ + token: "string", + regex: "'", + next: "pop" + }, { + include: "variables" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: '"', + push: [{ + token: "string", + regex: '"', + next: "pop" + }, { + include: "variables" + }, { + defaultToken: "string" + }] + }, { + token: "string.regexp", + regex: /[!]?[~][*]?\s+.*(?=\))/ + }, { + token: "string.regexp", + regex: /[\^]\S*(?=;$)/ + }, { + token: "string.regexp", + regex: /[\^]\S*(?=;|\s|$)/ + }, { + token: "keyword.operator", + regex: "\\B(\\+|\\-|\\*|\\=|!=)\\B" + }, { + token: "constant.language", + regex: "\\b(true|false|on|off|all|any|main|always)\\b" + }, { + token: "text", + regex: "\\s+" + }, { + include: "variables" + } + ], + variables: [{ + token: "variable", + regex: "\\$[\\w_]+" + }, { + token: "variable.language", + regex: "\\b(GET|POST|HEAD)\\b" + }] + }; + this.normalizeRules(); +}; + + +oop.inherits(NginxHighlightRules, TextHighlightRules); + +exports.NginxHighlightRules = NginxHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/nginx",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nginx_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var NginxHighlightRules = require("./nginx_highlight_rules").NginxHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function () { + TextMode.call(this); + this.HighlightRules = NginxHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; + +oop.inherits(Mode, TextMode); + + +(function () { + this.lineCommentStart = "#"; + + this.$id = "ace/mode/nginx"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/nginx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-nim.js b/htdocs/includes/ace/src/mode-nim.js new file mode 100644 index 00000000000..7b5c8d8bd31 --- /dev/null +++ b/htdocs/includes/ace/src/mode-nim.js @@ -0,0 +1,363 @@ +define("ace/mode/nim_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var NimHighlightRules = function () { + + var keywordMapper = this.createKeywordMapper({ + "variable": "var|let|const", + "keyword": "assert|parallel|spawn|export|include|from|template|mixin|bind|import|concept|raise|defer|try|finally|except|converter|proc|func|macro|method|and|or|not|xor|shl|shr|div|mod|in|notin|is|isnot|of|static|if|elif|else|case|of|discard|when|return|yield|block|break|while|echo|continue|asm|using|cast|addr|unsafeAddr|type|ref|ptr|do|declared|defined|definedInScope|compiles|sizeOf|is|shallowCopy|getAst|astToStr|spawn|procCall|for|iterator|as", + "storage.type": "newSeq|int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|char|bool|string|set|pointer|float32|float64|enum|object|cstring|array|seq|openArray|varargs|UncheckedArray|tuple|set|distinct|void|auto|openarray|range", + "support.function": "lock|ze|toU8|toU16|toU32|ord|low|len|high|add|pop|contains|card|incl|excl|dealloc|inc", + "constant.language": "nil|true|false" + }, "identifier"); + + var hexNumber = "(?:0[xX][\\dA-Fa-f][\\dA-Fa-f_]*)"; + var decNumber = "(?:[0-9][\\d_]*)"; + var octNumber = "(?:0o[0-7][0-7_]*)"; + var binNumber = "(?:0[bB][01][01_]*)"; + var intNumber = "(?:" + hexNumber + "|" + decNumber + "|" + octNumber + "|" + binNumber + ")(?:'?[iIuU](?:8|16|32|64)|u)?\\b"; + var exponent = "(?:[eE][+-]?[\\d][\\d_]*)"; + var floatNumber = "(?:[\\d][\\d_]*(?:[.][\\d](?:[\\d_]*)" + exponent + "?)|" + exponent + ")"; + var floatNumberExt = "(?:" + hexNumber + "(?:'(?:(?:[fF](?:32|64)?)|[dD])))|(?:" + floatNumber + "|" + decNumber + "|" + octNumber + "|" + binNumber + ")(?:'(?:(?:[fF](?:32|64)?)|[dD]))"; + var stringEscape = "\\\\([abeprcnlftv\\\"']|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + var identifier = '[a-zA-Z][a-zA-Z0-9_]*'; + this.$rules = { + "start": [{ + token: ["identifier", "keyword.operator", "support.function"], + regex: "(" + identifier + ")([.]{1})(" + identifier + ")(?=\\()" + }, {//pragmas + token: "paren.lparen", + regex: "(\\{\\.)", + next: [{ + token: "paren.rparen", + regex: '(\\.\\}|\\})', + next: "start" + }, { + include: "methods" + }, { + token: "identifier", + regex: identifier + }, { + token: "punctuation", + regex: /[,]/ + }, { + token: "keyword.operator", + regex: /[=:.]/ + }, { + token: "paren.lparen", + regex: /[[(]/ + }, { + token: "paren.rparen", + regex: /[\])]/ + }, { + include: "math" + }, { + include: "strings" + }, { + defaultToken: "text" + }] + }, { + token: "comment.doc.start", + regex: /##\[(?!])/, + push: "docBlockComment" + }, { + token: "comment.start", + regex: /#\[(?!])/, + push: "blockComment" + }, { + token: "comment.doc", + regex: '##.*$' + }, { + token: "comment", + regex: '#.*$' + }, { + include: "strings" + }, {// character + token: "string", + regex: "'(?:\\\\(?:[abercnlftv]|x[0-9A-Fa-f]{2}|[0-2][0-9]{2}|u[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})|.{1})?'" + }, { + include: "methods" + }, { + token: keywordMapper, + regex: "[a-zA-Z][a-zA-Z0-9_]*\\b" + }, { + token: ["keyword.operator", "text", "storage.type"], + regex: "([:])(\\s+)(" + identifier + ")(?=$|\\)|\\[|,|\\s+=|;|\\s+\\{)" + }, { + token: "paren.lparen", + regex: /\[\.|{\||\(\.|\[:|[[({`]/ + }, { + token: "paren.rparen", + regex: /\.\)|\|}|\.]|[\])}]/ + }, { + token: "keyword.operator", + regex: /[=+\-*\/<>@$~&%|!?^.:\\]/ + }, { + token: "punctuation", + regex: /[,;]/ + }, { + include: "math" + }], + blockComment: [{ + regex: /#\[]/, + token: "comment" + }, { + regex: /#\[(?!])/, + token: "comment.start", + push: "blockComment" + }, { + regex: /]#/, + token: "comment.end", + next: "pop" + }, { + defaultToken: "comment" + }], + docBlockComment: [{ + regex: /##\[]/, + token: "comment.doc" + }, { + regex: /##\[(?!])/, + token: "comment.doc.start", + push: "docBlockComment" + }, { + regex: /]##/, + token: "comment.doc.end", + next: "pop" + }, { + defaultToken: "comment.doc" + }], + math: [{ + token: "constant.float", + regex: floatNumberExt + }, { + token: "constant.float", + regex: floatNumber + }, { + token: "constant.integer", + regex: intNumber + }], + methods: [{ + token: "support.function", + regex: "(\\w+)(?=\\()" + }], + strings: [{ + token: "string", + regex: '(\\b' + identifier + ')?"""', + push: [{ + token: "string", + regex: '"""', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: "\\b" + identifier + '"(?=.)', + push: [{ + token: "string", + regex: '"|$', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token: "string", + regex: '"', + push: [{ + token: "string", + regex: '"|$', + next: "pop" + }, { + token: "constant.language.escape", + regex: stringEscape + }, { + defaultToken: "string" + }] + }] + }; + this.normalizeRules(); +}; + + +oop.inherits(NimHighlightRules, TextHighlightRules); + +exports.NimHighlightRules = NimHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/nim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nim_highlight_rules","ace/mode/folding/cstyle"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var NimHighlightRules = require("./nim_highlight_rules").NimHighlightRules; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function () { + TextMode.call(this); + this.HighlightRules = NimHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; + +oop.inherits(Mode, TextMode); + + +(function () { + this.lineCommentStart = "#"; + this.blockComment = {start: "#[", end: "]#", nestable: true}; + + + this.$id = "ace/mode/nim"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/nim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-nix.js b/htdocs/includes/ace/src/mode-nix.js similarity index 90% rename from htdocs/includes/ace/mode-nix.js rename to htdocs/includes/ace/src/mode-nix.js index 3424beafda9..b1a426fb9b3 100644 --- a/htdocs/includes/ace/mode-nix.js +++ b/htdocs/includes/ace/src/mode-nix.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,13 +48,13 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" +var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; var c_cppHighlightRules = function() { @@ -76,7 +76,7 @@ var c_cppHighlightRules = function() { ); var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); @@ -95,6 +95,14 @@ var c_cppHighlightRules = function() { var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type this.$rules = { "start" : [ @@ -122,7 +130,7 @@ var c_cppHighlightRules = function() { next: [ { token: "string", regex: /\\\s*$/, next: "qqstring" }, { token: "constant.language.escape", regex: escapeRe }, - { token: "constant.language.escape", regex: /%[^'"\\]/ }, + { token: "constant.language.escape", regex: formatRe }, { token: "string.end", regex: '"|$', next: "start" }, { defaultToken: "string"} ] @@ -234,7 +242,7 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -274,7 +282,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -295,8 +303,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -414,7 +422,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -486,7 +494,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -605,7 +613,7 @@ ace.define("ace/mode/nix_highlight_rules",["require","exports","module","ace/lib exports.NixHighlightRules = NixHighlightRules; }); -ace.define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/nix",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/nix_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -628,4 +636,11 @@ oop.inherits(Mode, CMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/nix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-nsis.js b/htdocs/includes/ace/src/mode-nsis.js similarity index 72% rename from htdocs/includes/ace/mode-nsis.js rename to htdocs/includes/ace/src/mode-nsis.js index a20aed277e2..2b8b5061a6d 100644 --- a/htdocs/includes/ace/mode-nsis.js +++ b/htdocs/includes/ace/src/mode-nsis.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/nsis_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/nsis_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -9,11 +9,11 @@ var NSISHighlightRules = function() { this.$rules = { start: [{ token: "keyword.compiler.nsis", - regex: /^\s*!(?:include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|finalize|getdllversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace)\b/, + regex: /^\s*!(?:include|addincludedir|addplugindir|appendfile|cd|delfile|echo|error|execute|packhdr|pragma|finalize|getdllversion|gettlbversion|system|tempfile|warning|verbose|define|undef|insertmacro|macro|macroend|makensis|searchparse|searchreplace)\b/, caseInsensitive: true }, { token: "keyword.command.nsis", - regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|IntCmp|IntCmpU|IntFmt|IntOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegStr|WriteUninstaller|XPStyle)\b/, + regex: /^\s*(?:Abort|AddBrandingImage|AddSize|AllowRootDirInstall|AllowSkipFiles|AutoCloseWindow|BGFont|BGGradient|BrandingText|BringToFront|Call|CallInstDLL|Caption|ChangeUI|CheckBitmap|ClearErrors|CompletedText|ComponentText|CopyFiles|CRCCheck|CreateDirectory|CreateFont|CreateShortCut|Delete|DeleteINISec|DeleteINIStr|DeleteRegKey|DeleteRegValue|DetailPrint|DetailsButtonText|DirText|DirVar|DirVerify|EnableWindow|EnumRegKey|EnumRegValue|Exch|Exec|ExecShell|ExecShellWait|ExecWait|ExpandEnvStrings|File|FileBufSize|FileClose|FileErrorText|FileOpen|FileRead|FileReadByte|FileReadUTF16LE|FileReadWord|FileWriteUTF16LE|FileSeek|FileWrite|FileWriteByte|FileWriteWord|FindClose|FindFirst|FindNext|FindWindow|FlushINI|GetCurInstType|GetCurrentAddress|GetDlgItem|GetDLLVersion|GetDLLVersionLocal|GetErrorLevel|GetFileTime|GetFileTimeLocal|GetFullPathName|GetFunctionAddress|GetInstDirError|GetLabelAddress|GetTempFileName|Goto|HideWindow|Icon|IfAbort|IfErrors|IfFileExists|IfRebootFlag|IfSilent|InitPluginsDir|InstallButtonText|InstallColors|InstallDir|InstallDirRegKey|InstProgressFlags|InstType|InstTypeGetText|InstTypeSetText|Int64Cmp|Int64CmpU|Int64Fmt|IntCmp|IntCmpU|IntFmt|IntOp|IntPtrCmp|IntPtrCmpU|IntPtrOp|IsWindow|LangString|LicenseBkColor|LicenseData|LicenseForceSelection|LicenseLangString|LicenseText|LoadLanguageFile|LockWindow|LogSet|LogText|ManifestDPIAware|ManifestSupportedOS|MessageBox|MiscButtonText|Name|Nop|OutFile|Page|PageCallbacks|PEDllCharacteristics|PESubsysVer|Pop|Push|Quit|ReadEnvStr|ReadINIStr|ReadRegDWORD|ReadRegStr|Reboot|RegDLL|Rename|RequestExecutionLevel|ReserveFile|Return|RMDir|SearchPath|SectionGetFlags|SectionGetInstTypes|SectionGetSize|SectionGetText|SectionIn|SectionSetFlags|SectionSetInstTypes|SectionSetSize|SectionSetText|SendMessage|SetAutoClose|SetBrandingImage|SetCompress|SetCompressor|SetCompressorDictSize|SetCtlColors|SetCurInstType|SetDatablockOptimize|SetDateSave|SetDetailsPrint|SetDetailsView|SetErrorLevel|SetErrors|SetFileAttributes|SetFont|SetOutPath|SetOverwrite|SetRebootFlag|SetRegView|SetShellVarContext|SetSilent|ShowInstDetails|ShowUninstDetails|ShowWindow|SilentInstall|SilentUnInstall|Sleep|SpaceTexts|StrCmp|StrCmpS|StrCpy|StrLen|SubCaption|Unicode|UninstallButtonText|UninstallCaption|UninstallIcon|UninstallSubCaption|UninstallText|UninstPage|UnRegDLL|Var|VIAddVersionKey|VIFileVersion|VIProductVersion|WindowIcon|WriteINIStr|WriteRegBin|WriteRegDWORD|WriteRegExpandStr|WriteRegMultiStr|WriteRegNone|WriteRegStr|WriteUninstaller|XPStyle)\b/, caseInsensitive: true }, { token: "keyword.control.nsis", @@ -35,11 +35,11 @@ var NSISHighlightRules = function() { regex: /\${[\w\.:-]+}/ }, { token: "constant.nsis", - regex: /\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/, + regex: /\b(?:ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_HIDDEN|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HIDDEN|HKCC|HKCR(32|64)?|HKCU(32|64)?|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM(32|64)?|HKPD|HKU|IDABORT|IDCANCEL|IDD_DIR|IDD_INST|IDD_INSTFILES|IDD_LICENSE|IDD_SELCOM|IDD_UNINST|IDD_VERIFY|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|MB_YESNOCANCEL|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SW_HIDE|SW_SHOWDEFAULT|SW_SHOWMAXIMIZED|SW_SHOWMINIMIZED|SW_SHOWNORMAL|SYSTEM|TEMPORARY)\b/, caseInsensitive: true }, { token: "constant.library.nsis", - regex: /\${(?:AtLeastServicePack|AtLeastWin7|AtLeastWin8|AtLeastWin10|AtLeastWin95|AtLeastWin98|AtLeastWin2000|AtLeastWin2003|AtLeastWin2008|AtLeastWin2008R2|AtLeastWinME|AtLeastWinNT4|AtLeastWinVista|AtLeastWinXP|AtMostServicePack|AtMostWin7|AtMostWin8|AtMostWin10|AtMostWin95|AtMostWin98|AtMostWin2000|AtMostWin2003|AtMostWin2008|AtMostWin2008R2|AtMostWinME|AtMostWinNT4|AtMostWinVista|AtMostWinXP|IsNT|IsServer|IsServicePack|IsWin7|IsWin8|IsWin10|IsWin95|IsWin98|IsWin2000|IsWin2003|IsWin2008|IsWin2008R2|IsWinME|IsWinNT4|IsWinVista|IsWinXP)}/ + regex: /\${(?:AtLeastServicePack|AtLeastWin7|AtLeastWin8|AtLeastWin10|AtLeastWin95|AtLeastWin98|AtLeastWin2000|AtLeastWin2003|AtLeastWin2008|AtLeastWin2008R2|AtLeastWinME|AtLeastWinNT4|AtLeastWinVista|AtLeastWinXP|AtMostServicePack|AtMostWin7|AtMostWin8|AtMostWin10|AtMostWin95|AtMostWin98|AtMostWin2000|AtMostWin2003|AtMostWin2008|AtMostWin2008R2|AtMostWinME|AtMostWinNT4|AtMostWinVista|AtMostWinXP|IsDomainController|IsNT|IsServer|IsServicePack|IsWin7|IsWin8|IsWin10|IsWin95|IsWin98|IsWin2000|IsWin2003|IsWin2008|IsWin2008R2|IsWinME|IsWinNT4|IsWinVista|IsWinXP)}/ }, { token: "constant.language.boolean.true.nsis", regex: /\b(?:true|on)\b/ @@ -62,7 +62,7 @@ var NSISHighlightRules = function() { regex: /\$\([\w\.:-]+\)/ }, { token: "storage.type.function.nsis", - regex: /\$[\w]+/ + regex: /\$\w+/ }, { token: "punctuation.definition.string.begin.nsis", regex: /`/, @@ -140,7 +140,7 @@ oop.inherits(NSISHighlightRules, TextHighlightRules); exports.NSISHighlightRules = NSISHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -161,8 +161,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -280,7 +280,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/nsis",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nsis_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/nsis",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/nsis_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -302,4 +302,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/nsis"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-objectivec.js b/htdocs/includes/ace/src/mode-objectivec.js similarity index 97% rename from htdocs/includes/ace/mode-objectivec.js rename to htdocs/includes/ace/src/mode-objectivec.js index 1dd0cb58502..28a56917f03 100644 --- a/htdocs/includes/ace/mode-objectivec.js +++ b/htdocs/includes/ace/src/mode-objectivec.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,13 +48,13 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" +var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; var c_cppHighlightRules = function() { @@ -76,7 +76,7 @@ var c_cppHighlightRules = function() { ); var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); @@ -95,6 +95,14 @@ var c_cppHighlightRules = function() { var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type this.$rules = { "start" : [ @@ -122,7 +130,7 @@ var c_cppHighlightRules = function() { next: [ { token: "string", regex: /\\\s*$/, next: "qqstring" }, { token: "constant.language.escape", regex: escapeRe }, - { token: "constant.language.escape", regex: /%[^'"\\]/ }, + { token: "constant.language.escape", regex: formatRe }, { token: "string.end", regex: '"|$', next: "start" }, { defaultToken: "string"} ] @@ -234,7 +242,7 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); -ace.define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { +define("ace/mode/objectivec_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/c_cpp_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -537,7 +545,7 @@ var ObjectiveCHighlightRules = function() { next : "start" } ] -} +}; for (var r in cRules) { if (this.$rules[r]) { if (this.$rules[r].push) @@ -560,7 +568,7 @@ oop.inherits(ObjectiveCHighlightRules, CHighlightRules); exports.ObjectiveCHighlightRules = ObjectiveCHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -581,8 +589,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -700,7 +708,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/objectivec",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/objectivec_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -722,4 +730,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/objectivec"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-ocaml.js b/htdocs/includes/ace/src/mode-ocaml.js similarity index 96% rename from htdocs/includes/ace/mode-ocaml.js rename to htdocs/includes/ace/src/mode-ocaml.js index 29f26cc4f46..fbd5223d2f8 100644 --- a/htdocs/includes/ace/mode-ocaml.js +++ b/htdocs/includes/ace/src/mode-ocaml.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/ocaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -305,7 +305,7 @@ oop.inherits(OcamlHighlightRules, TextHighlightRules); exports.OcamlHighlightRules = OcamlHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -345,7 +345,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { +define("ace/mode/ocaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -411,4 +411,11 @@ var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/ocaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-pascal.js b/htdocs/includes/ace/src/mode-pascal.js new file mode 100644 index 00000000000..2fb3c57d17d --- /dev/null +++ b/htdocs/includes/ace/src/mode-pascal.js @@ -0,0 +1,223 @@ +define("ace/mode/pascal_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var PascalHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "keyword.control": "absolute|abstract|all|and|and_then|array|as|asm|attribute|begin|bindable|case|class" + + "|const|constructor|destructor|div|do|do|else|end|except|export|exports|external|far|file|finalization" + + "|finally|for|forward|goto|if|implementation|import|in|inherited|initialization|interface|interrupt|is" + + "|label|library|mod|module|name|near|nil|not|object|of|only|operator|or|or_else|otherwise|packed|pow|private" + + "|program|property|protected|public|published|qualified|record|repeat|resident|restricted|segment|set|shl|shr" + + "|then|to|try|type|unit|until|uses|value|var|view|virtual|while|with|xor" + }, "identifier", true); + + this.$rules = { + start: [{ + caseInsensitive: true, + token: ['variable', "text", + 'storage.type.prototype', + 'entity.name.function.prototype' + ], + regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?(?=(?:\\(.*?\\))?;\\s*(?:attribute|forward|external))' + }, { + caseInsensitive: true, + token: ['variable', "text", 'storage.type.function', 'entity.name.function'], + regex: '\\b(function|procedure)(\\s+)(\\w+)(\\.\\w+)?' + }, { + caseInsensitive: true, + token: keywordMapper, + regex: /\b[a-z_]+\b/ + }, { + token: 'constant.numeric', + regex: '\\b((0(x|X)[0-9a-fA-F]*)|(([0-9]+\\.?[0-9]*)|(\\.[0-9]+))((e|E)(\\+|-)?[0-9]+)?)(L|l|UL|ul|u|U|F|f|ll|LL|ull|ULL)?\\b' + }, { + token: 'punctuation.definition.comment', + regex: '--.*$' + }, { + token: 'punctuation.definition.comment', + regex: '//.*$' + }, { + token: 'punctuation.definition.comment', + regex: '\\(\\*', + push: [{ + token: 'punctuation.definition.comment', + regex: '\\*\\)', + next: 'pop' + }, + { defaultToken: 'comment.block.one' } + ] + }, { + token: 'punctuation.definition.comment', + regex: '\\{', + push: [{ + token: 'punctuation.definition.comment', + regex: '\\}', + next: 'pop' + }, + { defaultToken: 'comment.block.two' } + ] + }, { + token: 'punctuation.definition.string.begin', + regex: '"', + push: [{ token: 'constant.character.escape', regex: '\\\\.' }, + { + token: 'punctuation.definition.string.end', + regex: '"', + next: 'pop' + }, + { defaultToken: 'string.quoted.double' } + ] + }, { + token: 'punctuation.definition.string.begin', + regex: '\'', + push: [{ + token: 'constant.character.escape.apostrophe', + regex: '\'\'' + }, + { + token: 'punctuation.definition.string.end', + regex: '\'', + next: 'pop' + }, + { defaultToken: 'string.quoted.single' } + ] + }, { + token: 'keyword.operator', + regex: '[+\\-;,/*%]|:=|=' + } + ] + }; + + this.normalizeRules(); +}; + +oop.inherits(PascalHighlightRules, TextHighlightRules); + +exports.PascalHighlightRules = PascalHighlightRules; +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/pascal",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pascal_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PascalHighlightRules = require("./pascal_highlight_rules").PascalHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = PascalHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ["--", "//"]; + this.blockComment = [ + {start: "(*", end: "*)"}, + {start: "{", end: "}"} + ]; + + this.$id = "ace/mode/pascal"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/pascal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-perl.js b/htdocs/includes/ace/src/mode-perl.js similarity index 91% rename from htdocs/includes/ace/mode-perl.js rename to htdocs/includes/ace/src/mode-perl.js index 768c538331a..978979b1e47 100644 --- a/htdocs/includes/ace/mode-perl.js +++ b/htdocs/includes/ace/src/mode-perl.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -131,7 +131,7 @@ oop.inherits(PerlHighlightRules, TextHighlightRules); exports.PerlHighlightRules = PerlHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -171,7 +171,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -192,8 +192,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -311,7 +311,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/perl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -370,4 +370,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/perl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-perl6.js b/htdocs/includes/ace/src/mode-perl6.js new file mode 100644 index 00000000000..4d25513c3ee --- /dev/null +++ b/htdocs/includes/ace/src/mode-perl6.js @@ -0,0 +1,593 @@ +define("ace/mode/perl6_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var Perl6HighlightRules = function() { + + var keywords = ( + "my|our|class|role|grammar|is|does|sub|method|submethod|try|" + + "default|when|if|elsif|else|unless|with|orwith|without|for|given|proceed|" + + "succeed|loop|while|until|repeat|module|use|need|import|require|unit|" + + "constant|enum|multi|return|has|token|rule|make|made|proto|state|augment|" + + "but|anon|supersede|let|subset|gather|returns|return-rw|temp|" + + "BEGIN|CHECK|INIT|END|CLOSE|ENTER|LEAVE|KEEP|UNDO|PRE|POST|FIRST|NEXT|LAST|CATCH|CONTROL|QUIT|DOC" + ); + + var types = ( + "Any|Array|Associative|AST|atomicint|Attribute|Backtrace|Backtrace::Frame|" + + "Bag|Baggy|BagHash|Blob|Block|Bool|Buf|Callable|CallFrame|Cancellation|" + + "Capture|Channel|Code|compiler|Complex|ComplexStr|Cool|CurrentThreadScheduler|" + + "Cursor|Date|Dateish|DateTime|Distro|Duration|Encoding|Exception|Failure|"+ + "FatRat|Grammar|Hash|HyperWhatever|Instant|Int|IntStr|IO|IO::ArgFiles|"+ + "IO::CatHandle|IO::Handle|IO::Notification|IO::Path|IO::Path::Cygwin|"+ + "IO::Path::QNX|IO::Path::Unix|IO::Path::Win32|IO::Pipe|IO::Socket|"+ + "IO::Socket::Async|IO::Socket::INET|IO::Spec|IO::Spec::Cygwin|IO::Spec::QNX|"+ + "IO::Spec::Unix|IO::Spec::Win32|IO::Special|Iterable|Iterator|Junction|Kernel|"+ + "Label|List|Lock|Lock::Async|Macro|Map|Match|Metamodel::AttributeContainer|"+ + "Metamodel::C3MRO|Metamodel::ClassHOW|Metamodel::EnumHOW|Metamodel::Finalization|"+ + "Metamodel::MethodContainer|Metamodel::MROBasedMethodDispatch|Metamodel::MultipleInheritance|"+ + "Metamodel::Naming|Metamodel::Primitives|Metamodel::PrivateMethodContainer|"+ + "Metamodel::RoleContainer|Metamodel::Trusting|Method|Mix|MixHash|Mixy|Mu|"+ + "NFC|NFD|NFKC|NFKD|Nil|Num|Numeric|NumStr|ObjAt|Order|Pair|Parameter|Perl|"+ + "Pod::Block|Pod::Block::Code|Pod::Block::Comment|Pod::Block::Declarator|"+ + "Pod::Block::Named|Pod::Block::Para|Pod::Block::Table|Pod::Heading|Pod::Item|"+ + "Positional|PositionalBindFailover|Proc|Proc::Async|Promise|Proxy|PseudoStash|"+ + "QuantHash|Range|Rat|Rational|RatStr|Real|Regex|Routine|Scalar|Scheduler|"+ + "Semaphore|Seq|Set|SetHash|Setty|Signature|Slip|Stash|Str|StrDistance|Stringy|"+ + "Sub|Submethod|Supplier|Supplier::Preserving|Supply|Systemic|Tap|Telemetry|"+ + "Telemetry::Instrument::Thread|Telemetry::Instrument::Usage|Telemetry::Period|"+ + "Telemetry::Sampler|Thread|ThreadPoolScheduler|UInt|Uni|utf8|Variable|Version|"+ + "VM|Whatever|WhateverCode|WrapHandle|int|uint|num|str|"+ + "int8|int16|int32|int64|uint8|uint16|uint32|uint64|long|longlong|num32|num64|size_t|bool|CArray|Pointer|"+ + "Backtrace|Backtrace::Frame|Exception|Failure|X::AdHoc|X::Anon::Augment|X::Anon::Multi|"+ + "X::Assignment::RO|X::Attribute::NoPackage|X::Attribute::Package|X::Attribute::Undeclared|"+ + "X::Augment::NoSuchType|X::Bind|X::Bind::NativeType|X::Bind::Slice|X::Caller::NotDynamic|"+ + "X::Channel::ReceiveOnClosed|X::Channel::SendOnClosed|X::Comp|X::Composition::NotComposable|"+ + "X::Constructor::Positional|X::ControlFlow|X::ControlFlow::Return|X::DateTime::TimezoneClash|"+ + "X::Declaration::Scope|X::Declaration::Scope::Multi|X::Does::TypeObject|X::Eval::NoSuchLang|"+ + "X::Export::NameClash|X::IO|X::IO::Chdir|X::IO::Chmod|X::IO::Copy|X::IO::Cwd|X::IO::Dir|"+ + "X::IO::DoesNotExist|X::IO::Link|X::IO::Mkdir|X::IO::Move|X::IO::Rename|X::IO::Rmdir|X::IO::Symlink|"+ + "X::IO::Unlink|X::Inheritance::NotComposed|X::Inheritance::Unsupported|X::Method::InvalidQualifier|"+ + "X::Method::NotFound|X::Method::Private::Permission|X::Method::Private::Unqualified|"+ + "X::Mixin::NotComposable|X::NYI|X::NoDispatcher|X::Numeric::Real|X::OS|X::Obsolete|X::OutOfRange|"+ + "X::Package::Stubbed|X::Parameter::Default|X::Parameter::MultipleTypeConstraints|"+ + "X::Parameter::Placeholder|X::Parameter::Twigil|X::Parameter::WrongOrder|X::Phaser::Multiple|"+ + "X::Phaser::PrePost|X::Placeholder::Block|X::Placeholder::Mainline|X::Pod|X::Proc::Async|"+ + "X::Proc::Async::AlreadyStarted|X::Proc::Async::CharsOrBytes|X::Proc::Async::MustBeStarted|"+ + "X::Proc::Async::OpenForWriting|X::Proc::Async::TapBeforeSpawn|X::Proc::Unsuccessful|"+ + "X::Promise::CauseOnlyValidOnBroken|X::Promise::Vowed|X::Redeclaration|X::Role::Initialization|"+ + "X::Seq::Consumed|X::Sequence::Deduction|X::Signature::NameClash|X::Signature::Placeholder|"+ + "X::Str::Numeric|X::StubCode|X::Syntax|X::Syntax::Augment::WithoutMonkeyTyping|"+ + "X::Syntax::Comment::Embedded|X::Syntax::Confused|X::Syntax::InfixInTermPosition|"+ + "X::Syntax::Malformed|X::Syntax::Missing|X::Syntax::NegatedPair|X::Syntax::NoSelf|"+ + "X::Syntax::Number::RadixOutOfRange|X::Syntax::P5|X::Syntax::Regex::Adverb|"+ + "X::Syntax::Regex::SolitaryQuantifier|X::Syntax::Reserved|X::Syntax::Self::WithoutObject|"+ + "X::Syntax::Signature::InvocantMarker|X::Syntax::Term::MissingInitializer|X::Syntax::UnlessElse|"+ + "X::Syntax::Variable::Match|X::Syntax::Variable::Numeric|X::Syntax::Variable::Twigil|X::Temporal|"+ + "X::Temporal::InvalidFormat|X::TypeCheck|X::TypeCheck::Assignment|X::TypeCheck::Binding|"+ + "X::TypeCheck::Return|X::TypeCheck::Splice|X::Undeclared" + ); + + var builtinFunctions = ( + "abs|abs2rel|absolute|accept|ACCEPTS|accessed|acos|acosec|acosech|acosh|"+ + "acotan|acotanh|acquire|act|action|actions|add|add_attribute|add_enum_value|"+ + "add_fallback|add_method|add_parent|add_private_method|add_role|add_trustee|"+ + "adverb|after|all|allocate|allof|allowed|alternative-names|annotations|antipair|"+ + "antipairs|any|anyof|app_lifetime|append|arch|archname|args|arity|asec|asech|"+ + "asin|asinh|ASSIGN-KEY|ASSIGN-POS|assuming|ast|at|atan|atan2|atanh|AT-KEY|"+ + "atomic-assign|atomic-dec-fetch|atomic-fetch|atomic-fetch-add|atomic-fetch-dec|"+ + "atomic-fetch-inc|atomic-fetch-sub|atomic-inc-fetch|AT-POS|attributes|auth|await|"+ + "backtrace|Bag|BagHash|base|basename|base-repeating|batch|BIND-KEY|BIND-POS|"+ + "bind-stderr|bind-stdin|bind-stdout|bind-udp|bits|bless|block|bool-only|"+ + "bounds|break|Bridge|broken|BUILD|build-date|bytes|cache|callframe|calling-package|"+ + "CALL-ME|callsame|callwith|can|cancel|candidates|cando|canonpath|caps|caption|"+ + "Capture|cas|catdir|categorize|categorize-list|catfile|catpath|cause|ceiling|"+ + "cglobal|changed|Channel|chars|chdir|child|child-name|child-typename|chmod|chomp|"+ + "chop|chr|chrs|chunks|cis|classify|classify-list|cleanup|clone|close|closed|"+ + "close-stdin|code|codes|collate|column|comb|combinations|command|comment|"+ + "compiler|Complex|compose|compose_type|composer|condition|config|configure_destroy|"+ + "configure_type_checking|conj|connect|constraints|construct|contains|contents|copy|"+ + "cos|cosec|cosech|cosh|cotan|cotanh|count|count-only|cpu-cores|cpu-usage|CREATE|"+ + "create_type|cross|cue|curdir|curupdir|d|Date|DateTime|day|daycount|day-of-month|"+ + "day-of-week|day-of-year|days-in-month|declaration|decode|decoder|deepmap|"+ + "defined|DEFINITE|delayed|DELETE-KEY|DELETE-POS|denominator|desc|DESTROY|destroyers|"+ + "devnull|did-you-mean|die|dir|dirname|dir-sep|DISTROnames|do|done|duckmap|dynamic|"+ + "e|eager|earlier|elems|emit|enclosing|encode|encoder|encoding|end|ends-with|enum_from_value|"+ + "enum_value_list|enum_values|enums|eof|EVAL|EVALFILE|exception|excludes-max|excludes-min|"+ + "EXISTS-KEY|EXISTS-POS|exit|exitcode|exp|expected|explicitly-manage|expmod|extension|f|"+ + "fail|fc|feature|file|filename|find_method|find_method_qualified|finish|first|flat|flatmap|"+ + "flip|floor|flush|fmt|format|formatter|freeze|from|from-list|from-loop|from-posix|full|"+ + "full-barrier|get|get_value|getc|gist|got|grab|grabpairs|grep|handle|handled|handles|"+ + "hardware|has_accessor|head|headers|hh-mm-ss|hidden|hides|hour|how|hyper|id|illegal|"+ + "im|in|indent|index|indices|indir|infinite|infix|install_method_cache|"+ + "Instant|instead|int-bounds|interval|in-timezone|invalid-str|invert|invocant|IO|"+ + "IO::Notification.watch-path|is_trusted|is_type|isa|is-absolute|is-hidden|is-initial-thread|"+ + "is-int|is-lazy|is-leap-year|isNaN|is-prime|is-relative|is-routine|is-setting|is-win|item|"+ + "iterator|join|keep|kept|KERNELnames|key|keyof|keys|kill|kv|kxxv|l|lang|last|lastcall|later|"+ + "lazy|lc|leading|level|line|lines|link|listen|live|local|lock|log|log10|lookup|lsb|"+ + "MAIN|match|max|maxpairs|merge|message|method_table|methods|migrate|min|minmax|"+ + "minpairs|minute|misplaced|Mix|MixHash|mkdir|mode|modified|month|move|mro|msb|multiness|"+ + "name|named|named_names|narrow|nativecast|native-descriptor|nativesizeof|new|new_type|"+ + "new-from-daycount|new-from-pairs|next|nextcallee|next-handle|nextsame|nextwith|NFC|NFD|"+ + "NFKC|NFKD|nl-in|nl-out|nodemap|none|norm|not|note|now|nude|numerator|Numeric|of|"+ + "offset|offset-in-hours|offset-in-minutes|old|on-close|one|on-switch|open|opened|"+ + "operation|optional|ord|ords|orig|os-error|osname|out-buffer|pack|package|package-kind|"+ + "package-name|packages|pair|pairs|pairup|parameter|params|parent|parent-name|parents|parse|"+ + "parse-base|parsefile|parse-names|parts|path|path-sep|payload|peer-host|peer-port|periods|"+ + "perl|permutations|phaser|pick|pickpairs|pid|placeholder|plus|polar|poll|polymod|pop|pos|"+ + "positional|posix|postfix|postmatch|precomp-ext|precomp-target|pred|prefix|prematch|prepend|"+ + "print|printf|print-nl|print-to|private|private_method_table|proc|produce|Promise|prompt|"+ + "protect|pull-one|push|push-all|push-at-least|push-exactly|push-until-lazy|put|"+ + "qualifier-type|quit|r|race|radix|rand|range|raw|re|read|readchars|readonly|"+ + "ready|Real|reallocate|reals|reason|rebless|receive|recv|redispatcher|redo|reduce|"+ + "rel2abs|relative|release|rename|repeated|replacement|report|reserved|resolve|"+ + "restore|result|resume|rethrow|reverse|right|rindex|rmdir|roles_to_compose|"+ + "rolish|roll|rootdir|roots|rotate|rotor|round|roundrobin|routine-type|run|rwx|s|"+ + "samecase|samemark|samewith|say|schedule-on|scheduler|scope|sec|sech|second|seek|"+ + "self|send|Set|set_hidden|set_name|set_package|set_rw|set_value|SetHash|"+ + "set-instruments|setup_finalization|shape|share|shell|shift|sibling|sigil|"+ + "sign|signal|signals|signature|sin|sinh|sink|sink-all|skip|skip-at-least|"+ + "skip-at-least-pull-one|skip-one|sleep|sleep-timer|sleep-until|Slip|slurp|"+ + "slurp-rest|slurpy|snap|snapper|so|socket-host|socket-port|sort|source|"+ + "source-package|spawn|SPEC|splice|split|splitdir|splitpath|sprintf|spurt|"+ + "sqrt|squish|srand|stable|start|started|starts-with|status|stderr|stdout|"+ + "sub_signature|subbuf|subbuf-rw|subname|subparse|subst|subst-mutate|"+ + "substr|substr-eq|substr-rw|succ|sum|Supply|symlink|t|tail|take|take-rw|"+ + "tan|tanh|tap|target|target-name|tc|tclc|tell|then|throttle|throw|timezone|"+ + "tmpdir|to|today|toggle|to-posix|total|trailing|trans|tree|trim|trim-leading|"+ + "trim-trailing|truncate|truncated-to|trusts|try_acquire|trying|twigil|type|"+ + "type_captures|typename|uc|udp|uncaught_handler|unimatch|uniname|uninames|"+ + "uniparse|uniprop|uniprops|unique|unival|univals|unlink|unlock|unpack|unpolar|"+ + "unshift|unwrap|updir|USAGE|utc|val|value|values|VAR|variable|verbose-config|"+ + "version|VMnames|volume|vow|w|wait|warn|watch|watch-path|week|weekday-of-month|"+ + "week-number|week-year|WHAT|WHERE|WHEREFORE|WHICH|WHO|whole-second|WHY|"+ + "wordcase|words|workaround|wrap|write|write-to|yada|year|yield|yyyy-mm-dd|"+ + "z|zip|zip-latest|"+ + "plan|done-testing|bail-out|todo|skip|skip-rest|diag|subtest|pass|flunk|ok|"+ + "nok|cmp-ok|is-deeply|isnt|is-approx|like|unlike|use-ok|isa-ok|does-ok|"+ + "can-ok|dies-ok|lives-ok|eval-dies-ok|eval-lives-ok|throws-like|fails-like|"+ + "rw|required|native|repr|export|symbol" + ); + var constants_ascii = ("pi|Inf|tau|time"); + + var ops_txt = ("eq|ne|gt|lt|le|ge|div|gcd|lcm|leg|cmp|ff|fff|"+ + "x|before|after|Z|X|and|or|andthen|notandthen|orelse|xor" + ); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "storage.type" : types, + "constant.language": constants_ascii, + "support.function": builtinFunctions, + "keyword.operator": ops_txt + }, "identifier"); + + var moduleName = "[a-zA-Z_][a-zA-Z_0-9:-]*\\b"; + var hex = { token : "constant.numeric", regex : "0x[0-9a-fA-F]+\\b" }; + var num_rat = { token : "constant.numeric", regex : "[+-.]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" }; + var num_with_ = { token : "constant.numeric", regex : "(?:\\d+_?\\d+)+\\b" }; + var complex_numbers = { token : "constant.numeric", regex : "\\+?\\d+i\\b" }; + var booleans = { token : "constant.language.boolean", regex : "(?:True|False)\\b" }; + var versions = { token : "constant.other", regex : "v[0-9](?:\\.[a-zA-Z0-9*])*\\b" }; + var lang_keywords = { token : keywordMapper, regex : "[a-zA-Z][\\:a-zA-Z0-9_-]*\\b" }; + var variables = { token : "variable.language", regex : "[$@%&][?*!.]?[a-zA-Z0-9_-]+\\b" }; + var vars_special = { token: "variable.language", regex : "\\$[/|!]?|@\\$/" }; + var ops_char = { token : "keyword.operator", regex : "=|<|>|\\+|\\*|-|/|~|%|\\?|!|\\^|\\.|\\:|\\,|"+ + "»|«|\\||\\&|⚛|∘" }; + var constants_unicode = { token : "constant.language", regex : "𝑒|π|τ|∞" }; + var qstrings = { token : "string.quoted.single", regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }; + var word_quoting = { token : "string.quoted.single", regex : "[<](?:[a-zA-Z0-9 ])*[>]"}; + var regexp = { + token : "string.regexp", + regex : "[m|rx]?[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" }; + + + this.$rules = { + "start" : [ + { + token : "comment.block", // Embedded Comments - Parentheses + regex : "#[`|=]\\(.*\\)" + }, { + token : "comment.block", // Embedded Comments - Brackets + regex : "#[`|=]\\[.*\\]" + }, { + token : "comment.doc", // Multiline Comments + regex : "^=(?:begin)\\b", + next : "block_comment" + }, { + token : "string.unquoted", // q Heredocs + regex : "q[x|w]?\\:to/END/;", + next : "qheredoc" + }, { + token : "string.unquoted", // qq Heredocs + regex : "qq[x|w]?\\:to/END/;", + next : "qqheredoc" + }, + regexp, + qstrings + , { + token : "string.quoted.double", // Double Quoted String + regex : '"', + next : "qqstring" + }, + word_quoting + , { + token: ["keyword", "text", "variable.module"], // use - Module Names, Pragmas, etc. + regex: "(use)(\\s+)((?:"+moduleName+"\\.?)*)" + }, + hex, + num_rat, + num_with_, + complex_numbers, + booleans, + versions, + lang_keywords, + variables, + vars_special, + ops_char, + constants_unicode + , { + token : "comment", // Sigle Line Comments + regex : "#.*$" + }, { + token : "lparen", + regex : "[[({]" + }, { + token : "rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : '\\\\(?:[nrtef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, + variables, + vars_special + , { + token : "lparen", + regex : "{", + next : "qqinterpolation" + }, { + token : "string.quoted.double", + regex : '"', + next : "start" + }, { + defaultToken : "string.quoted.double" + } + ], + "qqinterpolation" : [ + hex, + num_rat, + num_with_, + complex_numbers, + booleans, + versions, + lang_keywords, + variables, + vars_special, + ops_char, + constants_unicode, + qstrings, + regexp, + + { + token: "rparen", + regex: "}", + next : "qqstring" + } + ], + "block_comment": [ + { + token: "comment.doc", + regex: "^=end +[a-zA-Z_0-9]*", + next: "start" + }, + { + defaultToken: "comment.doc" + } + ], + "qheredoc": [ + { + token: "string.unquoted", + regex: "END$", + next: "start" + }, { + defaultToken: "string.unquoted" + } + ], + "qqheredoc": [ + variables, + vars_special, + { + token : "lparen", + regex : "{", + next : "qqheredocinterpolation" + }, { + token: "string.unquoted", + regex: "END$", + next: "start" + }, { + defaultToken: "string.unquoted" + } + ], + "qqheredocinterpolation" : [ + hex, + num_rat, + num_with_, + complex_numbers, + booleans, + versions, + lang_keywords, + variables, + vars_special, + ops_char, + constants_unicode, + qstrings, + regexp, + { + token: "rparen", + regex: "}", + next : "qqheredoc" + } + ] + }; +}; + +oop.inherits(Perl6HighlightRules, TextHighlightRules); + +exports.Perl6HighlightRules = Perl6HighlightRules; +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/perl6",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/perl6_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var Perl6HighlightRules = require("./perl6_highlight_rules").Perl6HighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = Perl6HighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.foldingRules = new CStyleFoldMode({start: "^=(begin)\\b", end: "^=(end)\\b"}); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + this.blockComment = [ + {start: "=begin", end: "=end", lineStartOnly: true}, + {start: "=item", end: "=end", lineStartOnly: true} + ]; + + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.$id = "ace/mode/perl6"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/perl6"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-pgsql.js b/htdocs/includes/ace/src/mode-pgsql.js similarity index 87% rename from htdocs/includes/ace/mode-pgsql.js rename to htdocs/includes/ace/src/mode-pgsql.js index 189f17a559b..952319ef862 100644 --- a/htdocs/includes/ace/mode-pgsql.js +++ b/htdocs/includes/ace/src/mode-pgsql.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/perl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,7 @@ oop.inherits(PerlHighlightRules, TextHighlightRules); exports.PerlHighlightRules = PerlHighlightRules; }); -ace.define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -192,7 +192,7 @@ var PythonHighlightRules = function() { var keywords = ( "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + - "raise|return|try|while|with|yield" + "raise|return|try|while|with|yield|async|await|nonlocal" ); var builtinConstants = ( @@ -202,22 +202,26 @@ var PythonHighlightRules = function() { var builtinFunctions = ( "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + - "binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + - "__import__|complex|hash|min|set|apply|delattr|help|next|setattr|" + - "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern" + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes" ); var keywordMapper = this.createKeywordMapper({ "invalid.deprecated": "debugger", "support.function": builtinFunctions, + "variable.language": "self|cls", "constant.language": builtinConstants, "keyword": keywords }, "identifier"); - var strPre = "(?:r|u|ur|R|U|UR|Ur|uR)?"; - + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; var octInteger = "(?:0[oO]?[0-7]+)"; var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; @@ -228,10 +232,10 @@ var PythonHighlightRules = function() { var fraction = "(?:\\.\\d+)"; var intPart = "(?:\\d+)"; var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; - var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; - var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; this.$rules = { "start" : [ { @@ -254,82 +258,313 @@ var PythonHighlightRules = function() { regex : strPre + "'(?=.)", next : "qstring" }, { - token : "constant.numeric", // imaginary - regex : "(?:" + floatNumber + "|\\d+)[jJ]\\b" + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" }, { - token : "constant.numeric", // float - regex : floatNumber + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" }, { - token : "constant.numeric", // long integer - regex : integer + "[lL]\\b" + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" }, { - token : "constant.numeric", // integer - regex : integer + "\\b" + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" }, { - token : keywordMapper, - regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" }, { - token : "keyword.operator", - regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" }, { - token : "paren.lparen", - regex : "[\\[\\(\\{]" + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" }, { - token : "paren.rparen", - regex : "[\\]\\)\\}]" + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + },{ + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" }, { - token : "text", - regex : "\\s+" - } ], - "qqstring3" : [ { - token : "constant.language.escape", - regex : stringEscape + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" }, { - token : "string", // multi line """ string end - regex : '"{3}', - next : "start" + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" }, { - defaultToken : "string" - } ], - "qstring3" : [ { - token : "constant.language.escape", - regex : stringEscape + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" }, { - token : "string", // multi line ''' string end - regex : "'{3}", - next : "start" + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" }, { - defaultToken : "string" - } ], - "qqstring" : [{ - token : "constant.language.escape", - regex : stringEscape + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" }, { - token : "string", - regex : "\\\\$", - next : "qqstring" + token: "paren.lparen", + regex: "[\\[\\(\\{]" }, { - token : "string", - regex : '"|$', - next : "start" + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" }, { defaultToken: "string" }], - "qstring" : [{ - token : "constant.language.escape", - regex : stringEscape + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape }, { - token : "string", - regex : "\\\\$", - next : "qstring" - }, { - token : "string", - regex : "'|$", - next : "start" + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" }, { defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{//TODO: nested {} + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'(.)*'" + }, { + token: "string", + regex: '"(.)*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + },{ + token: 'paren.rparen', + regex: "}", + next: 'pop' + },{ + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"],// method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" }] }; + this.normalizeRules(); }; oop.inherits(PythonHighlightRules, TextHighlightRules); @@ -337,7 +572,7 @@ oop.inherits(PythonHighlightRules, TextHighlightRules); exports.PythonHighlightRules = PythonHighlightRules; }); -ace.define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -413,7 +648,7 @@ oop.inherits(JsonHighlightRules, TextHighlightRules); exports.JsonHighlightRules = JsonHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -546,7 +781,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -886,7 +1122,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) { +define("ace/mode/pgsql_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/perl_highlight_rules","ace/mode/python_highlight_rules","ace/mode/json_highlight_rules","ace/mode/javascript_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var lang = require("../lib/lang"); @@ -1345,7 +1581,7 @@ var PgsqlHighlightRules = function() { next : "comment" },{ token : "keyword.statementBegin", - regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. + regex : "[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. next : "statement" },{ token : "support.buildin", // psql directive @@ -1469,7 +1705,7 @@ oop.inherits(PgsqlHighlightRules, TextHighlightRules); exports.PgsqlHighlightRules = PgsqlHighlightRules; }); -ace.define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"], function(require, exports, module) { +define("ace/mode/pgsql",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pgsql_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); var TextMode = require("../mode/text").Mode; @@ -1497,4 +1733,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/pgsql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-php.js b/htdocs/includes/ace/src/mode-php.js similarity index 79% rename from htdocs/includes/ace/mode-php.js rename to htdocs/includes/ace/src/mode-php.js index b4d55de8b6c..b9acd2c8073 100644 --- a/htdocs/includes/ace/mode-php.js +++ b/htdocs/includes/ace/src/mode-php.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,15 +48,15 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -86,7 +86,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -109,7 +109,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -146,6 +146,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -154,7 +157,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -178,7 +181,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -190,7 +193,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -228,7 +231,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -240,7 +243,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -373,7 +376,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -713,7 +717,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -894,7 +898,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -916,7 +920,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -998,7 +1002,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { +define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1010,857 +1014,857 @@ var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; var PhpLangHighlightRules = function() { var docComment = DocCommentHighlightRules; var builtinFunctions = lang.arrayToMap( - ('abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|' + - 'aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|' + - 'apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|' + - 'apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|' + - 'apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|' + - 'apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|' + - 'apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|' + - 'apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|' + - 'array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|' + - 'array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|' + - 'array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|' + - 'array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|' + - 'array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|' + - 'array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|' + - 'atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|' + - 'bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|' + - 'bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|' + - 'bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|' + - 'bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|' + - 'bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|' + - 'cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|' + - 'cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|' + - 'cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|' + - 'cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|' + - 'cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|' + - 'cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|' + - 'cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|' + - 'cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|' + - 'cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|' + - 'cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|' + - 'cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|' + - 'cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|' + - 'cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|' + - 'cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|' + - 'cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|' + - 'cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|' + - 'cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|' + - 'cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|' + - 'cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|' + - 'cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|' + - 'cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|' + - 'cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|' + - 'cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|' + - 'cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|' + - 'cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|' + - 'cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|' + - 'cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|' + - 'cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|' + - 'chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|' + - 'class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|' + - 'classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|' + - 'com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|' + - 'com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|' + - 'convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|' + - 'counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|' + - 'crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|' + - 'ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|' + - 'cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|' + - 'cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|' + - 'cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|' + - 'cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|' + - 'cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|' + - 'cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|' + - 'cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|' + - 'cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|' + - 'cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|' + - 'cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|' + - 'cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|' + - 'curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|' + - 'curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|' + - 'curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|' + - 'date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|' + - 'date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|' + - 'date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|' + - 'dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|' + - 'db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|' + - 'db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|' + - 'db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|' + - 'db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|' + - 'db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|' + - 'db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|' + - 'dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|' + - 'dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|' + - 'dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|' + - 'dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|' + - 'dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|' + - 'dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|' + - 'dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|' + - 'dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|' + - 'dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|' + - 'define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|' + - 'dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|' + - 'dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|' + - 'domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|' + - 'domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|' + - 'domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|' + - 'domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|' + - 'domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|' + - 'domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|' + - 'domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|' + - 'domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|' + - 'domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|' + - 'domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|' + - 'domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|' + - 'domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|' + - 'domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|' + - 'domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|' + - 'domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|' + - 'domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|' + - 'domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|' + - 'enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|' + - 'enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|' + - 'enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|' + - 'enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|' + - 'eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|' + - 'event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|' + - 'event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|' + - 'event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|' + - 'event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|' + - 'expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|' + - 'fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|' + - 'fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|' + - 'fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|' + - 'fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|' + - 'fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|' + - 'fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|' + - 'fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|' + - 'fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|' + - 'fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|' + - 'fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|' + - 'fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|' + - 'fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|' + - 'fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|' + - 'file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|' + - 'filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|' + - 'filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|' + - 'finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|' + - 'forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|' + - 'ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|' + - 'ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|' + - 'ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|' + - 'func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|' + - 'gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|' + - 'geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|' + - 'geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|' + - 'get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|' + - 'get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|' + - 'get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|' + - 'get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|' + - 'getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|' + - 'gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|' + - 'getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|' + - 'getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|' + - 'gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|' + - 'gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|' + - 'gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|' + - 'gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|' + - 'gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|' + - 'gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|' + - 'gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|' + - 'grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|' + - 'gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|' + - 'gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|' + - 'gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|' + - 'gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|' + - 'gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|' + - 'gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|' + - 'gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|' + - 'gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|' + - 'gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|' + - 'gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|' + - 'halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|' + - 'haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|' + - 'harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|' + - 'harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|' + - 'harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|' + - 'harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|' + - 'harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|' + - 'harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|' + - 'harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|' + - 'harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|' + - 'haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|' + - 'harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|' + - 'harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|' + - 'haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|' + - 'haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|' + - 'harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|' + - 'harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|' + - 'harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|' + - 'harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|' + - 'harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|' + - 'harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|' + - 'harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|' + - 'harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|' + - 'harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|' + - 'harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|' + - 'harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|' + - 'harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|' + - 'harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|' + - 'harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|' + - 'hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|' + - 'header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|' + - 'html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|' + - 'http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|' + - 'http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|' + - 'http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|' + - 'http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|' + - 'http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|' + - 'http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|' + - 'http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|' + - 'http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|' + - 'httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|' + - 'httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|' + - 'httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|' + - 'httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|' + - 'httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|' + - 'httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|' + - 'httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|' + - 'httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|' + - 'httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|' + - 'httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|' + - 'httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|' + - 'httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|' + - 'httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|' + - 'httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|' + - 'httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|' + - 'httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|' + - 'httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|' + - 'httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|' + - 'httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|' + - 'httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|' + - 'httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|' + - 'httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|' + - 'httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|' + - 'httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|' + - 'httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|' + - 'httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|' + - 'httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|' + - 'httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|' + - 'httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|' + - 'hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|' + - 'hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|' + - 'hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|' + - 'hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|' + - 'hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|' + - 'hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|' + - 'hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|' + - 'hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|' + - 'hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|' + - 'hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|' + - 'hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|' + - 'hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|' + - 'hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|' + - 'hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|' + - 'ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|' + - 'ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|' + - 'ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|' + - 'ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|' + - 'ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|' + - 'ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|' + - 'ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|' + - 'iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|' + - 'id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|' + - 'idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|' + - 'ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|' + - 'ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|' + - 'ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|' + - 'ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|' + - 'iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|' + - 'iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|' + - 'iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|' + - 'imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|' + - 'imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|' + - 'imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|' + - 'imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|' + - 'imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|' + - 'imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|' + - 'imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|' + - 'imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|' + - 'imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|' + - 'imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|' + - 'imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|' + - 'imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|' + - 'imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|' + - 'imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|' + - 'imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|' + - 'imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|' + - 'imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|' + - 'imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|' + - 'imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|' + - 'imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|' + - 'imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|' + - 'imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|' + - 'imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|' + - 'imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|' + - 'imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|' + - 'imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|' + - 'imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|' + - 'imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|' + - 'imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|' + - 'imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|' + - 'imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|' + - 'imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|' + - 'imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|' + - 'imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|' + - 'imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|' + - 'imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|' + - 'imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|' + - 'imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|' + - 'imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|' + - 'imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|' + - 'imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|' + - 'imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|' + - 'imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|' + - 'imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|' + - 'imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|' + - 'imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|' + - 'imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|' + - 'imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|' + - 'imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|' + - 'imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|' + - 'imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|' + - 'imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|' + - 'imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|' + - 'imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|' + - 'imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|' + - 'imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|' + - 'imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|' + - 'imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|' + - 'imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|' + - 'imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|' + - 'imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|' + - 'imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|' + - 'imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|' + - 'imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|' + - 'imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|' + - 'imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|' + - 'imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|' + - 'imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|' + - 'imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|' + - 'imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|' + - 'imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|' + - 'imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|' + - 'imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|' + - 'imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|' + - 'imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|' + - 'imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|' + - 'imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|' + - 'imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|' + - 'imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|' + - 'imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|' + - 'imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|' + - 'imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|' + - 'imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|' + - 'imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|' + - 'imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|' + - 'imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|' + - 'imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|' + - 'imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|' + - 'imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|' + - 'imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|' + - 'imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|' + - 'imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|' + - 'imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|' + - 'imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|' + - 'imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|' + - 'imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|' + - 'imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|' + - 'imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|' + - 'imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|' + - 'imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|' + - 'imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|' + - 'imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|' + - 'imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|' + - 'imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|' + - 'imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|' + - 'imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|' + - 'imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|' + - 'imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|' + - 'imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|' + - 'imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|' + - 'include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|' + - 'ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|' + - 'ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|' + - 'ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|' + - 'ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|' + - 'ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|' + - 'inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|' + - 'intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|' + - 'is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|' + - 'is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|' + - 'iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|' + - 'iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|' + - 'jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|' + - 'json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|' + - 'kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|' + - 'kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|' + - 'ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|' + - 'ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|' + - 'ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|' + - 'ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|' + - 'ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|' + - 'libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|' + - 'limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|' + - 'lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|' + - 'm_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|' + - 'm_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|' + - 'm_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|' + - 'm_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|' + - 'mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|' + - 'mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|' + - 'mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|' + - 'maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|' + - 'maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|' + - 'maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|' + - 'maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|' + - 'maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|' + - 'maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|' + - 'maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|' + - 'maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|' + - 'maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|' + - 'maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|' + - 'maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|' + - 'maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|' + - 'maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|' + - 'maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|' + - 'maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|' + - 'mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|' + - 'mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|' + - 'mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|' + - 'mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|' + - 'mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|' + - 'mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|' + - 'mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|' + - 'mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|' + - 'mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|' + - 'mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|' + - 'mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|' + - 'mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|' + - 'mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|' + - 'mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|' + - 'mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|' + - 'ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|' + - 'mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|' + - 'mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|' + - 'mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|' + - 'mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|' + - 'mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|' + - 'msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|' + - 'msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|' + - 'msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|' + - 'msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|' + - 'msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|' + - 'msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|' + - 'msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|' + - 'mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|' + - 'mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|' + - 'mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|' + - 'mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|' + - 'mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|' + - 'mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|' + - 'mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|' + - 'mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|' + - 'mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|' + - 'mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|' + - 'mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|' + - 'mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|' + - 'mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|' + - 'mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|' + - 'mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|' + - 'mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|' + - 'mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|' + - 'mysqli_free_result|mysqli_get_charset|mysqli_get_client_info|mysqli_get_client_stats|mysqli_get_client_version|mysqli_get_connection_stats|' + - 'mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|' + - 'mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|' + - 'mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|' + - 'mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|' + - 'mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|' + - 'mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|' + - 'mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|' + - 'mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|' + - 'mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|' + - 'mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|' + - 'mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|' + - 'mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|' + - 'mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|' + - 'mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|' + - 'ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|' + - 'ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|' + - 'ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|' + - 'ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|' + - 'ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|' + - 'ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|' + - 'ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|' + - 'ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|' + - 'ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|' + - 'ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|' + - 'ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|' + - 'ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|' + - 'ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|' + - 'ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|' + - 'ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|' + - 'ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|' + - 'ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|' + - 'ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|' + - 'ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|' + - 'ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|' + - 'ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|' + - 'ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|' + - 'newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|' + - 'newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|' + - 'newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|' + - 'newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|' + - 'newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|' + - 'newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|' + - 'newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|' + - 'newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|' + - 'newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|' + - 'newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|' + - 'newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|' + - 'newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|' + - 'newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|' + - 'newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|' + - 'newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|' + - 'newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|' + - 'newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|' + - 'newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|' + - 'newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|' + - 'notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|' + - 'notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|' + - 'numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|' + - 'ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|' + - 'ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|' + - 'oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|' + - 'oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|' + - 'oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|' + - 'oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|' + - 'oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|' + - 'oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|' + - 'oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|' + - 'oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|' + - 'oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|' + - 'ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|' + - 'ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|' + - 'ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|' + - 'ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|' + - 'ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|' + - 'octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|' + - 'odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|' + - 'odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|' + - 'odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|' + - 'odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|' + - 'odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|' + - 'openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|' + - 'openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|' + - 'openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|' + - 'openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|' + - 'openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|' + - 'openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|' + - 'openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|' + - 'openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|' + - 'openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|' + - 'openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|' + - 'openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|' + - 'outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|' + - 'ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|' + - 'ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|' + - 'ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|' + - 'parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|' + - 'pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|' + - 'pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|' + - 'pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|' + - 'pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|' + - 'pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|' + - 'pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|' + - 'pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|' + - 'pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|' + - 'pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|' + - 'pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|' + - 'pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|' + - 'pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|' + - 'pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|' + - 'pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|' + - 'pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|' + - 'pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|' + - 'pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|' + - 'pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|' + - 'pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|' + - 'pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|' + - 'pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|' + - 'pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|' + - 'pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|' + - 'pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|' + - 'pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|' + - 'pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|' + - 'pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|' + - 'pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|' + - 'pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|' + - 'pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|' + - 'pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|' + - 'pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|' + - 'pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|' + - 'pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|' + - 'pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|' + - 'php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|' + - 'png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|' + - 'posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|' + - 'posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|' + - 'posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|' + - 'preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|' + - 'printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|' + - 'printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|' + - 'printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|' + - 'printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|' + - 'printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|' + - 'ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|' + - 'ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|' + - 'ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|' + - 'ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|' + - 'ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|' + - 'ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|' + - 'ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|' + - 'ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|' + - 'ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|' + - 'pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|' + - 'pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|' + - 'pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|' + - 'px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|' + - 'px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|' + - 'px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|' + - 'radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|' + - 'radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|' + - 'radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|' + - 'radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|' + - 'rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|' + - 'readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|' + - 'readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|' + - 'readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|' + - 'recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|' + - 'recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|' + - 'reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|' + - 'regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|' + - 'resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|' + - 'rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|' + - 'rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|' + - 'runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|' + - 'runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|' + - 'runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|' + - 'runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|' + - 'samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|' + - 'samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|' + - 'sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|' + - 'sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|' + - 'sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|' + - 'sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|' + - 'sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|' + - 'sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|' + - 'sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|' + - 'sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|' + - 'sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|' + - 'sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|' + - 'sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|' + - 'sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|' + - 'sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|' + - 'sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|' + - 'sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|' + - 'sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|' + - 'sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|' + - 'sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|' + - 'sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|' + - 'sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|' + - 'session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|' + - 'session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|' + - 'session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|' + - 'session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|' + - 'set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|' + - 'setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|' + - 'shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|' + - 'similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|' + - 'snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|' + - 'snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|' + - 'snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|' + - 'soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|' + - 'socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|' + - 'socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|' + - 'socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|' + - 'solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|' + - 'solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|' + - 'solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|' + - 'spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|' + - 'splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|' + - 'splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|' + - 'sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|' + - 'sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|' + - 'sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|' + - 'sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|' + - 'sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|' + - 'sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|' + - 'ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|' + - 'ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|' + - 'ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|' + - 'ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|' + - 'stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|' + - 'stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|' + - 'stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|' + - 'stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|' + - 'stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|' + - 'stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|' + - 'stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|' + - 'stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|' + - 'stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|' + - 'stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|' + - 'stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|' + - 'stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|' + - 'str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|' + - 'stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|' + - 'stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|' + - 'stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|' + - 'stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|' + - 'stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|' + - 'stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|' + - 'stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|' + - 'stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|' + - 'stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|' + - 'strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|' + - 'svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|' + - 'svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|' + - 'svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|' + - 'svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|' + - 'svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|' + - 'svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|' + - 'swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|' + - 'swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|' + - 'swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|' + - 'swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|' + - 'swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|' + - 'swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|' + - 'swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|' + - 'swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|' + - 'swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|' + - 'swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|' + - 'swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|' + - 'swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|' + - 'swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|' + - 'sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|' + - 'sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|' + - 'sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|' + - 'sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|' + - 'tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|' + - 'tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|' + - 'time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|' + - 'timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|' + - 'tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|' + - 'ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|' + - 'udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|' + - 'udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|' + - 'uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|' + - 'urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|' + - 'variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|' + - 'variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|' + - 'variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|' + - 'vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|' + - 'vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|' + - 'vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|' + - 'w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|' + - 'wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|' + - 'win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|' + - 'win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|' + - 'wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|' + - 'wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|' + - 'wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|' + - 'wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|' + - 'xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|' + - 'xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|' + - 'xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|' + - 'xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|' + - 'xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|' + - 'xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|' + - 'xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|' + - 'xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|' + - 'xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|' + - 'xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|' + - 'xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|' + - 'xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|' + - 'xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|' + - 'xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|' + - 'xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|' + - 'xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|' + - 'xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|' + - 'xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|' + - 'xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|' + - 'xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|' + - 'xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|' + - 'xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|' + - 'yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|' + - 'yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|' + - 'yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|' + - 'yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|' + - 'zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|' + - 'ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|' + - 'ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|' + - 'ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|' + - 'ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|' + - 'ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|' + - 'ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type').split('|') +'abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|\ +aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|\ +apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|\ +apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|\ +apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|\ +apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|\ +apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|\ +apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|\ +array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|\ +array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|\ +array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|\ +array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|\ +array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|\ +array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|\ +atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|\ +bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|\ +bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|\ +bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|\ +bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|\ +bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|\ +cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|\ +cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|\ +cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|\ +cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|\ +cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|\ +cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|\ +cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|\ +cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|\ +cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|\ +cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|\ +cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|\ +cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|\ +cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|\ +cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|\ +cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|\ +cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|\ +cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|\ +cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|\ +cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|\ +cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|\ +cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|\ +cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|\ +cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|\ +cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|\ +cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|\ +cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|\ +cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|\ +cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|\ +chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|\ +class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|\ +classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|\ +com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|\ +com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|\ +convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|\ +counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|\ +crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|\ +ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|\ +cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|\ +cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|\ +cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|\ +cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|\ +cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|\ +cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|\ +cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|\ +cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|\ +cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|\ +cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|\ +cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|\ +curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|\ +curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|\ +curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|\ +date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|\ +date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|\ +date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|\ +dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|\ +db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|\ +db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|\ +db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|\ +db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|\ +db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|\ +db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|\ +dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|\ +dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|\ +dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|\ +dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|\ +dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|\ +dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|\ +dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|\ +dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|\ +dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|\ +define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|\ +dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|\ +dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|\ +domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|\ +domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|\ +domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|\ +domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|\ +domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|\ +domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|\ +domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|\ +domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|\ +domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|\ +domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|\ +domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|\ +domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|\ +domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|\ +domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|\ +domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|\ +domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|\ +domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|\ +enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|\ +enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|\ +enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|\ +enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|\ +eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|\ +event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|\ +event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|\ +event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|\ +event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|\ +expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|\ +fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|\ +fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|\ +fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|\ +fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|\ +fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|\ +fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|\ +fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|\ +fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|\ +fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|\ +fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|\ +fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|\ +fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|\ +fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|\ +file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|\ +filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|\ +filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|\ +finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|\ +forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|\ +ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|\ +ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|\ +ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|\ +func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|\ +gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|\ +geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|\ +geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|\ +get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|\ +get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|\ +get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|\ +get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|\ +getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|\ +gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|\ +getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|\ +getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|\ +gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|\ +gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|\ +gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|\ +gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|\ +gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|\ +gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|\ +gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|\ +grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|\ +gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|\ +gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|\ +gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|\ +gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|\ +gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|\ +gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|\ +gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|\ +gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|\ +gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|\ +gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|\ +halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|\ +haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|\ +harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|\ +harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|\ +harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|\ +harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|\ +harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|\ +harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|\ +harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|\ +harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|\ +haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|\ +harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|\ +harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|\ +haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|\ +haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|\ +harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|\ +harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|\ +harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|\ +harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|\ +harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|\ +harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|\ +harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|\ +harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|\ +harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|\ +harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|\ +harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|\ +harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|\ +harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|\ +harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|\ +hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|\ +header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|\ +html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|\ +http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|\ +http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|\ +http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|\ +http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|\ +http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|\ +http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|\ +http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|\ +http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|\ +httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|\ +httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|\ +httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|\ +httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|\ +httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|\ +httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|\ +httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|\ +httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|\ +httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|\ +httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|\ +httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|\ +httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|\ +httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|\ +httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|\ +httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|\ +httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|\ +httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|\ +httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|\ +httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|\ +httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|\ +httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|\ +httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|\ +httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|\ +httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|\ +httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|\ +httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|\ +httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|\ +httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|\ +httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|\ +hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|\ +hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|\ +hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|\ +hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|\ +hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|\ +hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|\ +hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|\ +hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|\ +hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|\ +hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|\ +hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|\ +hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|\ +hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|\ +hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|\ +ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|\ +ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|\ +ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|\ +ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|\ +ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|\ +ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|\ +ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|\ +iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|\ +id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|\ +idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|\ +ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|\ +ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|\ +ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|\ +ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|\ +iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|\ +iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|\ +iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|\ +imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|\ +imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|\ +imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|\ +imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|\ +imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|\ +imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|\ +imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|\ +imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|\ +imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|\ +imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|\ +imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|\ +imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|\ +imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|\ +imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|\ +imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|\ +imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|\ +imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|\ +imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|\ +imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|\ +imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|\ +imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|\ +imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|\ +imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|\ +imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|\ +imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|\ +imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|\ +imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|\ +imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|\ +imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|\ +imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|\ +imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|\ +imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|\ +imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|\ +imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|\ +imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|\ +imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|\ +imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|\ +imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|\ +imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|\ +imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|\ +imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|\ +imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|\ +imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|\ +imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|\ +imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|\ +imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|\ +imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|\ +imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|\ +imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|\ +imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|\ +imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|\ +imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|\ +imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|\ +imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|\ +imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|\ +imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|\ +imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|\ +imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|\ +imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|\ +imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|\ +imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|\ +imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|\ +imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|\ +imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|\ +imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|\ +imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|\ +imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|\ +imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|\ +imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|\ +imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|\ +imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|\ +imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|\ +imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|\ +imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|\ +imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|\ +imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|\ +imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|\ +imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|\ +imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|\ +imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|\ +imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|\ +imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|\ +imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|\ +imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|\ +imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|\ +imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|\ +imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|\ +imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|\ +imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|\ +imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|\ +imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|\ +imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|\ +imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|\ +imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|\ +imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|\ +imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|\ +imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|\ +imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|\ +imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|\ +imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|\ +imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|\ +imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|\ +imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|\ +imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|\ +imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|\ +imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|\ +imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|\ +imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|\ +imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|\ +imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|\ +include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|\ +ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|\ +ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|\ +ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|\ +ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|\ +ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|\ +inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|\ +intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|\ +is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|\ +is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|\ +iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|\ +iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|\ +jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|\ +json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|\ +kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|\ +kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|\ +ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|\ +ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|\ +ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|\ +ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|\ +ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|\ +libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|\ +limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|\ +lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|\ +m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|\ +m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|\ +m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|\ +m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|\ +mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|\ +mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|\ +mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|\ +maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|\ +maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|\ +maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|\ +maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|\ +maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|\ +maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|\ +maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|\ +maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|\ +maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|\ +maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|\ +maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|\ +maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|\ +maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|\ +maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|\ +maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|\ +mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|\ +mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|\ +mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|\ +mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|\ +mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|\ +mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|\ +mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|\ +mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|\ +mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|\ +mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|\ +mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|\ +mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|\ +mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|\ +mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|\ +mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|\ +ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|\ +mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|\ +mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|\ +mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|\ +mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|\ +mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|\ +msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|\ +msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|\ +msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|\ +msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|\ +msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|\ +msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|\ +msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|\ +mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|\ +mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|\ +mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|\ +mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|\ +mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|\ +mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|\ +mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|\ +mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|\ +mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|\ +mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|\ +mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|\ +mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|\ +mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|\ +mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|\ +mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|\ +mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|\ +mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|\ +mysqli_free_result|mysqli_get_charset|mysqli_get_client_info|mysqli_get_client_stats|mysqli_get_client_version|mysqli_get_connection_stats|\ +mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|\ +mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|\ +mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|\ +mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|\ +mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|\ +mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|\ +mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|\ +mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|\ +mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|\ +mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|\ +mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|\ +mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|\ +mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|\ +mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|\ +ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|\ +ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|\ +ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|\ +ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|\ +ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|\ +ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|\ +ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|\ +ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|\ +ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|\ +ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|\ +ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|\ +ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|\ +ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|\ +ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|\ +ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|\ +ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|\ +ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|\ +ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|\ +ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|\ +ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|\ +ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|\ +ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|\ +newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|\ +newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|\ +newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|\ +newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|\ +newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|\ +newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|\ +newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|\ +newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|\ +newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|\ +newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|\ +newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|\ +newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|\ +newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|\ +newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|\ +newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|\ +newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|\ +newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|\ +newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|\ +newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|\ +notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|\ +notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|\ +numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|\ +ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|\ +ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|\ +oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|\ +oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|\ +oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|\ +oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|\ +oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|\ +oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|\ +oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|\ +oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|\ +oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|\ +ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|\ +ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|\ +ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|\ +ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|\ +ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|\ +octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|\ +odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|\ +odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|\ +odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|\ +odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|\ +odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|\ +openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|\ +openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|\ +openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|\ +openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|\ +openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|\ +openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|\ +openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|\ +openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|\ +openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|\ +openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|\ +openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|\ +outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|\ +ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|\ +ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|\ +ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|\ +parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|\ +pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|\ +pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|\ +pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|\ +pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|\ +pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|\ +pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|\ +pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|\ +pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|\ +pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|\ +pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|\ +pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|\ +pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|\ +pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|\ +pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|\ +pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|\ +pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|\ +pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|\ +pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|\ +pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|\ +pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|\ +pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|\ +pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|\ +pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|\ +pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|\ +pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|\ +pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|\ +pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|\ +pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|\ +pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|\ +pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|\ +pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|\ +pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|\ +pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|\ +pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|\ +pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|\ +php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|\ +png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|\ +posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|\ +posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|\ +posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|\ +preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|\ +printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|\ +printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|\ +printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|\ +printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|\ +printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|\ +ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|\ +ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|\ +ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|\ +ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|\ +ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|\ +ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|\ +ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|\ +ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|\ +ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|\ +pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|\ +pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|\ +pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|\ +px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|\ +px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|\ +px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|\ +radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|\ +radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|\ +radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|\ +radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|\ +rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|\ +readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|\ +readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|\ +readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|\ +recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|\ +recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|\ +reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|\ +regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|\ +resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|\ +rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|\ +rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|\ +runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|\ +runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|\ +runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|\ +runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|\ +samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|\ +samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|\ +sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|\ +sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|\ +sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|\ +sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|\ +sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|\ +sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|\ +sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|\ +sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|\ +sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|\ +sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|\ +sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|\ +sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|\ +sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|\ +sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|\ +sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|\ +sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|\ +sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|\ +sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|\ +sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|\ +sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|\ +session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|\ +session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|\ +session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|\ +session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|\ +set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|\ +setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|\ +shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|\ +similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|\ +snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|\ +snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|\ +snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|\ +soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|\ +socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|\ +socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|\ +socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|\ +solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|\ +solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|\ +solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|\ +spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|\ +splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|\ +splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|\ +sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|\ +sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|\ +sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|\ +sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|\ +sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|\ +sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|\ +ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|\ +ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|\ +ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|\ +ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|\ +stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|\ +stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|\ +stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|\ +stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|\ +stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|\ +stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|\ +stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|\ +stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|\ +stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|\ +stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|\ +stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|\ +stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|\ +str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|\ +stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|\ +stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|\ +stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|\ +stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|\ +stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|\ +stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|\ +stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|\ +stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|\ +stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|\ +strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|\ +svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|\ +svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|\ +svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|\ +svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|\ +svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|\ +svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|\ +swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|\ +swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|\ +swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|\ +swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|\ +swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|\ +swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|\ +swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|\ +swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|\ +swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|\ +swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|\ +swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|\ +swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|\ +swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|\ +sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|\ +sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|\ +sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|\ +sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|\ +tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|\ +tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|\ +time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|\ +timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|\ +tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|\ +ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|\ +udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|\ +udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|\ +uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|\ +urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|\ +variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|\ +variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|\ +variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|\ +vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|\ +vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|\ +vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|\ +w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|\ +wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|\ +win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|\ +win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|\ +wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|\ +wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|\ +wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|\ +wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|\ +xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|\ +xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|\ +xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|\ +xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|\ +xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|\ +xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|\ +xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|\ +xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|\ +xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|\ +xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|\ +xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|\ +xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|\ +xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|\ +xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|\ +xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|\ +xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|\ +xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|\ +xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|\ +xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|\ +xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|\ +xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|\ +xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|\ +yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|\ +yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|\ +yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|\ +yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|\ +zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|\ +ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|\ +ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|\ +ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|\ +ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|\ +ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|\ +ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type'.split('|') ); var keywords = lang.arrayToMap( - ('abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|' + - 'endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|' + - 'public|static|switch|throw|trait|try|use|var|while|xor').split('|') +'abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|\ +endif|endswitch|endwhile|extends|final|finally|for|foreach|function|global|goto|if|implements|instanceof|insteadof|interface|namespace|new|or|private|protected|\ +public|static|switch|throw|trait|try|use|var|while|xor|yield'.split('|') ); var languageConstructs = lang.arrayToMap( - ('die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|') + ('__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|') ); var builtinConstants = lang.arrayToMap( - ('true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__').split('|') + ('true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__').split('|') ); var builtinVariables = lang.arrayToMap( - ('$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|' + - '$http_response_header|$argc|$argv').split('|') +'$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|\ +$http_response_header|$argc|$argv'.split('|') ); var builtinFunctionsDeprecated = lang.arrayToMap( - ('key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|' + - 'com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|' + - 'cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|' + - 'hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|' + - 'maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|' + - 'mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|' + - 'mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|' + - 'mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|' + - 'mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|' + - 'mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|' + - 'mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|' + - 'ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|' + - 'ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|' + - 'ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|' + - 'ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|' + - 'ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|' + - 'PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|' + - 'PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|' + - 'PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|' + - 'PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|' + - 'PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|' + - 'PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|' + - 'PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|' + - 'PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|' + - 'px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister' + - 'set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|' + - 'sql_regcase').split('|') +'key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|\ +com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|\ +cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|\ +hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|\ +maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|\ +mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|\ +mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|\ +mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|\ +mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|\ +mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|\ +mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|\ +ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|\ +ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|\ +ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|\ +ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|\ +ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|\ +PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|\ +PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|\ +PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|\ +PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|\ +PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|\ +PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|\ +PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|\ +PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|\ +px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister\ +set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|\ +sql_regcase'.split('|') ); var keywordsDeprecated = lang.arrayToMap( @@ -1960,7 +1964,10 @@ var PhpLangHighlightRules = function() { next: "heredoc" }, { token : "keyword.operator", - regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|=|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|\\.=|=|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : /[,;]/ }, { token : "paren.lparen", regex : "[[({]" @@ -2058,7 +2065,7 @@ exports.PhpHighlightRules = PhpHighlightRules; exports.PhpLangHighlightRules = PhpLangHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -2098,7 +2105,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/php_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/php_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var functionMap = { @@ -3585,7 +3592,7 @@ var functionMap = { ], "enchant_broker_dict_exists": [ "bool enchant_broker_dict_exists(resource broker, string tag)", - "Wether a dictionary exists or not. Using non-empty tag" + "Whether a dictionary exists or not. Using non-empty tag" ], "enchant_broker_free": [ "boolean enchant_broker_free(resource broker)", @@ -4095,6 +4102,8 @@ var functionMap = { "int func_num_args(void)", "Get the number of arguments that were passed to the function" ], + "function ": ["", ""], + "foreach ": ["", ""], "function_exists": [ "bool function_exists(string function_name)", "Checks if the function exists" @@ -6585,7 +6594,7 @@ var functionMap = { ], "msg_queue_exists": [ "bool msg_queue_exists(int key)", - "Check wether a message queue exists" + "Check whether a message queue exists" ], "msg_receive": [ "mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])", @@ -10073,7 +10082,7 @@ var functionMap = { ], "stream_supports_lock": [ "bool stream_supports_lock(resource stream)", - "Tells wether the stream supports locking through flock()." + "Tells whether the stream supports locking through flock()." ], "stream_wrapper_register": [ "bool stream_wrapper_register(string protocol, string classname[, integer flags])", @@ -11037,7 +11046,7 @@ var functionMap = { ], "xmlwriter_write_element_ns": [ "bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])", - "Write full namesapced element tag - returns FALSE on error" + "Write full namespaced element tag - returns FALSE on error" ], "xmlwriter_write_pi": [ "bool xmlwriter_write_pi(resource xmlwriter, string target, string content)", @@ -11213,8 +11222,18 @@ var PhpCompletions = function() { if (!token) return []; - if (token.type==='identifier') + + if (token.type==='support.php_tag' && token.value===' 0) { + var prevToken = session.getTokenAt(pos.row, token.start); + if (prevToken.type==='support.php_tag') { + return this.getTagCompletions(state, session, pos, prefix); + } + } return this.getFunctionCompletions(state, session, pos, prefix); + } if (is(token, "variable")) return this.getVariableCompletions(state, session, pos, prefix); var line = session.getLine(pos.row).substr(0, pos.column); @@ -11223,6 +11242,20 @@ var PhpCompletions = function() { return []; }; + + this.getTagCompletions = function(state, session, pos, prefix) { + return [{ + caption: 'php', + value: 'php', + meta: "php tag", + score: 1000000 + }, { + caption: '=', + value: '=', + meta: "php tag", + score: 1000000 + }]; + }; this.getFunctionCompletions = function(state, session, pos, prefix) { var functions = Object.keys(functionMap); @@ -11231,7 +11264,7 @@ var PhpCompletions = function() { caption: func, snippet: func + '($0)', meta: "php function", - score: Number.MAX_VALUE, + score: 1000000, docHTML: functionMap[func][1] }; }); @@ -11244,7 +11277,7 @@ var PhpCompletions = function() { caption: variable, value: variable, meta: "php variable", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -11266,7 +11299,7 @@ var PhpCompletions = function() { caption: key, value: key, meta: "php array key", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -11276,7 +11309,7 @@ var PhpCompletions = function() { exports.PhpCompletions = PhpCompletions; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -11297,8 +11330,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -11416,7 +11449,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -11503,7 +11536,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -11615,18 +11648,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -11645,9 +11674,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -11667,7 +11696,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -11677,7 +11706,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -11690,7 +11719,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -11704,13 +11733,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -11737,7 +11766,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -11745,18 +11774,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -11831,7 +11874,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -11840,7 +11883,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -11910,14 +11953,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -11998,7 +12046,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -12052,7 +12100,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -12107,7 +12155,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && //, + next : "start" + }, { + token : "keyword.operator", + regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token : "text", + regex : "\\s+" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", + next: "function_arguments" + }, { + token : "punctuation.operator", + regex : /[.](?![.])/ + }, { + token : "support.function", + regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : "support.function.dom", + regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : "support.constant", + regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : "identifier", + regex : identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.quasi.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : escapedRe + }, { + token : "paren.quasi.start", + regex : /\${/, + push : "start" + }, { + token : "string.quasi.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string.quasi" + }] + }); + + if (!options || options.jsx != false) + JSX.call(this); + } + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); + + this.normalizeRules(); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch : function(val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex : "", + onMatch : function(value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{type: this.token, value: value}]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + token : "text.tag-whitespace.xml", + regex : "\\s+" + }, { + token : "string.attribute-value.xml", + regex : "'", + stateName : "jsx_attr_q", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + stateName : "jsx_attr_qq", + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} + +function comments(next) { + return [ + { + token : "comment", // multi line comment + regex : /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "comment", + regex : "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + + this.$rules = { + start : [ + {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction" + }, + {token : "comment.start.xml", regex : "<\\!--", next : "comment"}, + { + token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true + }, + {include : "tag"}, + {token : "text.end-tag-open.xml", regex: "", + next : "start" + }], + + doctype : [ + {include : "whitespace"}, + {include : "string"}, + {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, + {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} + ], + + int_subset : [{ + token : "text.xml", + regex : "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex : "(<\\!)(" + tagRegex + ")", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.markup-decl.xml", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, + {token : "text.xml", regex : "\\s+"}, + {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment.end.xml", regex : "-->", next : "start"}, + {defaultToken : "comment.xml"} + ], + + reference : [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + attr_reference : [{ + token : "constant.language.escape.reference.attribute-value.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + tag : [{ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex : "(?:(<)|(", next : "start"} + ] + }], + + tag_whitespace : [ + {token : "text.tag-whitespace.xml", regex : "\\s+"} + ], + whitespace : [ + {token : "text.whitespace.xml", regex : "\\s+"} + ], + string: [{ + token : "string.xml", + regex : "'", + push : [ + {token : "string.xml", regex: "'", next: "pop"}, + {defaultToken : "string.xml"} + ] + }, { + token : "string.xml", + regex : '"', + push : [ + {token : "string.xml", regex: '"', next: "pop"}, + {defaultToken : "string.xml"} + ] + }], + + attributes: [{ + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + + attribute_value: [{ + token : "string.attribute-value.xml", + regex : "'", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(<)(" + tag + "(?=\\s|>|$))", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ]; + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex : "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex : "\\]\\]>" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "tag_whitespace" + }, { + token : "entity.other.attribute-name.xml", + regex : "[-_a-zA-Z0-9:.]+" + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=", + push : [{ + include: "tag_whitespace" + }, { + token : "string.unquoted.attribute-value.html", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "attribute_value" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex : "(", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +define("ace/mode/php_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; + +var PhpLangHighlightRules = function() { + var docComment = DocCommentHighlightRules; + var builtinFunctions = lang.arrayToMap( +'abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|\ +aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|\ +apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|\ +apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|\ +apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|\ +apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|\ +apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|\ +apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|\ +array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|\ +array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|\ +array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|\ +array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|\ +array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|\ +array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|\ +atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|\ +bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|\ +bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|\ +bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|\ +bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|\ +bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|\ +cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|\ +cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|\ +cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|\ +cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|\ +cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|\ +cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|\ +cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|\ +cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|\ +cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|\ +cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|\ +cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|\ +cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|\ +cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|\ +cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|\ +cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|\ +cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|\ +cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|\ +cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|\ +cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|\ +cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|\ +cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|\ +cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|\ +cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|\ +cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|\ +cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|\ +cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|\ +cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|\ +cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|\ +chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|\ +class_parents|class_uses|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|\ +classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|\ +com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|\ +com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|\ +convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|\ +counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|\ +crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|\ +ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|\ +cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|\ +cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|\ +cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|\ +cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|\ +cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|\ +cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|\ +cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|\ +cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|\ +cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|\ +cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|\ +cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|\ +curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|\ +curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|\ +curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|\ +date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|\ +date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|\ +date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|\ +dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|\ +db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|\ +db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|\ +db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|\ +db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|\ +db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|\ +db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|\ +dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|\ +dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|\ +dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|\ +dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|\ +dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|\ +dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|\ +dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|\ +dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|\ +dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|\ +define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|\ +dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|\ +dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|\ +domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|\ +domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|\ +domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|\ +domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|\ +domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|\ +domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|\ +domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|\ +domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|\ +domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|\ +domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|\ +domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|\ +domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|\ +domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|\ +domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|\ +domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|\ +domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|\ +domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|\ +enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|\ +enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|\ +enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|\ +enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|\ +eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|\ +event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|\ +event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|\ +event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|\ +event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|\ +expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|\ +fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|\ +fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|\ +fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|\ +fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|\ +fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|\ +fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|\ +fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|\ +fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|\ +fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|\ +fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|\ +fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|\ +fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|\ +fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|\ +file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|\ +filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|\ +filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|\ +finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|\ +forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|\ +ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|\ +ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|\ +ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|\ +func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|\ +gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|\ +geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|\ +geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|\ +get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|\ +get_declared_interfaces|get_declared_traits|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|\ +get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|\ +get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|\ +getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|\ +gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|\ +getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|\ +getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|\ +gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|\ +gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|\ +gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|\ +gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|\ +gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|\ +gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|\ +gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|\ +grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|\ +gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|\ +gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|\ +gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|\ +gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|\ +gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|\ +gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|\ +gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|\ +gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|\ +gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|\ +gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|\ +halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|\ +haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|\ +harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|\ +harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|\ +harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|\ +harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|\ +harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|\ +harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|\ +harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|\ +harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|\ +haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|\ +harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|\ +harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|\ +haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|\ +haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|\ +harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|\ +harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|\ +harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|\ +harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|\ +harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|\ +harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|\ +harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|\ +harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|\ +harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|\ +harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|\ +harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|\ +harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|\ +harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|\ +harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|\ +hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|\ +header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|\ +html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|\ +http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|\ +http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|\ +http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|\ +http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|\ +http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|\ +http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|\ +http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|\ +http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|\ +httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|\ +httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|\ +httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|\ +httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|\ +httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|\ +httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|\ +httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|\ +httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|\ +httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|\ +httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|\ +httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|\ +httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|\ +httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|\ +httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|\ +httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|\ +httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|\ +httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|\ +httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|\ +httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|\ +httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|\ +httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|\ +httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|\ +httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|\ +httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|\ +httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|\ +httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|\ +httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|\ +httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|\ +httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|\ +hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|\ +hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|\ +hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|\ +hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|\ +hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|\ +hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|\ +hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|\ +hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|\ +hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|\ +hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|\ +hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|\ +hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|\ +hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|\ +hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|\ +ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|\ +ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|\ +ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|\ +ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|\ +ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|\ +ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|\ +ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|\ +iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|\ +id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|\ +idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|\ +ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|\ +ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|\ +ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|\ +ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|\ +iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|\ +iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|\ +iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|\ +imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|\ +imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|\ +imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|\ +imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|\ +imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|\ +imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|\ +imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|\ +imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|\ +imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|\ +imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|\ +imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|\ +imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|\ +imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|\ +imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|\ +imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|\ +imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|\ +imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|\ +imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|\ +imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|\ +imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|\ +imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|\ +imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|\ +imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|\ +imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|\ +imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|\ +imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|\ +imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|\ +imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|\ +imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|\ +imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|\ +imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|\ +imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|\ +imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|\ +imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|\ +imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|\ +imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|\ +imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|\ +imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|\ +imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|\ +imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|\ +imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|\ +imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|\ +imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|\ +imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|\ +imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|\ +imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|\ +imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|\ +imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|\ +imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|\ +imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|\ +imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|\ +imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|\ +imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|\ +imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|\ +imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|\ +imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|\ +imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|\ +imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|\ +imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|\ +imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|\ +imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|\ +imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|\ +imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|\ +imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|\ +imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|\ +imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|\ +imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|\ +imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|\ +imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|\ +imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|\ +imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|\ +imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|\ +imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|\ +imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|\ +imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|\ +imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|\ +imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|\ +imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|\ +imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|\ +imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|\ +imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|\ +imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|\ +imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|\ +imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|\ +imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|\ +imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|\ +imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|\ +imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|\ +imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|\ +imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|\ +imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|\ +imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|\ +imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|\ +imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|\ +imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|\ +imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|\ +imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|\ +imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|\ +imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|\ +imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|\ +imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|\ +imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|\ +imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|\ +imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|\ +imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|\ +imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|\ +imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|\ +imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|\ +imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|\ +imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|\ +include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|\ +ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|\ +ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|\ +ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|\ +ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|\ +ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|\ +inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|\ +intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|\ +is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|\ +is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|\ +iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|\ +iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|\ +jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|\ +json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|\ +kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|\ +kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|\ +ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|\ +ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|\ +ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|\ +ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|\ +ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|\ +libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|\ +limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|\ +lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|\ +m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|\ +m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|\ +m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|\ +m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|\ +mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|\ +mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|\ +mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|\ +maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|\ +maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|\ +maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|\ +maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|\ +maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|\ +maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|\ +maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|\ +maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|\ +maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|\ +maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|\ +maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|\ +maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|\ +maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|\ +maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|\ +maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|\ +mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|\ +mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|\ +mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|\ +mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|\ +mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|\ +mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|\ +mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|\ +mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|\ +mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|\ +mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|\ +mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|\ +mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|\ +mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|\ +mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|\ +mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|\ +ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|\ +mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|\ +mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|\ +mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|\ +mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|\ +mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|\ +msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|\ +msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|\ +msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|\ +msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|\ +msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|\ +msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|\ +msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|\ +mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|\ +mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|\ +mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|\ +mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|\ +mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|\ +mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|\ +mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|\ +mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|\ +mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|\ +mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|\ +mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_affected_rows|\ +mysqli_autocommit|mysqli_bind_param|mysqli_bind_result|mysqli_cache_stats|mysqli_change_user|mysqli_character_set_name|\ +mysqli_client_encoding|mysqli_close|mysqli_commit|mysqli_connect|mysqli_connect_errno|mysqli_connect_error|mysqli_data_seek|\ +mysqli_debug|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_dump_debug_info|mysqli_embedded_server_end|\ +mysqli_embedded_server_start|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_errno|mysqli_error|mysqli_escape_string|\ +mysqli_execute|mysqli_fetch|mysqli_fetch_all|mysqli_fetch_array|mysqli_fetch_assoc|mysqli_fetch_field|mysqli_fetch_field_direct|\ +mysqli_fetch_fields|mysqli_fetch_lengths|mysqli_fetch_object|mysqli_fetch_row|mysqli_field_count|mysqli_field_seek|mysqli_field_tell|\ +mysqli_free_result|mysqli_get_charset|mysqli_get_client_info|mysqli_get_client_stats|mysqli_get_client_version|mysqli_get_connection_stats|\ +mysqli_get_host_info|mysqli_get_metadata|mysqli_get_proto_info|mysqli_get_server_info|mysqli_get_server_version|mysqli_get_warnings|\ +mysqli_info|mysqli_init|mysqli_insert_id|mysqli_kill|mysqli_link_construct|mysqli_master_query|mysqli_more_results|mysqli_multi_query|\ +mysqli_next_result|mysqli_num_fields|mysqli_num_rows|mysqli_options|mysqli_param_count|mysqli_ping|mysqli_poll|mysqli_prepare|\ +mysqli_query|mysqli_real_connect|mysqli_real_escape_string|mysqli_real_query|mysqli_reap_async_query|mysqli_refresh|mysqli_report|\ +mysqli_result|mysqli_rollback|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_select_db|mysqli_send_long_data|\ +mysqli_send_query|mysqli_set_charset|mysqli_set_local_infile_default|mysqli_set_local_infile_handler|mysqli_set_opt|mysqli_slave_query|\ +mysqli_sqlstate|mysqli_ssl_set|mysqli_stat|mysqli_stmt|mysqli_stmt_affected_rows|mysqli_stmt_attr_get|mysqli_stmt_attr_set|\ +mysqli_stmt_bind_param|mysqli_stmt_bind_result|mysqli_stmt_close|mysqli_stmt_data_seek|mysqli_stmt_errno|mysqli_stmt_error|\ +mysqli_stmt_execute|mysqli_stmt_fetch|mysqli_stmt_field_count|mysqli_stmt_free_result|mysqli_stmt_get_result|mysqli_stmt_get_warnings|\ +mysqli_stmt_init|mysqli_stmt_insert_id|mysqli_stmt_next_result|mysqli_stmt_num_rows|mysqli_stmt_param_count|mysqli_stmt_prepare|\ +mysqli_stmt_reset|mysqli_stmt_result_metadata|mysqli_stmt_send_long_data|mysqli_stmt_sqlstate|mysqli_stmt_store_result|mysqli_store_result|\ +mysqli_thread_id|mysqli_thread_safe|mysqli_use_result|mysqli_warning|mysqli_warning_count|mysqlnd_ms_get_stats|\ +mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|\ +mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|\ +ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|\ +ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|\ +ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|\ +ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|\ +ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|\ +ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|\ +ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|\ +ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|\ +ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|\ +ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|\ +ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|\ +ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|\ +ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|\ +ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|\ +ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|\ +ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|\ +ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|\ +ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|\ +ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|\ +ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|\ +ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|\ +ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|\ +newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|\ +newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|\ +newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|\ +newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|\ +newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|\ +newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|\ +newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|\ +newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|\ +newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|\ +newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|\ +newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|\ +newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|\ +newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|\ +newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|\ +newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|\ +newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|\ +newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|\ +newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|\ +newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|\ +notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|\ +notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|\ +numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|\ +ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|\ +ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|\ +oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|\ +oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|\ +oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|\ +oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|\ +oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|\ +oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|\ +oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|\ +oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|\ +oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|\ +ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|\ +ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|\ +ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|\ +ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|\ +ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|\ +octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|\ +odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|\ +odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|\ +odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|\ +odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|\ +odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|\ +openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|\ +openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|\ +openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|\ +openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|\ +openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|\ +openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|\ +openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|\ +openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|\ +openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|\ +openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|\ +openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|\ +outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|\ +ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|\ +ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|\ +ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|\ +parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|\ +pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|\ +pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|\ +pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|\ +pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|\ +pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|\ +pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|\ +pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|\ +pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|\ +pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|\ +pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|\ +pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|\ +pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|\ +pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|\ +pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|\ +pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|\ +pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|\ +pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|\ +pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|\ +pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|\ +pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|\ +pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|\ +pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|\ +pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|\ +pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|\ +pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|\ +pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|\ +pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|\ +pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|\ +pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|\ +pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|\ +pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|\ +pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|\ +pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|\ +pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|\ +pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|\ +php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|\ +png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|\ +posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|\ +posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|\ +posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|\ +preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|\ +printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|\ +printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|\ +printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|\ +printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|\ +printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|\ +ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|\ +ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|\ +ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|\ +ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|\ +ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|\ +ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|\ +ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|\ +ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|\ +ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|\ +pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|\ +pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|\ +pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|\ +px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|\ +px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|\ +px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|\ +radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|\ +radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|\ +radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|\ +radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|\ +rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|\ +readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|\ +readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|\ +readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|\ +recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|\ +recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|\ +reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|\ +regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|\ +resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|\ +rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|\ +rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|\ +runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|\ +runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|\ +runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|\ +runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|\ +samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|\ +samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|\ +sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|\ +sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|\ +sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|\ +sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|\ +sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|\ +sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|\ +sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|\ +sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|\ +sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|\ +sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|\ +sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|\ +sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|\ +sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|\ +sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|\ +sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|\ +sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|\ +sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|\ +sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|\ +sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|\ +sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|\ +session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|\ +session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|\ +session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|\ +session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|\ +set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|\ +setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|\ +shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|\ +similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|\ +snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|\ +snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|\ +snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|\ +soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|\ +socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|\ +socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|\ +socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|\ +solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|\ +solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|\ +solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|\ +spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|\ +splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|\ +splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|\ +sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|\ +sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|\ +sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|\ +sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|\ +sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|\ +sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|\ +ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|\ +ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|\ +ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|\ +ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|\ +stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|\ +stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|\ +stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|\ +stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|\ +stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|\ +stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|\ +stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|\ +stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|\ +stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|\ +stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|\ +stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|\ +stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|\ +str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|\ +stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|\ +stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|\ +stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|\ +stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|\ +stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|\ +stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|\ +stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|\ +stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|\ +stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|\ +strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|\ +svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|\ +svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|\ +svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|\ +svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|\ +svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|\ +svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|\ +swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|\ +swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|\ +swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|\ +swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|\ +swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|\ +swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|\ +swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|\ +swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|\ +swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|\ +swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|\ +swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|\ +swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|\ +swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|\ +sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|\ +sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|\ +sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|\ +sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|\ +tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|\ +tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|\ +time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|\ +timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|\ +tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|trait_exists|transliterator|traversable|trigger_error|trim|uasort|ucfirst|\ +ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|\ +udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|\ +udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|\ +uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|\ +urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|\ +variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|\ +variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|\ +variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|\ +vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|\ +vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|\ +vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|\ +w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|\ +wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|\ +win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|\ +win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|\ +wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|\ +wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|\ +wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|\ +wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|\ +xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|\ +xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|\ +xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|\ +xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|\ +xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|\ +xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|\ +xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|\ +xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|\ +xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|\ +xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|\ +xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|\ +xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|\ +xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|\ +xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|\ +xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|\ +xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|\ +xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|\ +xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|\ +xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|\ +xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|\ +xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|\ +xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|\ +yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|\ +yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|\ +yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|\ +yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|\ +zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|\ +ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|\ +ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|\ +ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|\ +ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|\ +ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|\ +ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type'.split('|') + ); + var keywords = lang.arrayToMap( +'abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|\ +endif|endswitch|endwhile|extends|final|finally|for|foreach|function|global|goto|if|implements|instanceof|insteadof|interface|namespace|new|or|private|protected|\ +public|static|switch|throw|trait|try|use|var|while|xor|yield'.split('|') + ); + var languageConstructs = lang.arrayToMap( + ('__halt_compiler|die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset').split('|') + ); + + var builtinConstants = lang.arrayToMap( + ('true|TRUE|false|FALSE|null|NULL|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__|__TRAIT__').split('|') + ); + + var builtinVariables = lang.arrayToMap( +'$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|\ +$http_response_header|$argc|$argv'.split('|') + ); + var builtinFunctionsDeprecated = lang.arrayToMap( +'key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|\ +com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|\ +cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|\ +hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|\ +maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|\ +mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|\ +mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|\ +mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|\ +mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|\ +mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|\ +mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|\ +ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|\ +ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|\ +ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|\ +ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|\ +ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|\ +PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|\ +PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|\ +PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|\ +PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|\ +PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|\ +PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|\ +PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|\ +PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|\ +px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregister\ +set_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|\ +sql_regcase'.split('|') + ); + + var keywordsDeprecated = lang.arrayToMap( + ('cfunction|old_function').split('|') + ); + + var futureReserved = lang.arrayToMap([]); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : /(?:#|\/\/)(?:[^?]|\?[^>])*/ + }, + docComment.getStartRule("doc-start"), + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)" + }, { + token : "string", // " string start + regex : '"', + next : "qqstring" + }, { + token : "string", // ' string start + regex : "'", + next : "qstring" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language", // constants + regex : "\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|" + + "ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|" + + "HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|" + + "L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|" + + "VERSION))|__COMPILER_HALT_OFFSET__)\\b" + }, { + token : ["keyword", "text", "support.class"], + regex : "\\b(new)(\\s+)(\\w+)" + }, { + token : ["support.class", "keyword.operator"], + regex : "\\b(\\w+)(::)" + }, { + token : "constant.language", // constants + regex : "\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|" + + "SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|" + + "O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|" + + "R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|" + + "YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|" + + "ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|" + + "T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|" + + "HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|" + + "I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|" + + "O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|" + + "L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|" + + "M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|" + + "OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|" + + "RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|" + + "T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b" + }, { + token : function(value) { + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (builtinConstants.hasOwnProperty(value)) + return "constant.language"; + else if (builtinVariables.hasOwnProperty(value)) + return "variable.language"; + else if (futureReserved.hasOwnProperty(value)) + return "invalid.illegal"; + else if (builtinFunctions.hasOwnProperty(value)) + return "support.function"; + else if (value == "debugger") + return "invalid.deprecated"; + else + if(value.match(/^(\$[a-zA-Z_\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*|self|parent)$/)) + return "variable"; + return "identifier"; + }, + regex : /[a-zA-Z_$\x7f-\uffff][a-zA-Z0-9_\x7f-\uffff]*/ + }, { + onMatch : function(value, currentSate, state) { + value = value.substr(3); + if (value[0] == "'" || value[0] == '"') + value = value.slice(1, -1); + state.unshift(this.next, value); + return "markup.list"; + }, + regex : /<<<(?:\w+|'\w+'|"\w+")$/, + next: "heredoc" + }, { + token : "keyword.operator", + regex : "::|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|!=|!==|<=|>=|=>|<<=|>>=|>>>=|<>|<|>|\\.=|=|!|&&|\\|\\||\\?\\:|\\*=|/=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "punctuation.operator", + regex : /[,;]/ + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "heredoc" : [ + { + onMatch : function(value, currentSate, stack) { + if (stack[1] != value) + return "string"; + stack.shift(); + stack.shift(); + return "markup.list"; + }, + regex : "^\\w+(?=;?$)", + next: "start" + }, { + token: "string", + regex : ".*" + } + ], + "comment" : [ + { + token : "comment", + regex : "\\*\\/", + next : "start" + }, { + defaultToken : "comment" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : '\\\\(?:[nrtvef\\\\"$]|[0-7]{1,3}|x[0-9A-Fa-f]{1,2})' + }, { + token : "variable", + regex : /\$[\w]+(?:\[[\w\]+]|[=\-]>\w+)?/ + }, { + token : "variable", + regex : /\$\{[^"\}]+\}?/ // this is wrong but ok for now + }, + {token : "string", regex : '"', next : "start"}, + {defaultToken : "string"} + ], + "qstring" : [ + {token : "constant.language.escape", regex : /\\['\\]/}, + {token : "string", regex : "'", next : "start"}, + {defaultToken : "string"} + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("start") ]); +}; + +oop.inherits(PhpLangHighlightRules, TextHighlightRules); + + +var PhpHighlightRules = function() { + HtmlHighlightRules.call(this); + + var startRules = [ + { + token : "support.php_tag", // php open tag + regex : "<\\?(?:php|=)?", + push : "php-start" + } + ]; + + var endRules = [ + { + token : "support.php_tag", // php close tag + regex : "\\?>", + next : "pop" + } + ]; + + for (var key in this.$rules) + this.$rules[key].unshift.apply(this.$rules[key], startRules); + + this.embedRules(PhpLangHighlightRules, "php-", endRules, ["start"]); + + this.normalizeRules(); +}; + +oop.inherits(PhpHighlightRules, HtmlHighlightRules); + +exports.PhpHighlightRules = PhpHighlightRules; +exports.PhpLangHighlightRules = PhpLangHighlightRules; +}); + +define("ace/mode/php_laravel_blade_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/php_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; + +var PHPLaravelBladeHighlightRules = function() { + PhpHighlightRules.call(this); + + var bladeRules = { + start: [{ + include: "comments" + }, { + include: "directives" + }, { + include: "parenthesis" + }], + comments: [{ + token: "punctuation.definition.comment.blade", + regex: "(\\/\\/(.)*)|(\\#(.)*)", + next: "pop" + }, { + token: "punctuation.definition.comment.begin.php", + regex: "(?:\\/\\*)", + push: [{ + token: "punctuation.definition.comment.end.php", + regex: "(?:\\*\\/)", + next: "pop" + }, { + defaultToken: "comment.block.blade" + }] + }, { + token: "punctuation.definition.comment.begin.blade", + regex: "(?:\\{\\{\\-\\-)", + push: [{ + token: "punctuation.definition.comment.end.blade", + regex: "(?:\\-\\-\\}\\})", + next: "pop" + }, { + defaultToken: "comment.block.blade" + }] + }], + parenthesis: [{ + token: "parenthesis.begin.blade", + regex: "\\(", + push: [{ + token: "parenthesis.end.blade", + regex: "\\)", + next: "pop" + }, { + include: "strings" + }, { + include: "variables" + }, { + include: "lang" + }, { + include: "parenthesis" + }, { + defaultToken: "source.blade" + }] + }], + directives: [{ + token: ["directive.declaration.blade", "keyword.directives.blade"], + regex: "(@)(endunless|endisset|endempty|endauth|endguest|endcomponent|endslot|endalert|endverbatim|endsection|show|php|endphp|endpush|endprepend|endenv|endforelse|isset|empty|component|slot|alert|json|verbatim|section|auth|guest|hasSection|forelse|includeIf|includeWhen|includeFirst|each|push|stack|prepend|inject|env|elseenv|unless|yield|extends|parent|include|acfrepeater|block|can|cannot|choice|debug|elsecan|elsecannot|embed|hipchat|lang|layout|macro|macrodef|minify|partial|render|servers|set|slack|story|task|unset|wpposts|acfend|after|append|breakpoint|endafter|endcan|endcannot|endembed|endmacro|endmarkdown|endminify|endpartial|endsetup|endstory|endtask|endunless|markdown|overwrite|setup|stop|wpempty|wpend|wpquery)" + + }, { + token: ["directive.declaration.blade", "keyword.control.blade"], + regex: "(@)(if|else|elseif|endif|foreach|endforeach|switch|case|break|default|endswitch|for|endfor|while|endwhile|continue)" + }, { + token: ["directive.ignore.blade", "injections.begin.blade"], + regex: "(@?)(\\{\\{)", + push: [{ + token: "injections.end.blade", + regex: "\\}\\}", + next: "pop" + }, { + include: "strings" + }, { + include: "variables" + }, { + defaultToken: "source.blade" + }] + }, { + token: "injections.unescaped.begin.blade", + regex: "\\{\\!\\!", + push: [{ + token: "injections.unescaped.end.blade", + regex: "\\!\\!\\}", + next: "pop" + }, { + include: "strings" + }, { + include: "variables" + }, { + defaultToken: "source.blade" + }] + } + + ], + + lang: [{ + token: "keyword.operator.blade", + regex: "(?:!=|!|<=|>=|<|>|===|==|=|\\+\\+|\\;|\\,|%|&&|\\|\\|)|\\b(?:and|or|eq|neq|ne|gte|gt|ge|lte|lt|le|not|mod|as)\\b" + }, { + token: "constant.language.blade", + regex: "\\b(?:TRUE|FALSE|true|false)\\b" + }], + strings: [{ + token: "punctuation.definition.string.begin.blade", + regex: "\"", + push: [{ + token: "punctuation.definition.string.end.blade", + regex: "\"", + next: "pop" + }, { + token: "string.character.escape.blade", + regex: "\\\\." + }, { + defaultToken: "string.quoted.single.blade" + }] + }, { + token: "punctuation.definition.string.begin.blade", + regex: "'", + push: [{ + token: "punctuation.definition.string.end.blade", + regex: "'", + next: "pop" + }, { + token: "string.character.escape.blade", + regex: "\\\\." + }, { + defaultToken: "string.quoted.double.blade" + }] + }], + variables: [{ + token: "variable.blade", + regex: "\\$([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, { + token: ["keyword.operator.blade", "constant.other.property.blade"], + regex: "(->)([a-zA-Z_][a-zA-Z0-9_]*)\\b" + }, { + token: ["keyword.operator.blade", + "meta.function-call.object.blade", + "punctuation.definition.variable.blade", + "variable.blade", + "punctuation.definition.variable.blade" + ], + regex: "(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))" + }] + }; + + var bladeStart = bladeRules.start; + + for (var rule in this.$rules) { + this.$rules[rule].unshift.apply(this.$rules[rule], bladeStart); + } + + Object.keys(bladeRules).forEach(function(x) { + if (!this.$rules[x]) + this.$rules[x] = bladeRules[x]; + }, this); + + this.normalizeRules(); +}; + + +oop.inherits(PHPLaravelBladeHighlightRules, PhpHighlightRules); + +exports.PHPLaravelBladeHighlightRules = PHPLaravelBladeHighlightRules; +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/php_completions",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var functionMap = { + "abs": [ + "int abs(int number)", + "Return the absolute value of the number" + ], + "acos": [ + "float acos(float number)", + "Return the arc cosine of the number in radians" + ], + "acosh": [ + "float acosh(float number)", + "Returns the inverse hyperbolic cosine of the number, i.e. the value whose hyperbolic cosine is number" + ], + "addGlob": [ + "bool addGlob(string pattern[,int flags [, array options]])", + "Add files matching the glob pattern. See php's glob for the pattern syntax." + ], + "addPattern": [ + "bool addPattern(string pattern[, string path [, array options]])", + "Add files matching the pcre pattern. See php's pcre for the pattern syntax." + ], + "addcslashes": [ + "string addcslashes(string str, string charlist)", + "Escapes all chars mentioned in charlist with backslash. It creates octal representations if asked to backslash characters with 8th bit set or with ASCII<32 (except '\\n', '\\r', '\\t' etc...)" + ], + "addslashes": [ + "string addslashes(string str)", + "Escapes single quote, double quotes and backslash characters in a string with backslashes" + ], + "apache_child_terminate": [ + "bool apache_child_terminate(void)", + "Terminate apache process after this request" + ], + "apache_get_modules": [ + "array apache_get_modules(void)", + "Get a list of loaded Apache modules" + ], + "apache_get_version": [ + "string apache_get_version(void)", + "Fetch Apache version" + ], + "apache_getenv": [ + "bool apache_getenv(string variable [, bool walk_to_top])", + "Get an Apache subprocess_env variable" + ], + "apache_lookup_uri": [ + "object apache_lookup_uri(string URI)", + "Perform a partial request of the given URI to obtain information about it" + ], + "apache_note": [ + "string apache_note(string note_name [, string note_value])", + "Get and set Apache request notes" + ], + "apache_request_auth_name": [ + "string apache_request_auth_name()", + "" + ], + "apache_request_auth_type": [ + "string apache_request_auth_type()", + "" + ], + "apache_request_discard_request_body": [ + "long apache_request_discard_request_body()", + "" + ], + "apache_request_err_headers_out": [ + "array apache_request_err_headers_out([{string name|array list} [, string value [, bool replace = false]]])", + "* fetch all headers that go out in case of an error or a subrequest" + ], + "apache_request_headers": [ + "array apache_request_headers(void)", + "Fetch all HTTP request headers" + ], + "apache_request_headers_in": [ + "array apache_request_headers_in()", + "* fetch all incoming request headers" + ], + "apache_request_headers_out": [ + "array apache_request_headers_out([{string name|array list} [, string value [, bool replace = false]]])", + "* fetch all outgoing request headers" + ], + "apache_request_is_initial_req": [ + "bool apache_request_is_initial_req()", + "" + ], + "apache_request_log_error": [ + "boolean apache_request_log_error(string message, [long facility])", + "" + ], + "apache_request_meets_conditions": [ + "long apache_request_meets_conditions()", + "" + ], + "apache_request_remote_host": [ + "int apache_request_remote_host([int type])", + "" + ], + "apache_request_run": [ + "long apache_request_run()", + "This is a wrapper for ap_sub_run_req and ap_destory_sub_req. It takes sub_request, runs it, destroys it, and returns it's status." + ], + "apache_request_satisfies": [ + "long apache_request_satisfies()", + "" + ], + "apache_request_server_port": [ + "int apache_request_server_port()", + "" + ], + "apache_request_set_etag": [ + "void apache_request_set_etag()", + "" + ], + "apache_request_set_last_modified": [ + "void apache_request_set_last_modified()", + "" + ], + "apache_request_some_auth_required": [ + "bool apache_request_some_auth_required()", + "" + ], + "apache_request_sub_req_lookup_file": [ + "object apache_request_sub_req_lookup_file(string file)", + "Returns sub-request for the specified file. You would need to run it yourself with run()." + ], + "apache_request_sub_req_lookup_uri": [ + "object apache_request_sub_req_lookup_uri(string uri)", + "Returns sub-request for the specified uri. You would need to run it yourself with run()" + ], + "apache_request_sub_req_method_uri": [ + "object apache_request_sub_req_method_uri(string method, string uri)", + "Returns sub-request for the specified file. You would need to run it yourself with run()." + ], + "apache_request_update_mtime": [ + "long apache_request_update_mtime([int dependency_mtime])", + "" + ], + "apache_reset_timeout": [ + "bool apache_reset_timeout(void)", + "Reset the Apache write timer" + ], + "apache_response_headers": [ + "array apache_response_headers(void)", + "Fetch all HTTP response headers" + ], + "apache_setenv": [ + "bool apache_setenv(string variable, string value [, bool walk_to_top])", + "Set an Apache subprocess_env variable" + ], + "array_change_key_case": [ + "array array_change_key_case(array input [, int case=CASE_LOWER])", + "Retuns an array with all string keys lowercased [or uppercased]" + ], + "array_chunk": [ + "array array_chunk(array input, int size [, bool preserve_keys])", + "Split array into chunks" + ], + "array_combine": [ + "array array_combine(array keys, array values)", + "Creates an array by using the elements of the first parameter as keys and the elements of the second as the corresponding values" + ], + "array_count_values": [ + "array array_count_values(array input)", + "Return the value as key and the frequency of that value in input as value" + ], + "array_diff": [ + "array array_diff(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are not present in any of the others arguments." + ], + "array_diff_assoc": [ + "array array_diff_assoc(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal" + ], + "array_diff_key": [ + "array array_diff_key(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have keys which are not present in any of the others arguments. This function is like array_diff() but works on the keys instead of the values. The associativity is preserved." + ], + "array_diff_uassoc": [ + "array array_diff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Elements are compared by user supplied function." + ], + "array_diff_ukey": [ + "array array_diff_ukey(array arr1, array arr2 [, array ...], callback key_comp_func)", + "Returns the entries of arr1 that have keys which are not present in any of the others arguments. User supplied function is used for comparing the keys. This function is like array_udiff() but works on the keys instead of the values. The associativity is preserved." + ], + "array_fill": [ + "array array_fill(int start_key, int num, mixed val)", + "Create an array containing num elements starting with index start_key each initialized to val" + ], + "array_fill_keys": [ + "array array_fill_keys(array keys, mixed val)", + "Create an array using the elements of the first parameter as keys each initialized to val" + ], + "array_filter": [ + "array array_filter(array input [, mixed callback])", + "Filters elements from the array via the callback." + ], + "array_flip": [ + "array array_flip(array input)", + "Return array with key <-> value flipped" + ], + "array_intersect": [ + "array array_intersect(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are present in all the other arguments" + ], + "array_intersect_assoc": [ + "array array_intersect_assoc(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check" + ], + "array_intersect_key": [ + "array array_intersect_key(array arr1, array arr2 [, array ...])", + "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). Equivalent of array_intersect_assoc() but does not do compare of the data." + ], + "array_intersect_uassoc": [ + "array array_intersect_uassoc(array arr1, array arr2 [, array ...], callback key_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check and they are compared by using an user-supplied callback." + ], + "array_intersect_ukey": [ + "array array_intersect_ukey(array arr1, array arr2 [, array ...], callback key_compare_func)", + "Returns the entries of arr1 that have keys which are present in all the other arguments. Kind of equivalent to array_diff(array_keys($arr1), array_keys($arr2)[,array_keys(...)]). The comparison of the keys is performed by a user supplied function. Equivalent of array_intersect_uassoc() but does not do compare of the data." + ], + "array_key_exists": [ + "bool array_key_exists(mixed key, array search)", + "Checks if the given key or index exists in the array" + ], + "array_keys": [ + "array array_keys(array input [, mixed search_value[, bool strict]])", + "Return just the keys from the input array, optionally only for the specified search_value" + ], + "array_map": [ + "array array_map(mixed callback, array input1 [, array input2 ,...])", + "Applies the callback to the elements in given arrays." + ], + "array_merge": [ + "array array_merge(array arr1, array arr2 [, array ...])", + "Merges elements from passed arrays into one array" + ], + "array_merge_recursive": [ + "array array_merge_recursive(array arr1, array arr2 [, array ...])", + "Recursively merges elements from passed arrays into one array" + ], + "array_multisort": [ + "bool array_multisort(array ar1 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]] [, array ar2 [, SORT_ASC|SORT_DESC [, SORT_REGULAR|SORT_NUMERIC|SORT_STRING]], ...])", + "Sort multiple arrays at once similar to how ORDER BY clause works in SQL" + ], + "array_pad": [ + "array array_pad(array input, int pad_size, mixed pad_value)", + "Returns a copy of input array padded with pad_value to size pad_size" + ], + "array_pop": [ + "mixed array_pop(array stack)", + "Pops an element off the end of the array" + ], + "array_product": [ + "mixed array_product(array input)", + "Returns the product of the array entries" + ], + "array_push": [ + "int array_push(array stack, mixed var [, mixed ...])", + "Pushes elements onto the end of the array" + ], + "array_rand": [ + "mixed array_rand(array input [, int num_req])", + "Return key/keys for random entry/entries in the array" + ], + "array_reduce": [ + "mixed array_reduce(array input, mixed callback [, mixed initial])", + "Iteratively reduce the array to a single value via the callback." + ], + "array_replace": [ + "array array_replace(array arr1, array arr2 [, array ...])", + "Replaces elements from passed arrays into one array" + ], + "array_replace_recursive": [ + "array array_replace_recursive(array arr1, array arr2 [, array ...])", + "Recursively replaces elements from passed arrays into one array" + ], + "array_reverse": [ + "array array_reverse(array input [, bool preserve keys])", + "Return input as a new array with the order of the entries reversed" + ], + "array_search": [ + "mixed array_search(mixed needle, array haystack [, bool strict])", + "Searches the array for a given value and returns the corresponding key if successful" + ], + "array_shift": [ + "mixed array_shift(array stack)", + "Pops an element off the beginning of the array" + ], + "array_slice": [ + "array array_slice(array input, int offset [, int length [, bool preserve_keys]])", + "Returns elements specified by offset and length" + ], + "array_splice": [ + "array array_splice(array input, int offset [, int length [, array replacement]])", + "Removes the elements designated by offset and length and replace them with supplied array" + ], + "array_sum": [ + "mixed array_sum(array input)", + "Returns the sum of the array entries" + ], + "array_udiff": [ + "array array_udiff(array arr1, array arr2 [, array ...], callback data_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments. Elements are compared by user supplied function." + ], + "array_udiff_assoc": [ + "array array_udiff_assoc(array arr1, array arr2 [, array ...], callback key_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys are compared by user supplied function." + ], + "array_udiff_uassoc": [ + "array array_udiff_uassoc(array arr1, array arr2 [, array ...], callback data_comp_func, callback key_comp_func)", + "Returns the entries of arr1 that have values which are not present in any of the others arguments but do additional checks whether the keys are equal. Keys and elements are compared by user supplied functions." + ], + "array_uintersect": [ + "array array_uintersect(array arr1, array arr2 [, array ...], callback data_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Data is compared by using an user-supplied callback." + ], + "array_uintersect_assoc": [ + "array array_uintersect_assoc(array arr1, array arr2 [, array ...], callback data_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Data is compared by using an user-supplied callback." + ], + "array_uintersect_uassoc": [ + "array array_uintersect_uassoc(array arr1, array arr2 [, array ...], callback data_compare_func, callback key_compare_func)", + "Returns the entries of arr1 that have values which are present in all the other arguments. Keys are used to do more restrictive check. Both data and keys are compared by using user-supplied callbacks." + ], + "array_unique": [ + "array array_unique(array input [, int sort_flags])", + "Removes duplicate values from array" + ], + "array_unshift": [ + "int array_unshift(array stack, mixed var [, mixed ...])", + "Pushes elements onto the beginning of the array" + ], + "array_values": [ + "array array_values(array input)", + "Return just the values from the input array" + ], + "array_walk": [ + "bool array_walk(array input, string funcname [, mixed userdata])", + "Apply a user function to every member of an array" + ], + "array_walk_recursive": [ + "bool array_walk_recursive(array input, string funcname [, mixed userdata])", + "Apply a user function recursively to every member of an array" + ], + "arsort": [ + "bool arsort(array &array_arg [, int sort_flags])", + "Sort an array in reverse order and maintain index association" + ], + "asin": [ + "float asin(float number)", + "Returns the arc sine of the number in radians" + ], + "asinh": [ + "float asinh(float number)", + "Returns the inverse hyperbolic sine of the number, i.e. the value whose hyperbolic sine is number" + ], + "asort": [ + "bool asort(array &array_arg [, int sort_flags])", + "Sort an array and maintain index association" + ], + "assert": [ + "int assert(string|bool assertion)", + "Checks if assertion is false" + ], + "assert_options": [ + "mixed assert_options(int what [, mixed value])", + "Set/get the various assert flags" + ], + "atan": [ + "float atan(float number)", + "Returns the arc tangent of the number in radians" + ], + "atan2": [ + "float atan2(float y, float x)", + "Returns the arc tangent of y/x, with the resulting quadrant determined by the signs of y and x" + ], + "atanh": [ + "float atanh(float number)", + "Returns the inverse hyperbolic tangent of the number, i.e. the value whose hyperbolic tangent is number" + ], + "attachIterator": [ + "void attachIterator(Iterator iterator[, mixed info])", + "Attach a new iterator" + ], + "base64_decode": [ + "string base64_decode(string str[, bool strict])", + "Decodes string using MIME base64 algorithm" + ], + "base64_encode": [ + "string base64_encode(string str)", + "Encodes string using MIME base64 algorithm" + ], + "base_convert": [ + "string base_convert(string number, int frombase, int tobase)", + "Converts a number in a string from any base <= 36 to any base <= 36" + ], + "basename": [ + "string basename(string path [, string suffix])", + "Returns the filename component of the path" + ], + "bcadd": [ + "string bcadd(string left_operand, string right_operand [, int scale])", + "Returns the sum of two arbitrary precision numbers" + ], + "bccomp": [ + "int bccomp(string left_operand, string right_operand [, int scale])", + "Compares two arbitrary precision numbers" + ], + "bcdiv": [ + "string bcdiv(string left_operand, string right_operand [, int scale])", + "Returns the quotient of two arbitrary precision numbers (division)" + ], + "bcmod": [ + "string bcmod(string left_operand, string right_operand)", + "Returns the modulus of the two arbitrary precision operands" + ], + "bcmul": [ + "string bcmul(string left_operand, string right_operand [, int scale])", + "Returns the multiplication of two arbitrary precision numbers" + ], + "bcpow": [ + "string bcpow(string x, string y [, int scale])", + "Returns the value of an arbitrary precision number raised to the power of another" + ], + "bcpowmod": [ + "string bcpowmod(string x, string y, string mod [, int scale])", + "Returns the value of an arbitrary precision number raised to the power of another reduced by a modulous" + ], + "bcscale": [ + "bool bcscale(int scale)", + "Sets default scale parameter for all bc math functions" + ], + "bcsqrt": [ + "string bcsqrt(string operand [, int scale])", + "Returns the square root of an arbitray precision number" + ], + "bcsub": [ + "string bcsub(string left_operand, string right_operand [, int scale])", + "Returns the difference between two arbitrary precision numbers" + ], + "bin2hex": [ + "string bin2hex(string data)", + "Converts the binary representation of data to hex" + ], + "bind_textdomain_codeset": [ + "string bind_textdomain_codeset (string domain, string codeset)", + "Specify the character encoding in which the messages from the DOMAIN message catalog will be returned." + ], + "bindec": [ + "int bindec(string binary_number)", + "Returns the decimal equivalent of the binary number" + ], + "bindtextdomain": [ + "string bindtextdomain(string domain_name, string dir)", + "Bind to the text domain domain_name, looking for translations in dir. Returns the current domain" + ], + "birdstep_autocommit": [ + "bool birdstep_autocommit(int index)", + "" + ], + "birdstep_close": [ + "bool birdstep_close(int id)", + "" + ], + "birdstep_commit": [ + "bool birdstep_commit(int index)", + "" + ], + "birdstep_connect": [ + "int birdstep_connect(string server, string user, string pass)", + "" + ], + "birdstep_exec": [ + "int birdstep_exec(int index, string exec_str)", + "" + ], + "birdstep_fetch": [ + "bool birdstep_fetch(int index)", + "" + ], + "birdstep_fieldname": [ + "string birdstep_fieldname(int index, int col)", + "" + ], + "birdstep_fieldnum": [ + "int birdstep_fieldnum(int index)", + "" + ], + "birdstep_freeresult": [ + "bool birdstep_freeresult(int index)", + "" + ], + "birdstep_off_autocommit": [ + "bool birdstep_off_autocommit(int index)", + "" + ], + "birdstep_result": [ + "mixed birdstep_result(int index, mixed col)", + "" + ], + "birdstep_rollback": [ + "bool birdstep_rollback(int index)", + "" + ], + "bzcompress": [ + "string bzcompress(string source [, int blocksize100k [, int workfactor]])", + "Compresses a string into BZip2 encoded data" + ], + "bzdecompress": [ + "string bzdecompress(string source [, int small])", + "Decompresses BZip2 compressed data" + ], + "bzerrno": [ + "int bzerrno(resource bz)", + "Returns the error number" + ], + "bzerror": [ + "array bzerror(resource bz)", + "Returns the error number and error string in an associative array" + ], + "bzerrstr": [ + "string bzerrstr(resource bz)", + "Returns the error string" + ], + "bzopen": [ + "resource bzopen(string|int file|fp, string mode)", + "Opens a new BZip2 stream" + ], + "bzread": [ + "string bzread(resource bz[, int length])", + "Reads up to length bytes from a BZip2 stream, or 1024 bytes if length is not specified" + ], + "cal_days_in_month": [ + "int cal_days_in_month(int calendar, int month, int year)", + "Returns the number of days in a month for a given year and calendar" + ], + "cal_from_jd": [ + "array cal_from_jd(int jd, int calendar)", + "Converts from Julian Day Count to a supported calendar and return extended information" + ], + "cal_info": [ + "array cal_info([int calendar])", + "Returns information about a particular calendar" + ], + "cal_to_jd": [ + "int cal_to_jd(int calendar, int month, int day, int year)", + "Converts from a supported calendar to Julian Day Count" + ], + "call_user_func": [ + "mixed call_user_func(mixed function_name [, mixed parmeter] [, mixed ...])", + "Call a user function which is the first parameter" + ], + "call_user_func_array": [ + "mixed call_user_func_array(string function_name, array parameters)", + "Call a user function which is the first parameter with the arguments contained in array" + ], + "call_user_method": [ + "mixed call_user_method(string method_name, mixed object [, mixed parameter] [, mixed ...])", + "Call a user method on a specific object or class" + ], + "call_user_method_array": [ + "mixed call_user_method_array(string method_name, mixed object, array params)", + "Call a user method on a specific object or class using a parameter array" + ], + "ceil": [ + "float ceil(float number)", + "Returns the next highest integer value of the number" + ], + "chdir": [ + "bool chdir(string directory)", + "Change the current directory" + ], + "checkdate": [ + "bool checkdate(int month, int day, int year)", + "Returns true(1) if it is a valid date in gregorian calendar" + ], + "chgrp": [ + "bool chgrp(string filename, mixed group)", + "Change file group" + ], + "chmod": [ + "bool chmod(string filename, int mode)", + "Change file mode" + ], + "chown": [ + "bool chown (string filename, mixed user)", + "Change file owner" + ], + "chr": [ + "string chr(int ascii)", + "Converts ASCII code to a character" + ], + "chroot": [ + "bool chroot(string directory)", + "Change root directory" + ], + "chunk_split": [ + "string chunk_split(string str [, int chunklen [, string ending]])", + "Returns split line" + ], + "class_alias": [ + "bool class_alias(string user_class_name , string alias_name [, bool autoload])", + "Creates an alias for user defined class" + ], + "class_exists": [ + "bool class_exists(string classname [, bool autoload])", + "Checks if the class exists" + ], + "class_implements": [ + "array class_implements(mixed what [, bool autoload ])", + "Return all classes and interfaces implemented by SPL" + ], + "class_parents": [ + "array class_parents(object instance [, boolean autoload = true])", + "Return an array containing the names of all parent classes" + ], + "clearstatcache": [ + "void clearstatcache([bool clear_realpath_cache[, string filename]])", + "Clear file stat cache" + ], + "closedir": [ + "void closedir([resource dir_handle])", + "Close directory connection identified by the dir_handle" + ], + "closelog": [ + "bool closelog(void)", + "Close connection to system logger" + ], + "collator_asort": [ + "bool collator_asort( Collator $coll, array(string) $arr )", + "* Sort array using specified collator, maintaining index association." + ], + "collator_compare": [ + "int collator_compare( Collator $coll, string $str1, string $str2 )", + "* Compare two strings." + ], + "collator_create": [ + "Collator collator_create( string $locale )", + "* Create collator." + ], + "collator_get_attribute": [ + "int collator_get_attribute( Collator $coll, int $attr )", + "* Get collation attribute value." + ], + "collator_get_error_code": [ + "int collator_get_error_code( Collator $coll )", + "* Get collator's last error code." + ], + "collator_get_error_message": [ + "string collator_get_error_message( Collator $coll )", + "* Get text description for collator's last error code." + ], + "collator_get_locale": [ + "string collator_get_locale( Collator $coll, int $type )", + "* Gets the locale name of the collator." + ], + "collator_get_sort_key": [ + "bool collator_get_sort_key( Collator $coll, string $str )", + "* Get a sort key for a string from a Collator. }}}" + ], + "collator_get_strength": [ + "int collator_get_strength(Collator coll)", + "* Returns the current collation strength." + ], + "collator_set_attribute": [ + "bool collator_set_attribute( Collator $coll, int $attr, int $val )", + "* Set collation attribute." + ], + "collator_set_strength": [ + "bool collator_set_strength(Collator coll, int strength)", + "* Set the collation strength." + ], + "collator_sort": [ + "bool collator_sort( Collator $coll, array(string) $arr [, int $sort_flags] )", + "* Sort array using specified collator." + ], + "collator_sort_with_sort_keys": [ + "bool collator_sort_with_sort_keys( Collator $coll, array(string) $arr )", + "* Equivalent to standard PHP sort using Collator. * Uses ICU ucol_getSortKey for performance." + ], + "com_create_guid": [ + "string com_create_guid()", + "Generate a globally unique identifier (GUID)" + ], + "com_event_sink": [ + "bool com_event_sink(object comobject, object sinkobject [, mixed sinkinterface])", + "Connect events from a COM object to a PHP object" + ], + "com_get_active_object": [ + "object com_get_active_object(string progid [, int code_page ])", + "Returns a handle to an already running instance of a COM object" + ], + "com_load_typelib": [ + "bool com_load_typelib(string typelib_name [, int case_insensitive])", + "Loads a Typelibrary and registers its constants" + ], + "com_message_pump": [ + "bool com_message_pump([int timeoutms])", + "Process COM messages, sleeping for up to timeoutms milliseconds" + ], + "com_print_typeinfo": [ + "bool com_print_typeinfo(object comobject | string typelib, string dispinterface, bool wantsink)", + "Print out a PHP class definition for a dispatchable interface" + ], + "compact": [ + "array compact(mixed var_names [, mixed ...])", + "Creates a hash containing variables and their values" + ], + "compose_locale": [ + "static string compose_locale($array)", + "* Creates a locale by combining the parts of locale-ID passed * }}}" + ], + "confirm_extname_compiled": [ + "string confirm_extname_compiled(string arg)", + "Return a string to confirm that the module is compiled in" + ], + "connection_aborted": [ + "int connection_aborted(void)", + "Returns true if client disconnected" + ], + "connection_status": [ + "int connection_status(void)", + "Returns the connection status bitfield" + ], + "constant": [ + "mixed constant(string const_name)", + "Given the name of a constant this function will return the constant's associated value" + ], + "convert_cyr_string": [ + "string convert_cyr_string(string str, string from, string to)", + "Convert from one Cyrillic character set to another" + ], + "convert_uudecode": [ + "string convert_uudecode(string data)", + "decode a uuencoded string" + ], + "convert_uuencode": [ + "string convert_uuencode(string data)", + "uuencode a string" + ], + "copy": [ + "bool copy(string source_file, string destination_file [, resource context])", + "Copy a file" + ], + "cos": [ + "float cos(float number)", + "Returns the cosine of the number in radians" + ], + "cosh": [ + "float cosh(float number)", + "Returns the hyperbolic cosine of the number, defined as (exp(number) + exp(-number))/2" + ], + "count": [ + "int count(mixed var [, int mode])", + "Count the number of elements in a variable (usually an array)" + ], + "count_chars": [ + "mixed count_chars(string input [, int mode])", + "Returns info about what characters are used in input" + ], + "crc32": [ + "string crc32(string str)", + "Calculate the crc32 polynomial of a string" + ], + "create_function": [ + "string create_function(string args, string code)", + "Creates an anonymous function, and returns its name (funny, eh?)" + ], + "crypt": [ + "string crypt(string str [, string salt])", + "Hash a string" + ], + "ctype_alnum": [ + "bool ctype_alnum(mixed c)", + "Checks for alphanumeric character(s)" + ], + "ctype_alpha": [ + "bool ctype_alpha(mixed c)", + "Checks for alphabetic character(s)" + ], + "ctype_cntrl": [ + "bool ctype_cntrl(mixed c)", + "Checks for control character(s)" + ], + "ctype_digit": [ + "bool ctype_digit(mixed c)", + "Checks for numeric character(s)" + ], + "ctype_graph": [ + "bool ctype_graph(mixed c)", + "Checks for any printable character(s) except space" + ], + "ctype_lower": [ + "bool ctype_lower(mixed c)", + "Checks for lowercase character(s)" + ], + "ctype_print": [ + "bool ctype_print(mixed c)", + "Checks for printable character(s)" + ], + "ctype_punct": [ + "bool ctype_punct(mixed c)", + "Checks for any printable character which is not whitespace or an alphanumeric character" + ], + "ctype_space": [ + "bool ctype_space(mixed c)", + "Checks for whitespace character(s)" + ], + "ctype_upper": [ + "bool ctype_upper(mixed c)", + "Checks for uppercase character(s)" + ], + "ctype_xdigit": [ + "bool ctype_xdigit(mixed c)", + "Checks for character(s) representing a hexadecimal digit" + ], + "curl_close": [ + "void curl_close(resource ch)", + "Close a cURL session" + ], + "curl_copy_handle": [ + "resource curl_copy_handle(resource ch)", + "Copy a cURL handle along with all of it's preferences" + ], + "curl_errno": [ + "int curl_errno(resource ch)", + "Return an integer containing the last error number" + ], + "curl_error": [ + "string curl_error(resource ch)", + "Return a string contain the last error for the current session" + ], + "curl_exec": [ + "bool curl_exec(resource ch)", + "Perform a cURL session" + ], + "curl_getinfo": [ + "mixed curl_getinfo(resource ch [, int option])", + "Get information regarding a specific transfer" + ], + "curl_init": [ + "resource curl_init([string url])", + "Initialize a cURL session" + ], + "curl_multi_add_handle": [ + "int curl_multi_add_handle(resource mh, resource ch)", + "Add a normal cURL handle to a cURL multi handle" + ], + "curl_multi_close": [ + "void curl_multi_close(resource mh)", + "Close a set of cURL handles" + ], + "curl_multi_exec": [ + "int curl_multi_exec(resource mh, int &still_running)", + "Run the sub-connections of the current cURL handle" + ], + "curl_multi_getcontent": [ + "string curl_multi_getcontent(resource ch)", + "Return the content of a cURL handle if CURLOPT_RETURNTRANSFER is set" + ], + "curl_multi_info_read": [ + "array curl_multi_info_read(resource mh [, long msgs_in_queue])", + "Get information about the current transfers" + ], + "curl_multi_init": [ + "resource curl_multi_init(void)", + "Returns a new cURL multi handle" + ], + "curl_multi_remove_handle": [ + "int curl_multi_remove_handle(resource mh, resource ch)", + "Remove a multi handle from a set of cURL handles" + ], + "curl_multi_select": [ + "int curl_multi_select(resource mh[, double timeout])", + "Get all the sockets associated with the cURL extension, which can then be \"selected\"" + ], + "curl_setopt": [ + "bool curl_setopt(resource ch, int option, mixed value)", + "Set an option for a cURL transfer" + ], + "curl_setopt_array": [ + "bool curl_setopt_array(resource ch, array options)", + "Set an array of option for a cURL transfer" + ], + "curl_version": [ + "array curl_version([int version])", + "Return cURL version information." + ], + "current": [ + "mixed current(array array_arg)", + "Return the element currently pointed to by the internal array pointer" + ], + "date": [ + "string date(string format [, long timestamp])", + "Format a local date/time" + ], + "date_add": [ + "DateTime date_add(DateTime object, DateInterval interval)", + "Adds an interval to the current date in object." + ], + "date_create": [ + "DateTime date_create([string time[, DateTimeZone object]])", + "Returns new DateTime object" + ], + "date_create_from_format": [ + "DateTime date_create_from_format(string format, string time[, DateTimeZone object])", + "Returns new DateTime object formatted according to the specified format" + ], + "date_date_set": [ + "DateTime date_date_set(DateTime object, long year, long month, long day)", + "Sets the date." + ], + "date_default_timezone_get": [ + "string date_default_timezone_get()", + "Gets the default timezone used by all date/time functions in a script" + ], + "date_default_timezone_set": [ + "bool date_default_timezone_set(string timezone_identifier)", + "Sets the default timezone used by all date/time functions in a script" + ], + "date_diff": [ + "DateInterval date_diff(DateTime object [, bool absolute])", + "Returns the difference between two DateTime objects." + ], + "date_format": [ + "string date_format(DateTime object, string format)", + "Returns date formatted according to given format" + ], + "date_get_last_errors": [ + "array date_get_last_errors()", + "Returns the warnings and errors found while parsing a date/time string." + ], + "date_interval_create_from_date_string": [ + "DateInterval date_interval_create_from_date_string(string time)", + "Uses the normal date parsers and sets up a DateInterval from the relative parts of the parsed string" + ], + "date_interval_format": [ + "string date_interval_format(DateInterval object, string format)", + "Formats the interval." + ], + "date_isodate_set": [ + "DateTime date_isodate_set(DateTime object, long year, long week[, long day])", + "Sets the ISO date." + ], + "date_modify": [ + "DateTime date_modify(DateTime object, string modify)", + "Alters the timestamp." + ], + "date_offset_get": [ + "long date_offset_get(DateTime object)", + "Returns the DST offset." + ], + "date_parse": [ + "array date_parse(string date)", + "Returns associative array with detailed info about given date" + ], + "date_parse_from_format": [ + "array date_parse_from_format(string format, string date)", + "Returns associative array with detailed info about given date" + ], + "date_sub": [ + "DateTime date_sub(DateTime object, DateInterval interval)", + "Subtracts an interval to the current date in object." + ], + "date_sun_info": [ + "array date_sun_info(long time, float latitude, float longitude)", + "Returns an array with information about sun set/rise and twilight begin/end" + ], + "date_sunrise": [ + "mixed date_sunrise(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])", + "Returns time of sunrise for a given day and location" + ], + "date_sunset": [ + "mixed date_sunset(mixed time [, int format [, float latitude [, float longitude [, float zenith [, float gmt_offset]]]]])", + "Returns time of sunset for a given day and location" + ], + "date_time_set": [ + "DateTime date_time_set(DateTime object, long hour, long minute[, long second])", + "Sets the time." + ], + "date_timestamp_get": [ + "long date_timestamp_get(DateTime object)", + "Gets the Unix timestamp." + ], + "date_timestamp_set": [ + "DateTime date_timestamp_set(DateTime object, long unixTimestamp)", + "Sets the date and time based on an Unix timestamp." + ], + "date_timezone_get": [ + "DateTimeZone date_timezone_get(DateTime object)", + "Return new DateTimeZone object relative to give DateTime" + ], + "date_timezone_set": [ + "DateTime date_timezone_set(DateTime object, DateTimeZone object)", + "Sets the timezone for the DateTime object." + ], + "datefmt_create": [ + "IntlDateFormatter datefmt_create(string $locale, long date_type, long time_type[, string $timezone_str, long $calendar, string $pattern] )", + "* Create formatter." + ], + "datefmt_format": [ + "string datefmt_format( [mixed]int $args or array $args )", + "* Format the time value as a string. }}}" + ], + "datefmt_get_calendar": [ + "string datefmt_get_calendar( IntlDateFormatter $mf )", + "* Get formatter calendar." + ], + "datefmt_get_datetype": [ + "string datefmt_get_datetype( IntlDateFormatter $mf )", + "* Get formatter datetype." + ], + "datefmt_get_error_code": [ + "int datefmt_get_error_code( IntlDateFormatter $nf )", + "* Get formatter's last error code." + ], + "datefmt_get_error_message": [ + "string datefmt_get_error_message( IntlDateFormatter $coll )", + "* Get text description for formatter's last error code." + ], + "datefmt_get_locale": [ + "string datefmt_get_locale(IntlDateFormatter $mf)", + "* Get formatter locale." + ], + "datefmt_get_pattern": [ + "string datefmt_get_pattern( IntlDateFormatter $mf )", + "* Get formatter pattern." + ], + "datefmt_get_timetype": [ + "string datefmt_get_timetype( IntlDateFormatter $mf )", + "* Get formatter timetype." + ], + "datefmt_get_timezone_id": [ + "string datefmt_get_timezone_id( IntlDateFormatter $mf )", + "* Get formatter timezone_id." + ], + "datefmt_isLenient": [ + "string datefmt_isLenient(IntlDateFormatter $mf)", + "* Get formatter locale." + ], + "datefmt_localtime": [ + "integer datefmt_localtime( IntlDateFormatter $fmt, string $text_to_parse[, int $parse_pos ])", + "* Parse the string $value to a localtime array }}}" + ], + "datefmt_parse": [ + "integer datefmt_parse( IntlDateFormatter $fmt, string $text_to_parse [, int $parse_pos] )", + "* Parse the string $value starting at parse_pos to a Unix timestamp -int }}}" + ], + "datefmt_setLenient": [ + "string datefmt_setLenient(IntlDateFormatter $mf)", + "* Set formatter lenient." + ], + "datefmt_set_calendar": [ + "bool datefmt_set_calendar( IntlDateFormatter $mf, int $calendar )", + "* Set formatter calendar." + ], + "datefmt_set_pattern": [ + "bool datefmt_set_pattern( IntlDateFormatter $mf, string $pattern )", + "* Set formatter pattern." + ], + "datefmt_set_timezone_id": [ + "boolean datefmt_set_timezone_id( IntlDateFormatter $mf,$timezone_id)", + "* Set formatter timezone_id." + ], + "dba_close": [ + "void dba_close(resource handle)", + "Closes database" + ], + "dba_delete": [ + "bool dba_delete(string key, resource handle)", + "Deletes the entry associated with key If inifile: remove all other key lines" + ], + "dba_exists": [ + "bool dba_exists(string key, resource handle)", + "Checks, if the specified key exists" + ], + "dba_fetch": [ + "string dba_fetch(string key, [int skip ,] resource handle)", + "Fetches the data associated with key" + ], + "dba_firstkey": [ + "string dba_firstkey(resource handle)", + "Resets the internal key pointer and returns the first key" + ], + "dba_handlers": [ + "array dba_handlers([bool full_info])", + "List configured database handlers" + ], + "dba_insert": [ + "bool dba_insert(string key, string value, resource handle)", + "If not inifile: Insert value as key, return false, if key exists already If inifile: Add vakue as key (next instance of key)" + ], + "dba_key_split": [ + "array|false dba_key_split(string key)", + "Splits an inifile key into an array of the form array(0=>group,1=>value_name) but returns false if input is false or null" + ], + "dba_list": [ + "array dba_list()", + "List opened databases" + ], + "dba_nextkey": [ + "string dba_nextkey(resource handle)", + "Returns the next key" + ], + "dba_open": [ + "resource dba_open(string path, string mode [, string handlername, string ...])", + "Opens path using the specified handler in mode" + ], + "dba_optimize": [ + "bool dba_optimize(resource handle)", + "Optimizes (e.g. clean up, vacuum) database" + ], + "dba_popen": [ + "resource dba_popen(string path, string mode [, string handlername, string ...])", + "Opens path using the specified handler in mode persistently" + ], + "dba_replace": [ + "bool dba_replace(string key, string value, resource handle)", + "Inserts value as key, replaces key, if key exists already If inifile: remove all other key lines" + ], + "dba_sync": [ + "bool dba_sync(resource handle)", + "Synchronizes database" + ], + "dcgettext": [ + "string dcgettext(string domain_name, string msgid, long category)", + "Return the translation of msgid for domain_name and category, or msgid unaltered if a translation does not exist" + ], + "dcngettext": [ + "string dcngettext (string domain, string msgid1, string msgid2, int n, int category)", + "Plural version of dcgettext()" + ], + "debug_backtrace": [ + "array debug_backtrace([bool provide_object])", + "Return backtrace as array" + ], + "debug_print_backtrace": [ + "void debug_print_backtrace(void) */", + "ZEND_FUNCTION(debug_print_backtrace) { zend_execute_data *ptr, *skip; int lineno; char *function_name; char *filename; char *class_name = NULL; char *call_type; char *include_filename = NULL; zval *arg_array = NULL; int indent = 0; if (zend_parse_parameters_none() == FAILURE) { return; } ptr = EG(current_execute_data);", + "PHP_FUNCTION(dom_document_relaxNG_validate_file) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_relaxNG_validate_file" + ], + "dom_document_relaxNG_validate_xml": [ + "boolean dom_document_relaxNG_validate_xml(string source); */", + "PHP_FUNCTION(dom_document_relaxNG_validate_xml) { _dom_document_relaxNG_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_relaxNG_validate_xml" + ], + "dom_document_rename_node": [ + "DOMNode dom_document_rename_node(node n, string namespaceURI, string qualifiedName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Document3-renameNode Since: DOM Level 3" + ], + "dom_document_save": [ + "int dom_document_save(string file);", + "Convenience method to save to file" + ], + "dom_document_save_html": [ + "string dom_document_save_html();", + "Convenience method to output as html" + ], + "dom_document_save_html_file": [ + "int dom_document_save_html_file(string file);", + "Convenience method to save to file as html" + ], + "dom_document_savexml": [ + "string dom_document_savexml([node n]);", + "URL: http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#LS-DocumentLS-saveXML Since: DOM Level 3" + ], + "dom_document_schema_validate": [ + "boolean dom_document_schema_validate(string source); */", + "PHP_FUNCTION(dom_document_schema_validate_xml) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_STRING); } /* }}} end dom_document_schema_validate" + ], + "dom_document_schema_validate_file": [ + "boolean dom_document_schema_validate_file(string filename); */", + "PHP_FUNCTION(dom_document_schema_validate_file) { _dom_document_schema_validate(INTERNAL_FUNCTION_PARAM_PASSTHRU, DOM_LOAD_FILE); } /* }}} end dom_document_schema_validate_file" + ], + "dom_document_validate": [ + "boolean dom_document_validate();", + "Since: DOM extended" + ], + "dom_document_xinclude": [ + "int dom_document_xinclude([int options])", + "Substitutues xincludes in a DomDocument" + ], + "dom_domconfiguration_can_set_parameter": [ + "boolean dom_domconfiguration_can_set_parameter(string name, domuserdata value);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-canSetParameter Since:" + ], + "dom_domconfiguration_get_parameter": [ + "domdomuserdata dom_domconfiguration_get_parameter(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-getParameter Since:" + ], + "dom_domconfiguration_set_parameter": [ + "dom_void dom_domconfiguration_set_parameter(string name, domuserdata value);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMConfiguration-property Since:" + ], + "dom_domerrorhandler_handle_error": [ + "dom_boolean dom_domerrorhandler_handle_error(domerror error);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-ERRORS-DOMErrorHandler-handleError Since:" + ], + "dom_domimplementation_create_document": [ + "DOMDocument dom_domimplementation_create_document(string namespaceURI, string qualifiedName, DOMDocumentType doctype);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocument Since: DOM Level 2" + ], + "dom_domimplementation_create_document_type": [ + "DOMDocumentType dom_domimplementation_create_document_type(string qualifiedName, string publicId, string systemId);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Level-2-Core-DOM-createDocType Since: DOM Level 2" + ], + "dom_domimplementation_get_feature": [ + "DOMNode dom_domimplementation_get_feature(string feature, string version);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementation3-getFeature Since: DOM Level 3" + ], + "dom_domimplementation_has_feature": [ + "boolean dom_domimplementation_has_feature(string feature, string version);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-5CED94D7 Since:" + ], + "dom_domimplementationlist_item": [ + "domdomimplementation dom_domimplementationlist_item(int index);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMImplementationList-item Since:" + ], + "dom_domimplementationsource_get_domimplementation": [ + "domdomimplementation dom_domimplementationsource_get_domimplementation(string features);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpl Since:" + ], + "dom_domimplementationsource_get_domimplementations": [ + "domimplementationlist dom_domimplementationsource_get_domimplementations(string features);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-getDOMImpls Since:" + ], + "dom_domstringlist_item": [ + "domstring dom_domstringlist_item(int index);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#DOMStringList-item Since:" + ], + "dom_element_get_attribute": [ + "string dom_element_get_attribute(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-666EE0F9 Since:" + ], + "dom_element_get_attribute_node": [ + "DOMAttr dom_element_get_attribute_node(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-217A91B8 Since:" + ], + "dom_element_get_attribute_node_ns": [ + "DOMAttr dom_element_get_attribute_node_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAtNodeNS Since: DOM Level 2" + ], + "dom_element_get_attribute_ns": [ + "string dom_element_get_attribute_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElGetAttrNS Since: DOM Level 2" + ], + "dom_element_get_elements_by_tag_name": [ + "DOMNodeList dom_element_get_elements_by_tag_name(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1938918D Since:" + ], + "dom_element_get_elements_by_tag_name_ns": [ + "DOMNodeList dom_element_get_elements_by_tag_name_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-A6C90942 Since: DOM Level 2" + ], + "dom_element_has_attribute": [ + "boolean dom_element_has_attribute(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttr Since: DOM Level 2" + ], + "dom_element_has_attribute_ns": [ + "boolean dom_element_has_attribute_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElHasAttrNS Since: DOM Level 2" + ], + "dom_element_remove_attribute": [ + "void dom_element_remove_attribute(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-6D6AC0F9 Since:" + ], + "dom_element_remove_attribute_node": [ + "DOMAttr dom_element_remove_attribute_node(DOMAttr oldAttr);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D589198 Since:" + ], + "dom_element_remove_attribute_ns": [ + "void dom_element_remove_attribute_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElRemAtNS Since: DOM Level 2" + ], + "dom_element_set_attribute": [ + "void dom_element_set_attribute(string name, string value);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-F68F082 Since:" + ], + "dom_element_set_attribute_node": [ + "DOMAttr dom_element_set_attribute_node(DOMAttr newAttr);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-887236154 Since:" + ], + "dom_element_set_attribute_node_ns": [ + "DOMAttr dom_element_set_attribute_node_ns(DOMAttr newAttr);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAtNodeNS Since: DOM Level 2" + ], + "dom_element_set_attribute_ns": [ + "void dom_element_set_attribute_ns(string namespaceURI, string qualifiedName, string value);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetAttrNS Since: DOM Level 2" + ], + "dom_element_set_id_attribute": [ + "void dom_element_set_id_attribute(string name, boolean isId);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttr Since: DOM Level 3" + ], + "dom_element_set_id_attribute_node": [ + "void dom_element_set_id_attribute_node(attr idAttr, boolean isId);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNode Since: DOM Level 3" + ], + "dom_element_set_id_attribute_ns": [ + "void dom_element_set_id_attribute_ns(string namespaceURI, string localName, boolean isId);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-ElSetIdAttrNS Since: DOM Level 3" + ], + "dom_import_simplexml": [ + "somNode dom_import_simplexml(sxeobject node)", + "Get a simplexml_element object from dom to allow for processing" + ], + "dom_namednodemap_get_named_item": [ + "DOMNode dom_namednodemap_get_named_item(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1074577549 Since:" + ], + "dom_namednodemap_get_named_item_ns": [ + "DOMNode dom_namednodemap_get_named_item_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-getNamedItemNS Since: DOM Level 2" + ], + "dom_namednodemap_item": [ + "DOMNode dom_namednodemap_item(int index);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-349467F9 Since:" + ], + "dom_namednodemap_remove_named_item": [ + "DOMNode dom_namednodemap_remove_named_item(string name);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-D58B193 Since:" + ], + "dom_namednodemap_remove_named_item_ns": [ + "DOMNode dom_namednodemap_remove_named_item_ns(string namespaceURI, string localName);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-removeNamedItemNS Since: DOM Level 2" + ], + "dom_namednodemap_set_named_item": [ + "DOMNode dom_namednodemap_set_named_item(DOMNode arg);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1025163788 Since:" + ], + "dom_namednodemap_set_named_item_ns": [ + "DOMNode dom_namednodemap_set_named_item_ns(DOMNode arg);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-setNamedItemNS Since: DOM Level 2" + ], + "dom_namelist_get_name": [ + "string dom_namelist_get_name(int index);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getName Since:" + ], + "dom_namelist_get_namespace_uri": [ + "string dom_namelist_get_namespace_uri(int index);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#NameList-getNamespaceURI Since:" + ], + "dom_node_append_child": [ + "DomNode dom_node_append_child(DomNode newChild);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-184E7107 Since:" + ], + "dom_node_clone_node": [ + "DomNode dom_node_clone_node(boolean deep);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-3A0ED0A4 Since:" + ], + "dom_node_compare_document_position": [ + "short dom_node_compare_document_position(DomNode other);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-compareDocumentPosition Since: DOM Level 3" + ], + "dom_node_get_feature": [ + "DomNode dom_node_get_feature(string feature, string version);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getFeature Since: DOM Level 3" + ], + "dom_node_get_user_data": [ + "mixed dom_node_get_user_data(string key);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-getUserData Since: DOM Level 3" + ], + "dom_node_has_attributes": [ + "boolean dom_node_has_attributes();", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-NodeHasAttrs Since: DOM Level 2" + ], + "dom_node_has_child_nodes": [ + "boolean dom_node_has_child_nodes();", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-810594187 Since:" + ], + "dom_node_insert_before": [ + "domnode dom_node_insert_before(DomNode newChild, DomNode refChild);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-952280727 Since:" + ], + "dom_node_is_default_namespace": [ + "boolean dom_node_is_default_namespace(string namespaceURI);", + "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-isDefaultNamespace Since: DOM Level 3" + ], + "dom_node_is_equal_node": [ + "boolean dom_node_is_equal_node(DomNode arg);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isEqualNode Since: DOM Level 3" + ], + "dom_node_is_same_node": [ + "boolean dom_node_is_same_node(DomNode other);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-isSameNode Since: DOM Level 3" + ], + "dom_node_is_supported": [ + "boolean dom_node_is_supported(string feature, string version);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Level-2-Core-Node-supports Since: DOM Level 2" + ], + "dom_node_lookup_namespace_uri": [ + "string dom_node_lookup_namespace_uri(string prefix);", + "URL: http://www.w3.org/TR/DOM-Level-3-Core/core.html#Node3-lookupNamespaceURI Since: DOM Level 3" + ], + "dom_node_lookup_prefix": [ + "string dom_node_lookup_prefix(string namespaceURI);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-lookupNamespacePrefix Since: DOM Level 3" + ], + "dom_node_normalize": [ + "void dom_node_normalize();", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-normalize Since:" + ], + "dom_node_remove_child": [ + "DomNode dom_node_remove_child(DomNode oldChild);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-1734834066 Since:" + ], + "dom_node_replace_child": [ + "DomNode dom_node_replace_child(DomNode newChild, DomNode oldChild);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-785887307 Since:" + ], + "dom_node_set_user_data": [ + "mixed dom_node_set_user_data(string key, mixed data, userdatahandler handler);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#Node3-setUserData Since: DOM Level 3" + ], + "dom_nodelist_item": [ + "DOMNode dom_nodelist_item(int index);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-844377136 Since:" + ], + "dom_string_extend_find_offset16": [ + "int dom_string_extend_find_offset16(int offset32);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset16 Since:" + ], + "dom_string_extend_find_offset32": [ + "int dom_string_extend_find_offset32(int offset16);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#i18n-methods-StringExtend-findOffset32 Since:" + ], + "dom_text_is_whitespace_in_element_content": [ + "boolean dom_text_is_whitespace_in_element_content();", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-isWhitespaceInElementContent Since: DOM Level 3" + ], + "dom_text_replace_whole_text": [ + "DOMText dom_text_replace_whole_text(string content);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-Text3-replaceWholeText Since: DOM Level 3" + ], + "dom_text_split_text": [ + "DOMText dom_text_split_text(int offset);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#core-ID-38853C1D Since:" + ], + "dom_userdatahandler_handle": [ + "dom_void dom_userdatahandler_handle(short operation, string key, domobject data, node src, node dst);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html#ID-handleUserDataEvent Since:" + ], + "dom_xpath_evaluate": [ + "mixed dom_xpath_evaluate(string expr [,DOMNode context]); */", + "PHP_FUNCTION(dom_xpath_evaluate) { php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_EVALUATE); } /* }}} end dom_xpath_evaluate" + ], + "dom_xpath_query": [ + "DOMNodeList dom_xpath_query(string expr [,DOMNode context]); */", + "PHP_FUNCTION(dom_xpath_query) { php_xpath_eval(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_DOM_XPATH_QUERY); } /* }}} end dom_xpath_query" + ], + "dom_xpath_register_ns": [ + "boolean dom_xpath_register_ns(string prefix, string uri); */", + "PHP_FUNCTION(dom_xpath_register_ns) { zval *id; xmlXPathContextPtr ctxp; int prefix_len, ns_uri_len; dom_xpath_object *intern; unsigned char *prefix, *ns_uri; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"Oss\", &id, dom_xpath_class_entry, &prefix, &prefix_len, &ns_uri, &ns_uri_len) == FAILURE) { return; } intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); ctxp = (xmlXPathContextPtr) intern->ptr; if (ctxp == NULL) { php_error_docref(NULL TSRMLS_CC, E_WARNING, \"Invalid XPath Context\"); RETURN_FALSE; } if (xmlXPathRegisterNs(ctxp, prefix, ns_uri) != 0) { RETURN_FALSE } RETURN_TRUE; } /* }}}" + ], + "dom_xpath_register_php_functions": [ + "void dom_xpath_register_php_functions() */", + "PHP_FUNCTION(dom_xpath_register_php_functions) { zval *id; dom_xpath_object *intern; zval *array_value, **entry, *new_string; int name_len = 0; char *name; DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, \"a\", &array_value) == SUCCESS) { intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); zend_hash_internal_pointer_reset(Z_ARRVAL_P(array_value)); while (zend_hash_get_current_data(Z_ARRVAL_P(array_value), (void **)&entry) == SUCCESS) { SEPARATE_ZVAL(entry); convert_to_string_ex(entry); MAKE_STD_ZVAL(new_string); ZVAL_LONG(new_string,1); zend_hash_update(intern->registered_phpfunctions, Z_STRVAL_PP(entry), Z_STRLEN_PP(entry) + 1, &new_string, sizeof(zval*), NULL); zend_hash_move_forward(Z_ARRVAL_P(array_value)); } intern->registerPhpFunctions = 2; RETURN_TRUE; } else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, \"s\", &name, &name_len) == SUCCESS) { intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); MAKE_STD_ZVAL(new_string); ZVAL_LONG(new_string,1); zend_hash_update(intern->registered_phpfunctions, name, name_len + 1, &new_string, sizeof(zval*), NULL); intern->registerPhpFunctions = 2; } else { intern = (dom_xpath_object *)zend_object_store_get_object(id TSRMLS_CC); intern->registerPhpFunctions = 1; } } /* }}} end dom_xpath_register_php_functions" + ], + "each": [ + "array each(array arr)", + "Return the currently pointed key..value pair in the passed array, and advance the pointer to the next element" + ], + "easter_date": [ + "int easter_date([int year])", + "Return the timestamp of midnight on Easter of a given year (defaults to current year)" + ], + "easter_days": [ + "int easter_days([int year, [int method]])", + "Return the number of days after March 21 that Easter falls on for a given year (defaults to current year)" + ], + "echo": [ + "void echo(string arg1 [, string ...])", + "Output one or more strings" + ], + "empty": [ + "bool empty( mixed var )", + "Determine whether a variable is empty" + ], + "enchant_broker_describe": [ + "array enchant_broker_describe(resource broker)", + "Enumerates the Enchant providers and tells you some rudimentary information about them. The same info is provided through phpinfo()" + ], + "enchant_broker_dict_exists": [ + "bool enchant_broker_dict_exists(resource broker, string tag)", + "Whether a dictionary exists or not. Using non-empty tag" + ], + "enchant_broker_free": [ + "boolean enchant_broker_free(resource broker)", + "Destroys the broker object and its dictionnaries" + ], + "enchant_broker_free_dict": [ + "resource enchant_broker_free_dict(resource dict)", + "Free the dictionary resource" + ], + "enchant_broker_get_dict_path": [ + "string enchant_broker_get_dict_path(resource broker, int dict_type)", + "Get the directory path for a given backend, works with ispell and myspell" + ], + "enchant_broker_get_error": [ + "string enchant_broker_get_error(resource broker)", + "Returns the last error of the broker" + ], + "enchant_broker_init": [ + "resource enchant_broker_init()", + "create a new broker object capable of requesting" + ], + "enchant_broker_list_dicts": [ + "string enchant_broker_list_dicts(resource broker)", + "Lists the dictionaries available for the given broker" + ], + "enchant_broker_request_dict": [ + "resource enchant_broker_request_dict(resource broker, string tag)", + "create a new dictionary using tag, the non-empty language tag you wish to request a dictionary for (\"en_US\", \"de_DE\", ...)" + ], + "enchant_broker_request_pwl_dict": [ + "resource enchant_broker_request_pwl_dict(resource broker, string filename)", + "creates a dictionary using a PWL file. A PWL file is personal word file one word per line. It must exist before the call." + ], + "enchant_broker_set_dict_path": [ + "bool enchant_broker_set_dict_path(resource broker, int dict_type, string value)", + "Set the directory path for a given backend, works with ispell and myspell" + ], + "enchant_broker_set_ordering": [ + "bool enchant_broker_set_ordering(resource broker, string tag, string ordering)", + "Declares a preference of dictionaries to use for the language described/referred to by 'tag'. The ordering is a comma delimited list of provider names. As a special exception, the \"*\" tag can be used as a language tag to declare a default ordering for any language that does not explictly declare an ordering." + ], + "enchant_dict_add_to_personal": [ + "void enchant_dict_add_to_personal(resource dict, string word)", + "add 'word' to personal word list" + ], + "enchant_dict_add_to_session": [ + "void enchant_dict_add_to_session(resource dict, string word)", + "add 'word' to this spell-checking session" + ], + "enchant_dict_check": [ + "bool enchant_dict_check(resource dict, string word)", + "If the word is correctly spelled return true, otherwise return false" + ], + "enchant_dict_describe": [ + "array enchant_dict_describe(resource dict)", + "Describes an individual dictionary 'dict'" + ], + "enchant_dict_get_error": [ + "string enchant_dict_get_error(resource dict)", + "Returns the last error of the current spelling-session" + ], + "enchant_dict_is_in_session": [ + "bool enchant_dict_is_in_session(resource dict, string word)", + "whether or not 'word' exists in this spelling-session" + ], + "enchant_dict_quick_check": [ + "bool enchant_dict_quick_check(resource dict, string word [, array &suggestions])", + "If the word is correctly spelled return true, otherwise return false, if suggestions variable is provided, fill it with spelling alternatives." + ], + "enchant_dict_store_replacement": [ + "void enchant_dict_store_replacement(resource dict, string mis, string cor)", + "add a correction for 'mis' using 'cor'. Notes that you replaced @mis with @cor, so it's possibly more likely that future occurrences of @mis will be replaced with @cor. So it might bump @cor up in the suggestion list." + ], + "enchant_dict_suggest": [ + "array enchant_dict_suggest(resource dict, string word)", + "Will return a list of values if any of those pre-conditions are not met." + ], + "end": [ + "mixed end(array array_arg)", + "Advances array argument's internal pointer to the last element and return it" + ], + "ereg": [ + "int ereg(string pattern, string string [, array registers])", + "Regular expression match" + ], + "ereg_replace": [ + "string ereg_replace(string pattern, string replacement, string string)", + "Replace regular expression" + ], + "eregi": [ + "int eregi(string pattern, string string [, array registers])", + "Case-insensitive regular expression match" + ], + "eregi_replace": [ + "string eregi_replace(string pattern, string replacement, string string)", + "Case insensitive replace regular expression" + ], + "error_get_last": [ + "array error_get_last()", + "Get the last occurred error as associative array. Returns NULL if there hasn't been an error yet." + ], + "error_log": [ + "bool error_log(string message [, int message_type [, string destination [, string extra_headers]]])", + "Send an error message somewhere" + ], + "error_reporting": [ + "int error_reporting([int new_error_level])", + "Return the current error_reporting level, and if an argument was passed - change to the new level" + ], + "escapeshellarg": [ + "string escapeshellarg(string arg)", + "Quote and escape an argument for use in a shell command" + ], + "escapeshellcmd": [ + "string escapeshellcmd(string command)", + "Escape shell metacharacters" + ], + "exec": [ + "string exec(string command [, array &output [, int &return_value]])", + "Execute an external program" + ], + "exif_imagetype": [ + "int exif_imagetype(string imagefile)", + "Get the type of an image" + ], + "exif_read_data": [ + "array exif_read_data(string filename [, sections_needed [, sub_arrays[, read_thumbnail]]])", + "Reads header data from the JPEG/TIFF image filename and optionally reads the internal thumbnails" + ], + "exif_tagname": [ + "string exif_tagname(index)", + "Get headername for index or false if not defined" + ], + "exif_thumbnail": [ + "string exif_thumbnail(string filename [, &width, &height [, &imagetype]])", + "Reads the embedded thumbnail" + ], + "exit": [ + "void exit([mixed status])", + "Output a message and terminate the current script" + ], + "exp": [ + "float exp(float number)", + "Returns e raised to the power of the number" + ], + "explode": [ + "array explode(string separator, string str [, int limit])", + "Splits a string on string separator and return array of components. If limit is positive only limit number of components is returned. If limit is negative all components except the last abs(limit) are returned." + ], + "expm1": [ + "float expm1(float number)", + "Returns exp(number) - 1, computed in a way that accurate even when the value of number is close to zero" + ], + "extension_loaded": [ + "bool extension_loaded(string extension_name)", + "Returns true if the named extension is loaded" + ], + "extract": [ + "int extract(array var_array [, int extract_type [, string prefix]])", + "Imports variables into symbol table from an array" + ], + "ezmlm_hash": [ + "int ezmlm_hash(string addr)", + "Calculate EZMLM list hash value." + ], + "fclose": [ + "bool fclose(resource fp)", + "Close an open file pointer" + ], + "feof": [ + "bool feof(resource fp)", + "Test for end-of-file on a file pointer" + ], + "fflush": [ + "bool fflush(resource fp)", + "Flushes output" + ], + "fgetc": [ + "string fgetc(resource fp)", + "Get a character from file pointer" + ], + "fgetcsv": [ + "array fgetcsv(resource fp [,int length [, string delimiter [, string enclosure [, string escape]]]])", + "Get line from file pointer and parse for CSV fields" + ], + "fgets": [ + "string fgets(resource fp[, int length])", + "Get a line from file pointer" + ], + "fgetss": [ + "string fgetss(resource fp [, int length [, string allowable_tags]])", + "Get a line from file pointer and strip HTML tags" + ], + "file": [ + "array file(string filename [, int flags[, resource context]])", + "Read entire file into an array" + ], + "file_exists": [ + "bool file_exists(string filename)", + "Returns true if filename exists" + ], + "file_get_contents": [ + "string file_get_contents(string filename [, bool use_include_path [, resource context [, long offset [, long maxlen]]]])", + "Read the entire file into a string" + ], + "file_put_contents": [ + "int file_put_contents(string file, mixed data [, int flags [, resource context]])", + "Write/Create a file with contents data and return the number of bytes written" + ], + "fileatime": [ + "int fileatime(string filename)", + "Get last access time of file" + ], + "filectime": [ + "int filectime(string filename)", + "Get inode modification time of file" + ], + "filegroup": [ + "int filegroup(string filename)", + "Get file group" + ], + "fileinode": [ + "int fileinode(string filename)", + "Get file inode" + ], + "filemtime": [ + "int filemtime(string filename)", + "Get last modification time of file" + ], + "fileowner": [ + "int fileowner(string filename)", + "Get file owner" + ], + "fileperms": [ + "int fileperms(string filename)", + "Get file permissions" + ], + "filesize": [ + "int filesize(string filename)", + "Get file size" + ], + "filetype": [ + "string filetype(string filename)", + "Get file type" + ], + "filter_has_var": [ + "mixed filter_has_var(constant type, string variable_name)", + "* Returns true if the variable with the name 'name' exists in source." + ], + "filter_input": [ + "mixed filter_input(constant type, string variable_name [, long filter [, mixed options]])", + "* Returns the filtered variable 'name'* from source `type`." + ], + "filter_input_array": [ + "mixed filter_input_array(constant type, [, mixed options]])", + "* Returns an array with all arguments defined in 'definition'." + ], + "filter_var": [ + "mixed filter_var(mixed variable [, long filter [, mixed options]])", + "* Returns the filtered version of the vriable." + ], + "filter_var_array": [ + "mixed filter_var_array(array data, [, mixed options]])", + "* Returns an array with all arguments defined in 'definition'." + ], + "finfo_buffer": [ + "string finfo_buffer(resource finfo, char *string [, int options [, resource context]])", + "Return infromation about a string buffer." + ], + "finfo_close": [ + "resource finfo_close(resource finfo)", + "Close fileinfo resource." + ], + "finfo_file": [ + "string finfo_file(resource finfo, char *file_name [, int options [, resource context]])", + "Return information about a file." + ], + "finfo_open": [ + "resource finfo_open([int options [, string arg]])", + "Create a new fileinfo resource." + ], + "finfo_set_flags": [ + "bool finfo_set_flags(resource finfo, int options)", + "Set libmagic configuration options." + ], + "floatval": [ + "float floatval(mixed var)", + "Get the float value of a variable" + ], + "flock": [ + "bool flock(resource fp, int operation [, int &wouldblock])", + "Portable file locking" + ], + "floor": [ + "float floor(float number)", + "Returns the next lowest integer value from the number" + ], + "flush": [ + "void flush(void)", + "Flush the output buffer" + ], + "fmod": [ + "float fmod(float x, float y)", + "Returns the remainder of dividing x by y as a float" + ], + "fnmatch": [ + "bool fnmatch(string pattern, string filename [, int flags])", + "Match filename against pattern" + ], + "fopen": [ + "resource fopen(string filename, string mode [, bool use_include_path [, resource context]])", + "Open a file or a URL and return a file pointer" + ], + "forward_static_call": [ + "mixed forward_static_call(mixed function_name [, mixed parmeter] [, mixed ...])", + "Call a user function which is the first parameter" + ], + "fpassthru": [ + "int fpassthru(resource fp)", + "Output all remaining data from a file pointer" + ], + "fprintf": [ + "int fprintf(resource stream, string format [, mixed arg1 [, mixed ...]])", + "Output a formatted string into a stream" + ], + "fputcsv": [ + "int fputcsv(resource fp, array fields [, string delimiter [, string enclosure]])", + "Format line as CSV and write to file pointer" + ], + "fread": [ + "string fread(resource fp, int length)", + "Binary-safe file read" + ], + "frenchtojd": [ + "int frenchtojd(int month, int day, int year)", + "Converts a french republic calendar date to julian day count" + ], + "fscanf": [ + "mixed fscanf(resource stream, string format [, string ...])", + "Implements a mostly ANSI compatible fscanf()" + ], + "fseek": [ + "int fseek(resource fp, int offset [, int whence])", + "Seek on a file pointer" + ], + "fsockopen": [ + "resource fsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])", + "Open Internet or Unix domain socket connection" + ], + "fstat": [ + "array fstat(resource fp)", + "Stat() on a filehandle" + ], + "ftell": [ + "int ftell(resource fp)", + "Get file pointer's read/write position" + ], + "ftok": [ + "int ftok(string pathname, string proj)", + "Convert a pathname and a project identifier to a System V IPC key" + ], + "ftp_alloc": [ + "bool ftp_alloc(resource stream, int size[, &response])", + "Attempt to allocate space on the remote FTP server" + ], + "ftp_cdup": [ + "bool ftp_cdup(resource stream)", + "Changes to the parent directory" + ], + "ftp_chdir": [ + "bool ftp_chdir(resource stream, string directory)", + "Changes directories" + ], + "ftp_chmod": [ + "int ftp_chmod(resource stream, int mode, string filename)", + "Sets permissions on a file" + ], + "ftp_close": [ + "bool ftp_close(resource stream)", + "Closes the FTP stream" + ], + "ftp_connect": [ + "resource ftp_connect(string host [, int port [, int timeout]])", + "Opens a FTP stream" + ], + "ftp_delete": [ + "bool ftp_delete(resource stream, string file)", + "Deletes a file" + ], + "ftp_exec": [ + "bool ftp_exec(resource stream, string command)", + "Requests execution of a program on the FTP server" + ], + "ftp_fget": [ + "bool ftp_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])", + "Retrieves a file from the FTP server and writes it to an open file" + ], + "ftp_fput": [ + "bool ftp_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])", + "Stores a file from an open file to the FTP server" + ], + "ftp_get": [ + "bool ftp_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])", + "Retrieves a file from the FTP server and writes it to a local file" + ], + "ftp_get_option": [ + "mixed ftp_get_option(resource stream, int option)", + "Gets an FTP option" + ], + "ftp_login": [ + "bool ftp_login(resource stream, string username, string password)", + "Logs into the FTP server" + ], + "ftp_mdtm": [ + "int ftp_mdtm(resource stream, string filename)", + "Returns the last modification time of the file, or -1 on error" + ], + "ftp_mkdir": [ + "string ftp_mkdir(resource stream, string directory)", + "Creates a directory and returns the absolute path for the new directory or false on error" + ], + "ftp_nb_continue": [ + "int ftp_nb_continue(resource stream)", + "Continues retrieving/sending a file nbronously" + ], + "ftp_nb_fget": [ + "int ftp_nb_fget(resource stream, resource fp, string remote_file, int mode[, int resumepos])", + "Retrieves a file from the FTP server asynchronly and writes it to an open file" + ], + "ftp_nb_fput": [ + "int ftp_nb_fput(resource stream, string remote_file, resource fp, int mode[, int startpos])", + "Stores a file from an open file to the FTP server nbronly" + ], + "ftp_nb_get": [ + "int ftp_nb_get(resource stream, string local_file, string remote_file, int mode[, int resume_pos])", + "Retrieves a file from the FTP server nbhronly and writes it to a local file" + ], + "ftp_nb_put": [ + "int ftp_nb_put(resource stream, string remote_file, string local_file, int mode[, int startpos])", + "Stores a file on the FTP server" + ], + "ftp_nlist": [ + "array ftp_nlist(resource stream, string directory)", + "Returns an array of filenames in the given directory" + ], + "ftp_pasv": [ + "bool ftp_pasv(resource stream, bool pasv)", + "Turns passive mode on or off" + ], + "ftp_put": [ + "bool ftp_put(resource stream, string remote_file, string local_file, int mode[, int startpos])", + "Stores a file on the FTP server" + ], + "ftp_pwd": [ + "string ftp_pwd(resource stream)", + "Returns the present working directory" + ], + "ftp_raw": [ + "array ftp_raw(resource stream, string command)", + "Sends a literal command to the FTP server" + ], + "ftp_rawlist": [ + "array ftp_rawlist(resource stream, string directory [, bool recursive])", + "Returns a detailed listing of a directory as an array of output lines" + ], + "ftp_rename": [ + "bool ftp_rename(resource stream, string src, string dest)", + "Renames the given file to a new path" + ], + "ftp_rmdir": [ + "bool ftp_rmdir(resource stream, string directory)", + "Removes a directory" + ], + "ftp_set_option": [ + "bool ftp_set_option(resource stream, int option, mixed value)", + "Sets an FTP option" + ], + "ftp_site": [ + "bool ftp_site(resource stream, string cmd)", + "Sends a SITE command to the server" + ], + "ftp_size": [ + "int ftp_size(resource stream, string filename)", + "Returns the size of the file, or -1 on error" + ], + "ftp_ssl_connect": [ + "resource ftp_ssl_connect(string host [, int port [, int timeout]])", + "Opens a FTP-SSL stream" + ], + "ftp_systype": [ + "string ftp_systype(resource stream)", + "Returns the system type identifier" + ], + "ftruncate": [ + "bool ftruncate(resource fp, int size)", + "Truncate file to 'size' length" + ], + "func_get_arg": [ + "mixed func_get_arg(int arg_num)", + "Get the $arg_num'th argument that was passed to the function" + ], + "func_get_args": [ + "array func_get_args()", + "Get an array of the arguments that were passed to the function" + ], + "func_num_args": [ + "int func_num_args(void)", + "Get the number of arguments that were passed to the function" + ], + "function ": ["", ""], + "foreach ": ["", ""], + "function_exists": [ + "bool function_exists(string function_name)", + "Checks if the function exists" + ], + "fwrite": [ + "int fwrite(resource fp, string str [, int length])", + "Binary-safe file write" + ], + "gc_collect_cycles": [ + "int gc_collect_cycles(void)", + "Forces collection of any existing garbage cycles. Returns number of freed zvals" + ], + "gc_disable": [ + "void gc_disable(void)", + "Deactivates the circular reference collector" + ], + "gc_enable": [ + "void gc_enable(void)", + "Activates the circular reference collector" + ], + "gc_enabled": [ + "void gc_enabled(void)", + "Returns status of the circular reference collector" + ], + "gd_info": [ + "array gd_info()", + "" + ], + "getKeywords": [ + "static array getKeywords(string $locale) {", + "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!) * }}}" + ], + "get_browser": [ + "mixed get_browser([string browser_name [, bool return_array]])", + "Get information about the capabilities of a browser. If browser_name is omitted or null, HTTP_USER_AGENT is used. Returns an object by default; if return_array is true, returns an array." + ], + "get_called_class": [ + "string get_called_class()", + "Retrieves the \"Late Static Binding\" class name" + ], + "get_cfg_var": [ + "mixed get_cfg_var(string option_name)", + "Get the value of a PHP configuration option" + ], + "get_class": [ + "string get_class([object object])", + "Retrieves the class name" + ], + "get_class_methods": [ + "array get_class_methods(mixed class)", + "Returns an array of method names for class or class instance." + ], + "get_class_vars": [ + "array get_class_vars(string class_name)", + "Returns an array of default properties of the class." + ], + "get_current_user": [ + "string get_current_user(void)", + "Get the name of the owner of the current PHP script" + ], + "get_declared_classes": [ + "array get_declared_classes()", + "Returns an array of all declared classes." + ], + "get_declared_interfaces": [ + "array get_declared_interfaces()", + "Returns an array of all declared interfaces." + ], + "get_defined_constants": [ + "array get_defined_constants([bool categorize])", + "Return an array containing the names and values of all defined constants" + ], + "get_defined_functions": [ + "array get_defined_functions(void)", + "Returns an array of all defined functions" + ], + "get_defined_vars": [ + "array get_defined_vars(void)", + "Returns an associative array of names and values of all currently defined variable names (variables in the current scope)" + ], + "get_display_language": [ + "static string get_display_language($locale[, $in_locale = null])", + "* gets the language for the $locale in $in_locale or default_locale" + ], + "get_display_name": [ + "static string get_display_name($locale[, $in_locale = null])", + "* gets the name for the $locale in $in_locale or default_locale" + ], + "get_display_region": [ + "static string get_display_region($locale, $in_locale = null)", + "* gets the region for the $locale in $in_locale or default_locale" + ], + "get_display_script": [ + "static string get_display_script($locale, $in_locale = null)", + "* gets the script for the $locale in $in_locale or default_locale" + ], + "get_extension_funcs": [ + "array get_extension_funcs(string extension_name)", + "Returns an array with the names of functions belonging to the named extension" + ], + "get_headers": [ + "array get_headers(string url[, int format])", + "fetches all the headers sent by the server in response to a HTTP request" + ], + "get_html_translation_table": [ + "array get_html_translation_table([int table [, int quote_style]])", + "Returns the internal translation table used by htmlspecialchars and htmlentities" + ], + "get_include_path": [ + "string get_include_path()", + "Get the current include_path configuration option" + ], + "get_included_files": [ + "array get_included_files(void)", + "Returns an array with the file names that were include_once()'d" + ], + "get_loaded_extensions": [ + "array get_loaded_extensions([bool zend_extensions])", + "Return an array containing names of loaded extensions" + ], + "get_magic_quotes_gpc": [ + "int get_magic_quotes_gpc(void)", + "Get the current active configuration setting of magic_quotes_gpc" + ], + "get_magic_quotes_runtime": [ + "int get_magic_quotes_runtime(void)", + "Get the current active configuration setting of magic_quotes_runtime" + ], + "get_meta_tags": [ + "array get_meta_tags(string filename [, bool use_include_path])", + "Extracts all meta tag content attributes from a file and returns an array" + ], + "get_object_vars": [ + "array get_object_vars(object obj)", + "Returns an array of object properties" + ], + "get_parent_class": [ + "string get_parent_class([mixed object])", + "Retrieves the parent class name for object or class or current scope." + ], + "get_resource_type": [ + "string get_resource_type(resource res)", + "Get the resource type name for a given resource" + ], + "getallheaders": [ + "array getallheaders(void)", + "" + ], + "getcwd": [ + "mixed getcwd(void)", + "Gets the current directory" + ], + "getdate": [ + "array getdate([int timestamp])", + "Get date/time information" + ], + "getenv": [ + "string getenv(string varname)", + "Get the value of an environment variable" + ], + "gethostbyaddr": [ + "string gethostbyaddr(string ip_address)", + "Get the Internet host name corresponding to a given IP address" + ], + "gethostbyname": [ + "string gethostbyname(string hostname)", + "Get the IP address corresponding to a given Internet host name" + ], + "gethostbynamel": [ + "array gethostbynamel(string hostname)", + "Return a list of IP addresses that a given hostname resolves to." + ], + "gethostname": [ + "string gethostname()", + "Get the host name of the current machine" + ], + "getimagesize": [ + "array getimagesize(string imagefile [, array info])", + "Get the size of an image as 4-element array" + ], + "getlastmod": [ + "int getlastmod(void)", + "Get time of last page modification" + ], + "getmygid": [ + "int getmygid(void)", + "Get PHP script owner's GID" + ], + "getmyinode": [ + "int getmyinode(void)", + "Get the inode of the current script being parsed" + ], + "getmypid": [ + "int getmypid(void)", + "Get current process ID" + ], + "getmyuid": [ + "int getmyuid(void)", + "Get PHP script owner's UID" + ], + "getopt": [ + "array getopt(string options [, array longopts])", + "Get options from the command line argument list" + ], + "getprotobyname": [ + "int getprotobyname(string name)", + "Returns protocol number associated with name as per /etc/protocols" + ], + "getprotobynumber": [ + "string getprotobynumber(int proto)", + "Returns protocol name associated with protocol number proto" + ], + "getrandmax": [ + "int getrandmax(void)", + "Returns the maximum value a random number can have" + ], + "getrusage": [ + "array getrusage([int who])", + "Returns an array of usage statistics" + ], + "getservbyname": [ + "int getservbyname(string service, string protocol)", + "Returns port associated with service. Protocol must be \"tcp\" or \"udp\"" + ], + "getservbyport": [ + "string getservbyport(int port, string protocol)", + "Returns service name associated with port. Protocol must be \"tcp\" or \"udp\"" + ], + "gettext": [ + "string gettext(string msgid)", + "Return the translation of msgid for the current domain, or msgid unaltered if a translation does not exist" + ], + "gettimeofday": [ + "array gettimeofday([bool get_as_float])", + "Returns the current time as array" + ], + "gettype": [ + "string gettype(mixed var)", + "Returns the type of the variable" + ], + "glob": [ + "array glob(string pattern [, int flags])", + "Find pathnames matching a pattern" + ], + "gmdate": [ + "string gmdate(string format [, long timestamp])", + "Format a GMT date/time" + ], + "gmmktime": [ + "int gmmktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])", + "Get UNIX timestamp for a GMT date" + ], + "gmp_abs": [ + "resource gmp_abs(resource a)", + "Calculates absolute value" + ], + "gmp_add": [ + "resource gmp_add(resource a, resource b)", + "Add a and b" + ], + "gmp_and": [ + "resource gmp_and(resource a, resource b)", + "Calculates logical AND of a and b" + ], + "gmp_clrbit": [ + "void gmp_clrbit(resource &a, int index)", + "Clears bit in a" + ], + "gmp_cmp": [ + "int gmp_cmp(resource a, resource b)", + "Compares two numbers" + ], + "gmp_com": [ + "resource gmp_com(resource a)", + "Calculates one's complement of a" + ], + "gmp_div_q": [ + "resource gmp_div_q(resource a, resource b [, int round])", + "Divide a by b, returns quotient only" + ], + "gmp_div_qr": [ + "array gmp_div_qr(resource a, resource b [, int round])", + "Divide a by b, returns quotient and reminder" + ], + "gmp_div_r": [ + "resource gmp_div_r(resource a, resource b [, int round])", + "Divide a by b, returns reminder only" + ], + "gmp_divexact": [ + "resource gmp_divexact(resource a, resource b)", + "Divide a by b using exact division algorithm" + ], + "gmp_fact": [ + "resource gmp_fact(int a)", + "Calculates factorial function" + ], + "gmp_gcd": [ + "resource gmp_gcd(resource a, resource b)", + "Computes greatest common denominator (gcd) of a and b" + ], + "gmp_gcdext": [ + "array gmp_gcdext(resource a, resource b)", + "Computes G, S, and T, such that AS + BT = G = `gcd' (A, B)" + ], + "gmp_hamdist": [ + "int gmp_hamdist(resource a, resource b)", + "Calculates hamming distance between a and b" + ], + "gmp_init": [ + "resource gmp_init(mixed number [, int base])", + "Initializes GMP number" + ], + "gmp_intval": [ + "int gmp_intval(resource gmpnumber)", + "Gets signed long value of GMP number" + ], + "gmp_invert": [ + "resource gmp_invert(resource a, resource b)", + "Computes the inverse of a modulo b" + ], + "gmp_jacobi": [ + "int gmp_jacobi(resource a, resource b)", + "Computes Jacobi symbol" + ], + "gmp_legendre": [ + "int gmp_legendre(resource a, resource b)", + "Computes Legendre symbol" + ], + "gmp_mod": [ + "resource gmp_mod(resource a, resource b)", + "Computes a modulo b" + ], + "gmp_mul": [ + "resource gmp_mul(resource a, resource b)", + "Multiply a and b" + ], + "gmp_neg": [ + "resource gmp_neg(resource a)", + "Negates a number" + ], + "gmp_nextprime": [ + "resource gmp_nextprime(resource a)", + "Finds next prime of a" + ], + "gmp_or": [ + "resource gmp_or(resource a, resource b)", + "Calculates logical OR of a and b" + ], + "gmp_perfect_square": [ + "bool gmp_perfect_square(resource a)", + "Checks if a is an exact square" + ], + "gmp_popcount": [ + "int gmp_popcount(resource a)", + "Calculates the population count of a" + ], + "gmp_pow": [ + "resource gmp_pow(resource base, int exp)", + "Raise base to power exp" + ], + "gmp_powm": [ + "resource gmp_powm(resource base, resource exp, resource mod)", + "Raise base to power exp and take result modulo mod" + ], + "gmp_prob_prime": [ + "int gmp_prob_prime(resource a[, int reps])", + "Checks if a is \"probably prime\"" + ], + "gmp_random": [ + "resource gmp_random([int limiter])", + "Gets random number" + ], + "gmp_scan0": [ + "int gmp_scan0(resource a, int start)", + "Finds first zero bit" + ], + "gmp_scan1": [ + "int gmp_scan1(resource a, int start)", + "Finds first non-zero bit" + ], + "gmp_setbit": [ + "void gmp_setbit(resource &a, int index[, bool set_clear])", + "Sets or clear bit in a" + ], + "gmp_sign": [ + "int gmp_sign(resource a)", + "Gets the sign of the number" + ], + "gmp_sqrt": [ + "resource gmp_sqrt(resource a)", + "Takes integer part of square root of a" + ], + "gmp_sqrtrem": [ + "array gmp_sqrtrem(resource a)", + "Square root with remainder" + ], + "gmp_strval": [ + "string gmp_strval(resource gmpnumber [, int base])", + "Gets string representation of GMP number" + ], + "gmp_sub": [ + "resource gmp_sub(resource a, resource b)", + "Subtract b from a" + ], + "gmp_testbit": [ + "bool gmp_testbit(resource a, int index)", + "Tests if bit is set in a" + ], + "gmp_xor": [ + "resource gmp_xor(resource a, resource b)", + "Calculates logical exclusive OR of a and b" + ], + "gmstrftime": [ + "string gmstrftime(string format [, int timestamp])", + "Format a GMT/UCT time/date according to locale settings" + ], + "grapheme_extract": [ + "string grapheme_extract(string str, int size[, int extract_type[, int start[, int next]]])", + "Function to extract a sequence of default grapheme clusters" + ], + "grapheme_stripos": [ + "int grapheme_stripos(string haystack, string needle [, int offset ])", + "Find position of first occurrence of a string within another, ignoring case differences" + ], + "grapheme_stristr": [ + "string grapheme_stristr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "grapheme_strlen": [ + "int grapheme_strlen(string str)", + "Get number of graphemes in a string" + ], + "grapheme_strpos": [ + "int grapheme_strpos(string haystack, string needle [, int offset ])", + "Find position of first occurrence of a string within another" + ], + "grapheme_strripos": [ + "int grapheme_strripos(string haystack, string needle [, int offset])", + "Find position of last occurrence of a string within another, ignoring case" + ], + "grapheme_strrpos": [ + "int grapheme_strrpos(string haystack, string needle [, int offset])", + "Find position of last occurrence of a string within another" + ], + "grapheme_strstr": [ + "string grapheme_strstr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "grapheme_substr": [ + "string grapheme_substr(string str, int start [, int length])", + "Returns part of a string" + ], + "gregoriantojd": [ + "int gregoriantojd(int month, int day, int year)", + "Converts a gregorian calendar date to julian day count" + ], + "gzcompress": [ + "string gzcompress(string data [, int level])", + "Gzip-compress a string" + ], + "gzdeflate": [ + "string gzdeflate(string data [, int level])", + "Gzip-compress a string" + ], + "gzencode": [ + "string gzencode(string data [, int level [, int encoding_mode]])", + "GZ encode a string" + ], + "gzfile": [ + "array gzfile(string filename [, int use_include_path])", + "Read und uncompress entire .gz-file into an array" + ], + "gzinflate": [ + "string gzinflate(string data [, int length])", + "Unzip a gzip-compressed string" + ], + "gzopen": [ + "resource gzopen(string filename, string mode [, int use_include_path])", + "Open a .gz-file and return a .gz-file pointer" + ], + "gzuncompress": [ + "string gzuncompress(string data [, int length])", + "Unzip a gzip-compressed string" + ], + "hash": [ + "string hash(string algo, string data[, bool raw_output = false])", + "Generate a hash of a given input string Returns lowercase hexits by default" + ], + "hash_algos": [ + "array hash_algos(void)", + "Return a list of registered hashing algorithms" + ], + "hash_copy": [ + "resource hash_copy(resource context)", + "Copy hash resource" + ], + "hash_file": [ + "string hash_file(string algo, string filename[, bool raw_output = false])", + "Generate a hash of a given file Returns lowercase hexits by default" + ], + "hash_final": [ + "string hash_final(resource context[, bool raw_output=false])", + "Output resulting digest" + ], + "hash_hmac": [ + "string hash_hmac(string algo, string data, string key[, bool raw_output = false])", + "Generate a hash of a given input string with a key using HMAC Returns lowercase hexits by default" + ], + "hash_hmac_file": [ + "string hash_hmac_file(string algo, string filename, string key[, bool raw_output = false])", + "Generate a hash of a given file with a key using HMAC Returns lowercase hexits by default" + ], + "hash_init": [ + "resource hash_init(string algo[, int options, string key])", + "Initialize a hashing context" + ], + "hash_update": [ + "bool hash_update(resource context, string data)", + "Pump data into the hashing algorithm" + ], + "hash_update_file": [ + "bool hash_update_file(resource context, string filename[, resource context])", + "Pump data into the hashing algorithm from a file" + ], + "hash_update_stream": [ + "int hash_update_stream(resource context, resource handle[, integer length])", + "Pump data into the hashing algorithm from an open stream" + ], + "header": [ + "void header(string header [, bool replace, [int http_response_code]])", + "Sends a raw HTTP header" + ], + "header_remove": [ + "void header_remove([string name])", + "Removes an HTTP header previously set using header()" + ], + "headers_list": [ + "array headers_list(void)", + "Return list of headers to be sent / already sent" + ], + "headers_sent": [ + "bool headers_sent([string &$file [, int &$line]])", + "Returns true if headers have already been sent, false otherwise" + ], + "hebrev": [ + "string hebrev(string str [, int max_chars_per_line])", + "Converts logical Hebrew text to visual text" + ], + "hebrevc": [ + "string hebrevc(string str [, int max_chars_per_line])", + "Converts logical Hebrew text to visual text with newline conversion" + ], + "hexdec": [ + "int hexdec(string hexadecimal_number)", + "Returns the decimal equivalent of the hexadecimal number" + ], + "highlight_file": [ + "bool highlight_file(string file_name [, bool return] )", + "Syntax highlight a source file" + ], + "highlight_string": [ + "bool highlight_string(string string [, bool return] )", + "Syntax highlight a string or optionally return it" + ], + "html_entity_decode": [ + "string html_entity_decode(string string [, int quote_style][, string charset])", + "Convert all HTML entities to their applicable characters" + ], + "htmlentities": [ + "string htmlentities(string string [, int quote_style[, string charset[, bool double_encode]]])", + "Convert all applicable characters to HTML entities" + ], + "htmlspecialchars": [ + "string htmlspecialchars(string string [, int quote_style[, string charset[, bool double_encode]]])", + "Convert special characters to HTML entities" + ], + "htmlspecialchars_decode": [ + "string htmlspecialchars_decode(string string [, int quote_style])", + "Convert special HTML entities back to characters" + ], + "http_build_query": [ + "string http_build_query(mixed formdata [, string prefix [, string arg_separator]])", + "Generates a form-encoded query string from an associative array or object." + ], + "hypot": [ + "float hypot(float num1, float num2)", + "Returns sqrt(num1*num1 + num2*num2)" + ], + "ibase_add_user": [ + "bool ibase_add_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Add a user to security database" + ], + "ibase_affected_rows": [ + "int ibase_affected_rows( [ resource link_identifier ] )", + "Returns the number of rows affected by the previous INSERT, UPDATE or DELETE statement" + ], + "ibase_backup": [ + "mixed ibase_backup(resource service_handle, string source_db, string dest_file [, int options [, bool verbose]])", + "Initiates a backup task in the service manager and returns immediately" + ], + "ibase_blob_add": [ + "bool ibase_blob_add(resource blob_handle, string data)", + "Add data into created blob" + ], + "ibase_blob_cancel": [ + "bool ibase_blob_cancel(resource blob_handle)", + "Cancel creating blob" + ], + "ibase_blob_close": [ + "string ibase_blob_close(resource blob_handle)", + "Close blob" + ], + "ibase_blob_create": [ + "resource ibase_blob_create([resource link_identifier])", + "Create blob for adding data" + ], + "ibase_blob_echo": [ + "bool ibase_blob_echo([ resource link_identifier, ] string blob_id)", + "Output blob contents to browser" + ], + "ibase_blob_get": [ + "string ibase_blob_get(resource blob_handle, int len)", + "Get len bytes data from open blob" + ], + "ibase_blob_import": [ + "string ibase_blob_import([ resource link_identifier, ] resource file)", + "Create blob, copy file in it, and close it" + ], + "ibase_blob_info": [ + "array ibase_blob_info([ resource link_identifier, ] string blob_id)", + "Return blob length and other useful info" + ], + "ibase_blob_open": [ + "resource ibase_blob_open([ resource link_identifier, ] string blob_id)", + "Open blob for retrieving data parts" + ], + "ibase_close": [ + "bool ibase_close([resource link_identifier])", + "Close an InterBase connection" + ], + "ibase_commit": [ + "bool ibase_commit( resource link_identifier )", + "Commit transaction" + ], + "ibase_commit_ret": [ + "bool ibase_commit_ret( resource link_identifier )", + "Commit transaction and retain the transaction context" + ], + "ibase_connect": [ + "resource ibase_connect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])", + "Open a connection to an InterBase database" + ], + "ibase_db_info": [ + "string ibase_db_info(resource service_handle, string db, int action [, int argument])", + "Request statistics about a database" + ], + "ibase_delete_user": [ + "bool ibase_delete_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Delete a user from security database" + ], + "ibase_drop_db": [ + "bool ibase_drop_db([resource link_identifier])", + "Drop an InterBase database" + ], + "ibase_errcode": [ + "int ibase_errcode(void)", + "Return error code" + ], + "ibase_errmsg": [ + "string ibase_errmsg(void)", + "Return error message" + ], + "ibase_execute": [ + "mixed ibase_execute(resource query [, mixed bind_arg [, mixed bind_arg [, ...]]])", + "Execute a previously prepared query" + ], + "ibase_fetch_assoc": [ + "array ibase_fetch_assoc(resource result [, int fetch_flags])", + "Fetch a row from the results of a query" + ], + "ibase_fetch_object": [ + "object ibase_fetch_object(resource result [, int fetch_flags])", + "Fetch a object from the results of a query" + ], + "ibase_fetch_row": [ + "array ibase_fetch_row(resource result [, int fetch_flags])", + "Fetch a row from the results of a query" + ], + "ibase_field_info": [ + "array ibase_field_info(resource query_result, int field_number)", + "Get information about a field" + ], + "ibase_free_event_handler": [ + "bool ibase_free_event_handler(resource event)", + "Frees the event handler set by ibase_set_event_handler()" + ], + "ibase_free_query": [ + "bool ibase_free_query(resource query)", + "Free memory used by a query" + ], + "ibase_free_result": [ + "bool ibase_free_result(resource result)", + "Free the memory used by a result" + ], + "ibase_gen_id": [ + "int ibase_gen_id(string generator [, int increment [, resource link_identifier ]])", + "Increments the named generator and returns its new value" + ], + "ibase_maintain_db": [ + "bool ibase_maintain_db(resource service_handle, string db, int action [, int argument])", + "Execute a maintenance command on the database server" + ], + "ibase_modify_user": [ + "bool ibase_modify_user(resource service_handle, string user_name, string password [, string first_name [, string middle_name [, string last_name]]])", + "Modify a user in security database" + ], + "ibase_name_result": [ + "bool ibase_name_result(resource result, string name)", + "Assign a name to a result for use with ... WHERE CURRENT OF statements" + ], + "ibase_num_fields": [ + "int ibase_num_fields(resource query_result)", + "Get the number of fields in result" + ], + "ibase_num_params": [ + "int ibase_num_params(resource query)", + "Get the number of params in a prepared query" + ], + "ibase_num_rows": [ + "int ibase_num_rows( resource result_identifier )", + "Return the number of rows that are available in a result" + ], + "ibase_param_info": [ + "array ibase_param_info(resource query, int field_number)", + "Get information about a parameter" + ], + "ibase_pconnect": [ + "resource ibase_pconnect(string database [, string username [, string password [, string charset [, int buffers [, int dialect [, string role]]]]]])", + "Open a persistent connection to an InterBase database" + ], + "ibase_prepare": [ + "resource ibase_prepare(resource link_identifier[, string query [, resource trans_identifier ]])", + "Prepare a query for later execution" + ], + "ibase_query": [ + "mixed ibase_query([resource link_identifier, [ resource link_identifier, ]] string query [, mixed bind_arg [, mixed bind_arg [, ...]]])", + "Execute a query" + ], + "ibase_restore": [ + "mixed ibase_restore(resource service_handle, string source_file, string dest_db [, int options [, bool verbose]])", + "Initiates a restore task in the service manager and returns immediately" + ], + "ibase_rollback": [ + "bool ibase_rollback( resource link_identifier )", + "Rollback transaction" + ], + "ibase_rollback_ret": [ + "bool ibase_rollback_ret( resource link_identifier )", + "Rollback transaction and retain the transaction context" + ], + "ibase_server_info": [ + "string ibase_server_info(resource service_handle, int action)", + "Request information about a database server" + ], + "ibase_service_attach": [ + "resource ibase_service_attach(string host, string dba_username, string dba_password)", + "Connect to the service manager" + ], + "ibase_service_detach": [ + "bool ibase_service_detach(resource service_handle)", + "Disconnect from the service manager" + ], + "ibase_set_event_handler": [ + "resource ibase_set_event_handler([resource link_identifier,] callback handler, string event [, string event [, ...]])", + "Register the callback for handling each of the named events" + ], + "ibase_trans": [ + "resource ibase_trans([int trans_args [, resource link_identifier [, ... ], int trans_args [, resource link_identifier [, ... ]] [, ...]]])", + "Start a transaction over one or several databases" + ], + "ibase_wait_event": [ + "string ibase_wait_event([resource link_identifier,] string event [, string event [, ...]])", + "Waits for any one of the passed Interbase events to be posted by the database, and returns its name" + ], + "iconv": [ + "string iconv(string in_charset, string out_charset, string str)", + "Returns str converted to the out_charset character set" + ], + "iconv_get_encoding": [ + "mixed iconv_get_encoding([string type])", + "Get internal encoding and output encoding for ob_iconv_handler()" + ], + "iconv_mime_decode": [ + "string iconv_mime_decode(string encoded_string [, int mode, string charset])", + "Decodes a mime header field" + ], + "iconv_mime_decode_headers": [ + "array iconv_mime_decode_headers(string headers [, int mode, string charset])", + "Decodes multiple mime header fields" + ], + "iconv_mime_encode": [ + "string iconv_mime_encode(string field_name, string field_value [, array preference])", + "Composes a mime header field with field_name and field_value in a specified scheme" + ], + "iconv_set_encoding": [ + "bool iconv_set_encoding(string type, string charset)", + "Sets internal encoding and output encoding for ob_iconv_handler()" + ], + "iconv_strlen": [ + "int iconv_strlen(string str [, string charset])", + "Returns the character count of str" + ], + "iconv_strpos": [ + "int iconv_strpos(string haystack, string needle [, int offset [, string charset]])", + "Finds position of first occurrence of needle within part of haystack beginning with offset" + ], + "iconv_strrpos": [ + "int iconv_strrpos(string haystack, string needle [, string charset])", + "Finds position of last occurrence of needle within part of haystack beginning with offset" + ], + "iconv_substr": [ + "string iconv_substr(string str, int offset, [int length, string charset])", + "Returns specified part of a string" + ], + "idate": [ + "int idate(string format [, int timestamp])", + "Format a local time/date as integer" + ], + "idn_to_ascii": [ + "int idn_to_ascii(string domain[, int options])", + "Converts an Unicode domain to ASCII representation, as defined in the IDNA RFC" + ], + "idn_to_utf8": [ + "int idn_to_utf8(string domain[, int options])", + "Converts an ASCII representation of the domain to Unicode (UTF-8), as defined in the IDNA RFC" + ], + "ignore_user_abort": [ + "int ignore_user_abort([string value])", + "Set whether we want to ignore a user abort event or not" + ], + "image2wbmp": [ + "bool image2wbmp(resource im [, string filename [, int threshold]])", + "Output WBMP image to browser or file" + ], + "image_type_to_extension": [ + "string image_type_to_extension(int imagetype [, bool include_dot])", + "Get file extension for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype" + ], + "image_type_to_mime_type": [ + "string image_type_to_mime_type(int imagetype)", + "Get Mime-Type for image-type returned by getimagesize, exif_read_data, exif_thumbnail, exif_imagetype" + ], + "imagealphablending": [ + "bool imagealphablending(resource im, bool on)", + "Turn alpha blending mode on or off for the given image" + ], + "imageantialias": [ + "bool imageantialias(resource im, bool on)", + "Should antialiased functions used or not" + ], + "imagearc": [ + "bool imagearc(resource im, int cx, int cy, int w, int h, int s, int e, int col)", + "Draw a partial ellipse" + ], + "imagechar": [ + "bool imagechar(resource im, int font, int x, int y, string c, int col)", + "Draw a character" + ], + "imagecharup": [ + "bool imagecharup(resource im, int font, int x, int y, string c, int col)", + "Draw a character rotated 90 degrees counter-clockwise" + ], + "imagecolorallocate": [ + "int imagecolorallocate(resource im, int red, int green, int blue)", + "Allocate a color for an image" + ], + "imagecolorallocatealpha": [ + "int imagecolorallocatealpha(resource im, int red, int green, int blue, int alpha)", + "Allocate a color with an alpha level. Works for true color and palette based images" + ], + "imagecolorat": [ + "int imagecolorat(resource im, int x, int y)", + "Get the index of the color of a pixel" + ], + "imagecolorclosest": [ + "int imagecolorclosest(resource im, int red, int green, int blue)", + "Get the index of the closest color to the specified color" + ], + "imagecolorclosestalpha": [ + "int imagecolorclosestalpha(resource im, int red, int green, int blue, int alpha)", + "Find the closest matching colour with alpha transparency" + ], + "imagecolorclosesthwb": [ + "int imagecolorclosesthwb(resource im, int red, int green, int blue)", + "Get the index of the color which has the hue, white and blackness nearest to the given color" + ], + "imagecolordeallocate": [ + "bool imagecolordeallocate(resource im, int index)", + "De-allocate a color for an image" + ], + "imagecolorexact": [ + "int imagecolorexact(resource im, int red, int green, int blue)", + "Get the index of the specified color" + ], + "imagecolorexactalpha": [ + "int imagecolorexactalpha(resource im, int red, int green, int blue, int alpha)", + "Find exact match for colour with transparency" + ], + "imagecolormatch": [ + "bool imagecolormatch(resource im1, resource im2)", + "Makes the colors of the palette version of an image more closely match the true color version" + ], + "imagecolorresolve": [ + "int imagecolorresolve(resource im, int red, int green, int blue)", + "Get the index of the specified color or its closest possible alternative" + ], + "imagecolorresolvealpha": [ + "int imagecolorresolvealpha(resource im, int red, int green, int blue, int alpha)", + "Resolve/Allocate a colour with an alpha level. Works for true colour and palette based images" + ], + "imagecolorset": [ + "void imagecolorset(resource im, int col, int red, int green, int blue)", + "Set the color for the specified palette index" + ], + "imagecolorsforindex": [ + "array imagecolorsforindex(resource im, int col)", + "Get the colors for an index" + ], + "imagecolorstotal": [ + "int imagecolorstotal(resource im)", + "Find out the number of colors in an image's palette" + ], + "imagecolortransparent": [ + "int imagecolortransparent(resource im [, int col])", + "Define a color as transparent" + ], + "imageconvolution": [ + "resource imageconvolution(resource src_im, array matrix3x3, double div, double offset)", + "Apply a 3x3 convolution matrix, using coefficient div and offset" + ], + "imagecopy": [ + "bool imagecopy(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h)", + "Copy part of an image" + ], + "imagecopymerge": [ + "bool imagecopymerge(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)", + "Merge one part of an image with another" + ], + "imagecopymergegray": [ + "bool imagecopymergegray(resource src_im, resource dst_im, int dst_x, int dst_y, int src_x, int src_y, int src_w, int src_h, int pct)", + "Merge one part of an image with another" + ], + "imagecopyresampled": [ + "bool imagecopyresampled(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)", + "Copy and resize part of an image using resampling to help ensure clarity" + ], + "imagecopyresized": [ + "bool imagecopyresized(resource dst_im, resource src_im, int dst_x, int dst_y, int src_x, int src_y, int dst_w, int dst_h, int src_w, int src_h)", + "Copy and resize part of an image" + ], + "imagecreate": [ + "resource imagecreate(int x_size, int y_size)", + "Create a new image" + ], + "imagecreatefromgd": [ + "resource imagecreatefromgd(string filename)", + "Create a new image from GD file or URL" + ], + "imagecreatefromgd2": [ + "resource imagecreatefromgd2(string filename)", + "Create a new image from GD2 file or URL" + ], + "imagecreatefromgd2part": [ + "resource imagecreatefromgd2part(string filename, int srcX, int srcY, int width, int height)", + "Create a new image from a given part of GD2 file or URL" + ], + "imagecreatefromgif": [ + "resource imagecreatefromgif(string filename)", + "Create a new image from GIF file or URL" + ], + "imagecreatefromjpeg": [ + "resource imagecreatefromjpeg(string filename)", + "Create a new image from JPEG file or URL" + ], + "imagecreatefrompng": [ + "resource imagecreatefrompng(string filename)", + "Create a new image from PNG file or URL" + ], + "imagecreatefromstring": [ + "resource imagecreatefromstring(string image)", + "Create a new image from the image stream in the string" + ], + "imagecreatefromwbmp": [ + "resource imagecreatefromwbmp(string filename)", + "Create a new image from WBMP file or URL" + ], + "imagecreatefromxbm": [ + "resource imagecreatefromxbm(string filename)", + "Create a new image from XBM file or URL" + ], + "imagecreatefromxpm": [ + "resource imagecreatefromxpm(string filename)", + "Create a new image from XPM file or URL" + ], + "imagecreatetruecolor": [ + "resource imagecreatetruecolor(int x_size, int y_size)", + "Create a new true color image" + ], + "imagedashedline": [ + "bool imagedashedline(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a dashed line" + ], + "imagedestroy": [ + "bool imagedestroy(resource im)", + "Destroy an image" + ], + "imageellipse": [ + "bool imageellipse(resource im, int cx, int cy, int w, int h, int color)", + "Draw an ellipse" + ], + "imagefill": [ + "bool imagefill(resource im, int x, int y, int col)", + "Flood fill" + ], + "imagefilledarc": [ + "bool imagefilledarc(resource im, int cx, int cy, int w, int h, int s, int e, int col, int style)", + "Draw a filled partial ellipse" + ], + "imagefilledellipse": [ + "bool imagefilledellipse(resource im, int cx, int cy, int w, int h, int color)", + "Draw an ellipse" + ], + "imagefilledpolygon": [ + "bool imagefilledpolygon(resource im, array point, int num_points, int col)", + "Draw a filled polygon" + ], + "imagefilledrectangle": [ + "bool imagefilledrectangle(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a filled rectangle" + ], + "imagefilltoborder": [ + "bool imagefilltoborder(resource im, int x, int y, int border, int col)", + "Flood fill to specific color" + ], + "imagefilter": [ + "bool imagefilter(resource src_im, int filtertype, [args] )", + "Applies Filter an image using a custom angle" + ], + "imagefontheight": [ + "int imagefontheight(int font)", + "Get font height" + ], + "imagefontwidth": [ + "int imagefontwidth(int font)", + "Get font width" + ], + "imageftbbox": [ + "array imageftbbox(float size, float angle, string font_file, string text [, array extrainfo])", + "Give the bounding box of a text using fonts via freetype2" + ], + "imagefttext": [ + "array imagefttext(resource im, float size, float angle, int x, int y, int col, string font_file, string text [, array extrainfo])", + "Write text to the image using fonts via freetype2" + ], + "imagegammacorrect": [ + "bool imagegammacorrect(resource im, float inputgamma, float outputgamma)", + "Apply a gamma correction to a GD image" + ], + "imagegd": [ + "bool imagegd(resource im [, string filename])", + "Output GD image to browser or file" + ], + "imagegd2": [ + "bool imagegd2(resource im [, string filename, [, int chunk_size, [, int type]]])", + "Output GD2 image to browser or file" + ], + "imagegif": [ + "bool imagegif(resource im [, string filename])", + "Output GIF image to browser or file" + ], + "imagegrabscreen": [ + "resource imagegrabscreen()", + "Grab a screenshot" + ], + "imagegrabwindow": [ + "resource imagegrabwindow(int window_handle [, int client_area])", + "Grab a window or its client area using a windows handle (HWND property in COM instance)" + ], + "imageinterlace": [ + "int imageinterlace(resource im [, int interlace])", + "Enable or disable interlace" + ], + "imageistruecolor": [ + "bool imageistruecolor(resource im)", + "return true if the image uses truecolor" + ], + "imagejpeg": [ + "bool imagejpeg(resource im [, string filename [, int quality]])", + "Output JPEG image to browser or file" + ], + "imagelayereffect": [ + "bool imagelayereffect(resource im, int effect)", + "Set the alpha blending flag to use the bundled libgd layering effects" + ], + "imageline": [ + "bool imageline(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a line" + ], + "imageloadfont": [ + "int imageloadfont(string filename)", + "Load a new font" + ], + "imagepalettecopy": [ + "void imagepalettecopy(resource dst, resource src)", + "Copy the palette from the src image onto the dst image" + ], + "imagepng": [ + "bool imagepng(resource im [, string filename])", + "Output PNG image to browser or file" + ], + "imagepolygon": [ + "bool imagepolygon(resource im, array point, int num_points, int col)", + "Draw a polygon" + ], + "imagepsbbox": [ + "array imagepsbbox(string text, resource font, int size [, int space, int tightness, float angle])", + "Return the bounding box needed by a string if rasterized" + ], + "imagepscopyfont": [ + "int imagepscopyfont(int font_index)", + "Make a copy of a font for purposes like extending or reenconding" + ], + "imagepsencodefont": [ + "bool imagepsencodefont(resource font_index, string filename)", + "To change a fonts character encoding vector" + ], + "imagepsextendfont": [ + "bool imagepsextendfont(resource font_index, float extend)", + "Extend or or condense (if extend < 1) a font" + ], + "imagepsfreefont": [ + "bool imagepsfreefont(resource font_index)", + "Free memory used by a font" + ], + "imagepsloadfont": [ + "resource imagepsloadfont(string pathname)", + "Load a new font from specified file" + ], + "imagepsslantfont": [ + "bool imagepsslantfont(resource font_index, float slant)", + "Slant a font" + ], + "imagepstext": [ + "array imagepstext(resource image, string text, resource font, int size, int foreground, int background, int xcoord, int ycoord [, int space [, int tightness [, float angle [, int antialias])", + "Rasterize a string over an image" + ], + "imagerectangle": [ + "bool imagerectangle(resource im, int x1, int y1, int x2, int y2, int col)", + "Draw a rectangle" + ], + "imagerotate": [ + "resource imagerotate(resource src_im, float angle, int bgdcolor [, int ignoretransparent])", + "Rotate an image using a custom angle" + ], + "imagesavealpha": [ + "bool imagesavealpha(resource im, bool on)", + "Include alpha channel to a saved image" + ], + "imagesetbrush": [ + "bool imagesetbrush(resource image, resource brush)", + "Set the brush image to $brush when filling $image with the \"IMG_COLOR_BRUSHED\" color" + ], + "imagesetpixel": [ + "bool imagesetpixel(resource im, int x, int y, int col)", + "Set a single pixel" + ], + "imagesetstyle": [ + "bool imagesetstyle(resource im, array styles)", + "Set the line drawing styles for use with imageline and IMG_COLOR_STYLED." + ], + "imagesetthickness": [ + "bool imagesetthickness(resource im, int thickness)", + "Set line thickness for drawing lines, ellipses, rectangles, polygons etc." + ], + "imagesettile": [ + "bool imagesettile(resource image, resource tile)", + "Set the tile image to $tile when filling $image with the \"IMG_COLOR_TILED\" color" + ], + "imagestring": [ + "bool imagestring(resource im, int font, int x, int y, string str, int col)", + "Draw a string horizontally" + ], + "imagestringup": [ + "bool imagestringup(resource im, int font, int x, int y, string str, int col)", + "Draw a string vertically - rotated 90 degrees counter-clockwise" + ], + "imagesx": [ + "int imagesx(resource im)", + "Get image width" + ], + "imagesy": [ + "int imagesy(resource im)", + "Get image height" + ], + "imagetruecolortopalette": [ + "void imagetruecolortopalette(resource im, bool ditherFlag, int colorsWanted)", + "Convert a true colour image to a palette based image with a number of colours, optionally using dithering." + ], + "imagettfbbox": [ + "array imagettfbbox(float size, float angle, string font_file, string text)", + "Give the bounding box of a text using TrueType fonts" + ], + "imagettftext": [ + "array imagettftext(resource im, float size, float angle, int x, int y, int col, string font_file, string text)", + "Write text to the image using a TrueType font" + ], + "imagetypes": [ + "int imagetypes(void)", + "Return the types of images supported in a bitfield - 1=GIF, 2=JPEG, 4=PNG, 8=WBMP, 16=XPM" + ], + "imagewbmp": [ + "bool imagewbmp(resource im [, string filename, [, int foreground]])", + "Output WBMP image to browser or file" + ], + "imagexbm": [ + "int imagexbm(int im, string filename [, int foreground])", + "Output XBM image to browser or file" + ], + "imap_8bit": [ + "string imap_8bit(string text)", + "Convert an 8-bit string to a quoted-printable string" + ], + "imap_alerts": [ + "array imap_alerts(void)", + "Returns an array of all IMAP alerts that have been generated since the last page load or since the last imap_alerts() call, whichever came last. The alert stack is cleared after imap_alerts() is called." + ], + "imap_append": [ + "bool imap_append(resource stream_id, string folder, string message [, string options [, string internal_date]])", + "Append a new message to a specified mailbox" + ], + "imap_base64": [ + "string imap_base64(string text)", + "Decode BASE64 encoded text" + ], + "imap_binary": [ + "string imap_binary(string text)", + "Convert an 8bit string to a base64 string" + ], + "imap_body": [ + "string imap_body(resource stream_id, int msg_no [, int options])", + "Read the message body" + ], + "imap_bodystruct": [ + "object imap_bodystruct(resource stream_id, int msg_no, string section)", + "Read the structure of a specified body section of a specific message" + ], + "imap_check": [ + "object imap_check(resource stream_id)", + "Get mailbox properties" + ], + "imap_clearflag_full": [ + "bool imap_clearflag_full(resource stream_id, string sequence, string flag [, int options])", + "Clears flags on messages" + ], + "imap_close": [ + "bool imap_close(resource stream_id [, int options])", + "Close an IMAP stream" + ], + "imap_createmailbox": [ + "bool imap_createmailbox(resource stream_id, string mailbox)", + "Create a new mailbox" + ], + "imap_delete": [ + "bool imap_delete(resource stream_id, int msg_no [, int options])", + "Mark a message for deletion" + ], + "imap_deletemailbox": [ + "bool imap_deletemailbox(resource stream_id, string mailbox)", + "Delete a mailbox" + ], + "imap_errors": [ + "array imap_errors(void)", + "Returns an array of all IMAP errors generated since the last page load, or since the last imap_errors() call, whichever came last. The error stack is cleared after imap_errors() is called." + ], + "imap_expunge": [ + "bool imap_expunge(resource stream_id)", + "Permanently delete all messages marked for deletion" + ], + "imap_fetch_overview": [ + "array imap_fetch_overview(resource stream_id, string sequence [, int options])", + "Read an overview of the information in the headers of the given message sequence" + ], + "imap_fetchbody": [ + "string imap_fetchbody(resource stream_id, int msg_no, string section [, int options])", + "Get a specific body section" + ], + "imap_fetchheader": [ + "string imap_fetchheader(resource stream_id, int msg_no [, int options])", + "Get the full unfiltered header for a message" + ], + "imap_fetchstructure": [ + "object imap_fetchstructure(resource stream_id, int msg_no [, int options])", + "Read the full structure of a message" + ], + "imap_gc": [ + "bool imap_gc(resource stream_id, int flags)", + "This function garbage collects (purges) the cache of entries of a specific type." + ], + "imap_get_quota": [ + "array imap_get_quota(resource stream_id, string qroot)", + "Returns the quota set to the mailbox account qroot" + ], + "imap_get_quotaroot": [ + "array imap_get_quotaroot(resource stream_id, string mbox)", + "Returns the quota set to the mailbox account mbox" + ], + "imap_getacl": [ + "array imap_getacl(resource stream_id, string mailbox)", + "Gets the ACL for a given mailbox" + ], + "imap_getmailboxes": [ + "array imap_getmailboxes(resource stream_id, string ref, string pattern)", + "Reads the list of mailboxes and returns a full array of objects containing name, attributes, and delimiter" + ], + "imap_getsubscribed": [ + "array imap_getsubscribed(resource stream_id, string ref, string pattern)", + "Return a list of subscribed mailboxes, in the same format as imap_getmailboxes()" + ], + "imap_headerinfo": [ + "object imap_headerinfo(resource stream_id, int msg_no [, int from_length [, int subject_length [, string default_host]]])", + "Read the headers of the message" + ], + "imap_headers": [ + "array imap_headers(resource stream_id)", + "Returns headers for all messages in a mailbox" + ], + "imap_last_error": [ + "string imap_last_error(void)", + "Returns the last error that was generated by an IMAP function. The error stack is NOT cleared after this call." + ], + "imap_list": [ + "array imap_list(resource stream_id, string ref, string pattern)", + "Read the list of mailboxes" + ], + "imap_listscan": [ + "array imap_listscan(resource stream_id, string ref, string pattern, string content)", + "Read list of mailboxes containing a certain string" + ], + "imap_lsub": [ + "array imap_lsub(resource stream_id, string ref, string pattern)", + "Return a list of subscribed mailboxes" + ], + "imap_mail": [ + "bool imap_mail(string to, string subject, string message [, string additional_headers [, string cc [, string bcc [, string rpath]]]])", + "Send an email message" + ], + "imap_mail_compose": [ + "string imap_mail_compose(array envelope, array body)", + "Create a MIME message based on given envelope and body sections" + ], + "imap_mail_copy": [ + "bool imap_mail_copy(resource stream_id, string msglist, string mailbox [, int options])", + "Copy specified message to a mailbox" + ], + "imap_mail_move": [ + "bool imap_mail_move(resource stream_id, string sequence, string mailbox [, int options])", + "Move specified message to a mailbox" + ], + "imap_mailboxmsginfo": [ + "object imap_mailboxmsginfo(resource stream_id)", + "Returns info about the current mailbox" + ], + "imap_mime_header_decode": [ + "array imap_mime_header_decode(string str)", + "Decode mime header element in accordance with RFC 2047 and return array of objects containing 'charset' encoding and decoded 'text'" + ], + "imap_msgno": [ + "int imap_msgno(resource stream_id, int unique_msg_id)", + "Get the sequence number associated with a UID" + ], + "imap_mutf7_to_utf8": [ + "string imap_mutf7_to_utf8(string in)", + "Decode a modified UTF-7 string to UTF-8" + ], + "imap_num_msg": [ + "int imap_num_msg(resource stream_id)", + "Gives the number of messages in the current mailbox" + ], + "imap_num_recent": [ + "int imap_num_recent(resource stream_id)", + "Gives the number of recent messages in current mailbox" + ], + "imap_open": [ + "resource imap_open(string mailbox, string user, string password [, int options [, int n_retries]])", + "Open an IMAP stream to a mailbox" + ], + "imap_ping": [ + "bool imap_ping(resource stream_id)", + "Check if the IMAP stream is still active" + ], + "imap_qprint": [ + "string imap_qprint(string text)", + "Convert a quoted-printable string to an 8-bit string" + ], + "imap_renamemailbox": [ + "bool imap_renamemailbox(resource stream_id, string old_name, string new_name)", + "Rename a mailbox" + ], + "imap_reopen": [ + "bool imap_reopen(resource stream_id, string mailbox [, int options [, int n_retries]])", + "Reopen an IMAP stream to a new mailbox" + ], + "imap_rfc822_parse_adrlist": [ + "array imap_rfc822_parse_adrlist(string address_string, string default_host)", + "Parses an address string" + ], + "imap_rfc822_parse_headers": [ + "object imap_rfc822_parse_headers(string headers [, string default_host])", + "Parse a set of mail headers contained in a string, and return an object similar to imap_headerinfo()" + ], + "imap_rfc822_write_address": [ + "string imap_rfc822_write_address(string mailbox, string host, string personal)", + "Returns a properly formatted email address given the mailbox, host, and personal info" + ], + "imap_savebody": [ + "bool imap_savebody(resource stream_id, string|resource file, int msg_no[, string section = \"\"[, int options = 0]])", + "Save a specific body section to a file" + ], + "imap_search": [ + "array imap_search(resource stream_id, string criteria [, int options [, string charset]])", + "Return a list of messages matching the given criteria" + ], + "imap_set_quota": [ + "bool imap_set_quota(resource stream_id, string qroot, int mailbox_size)", + "Will set the quota for qroot mailbox" + ], + "imap_setacl": [ + "bool imap_setacl(resource stream_id, string mailbox, string id, string rights)", + "Sets the ACL for a given mailbox" + ], + "imap_setflag_full": [ + "bool imap_setflag_full(resource stream_id, string sequence, string flag [, int options])", + "Sets flags on messages" + ], + "imap_sort": [ + "array imap_sort(resource stream_id, int criteria, int reverse [, int options [, string search_criteria [, string charset]]])", + "Sort an array of message headers, optionally including only messages that meet specified criteria." + ], + "imap_status": [ + "object imap_status(resource stream_id, string mailbox, int options)", + "Get status info from a mailbox" + ], + "imap_subscribe": [ + "bool imap_subscribe(resource stream_id, string mailbox)", + "Subscribe to a mailbox" + ], + "imap_thread": [ + "array imap_thread(resource stream_id [, int options])", + "Return threaded by REFERENCES tree" + ], + "imap_timeout": [ + "mixed imap_timeout(int timeout_type [, int timeout])", + "Set or fetch imap timeout" + ], + "imap_uid": [ + "int imap_uid(resource stream_id, int msg_no)", + "Get the unique message id associated with a standard sequential message number" + ], + "imap_undelete": [ + "bool imap_undelete(resource stream_id, int msg_no [, int flags])", + "Remove the delete flag from a message" + ], + "imap_unsubscribe": [ + "bool imap_unsubscribe(resource stream_id, string mailbox)", + "Unsubscribe from a mailbox" + ], + "imap_utf7_decode": [ + "string imap_utf7_decode(string buf)", + "Decode a modified UTF-7 string" + ], + "imap_utf7_encode": [ + "string imap_utf7_encode(string buf)", + "Encode a string in modified UTF-7" + ], + "imap_utf8": [ + "string imap_utf8(string mime_encoded_text)", + "Convert a mime-encoded text to UTF-8" + ], + "imap_utf8_to_mutf7": [ + "string imap_utf8_to_mutf7(string in)", + "Encode a UTF-8 string to modified UTF-7" + ], + "implode": [ + "string implode([string glue,] array pieces)", + "Joins array elements placing glue string between items and return one string" + ], + "import_request_variables": [ + "bool import_request_variables(string types [, string prefix])", + "Import GET/POST/Cookie variables into the global scope" + ], + "in_array": [ + "bool in_array(mixed needle, array haystack [, bool strict])", + "Checks if the given value exists in the array" + ], + "include": [ + "bool include(string path)", + "Includes and evaluates the specified file" + ], + "include_once": [ + "bool include_once(string path)", + "Includes and evaluates the specified file" + ], + "inet_ntop": [ + "string inet_ntop(string in_addr)", + "Converts a packed inet address to a human readable IP address string" + ], + "inet_pton": [ + "string inet_pton(string ip_address)", + "Converts a human readable IP address to a packed binary string" + ], + "ini_get": [ + "string ini_get(string varname)", + "Get a configuration option" + ], + "ini_get_all": [ + "array ini_get_all([string extension[, bool details = true]])", + "Get all configuration options" + ], + "ini_restore": [ + "void ini_restore(string varname)", + "Restore the value of a configuration option specified by varname" + ], + "ini_set": [ + "string ini_set(string varname, string newvalue)", + "Set a configuration option, returns false on error and the old value of the configuration option on success" + ], + "interface_exists": [ + "bool interface_exists(string classname [, bool autoload])", + "Checks if the class exists" + ], + "intl_error_name": [ + "string intl_error_name()", + "* Return a string for a given error code. * The string will be the same as the name of the error code constant." + ], + "intl_get_error_code": [ + "int intl_get_error_code()", + "* Get code of the last occured error." + ], + "intl_get_error_message": [ + "string intl_get_error_message()", + "* Get text description of the last occured error." + ], + "intl_is_failure": [ + "bool intl_is_failure()", + "* Check whether the given error code indicates a failure. * Returns true if it does, and false if the code * indicates success or a warning." + ], + "intval": [ + "int intval(mixed var [, int base])", + "Get the integer value of a variable using the optional base for the conversion" + ], + "ip2long": [ + "int ip2long(string ip_address)", + "Converts a string containing an (IPv4) Internet Protocol dotted address into a proper address" + ], + "iptcembed": [ + "array iptcembed(string iptcdata, string jpeg_file_name [, int spool])", + "Embed binary IPTC data into a JPEG image." + ], + "iptcparse": [ + "array iptcparse(string iptcdata)", + "Parse binary IPTC-data into associative array" + ], + "is_a": [ + "bool is_a(object object, string class_name)", + "Returns true if the object is of this class or has this class as one of its parents" + ], + "is_array": [ + "bool is_array(mixed var)", + "Returns true if variable is an array" + ], + "is_bool": [ + "bool is_bool(mixed var)", + "Returns true if variable is a boolean" + ], + "is_callable": [ + "bool is_callable(mixed var [, bool syntax_only [, string callable_name]])", + "Returns true if var is callable." + ], + "is_dir": [ + "bool is_dir(string filename)", + "Returns true if file is directory" + ], + "is_executable": [ + "bool is_executable(string filename)", + "Returns true if file is executable" + ], + "is_file": [ + "bool is_file(string filename)", + "Returns true if file is a regular file" + ], + "is_finite": [ + "bool is_finite(float val)", + "Returns whether argument is finite" + ], + "is_float": [ + "bool is_float(mixed var)", + "Returns true if variable is float point" + ], + "is_infinite": [ + "bool is_infinite(float val)", + "Returns whether argument is infinite" + ], + "is_link": [ + "bool is_link(string filename)", + "Returns true if file is symbolic link" + ], + "is_long": [ + "bool is_long(mixed var)", + "Returns true if variable is a long (integer)" + ], + "is_nan": [ + "bool is_nan(float val)", + "Returns whether argument is not a number" + ], + "is_null": [ + "bool is_null(mixed var)", + "Returns true if variable is null" + ], + "is_numeric": [ + "bool is_numeric(mixed value)", + "Returns true if value is a number or a numeric string" + ], + "is_object": [ + "bool is_object(mixed var)", + "Returns true if variable is an object" + ], + "is_readable": [ + "bool is_readable(string filename)", + "Returns true if file can be read" + ], + "is_resource": [ + "bool is_resource(mixed var)", + "Returns true if variable is a resource" + ], + "is_scalar": [ + "bool is_scalar(mixed value)", + "Returns true if value is a scalar" + ], + "is_string": [ + "bool is_string(mixed var)", + "Returns true if variable is a string" + ], + "is_subclass_of": [ + "bool is_subclass_of(object object, string class_name)", + "Returns true if the object has this class as one of its parents" + ], + "is_uploaded_file": [ + "bool is_uploaded_file(string path)", + "Check if file was created by rfc1867 upload" + ], + "is_writable": [ + "bool is_writable(string filename)", + "Returns true if file can be written" + ], + "isset": [ + "bool isset(mixed var [, mixed var])", + "Determine whether a variable is set" + ], + "iterator_apply": [ + "int iterator_apply(Traversable it, mixed function [, mixed params])", + "Calls a function for every element in an iterator" + ], + "iterator_count": [ + "int iterator_count(Traversable it)", + "Count the elements in an iterator" + ], + "iterator_to_array": [ + "array iterator_to_array(Traversable it [, bool use_keys = true])", + "Copy the iterator into an array" + ], + "jddayofweek": [ + "mixed jddayofweek(int juliandaycount [, int mode])", + "Returns name or number of day of week from julian day count" + ], + "jdmonthname": [ + "string jdmonthname(int juliandaycount, int mode)", + "Returns name of month for julian day count" + ], + "jdtofrench": [ + "string jdtofrench(int juliandaycount)", + "Converts a julian day count to a french republic calendar date" + ], + "jdtogregorian": [ + "string jdtogregorian(int juliandaycount)", + "Converts a julian day count to a gregorian calendar date" + ], + "jdtojewish": [ + "string jdtojewish(int juliandaycount [, bool hebrew [, int fl]])", + "Converts a julian day count to a jewish calendar date" + ], + "jdtojulian": [ + "string jdtojulian(int juliandaycount)", + "Convert a julian day count to a julian calendar date" + ], + "jdtounix": [ + "int jdtounix(int jday)", + "Convert Julian Day to UNIX timestamp" + ], + "jewishtojd": [ + "int jewishtojd(int month, int day, int year)", + "Converts a jewish calendar date to a julian day count" + ], + "join": [ + "string join(array src, string glue)", + "An alias for implode" + ], + "jpeg2wbmp": [ + "bool jpeg2wbmp (string f_org, string f_dest, int d_height, int d_width, int threshold)", + "Convert JPEG image to WBMP image" + ], + "json_decode": [ + "mixed json_decode(string json [, bool assoc [, long depth]])", + "Decodes the JSON representation into a PHP value" + ], + "json_encode": [ + "string json_encode(mixed data [, int options])", + "Returns the JSON representation of a value" + ], + "json_last_error": [ + "int json_last_error()", + "Returns the error code of the last json_decode()." + ], + "juliantojd": [ + "int juliantojd(int month, int day, int year)", + "Converts a julian calendar date to julian day count" + ], + "key": [ + "mixed key(array array_arg)", + "Return the key of the element currently pointed to by the internal array pointer" + ], + "krsort": [ + "bool krsort(array &array_arg [, int sort_flags])", + "Sort an array by key value in reverse order" + ], + "ksort": [ + "bool ksort(array &array_arg [, int sort_flags])", + "Sort an array by key" + ], + "lcfirst": [ + "string lcfirst(string str)", + "Make a string's first character lowercase" + ], + "lcg_value": [ + "float lcg_value()", + "Returns a value from the combined linear congruential generator" + ], + "lchgrp": [ + "bool lchgrp(string filename, mixed group)", + "Change symlink group" + ], + "ldap_8859_to_t61": [ + "string ldap_8859_to_t61(string value)", + "Translate 8859 characters to t61 characters" + ], + "ldap_add": [ + "bool ldap_add(resource link, string dn, array entry)", + "Add entries to LDAP directory" + ], + "ldap_bind": [ + "bool ldap_bind(resource link [, string dn [, string password]])", + "Bind to LDAP directory" + ], + "ldap_compare": [ + "bool ldap_compare(resource link, string dn, string attr, string value)", + "Determine if an entry has a specific value for one of its attributes" + ], + "ldap_connect": [ + "resource ldap_connect([string host [, int port [, string wallet [, string wallet_passwd [, int authmode]]]]])", + "Connect to an LDAP server" + ], + "ldap_count_entries": [ + "int ldap_count_entries(resource link, resource result)", + "Count the number of entries in a search result" + ], + "ldap_delete": [ + "bool ldap_delete(resource link, string dn)", + "Delete an entry from a directory" + ], + "ldap_dn2ufn": [ + "string ldap_dn2ufn(string dn)", + "Convert DN to User Friendly Naming format" + ], + "ldap_err2str": [ + "string ldap_err2str(int errno)", + "Convert error number to error string" + ], + "ldap_errno": [ + "int ldap_errno(resource link)", + "Get the current ldap error number" + ], + "ldap_error": [ + "string ldap_error(resource link)", + "Get the current ldap error string" + ], + "ldap_explode_dn": [ + "array ldap_explode_dn(string dn, int with_attrib)", + "Splits DN into its component parts" + ], + "ldap_first_attribute": [ + "string ldap_first_attribute(resource link, resource result_entry)", + "Return first attribute" + ], + "ldap_first_entry": [ + "resource ldap_first_entry(resource link, resource result)", + "Return first result id" + ], + "ldap_first_reference": [ + "resource ldap_first_reference(resource link, resource result)", + "Return first reference" + ], + "ldap_free_result": [ + "bool ldap_free_result(resource result)", + "Free result memory" + ], + "ldap_get_attributes": [ + "array ldap_get_attributes(resource link, resource result_entry)", + "Get attributes from a search result entry" + ], + "ldap_get_dn": [ + "string ldap_get_dn(resource link, resource result_entry)", + "Get the DN of a result entry" + ], + "ldap_get_entries": [ + "array ldap_get_entries(resource link, resource result)", + "Get all result entries" + ], + "ldap_get_option": [ + "bool ldap_get_option(resource link, int option, mixed retval)", + "Get the current value of various session-wide parameters" + ], + "ldap_get_values_len": [ + "array ldap_get_values_len(resource link, resource result_entry, string attribute)", + "Get all values with lengths from a result entry" + ], + "ldap_list": [ + "resource ldap_list(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Single-level search" + ], + "ldap_mod_add": [ + "bool ldap_mod_add(resource link, string dn, array entry)", + "Add attribute values to current" + ], + "ldap_mod_del": [ + "bool ldap_mod_del(resource link, string dn, array entry)", + "Delete attribute values" + ], + "ldap_mod_replace": [ + "bool ldap_mod_replace(resource link, string dn, array entry)", + "Replace attribute values with new ones" + ], + "ldap_next_attribute": [ + "string ldap_next_attribute(resource link, resource result_entry)", + "Get the next attribute in result" + ], + "ldap_next_entry": [ + "resource ldap_next_entry(resource link, resource result_entry)", + "Get next result entry" + ], + "ldap_next_reference": [ + "resource ldap_next_reference(resource link, resource reference_entry)", + "Get next reference" + ], + "ldap_parse_reference": [ + "bool ldap_parse_reference(resource link, resource reference_entry, array referrals)", + "Extract information from reference entry" + ], + "ldap_parse_result": [ + "bool ldap_parse_result(resource link, resource result, int errcode, string matcheddn, string errmsg, array referrals)", + "Extract information from result" + ], + "ldap_read": [ + "resource ldap_read(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Read an entry" + ], + "ldap_rename": [ + "bool ldap_rename(resource link, string dn, string newrdn, string newparent, bool deleteoldrdn);", + "Modify the name of an entry" + ], + "ldap_sasl_bind": [ + "bool ldap_sasl_bind(resource link [, string binddn [, string password [, string sasl_mech [, string sasl_realm [, string sasl_authc_id [, string sasl_authz_id [, string props]]]]]]])", + "Bind to LDAP directory using SASL" + ], + "ldap_search": [ + "resource ldap_search(resource|array link, string base_dn, string filter [, array attrs [, int attrsonly [, int sizelimit [, int timelimit [, int deref]]]]])", + "Search LDAP tree under base_dn" + ], + "ldap_set_option": [ + "bool ldap_set_option(resource link, int option, mixed newval)", + "Set the value of various session-wide parameters" + ], + "ldap_set_rebind_proc": [ + "bool ldap_set_rebind_proc(resource link, string callback)", + "Set a callback function to do re-binds on referral chasing." + ], + "ldap_sort": [ + "bool ldap_sort(resource link, resource result, string sortfilter)", + "Sort LDAP result entries" + ], + "ldap_start_tls": [ + "bool ldap_start_tls(resource link)", + "Start TLS" + ], + "ldap_t61_to_8859": [ + "string ldap_t61_to_8859(string value)", + "Translate t61 characters to 8859 characters" + ], + "ldap_unbind": [ + "bool ldap_unbind(resource link)", + "Unbind from LDAP directory" + ], + "leak": [ + "void leak(int num_bytes=3)", + "Cause an intentional memory leak, for testing/debugging purposes" + ], + "levenshtein": [ + "int levenshtein(string str1, string str2[, int cost_ins, int cost_rep, int cost_del])", + "Calculate Levenshtein distance between two strings" + ], + "libxml_clear_errors": [ + "void libxml_clear_errors()", + "Clear last error from libxml" + ], + "libxml_disable_entity_loader": [ + "bool libxml_disable_entity_loader([boolean disable])", + "Disable/Enable ability to load external entities" + ], + "libxml_get_errors": [ + "object libxml_get_errors()", + "Retrieve array of errors" + ], + "libxml_get_last_error": [ + "object libxml_get_last_error()", + "Retrieve last error from libxml" + ], + "libxml_set_streams_context": [ + "void libxml_set_streams_context(resource streams_context)", + "Set the streams context for the next libxml document load or write" + ], + "libxml_use_internal_errors": [ + "bool libxml_use_internal_errors([boolean use_errors])", + "Disable libxml errors and allow user to fetch error information as needed" + ], + "link": [ + "int link(string target, string link)", + "Create a hard link" + ], + "linkinfo": [ + "int linkinfo(string filename)", + "Returns the st_dev field of the UNIX C stat structure describing the link" + ], + "litespeed_request_headers": [ + "array litespeed_request_headers(void)", + "Fetch all HTTP request headers" + ], + "litespeed_response_headers": [ + "array litespeed_response_headers(void)", + "Fetch all HTTP response headers" + ], + "locale_accept_from_http": [ + "string locale_accept_from_http(string $http_accept)", + null + ], + "locale_canonicalize": [ + "static string locale_canonicalize(Locale $loc, string $locale)", + "* @param string $locale The locale string to canonicalize" + ], + "locale_filter_matches": [ + "boolean locale_filter_matches(string $langtag, string $locale[, bool $canonicalize])", + "* Checks if a $langtag filter matches with $locale according to RFC 4647's basic filtering algorithm" + ], + "locale_get_all_variants": [ + "static array locale_get_all_variants($locale)", + "* gets an array containing the list of variants, or null" + ], + "locale_get_default": [ + "static string locale_get_default( )", + "Get default locale" + ], + "locale_get_keywords": [ + "static array locale_get_keywords(string $locale) {", + "* return an associative array containing keyword-value * pairs for this locale. The keys are keys to the array (doh!)" + ], + "locale_get_primary_language": [ + "static string locale_get_primary_language($locale)", + "* gets the primary language for the $locale" + ], + "locale_get_region": [ + "static string locale_get_region($locale)", + "* gets the region for the $locale" + ], + "locale_get_script": [ + "static string locale_get_script($locale)", + "* gets the script for the $locale" + ], + "locale_lookup": [ + "string locale_lookup(array $langtag, string $locale[, bool $canonicalize[, string $default = null]])", + "* Searchs the items in $langtag for the best match to the language * range" + ], + "locale_set_default": [ + "static string locale_set_default( string $locale )", + "Set default locale" + ], + "localeconv": [ + "array localeconv(void)", + "Returns numeric formatting information based on the current locale" + ], + "localtime": [ + "array localtime([int timestamp [, bool associative_array]])", + "Returns the results of the C system call localtime as an associative array if the associative_array argument is set to 1 other wise it is a regular array" + ], + "log": [ + "float log(float number, [float base])", + "Returns the natural logarithm of the number, or the base log if base is specified" + ], + "log10": [ + "float log10(float number)", + "Returns the base-10 logarithm of the number" + ], + "log1p": [ + "float log1p(float number)", + "Returns log(1 + number), computed in a way that accurate even when the value of number is close to zero" + ], + "long2ip": [ + "string long2ip(int proper_address)", + "Converts an (IPv4) Internet network address into a string in Internet standard dotted format" + ], + "lstat": [ + "array lstat(string filename)", + "Give information about a file or symbolic link" + ], + "ltrim": [ + "string ltrim(string str [, string character_mask])", + "Strips whitespace from the beginning of a string" + ], + "mail": [ + "int mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])", + "Send an email message" + ], + "max": [ + "mixed max(mixed arg1 [, mixed arg2 [, mixed ...]])", + "Return the highest value in an array or a series of arguments" + ], + "mb_check_encoding": [ + "bool mb_check_encoding([string var[, string encoding]])", + "Check if the string is valid for the specified encoding" + ], + "mb_convert_case": [ + "string mb_convert_case(string sourcestring, int mode [, string encoding])", + "Returns a case-folded version of sourcestring" + ], + "mb_convert_encoding": [ + "string mb_convert_encoding(string str, string to-encoding [, mixed from-encoding])", + "Returns converted string in desired encoding" + ], + "mb_convert_kana": [ + "string mb_convert_kana(string str [, string option] [, string encoding])", + "Conversion between full-width character and half-width character (Japanese)" + ], + "mb_convert_variables": [ + "string mb_convert_variables(string to-encoding, mixed from-encoding, mixed vars [, ...])", + "Converts the string resource in variables to desired encoding" + ], + "mb_decode_mimeheader": [ + "string mb_decode_mimeheader(string string)", + "Decodes the MIME \"encoded-word\" in the string" + ], + "mb_decode_numericentity": [ + "string mb_decode_numericentity(string string, array convmap [, string encoding])", + "Converts HTML numeric entities to character code" + ], + "mb_detect_encoding": [ + "string mb_detect_encoding(string str [, mixed encoding_list [, bool strict]])", + "Encodings of the given string is returned (as a string)" + ], + "mb_detect_order": [ + "bool|array mb_detect_order([mixed encoding-list])", + "Sets the current detect_order or Return the current detect_order as a array" + ], + "mb_encode_mimeheader": [ + "string mb_encode_mimeheader(string str [, string charset [, string transfer-encoding [, string linefeed [, int indent]]]])", + "Converts the string to MIME \"encoded-word\" in the format of =?charset?(B|Q)?encoded_string?=" + ], + "mb_encode_numericentity": [ + "string mb_encode_numericentity(string string, array convmap [, string encoding])", + "Converts specified characters to HTML numeric entities" + ], + "mb_encoding_aliases": [ + "array mb_encoding_aliases(string encoding)", + "Returns an array of the aliases of a given encoding name" + ], + "mb_ereg": [ + "int mb_ereg(string pattern, string string [, array registers])", + "Regular expression match for multibyte string" + ], + "mb_ereg_match": [ + "bool mb_ereg_match(string pattern, string string [,string option])", + "Regular expression match for multibyte string" + ], + "mb_ereg_replace": [ + "string mb_ereg_replace(string pattern, string replacement, string string [, string option])", + "Replace regular expression for multibyte string" + ], + "mb_ereg_search": [ + "bool mb_ereg_search([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_getpos": [ + "int mb_ereg_search_getpos(void)", + "Get search start position" + ], + "mb_ereg_search_getregs": [ + "array mb_ereg_search_getregs(void)", + "Get matched substring of the last time" + ], + "mb_ereg_search_init": [ + "bool mb_ereg_search_init(string string [, string pattern[, string option]])", + "Initialize string and regular expression for search." + ], + "mb_ereg_search_pos": [ + "array mb_ereg_search_pos([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_regs": [ + "array mb_ereg_search_regs([string pattern[, string option]])", + "Regular expression search for multibyte string" + ], + "mb_ereg_search_setpos": [ + "bool mb_ereg_search_setpos(int position)", + "Set search start position" + ], + "mb_eregi": [ + "int mb_eregi(string pattern, string string [, array registers])", + "Case-insensitive regular expression match for multibyte string" + ], + "mb_eregi_replace": [ + "string mb_eregi_replace(string pattern, string replacement, string string)", + "Case insensitive replace regular expression for multibyte string" + ], + "mb_get_info": [ + "mixed mb_get_info([string type])", + "Returns the current settings of mbstring" + ], + "mb_http_input": [ + "mixed mb_http_input([string type])", + "Returns the input encoding" + ], + "mb_http_output": [ + "string mb_http_output([string encoding])", + "Sets the current output_encoding or returns the current output_encoding as a string" + ], + "mb_internal_encoding": [ + "string mb_internal_encoding([string encoding])", + "Sets the current internal encoding or Returns the current internal encoding as a string" + ], + "mb_language": [ + "string mb_language([string language])", + "Sets the current language or Returns the current language as a string" + ], + "mb_list_encodings": [ + "mixed mb_list_encodings()", + "Returns an array of all supported entity encodings" + ], + "mb_output_handler": [ + "string mb_output_handler(string contents, int status)", + "Returns string in output buffer converted to the http_output encoding" + ], + "mb_parse_str": [ + "bool mb_parse_str(string encoded_string [, array result])", + "Parses GET/POST/COOKIE data and sets global variables" + ], + "mb_preferred_mime_name": [ + "string mb_preferred_mime_name(string encoding)", + "Return the preferred MIME name (charset) as a string" + ], + "mb_regex_encoding": [ + "string mb_regex_encoding([string encoding])", + "Returns the current encoding for regex as a string." + ], + "mb_regex_set_options": [ + "string mb_regex_set_options([string options])", + "Set or get the default options for mbregex functions" + ], + "mb_send_mail": [ + "int mb_send_mail(string to, string subject, string message [, string additional_headers [, string additional_parameters]])", + "* Sends an email message with MIME scheme" + ], + "mb_split": [ + "array mb_split(string pattern, string string [, int limit])", + "split multibyte string into array by regular expression" + ], + "mb_strcut": [ + "string mb_strcut(string str, int start [, int length [, string encoding]])", + "Returns part of a string" + ], + "mb_strimwidth": [ + "string mb_strimwidth(string str, int start, int width [, string trimmarker [, string encoding]])", + "Trim the string in terminal width" + ], + "mb_stripos": [ + "int mb_stripos(string haystack, string needle [, int offset [, string encoding]])", + "Finds position of first occurrence of a string within another, case insensitive" + ], + "mb_stristr": [ + "string mb_stristr(string haystack, string needle[, bool part[, string encoding]])", + "Finds first occurrence of a string within another, case insensitive" + ], + "mb_strlen": [ + "int mb_strlen(string str [, string encoding])", + "Get character numbers of a string" + ], + "mb_strpos": [ + "int mb_strpos(string haystack, string needle [, int offset [, string encoding]])", + "Find position of first occurrence of a string within another" + ], + "mb_strrchr": [ + "string mb_strrchr(string haystack, string needle[, bool part[, string encoding]])", + "Finds the last occurrence of a character in a string within another" + ], + "mb_strrichr": [ + "string mb_strrichr(string haystack, string needle[, bool part[, string encoding]])", + "Finds the last occurrence of a character in a string within another, case insensitive" + ], + "mb_strripos": [ + "int mb_strripos(string haystack, string needle [, int offset [, string encoding]])", + "Finds position of last occurrence of a string within another, case insensitive" + ], + "mb_strrpos": [ + "int mb_strrpos(string haystack, string needle [, int offset [, string encoding]])", + "Find position of last occurrence of a string within another" + ], + "mb_strstr": [ + "string mb_strstr(string haystack, string needle[, bool part[, string encoding]])", + "Finds first occurrence of a string within another" + ], + "mb_strtolower": [ + "string mb_strtolower(string sourcestring [, string encoding])", + "* Returns a lowercased version of sourcestring" + ], + "mb_strtoupper": [ + "string mb_strtoupper(string sourcestring [, string encoding])", + "* Returns a uppercased version of sourcestring" + ], + "mb_strwidth": [ + "int mb_strwidth(string str [, string encoding])", + "Gets terminal width of a string" + ], + "mb_substitute_character": [ + "mixed mb_substitute_character([mixed substchar])", + "Sets the current substitute_character or returns the current substitute_character" + ], + "mb_substr": [ + "string mb_substr(string str, int start [, int length [, string encoding]])", + "Returns part of a string" + ], + "mb_substr_count": [ + "int mb_substr_count(string haystack, string needle [, string encoding])", + "Count the number of substring occurrences" + ], + "mcrypt_cbc": [ + "string mcrypt_cbc(int cipher, string key, string data, int mode, string iv)", + "CBC crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_cfb": [ + "string mcrypt_cfb(int cipher, string key, string data, int mode, string iv)", + "CFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_create_iv": [ + "string mcrypt_create_iv(int size, int source)", + "Create an initialization vector (IV)" + ], + "mcrypt_decrypt": [ + "string mcrypt_decrypt(string cipher, string key, string data, string mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_ecb": [ + "string mcrypt_ecb(int cipher, string key, string data, int mode, string iv)", + "ECB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_enc_get_algorithms_name": [ + "string mcrypt_enc_get_algorithms_name(resource td)", + "Returns the name of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_block_size": [ + "int mcrypt_enc_get_block_size(resource td)", + "Returns the block size of the cipher specified by the descriptor td" + ], + "mcrypt_enc_get_iv_size": [ + "int mcrypt_enc_get_iv_size(resource td)", + "Returns the size of the IV in bytes of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_key_size": [ + "int mcrypt_enc_get_key_size(resource td)", + "Returns the maximum supported key size in bytes of the algorithm specified by the descriptor td" + ], + "mcrypt_enc_get_modes_name": [ + "string mcrypt_enc_get_modes_name(resource td)", + "Returns the name of the mode specified by the descriptor td" + ], + "mcrypt_enc_get_supported_key_sizes": [ + "array mcrypt_enc_get_supported_key_sizes(resource td)", + "This function decrypts the crypttext" + ], + "mcrypt_enc_is_block_algorithm": [ + "bool mcrypt_enc_is_block_algorithm(resource td)", + "Returns TRUE if the alrogithm is a block algorithms" + ], + "mcrypt_enc_is_block_algorithm_mode": [ + "bool mcrypt_enc_is_block_algorithm_mode(resource td)", + "Returns TRUE if the mode is for use with block algorithms" + ], + "mcrypt_enc_is_block_mode": [ + "bool mcrypt_enc_is_block_mode(resource td)", + "Returns TRUE if the mode outputs blocks" + ], + "mcrypt_enc_self_test": [ + "int mcrypt_enc_self_test(resource td)", + "This function runs the self test on the algorithm specified by the descriptor td" + ], + "mcrypt_encrypt": [ + "string mcrypt_encrypt(string cipher, string key, string data, string mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "mcrypt_generic": [ + "string mcrypt_generic(resource td, string data)", + "This function encrypts the plaintext" + ], + "mcrypt_generic_deinit": [ + "bool mcrypt_generic_deinit(resource td)", + "This function terminates encrypt specified by the descriptor td" + ], + "mcrypt_generic_init": [ + "int mcrypt_generic_init(resource td, string key, string iv)", + "This function initializes all buffers for the specific module" + ], + "mcrypt_get_block_size": [ + "int mcrypt_get_block_size(string cipher, string module)", + "Get the key size of cipher" + ], + "mcrypt_get_cipher_name": [ + "string mcrypt_get_cipher_name(string cipher)", + "Get the key size of cipher" + ], + "mcrypt_get_iv_size": [ + "int mcrypt_get_iv_size(string cipher, string module)", + "Get the IV size of cipher (Usually the same as the blocksize)" + ], + "mcrypt_get_key_size": [ + "int mcrypt_get_key_size(string cipher, string module)", + "Get the key size of cipher" + ], + "mcrypt_list_algorithms": [ + "array mcrypt_list_algorithms([string lib_dir])", + "List all algorithms in \"module_dir\"" + ], + "mcrypt_list_modes": [ + "array mcrypt_list_modes([string lib_dir])", + "List all modes \"module_dir\"" + ], + "mcrypt_module_close": [ + "bool mcrypt_module_close(resource td)", + "Free the descriptor td" + ], + "mcrypt_module_get_algo_block_size": [ + "int mcrypt_module_get_algo_block_size(string algorithm [, string lib_dir])", + "Returns the block size of the algorithm" + ], + "mcrypt_module_get_algo_key_size": [ + "int mcrypt_module_get_algo_key_size(string algorithm [, string lib_dir])", + "Returns the maximum supported key size of the algorithm" + ], + "mcrypt_module_get_supported_key_sizes": [ + "array mcrypt_module_get_supported_key_sizes(string algorithm [, string lib_dir])", + "This function decrypts the crypttext" + ], + "mcrypt_module_is_block_algorithm": [ + "bool mcrypt_module_is_block_algorithm(string algorithm [, string lib_dir])", + "Returns TRUE if the algorithm is a block algorithm" + ], + "mcrypt_module_is_block_algorithm_mode": [ + "bool mcrypt_module_is_block_algorithm_mode(string mode [, string lib_dir])", + "Returns TRUE if the mode is for use with block algorithms" + ], + "mcrypt_module_is_block_mode": [ + "bool mcrypt_module_is_block_mode(string mode [, string lib_dir])", + "Returns TRUE if the mode outputs blocks of bytes" + ], + "mcrypt_module_open": [ + "resource mcrypt_module_open(string cipher, string cipher_directory, string mode, string mode_directory)", + "Opens the module of the algorithm and the mode to be used" + ], + "mcrypt_module_self_test": [ + "bool mcrypt_module_self_test(string algorithm [, string lib_dir])", + "Does a self test of the module \"module\"" + ], + "mcrypt_ofb": [ + "string mcrypt_ofb(int cipher, string key, string data, int mode, string iv)", + "OFB crypt/decrypt data using key key with cipher cipher starting with iv" + ], + "md5": [ + "string md5(string str, [ bool raw_output])", + "Calculate the md5 hash of a string" + ], + "md5_file": [ + "string md5_file(string filename [, bool raw_output])", + "Calculate the md5 hash of given filename" + ], + "mdecrypt_generic": [ + "string mdecrypt_generic(resource td, string data)", + "This function decrypts the plaintext" + ], + "memory_get_peak_usage": [ + "int memory_get_peak_usage([real_usage])", + "Returns the peak allocated by PHP memory" + ], + "memory_get_usage": [ + "int memory_get_usage([real_usage])", + "Returns the allocated by PHP memory" + ], + "metaphone": [ + "string metaphone(string text[, int phones])", + "Break english phrases down into their phonemes" + ], + "method_exists": [ + "bool method_exists(object object, string method)", + "Checks if the class method exists" + ], + "mhash": [ + "string mhash(int hash, string data [, string key])", + "Hash data with hash" + ], + "mhash_count": [ + "int mhash_count(void)", + "Gets the number of available hashes" + ], + "mhash_get_block_size": [ + "int mhash_get_block_size(int hash)", + "Gets the block size of hash" + ], + "mhash_get_hash_name": [ + "string mhash_get_hash_name(int hash)", + "Gets the name of hash" + ], + "mhash_keygen_s2k": [ + "string mhash_keygen_s2k(int hash, string input_password, string salt, int bytes)", + "Generates a key using hash functions" + ], + "microtime": [ + "mixed microtime([bool get_as_float])", + "Returns either a string or a float containing the current time in seconds and microseconds" + ], + "mime_content_type": [ + "string mime_content_type(string filename|resource stream)", + "Return content-type for file" + ], + "min": [ + "mixed min(mixed arg1 [, mixed arg2 [, mixed ...]])", + "Return the lowest value in an array or a series of arguments" + ], + "mkdir": [ + "bool mkdir(string pathname [, int mode [, bool recursive [, resource context]]])", + "Create a directory" + ], + "mktime": [ + "int mktime([int hour [, int min [, int sec [, int mon [, int day [, int year]]]]]])", + "Get UNIX timestamp for a date" + ], + "money_format": [ + "string money_format(string format , float value)", + "Convert monetary value(s) to string" + ], + "move_uploaded_file": [ + "bool move_uploaded_file(string path, string new_path)", + "Move a file if and only if it was created by an upload" + ], + "msg_get_queue": [ + "resource msg_get_queue(int key [, int perms])", + "Attach to a message queue" + ], + "msg_queue_exists": [ + "bool msg_queue_exists(int key)", + "Check whether a message queue exists" + ], + "msg_receive": [ + "mixed msg_receive(resource queue, int desiredmsgtype, int &msgtype, int maxsize, mixed message [, bool unserialize=true [, int flags=0 [, int errorcode]]])", + "Send a message of type msgtype (must be > 0) to a message queue" + ], + "msg_remove_queue": [ + "bool msg_remove_queue(resource queue)", + "Destroy the queue" + ], + "msg_send": [ + "bool msg_send(resource queue, int msgtype, mixed message [, bool serialize=true [, bool blocking=true [, int errorcode]]])", + "Send a message of type msgtype (must be > 0) to a message queue" + ], + "msg_set_queue": [ + "bool msg_set_queue(resource queue, array data)", + "Set information for a message queue" + ], + "msg_stat_queue": [ + "array msg_stat_queue(resource queue)", + "Returns information about a message queue" + ], + "msgfmt_create": [ + "MessageFormatter msgfmt_create( string $locale, string $pattern )", + "* Create formatter." + ], + "msgfmt_format": [ + "mixed msgfmt_format( MessageFormatter $nf, array $args )", + "* Format a message." + ], + "msgfmt_format_message": [ + "mixed msgfmt_format_message( string $locale, string $pattern, array $args )", + "* Format a message." + ], + "msgfmt_get_error_code": [ + "int msgfmt_get_error_code( MessageFormatter $nf )", + "* Get formatter's last error code." + ], + "msgfmt_get_error_message": [ + "string msgfmt_get_error_message( MessageFormatter $coll )", + "* Get text description for formatter's last error code." + ], + "msgfmt_get_locale": [ + "string msgfmt_get_locale(MessageFormatter $mf)", + "* Get formatter locale." + ], + "msgfmt_get_pattern": [ + "string msgfmt_get_pattern( MessageFormatter $mf )", + "* Get formatter pattern." + ], + "msgfmt_parse": [ + "array msgfmt_parse( MessageFormatter $nf, string $source )", + "* Parse a message." + ], + "msgfmt_set_pattern": [ + "bool msgfmt_set_pattern( MessageFormatter $mf, string $pattern )", + "* Set formatter pattern." + ], + "mssql_bind": [ + "bool mssql_bind(resource stmt, string param_name, mixed var, int type [, bool is_output [, bool is_null [, int maxlen]]])", + "Adds a parameter to a stored procedure or a remote stored procedure" + ], + "mssql_close": [ + "bool mssql_close([resource conn_id])", + "Closes a connection to a MS-SQL server" + ], + "mssql_connect": [ + "int mssql_connect([string servername [, string username [, string password [, bool new_link]]]])", + "Establishes a connection to a MS-SQL server" + ], + "mssql_data_seek": [ + "bool mssql_data_seek(resource result_id, int offset)", + "Moves the internal row pointer of the MS-SQL result associated with the specified result identifier to pointer to the specified row number" + ], + "mssql_execute": [ + "mixed mssql_execute(resource stmt [, bool skip_results = false])", + "Executes a stored procedure on a MS-SQL server database" + ], + "mssql_fetch_array": [ + "array mssql_fetch_array(resource result_id [, int result_type])", + "Returns an associative array of the current row in the result set specified by result_id" + ], + "mssql_fetch_assoc": [ + "array mssql_fetch_assoc(resource result_id)", + "Returns an associative array of the current row in the result set specified by result_id" + ], + "mssql_fetch_batch": [ + "int mssql_fetch_batch(resource result_index)", + "Returns the next batch of records" + ], + "mssql_fetch_field": [ + "object mssql_fetch_field(resource result_id [, int offset])", + "Gets information about certain fields in a query result" + ], + "mssql_fetch_object": [ + "object mssql_fetch_object(resource result_id)", + "Returns a pseudo-object of the current row in the result set specified by result_id" + ], + "mssql_fetch_row": [ + "array mssql_fetch_row(resource result_id)", + "Returns an array of the current row in the result set specified by result_id" + ], + "mssql_field_length": [ + "int mssql_field_length(resource result_id [, int offset])", + "Get the length of a MS-SQL field" + ], + "mssql_field_name": [ + "string mssql_field_name(resource result_id [, int offset])", + "Returns the name of the field given by offset in the result set given by result_id" + ], + "mssql_field_seek": [ + "bool mssql_field_seek(resource result_id, int offset)", + "Seeks to the specified field offset" + ], + "mssql_field_type": [ + "string mssql_field_type(resource result_id [, int offset])", + "Returns the type of a field" + ], + "mssql_free_result": [ + "bool mssql_free_result(resource result_index)", + "Free a MS-SQL result index" + ], + "mssql_free_statement": [ + "bool mssql_free_statement(resource result_index)", + "Free a MS-SQL statement index" + ], + "mssql_get_last_message": [ + "string mssql_get_last_message(void)", + "Gets the last message from the MS-SQL server" + ], + "mssql_guid_string": [ + "string mssql_guid_string(string binary [,bool short_format])", + "Converts a 16 byte binary GUID to a string" + ], + "mssql_init": [ + "int mssql_init(string sp_name [, resource conn_id])", + "Initializes a stored procedure or a remote stored procedure" + ], + "mssql_min_error_severity": [ + "void mssql_min_error_severity(int severity)", + "Sets the lower error severity" + ], + "mssql_min_message_severity": [ + "void mssql_min_message_severity(int severity)", + "Sets the lower message severity" + ], + "mssql_next_result": [ + "bool mssql_next_result(resource result_id)", + "Move the internal result pointer to the next result" + ], + "mssql_num_fields": [ + "int mssql_num_fields(resource mssql_result_index)", + "Returns the number of fields fetched in from the result id specified" + ], + "mssql_num_rows": [ + "int mssql_num_rows(resource mssql_result_index)", + "Returns the number of rows fetched in from the result id specified" + ], + "mssql_pconnect": [ + "int mssql_pconnect([string servername [, string username [, string password [, bool new_link]]]])", + "Establishes a persistent connection to a MS-SQL server" + ], + "mssql_query": [ + "resource mssql_query(string query [, resource conn_id [, int batch_size]])", + "Perform an SQL query on a MS-SQL server database" + ], + "mssql_result": [ + "string mssql_result(resource result_id, int row, mixed field)", + "Returns the contents of one cell from a MS-SQL result set" + ], + "mssql_rows_affected": [ + "int mssql_rows_affected(resource conn_id)", + "Returns the number of records affected by the query" + ], + "mssql_select_db": [ + "bool mssql_select_db(string database_name [, resource conn_id])", + "Select a MS-SQL database" + ], + "mt_getrandmax": [ + "int mt_getrandmax(void)", + "Returns the maximum value a random number from Mersenne Twister can have" + ], + "mt_rand": [ + "int mt_rand([int min, int max])", + "Returns a random number from Mersenne Twister" + ], + "mt_srand": [ + "void mt_srand([int seed])", + "Seeds Mersenne Twister random number generator" + ], + "mysql_affected_rows": [ + "int mysql_affected_rows([int link_identifier])", + "Gets number of affected rows in previous MySQL operation" + ], + "mysql_client_encoding": [ + "string mysql_client_encoding([int link_identifier])", + "Returns the default character set for the current connection" + ], + "mysql_close": [ + "bool mysql_close([int link_identifier])", + "Close a MySQL connection" + ], + "mysql_connect": [ + "resource mysql_connect([string hostname[:port][:/path/to/socket] [, string username [, string password [, bool new [, int flags]]]]])", + "Opens a connection to a MySQL Server" + ], + "mysql_create_db": [ + "bool mysql_create_db(string database_name [, int link_identifier])", + "Create a MySQL database" + ], + "mysql_data_seek": [ + "bool mysql_data_seek(resource result, int row_number)", + "Move internal result pointer" + ], + "mysql_db_query": [ + "resource mysql_db_query(string database_name, string query [, int link_identifier])", + "Sends an SQL query to MySQL" + ], + "mysql_drop_db": [ + "bool mysql_drop_db(string database_name [, int link_identifier])", + "Drops (delete) a MySQL database" + ], + "mysql_errno": [ + "int mysql_errno([int link_identifier])", + "Returns the number of the error message from previous MySQL operation" + ], + "mysql_error": [ + "string mysql_error([int link_identifier])", + "Returns the text of the error message from previous MySQL operation" + ], + "mysql_escape_string": [ + "string mysql_escape_string(string to_be_escaped)", + "Escape string for mysql query" + ], + "mysql_fetch_array": [ + "array mysql_fetch_array(resource result [, int result_type])", + "Fetch a result row as an array (associative, numeric or both)" + ], + "mysql_fetch_assoc": [ + "array mysql_fetch_assoc(resource result)", + "Fetch a result row as an associative array" + ], + "mysql_fetch_field": [ + "object mysql_fetch_field(resource result [, int field_offset])", + "Gets column information from a result and return as an object" + ], + "mysql_fetch_lengths": [ + "array mysql_fetch_lengths(resource result)", + "Gets max data size of each column in a result" + ], + "mysql_fetch_object": [ + "object mysql_fetch_object(resource result [, string class_name [, NULL|array ctor_params]])", + "Fetch a result row as an object" + ], + "mysql_fetch_row": [ + "array mysql_fetch_row(resource result)", + "Gets a result row as an enumerated array" + ], + "mysql_field_flags": [ + "string mysql_field_flags(resource result, int field_offset)", + "Gets the flags associated with the specified field in a result" + ], + "mysql_field_len": [ + "int mysql_field_len(resource result, int field_offset)", + "Returns the length of the specified field" + ], + "mysql_field_name": [ + "string mysql_field_name(resource result, int field_index)", + "Gets the name of the specified field in a result" + ], + "mysql_field_seek": [ + "bool mysql_field_seek(resource result, int field_offset)", + "Sets result pointer to a specific field offset" + ], + "mysql_field_table": [ + "string mysql_field_table(resource result, int field_offset)", + "Gets name of the table the specified field is in" + ], + "mysql_field_type": [ + "string mysql_field_type(resource result, int field_offset)", + "Gets the type of the specified field in a result" + ], + "mysql_free_result": [ + "bool mysql_free_result(resource result)", + "Free result memory" + ], + "mysql_get_client_info": [ + "string mysql_get_client_info(void)", + "Returns a string that represents the client library version" + ], + "mysql_get_host_info": [ + "string mysql_get_host_info([int link_identifier])", + "Returns a string describing the type of connection in use, including the server host name" + ], + "mysql_get_proto_info": [ + "int mysql_get_proto_info([int link_identifier])", + "Returns the protocol version used by current connection" + ], + "mysql_get_server_info": [ + "string mysql_get_server_info([int link_identifier])", + "Returns a string that represents the server version number" + ], + "mysql_info": [ + "string mysql_info([int link_identifier])", + "Returns a string containing information about the most recent query" + ], + "mysql_insert_id": [ + "int mysql_insert_id([int link_identifier])", + "Gets the ID generated from the previous INSERT operation" + ], + "mysql_list_dbs": [ + "resource mysql_list_dbs([int link_identifier])", + "List databases available on a MySQL server" + ], + "mysql_list_fields": [ + "resource mysql_list_fields(string database_name, string table_name [, int link_identifier])", + "List MySQL result fields" + ], + "mysql_list_processes": [ + "resource mysql_list_processes([int link_identifier])", + "Returns a result set describing the current server threads" + ], + "mysql_list_tables": [ + "resource mysql_list_tables(string database_name [, int link_identifier])", + "List tables in a MySQL database" + ], + "mysql_num_fields": [ + "int mysql_num_fields(resource result)", + "Gets number of fields in a result" + ], + "mysql_num_rows": [ + "int mysql_num_rows(resource result)", + "Gets number of rows in a result" + ], + "mysql_pconnect": [ + "resource mysql_pconnect([string hostname[:port][:/path/to/socket] [, string username [, string password [, int flags]]]])", + "Opens a persistent connection to a MySQL Server" + ], + "mysql_ping": [ + "bool mysql_ping([int link_identifier])", + "Ping a server connection. If no connection then reconnect." + ], + "mysql_query": [ + "resource mysql_query(string query [, int link_identifier])", + "Sends an SQL query to MySQL" + ], + "mysql_real_escape_string": [ + "string mysql_real_escape_string(string to_be_escaped [, int link_identifier])", + "Escape special characters in a string for use in a SQL statement, taking into account the current charset of the connection" + ], + "mysql_result": [ + "mixed mysql_result(resource result, int row [, mixed field])", + "Gets result data" + ], + "mysql_select_db": [ + "bool mysql_select_db(string database_name [, int link_identifier])", + "Selects a MySQL database" + ], + "mysql_set_charset": [ + "bool mysql_set_charset(string csname [, int link_identifier])", + "sets client character set" + ], + "mysql_stat": [ + "string mysql_stat([int link_identifier])", + "Returns a string containing status information" + ], + "mysql_thread_id": [ + "int mysql_thread_id([int link_identifier])", + "Returns the thread id of current connection" + ], + "mysql_unbuffered_query": [ + "resource mysql_unbuffered_query(string query [, int link_identifier])", + "Sends an SQL query to MySQL, without fetching and buffering the result rows" + ], + "mysqli_affected_rows": [ + "mixed mysqli_affected_rows(object link)", + "Get number of affected rows in previous MySQL operation" + ], + "mysqli_autocommit": [ + "bool mysqli_autocommit(object link, bool mode)", + "Turn auto commit on or of" + ], + "mysqli_cache_stats": [ + "array mysqli_cache_stats(void)", + "Returns statistics about the zval cache" + ], + "mysqli_change_user": [ + "bool mysqli_change_user(object link, string user, string password, string database)", + "Change logged-in user of the active connection" + ], + "mysqli_character_set_name": [ + "string mysqli_character_set_name(object link)", + "Returns the name of the character set used for this connection" + ], + "mysqli_close": [ + "bool mysqli_close(object link)", + "Close connection" + ], + "mysqli_commit": [ + "bool mysqli_commit(object link)", + "Commit outstanding actions and close transaction" + ], + "mysqli_connect": [ + "object mysqli_connect([string hostname [,string username [,string passwd [,string dbname [,int port [,string socket]]]]]])", + "Open a connection to a mysql server" + ], + "mysqli_connect_errno": [ + "int mysqli_connect_errno(void)", + "Returns the numerical value of the error message from last connect command" + ], + "mysqli_connect_error": [ + "string mysqli_connect_error(void)", + "Returns the text of the error message from previous MySQL operation" + ], + "mysqli_data_seek": [ + "bool mysqli_data_seek(object result, int offset)", + "Move internal result pointer" + ], + "mysqli_debug": [ + "void mysqli_debug(string debug)", + "" + ], + "mysqli_dump_debug_info": [ + "bool mysqli_dump_debug_info(object link)", + "" + ], + "mysqli_embedded_server_end": [ + "void mysqli_embedded_server_end(void)", + "" + ], + "mysqli_embedded_server_start": [ + "bool mysqli_embedded_server_start(bool start, array arguments, array groups)", + "initialize and start embedded server" + ], + "mysqli_errno": [ + "int mysqli_errno(object link)", + "Returns the numerical value of the error message from previous MySQL operation" + ], + "mysqli_error": [ + "string mysqli_error(object link)", + "Returns the text of the error message from previous MySQL operation" + ], + "mysqli_fetch_all": [ + "mixed mysqli_fetch_all (object result [,int resulttype])", + "Fetches all result rows as an associative array, a numeric array, or both" + ], + "mysqli_fetch_array": [ + "mixed mysqli_fetch_array (object result [,int resulttype])", + "Fetch a result row as an associative array, a numeric array, or both" + ], + "mysqli_fetch_assoc": [ + "mixed mysqli_fetch_assoc (object result)", + "Fetch a result row as an associative array" + ], + "mysqli_fetch_field": [ + "mixed mysqli_fetch_field (object result)", + "Get column information from a result and return as an object" + ], + "mysqli_fetch_field_direct": [ + "mixed mysqli_fetch_field_direct (object result, int offset)", + "Fetch meta-data for a single field" + ], + "mysqli_fetch_fields": [ + "mixed mysqli_fetch_fields (object result)", + "Return array of objects containing field meta-data" + ], + "mysqli_fetch_lengths": [ + "mixed mysqli_fetch_lengths (object result)", + "Get the length of each output in a result" + ], + "mysqli_fetch_object": [ + "mixed mysqli_fetch_object (object result [, string class_name [, NULL|array ctor_params]])", + "Fetch a result row as an object" + ], + "mysqli_fetch_row": [ + "array mysqli_fetch_row (object result)", + "Get a result row as an enumerated array" + ], + "mysqli_field_count": [ + "int mysqli_field_count(object link)", + "Fetch the number of fields returned by the last query for the given link" + ], + "mysqli_field_seek": [ + "int mysqli_field_seek(object result, int fieldnr)", + "Set result pointer to a specified field offset" + ], + "mysqli_field_tell": [ + "int mysqli_field_tell(object result)", + "Get current field offset of result pointer" + ], + "mysqli_free_result": [ + "void mysqli_free_result(object result)", + "Free query result memory for the given result handle" + ], + "mysqli_get_charset": [ + "object mysqli_get_charset(object link)", + "returns a character set object" + ], + "mysqli_get_client_info": [ + "string mysqli_get_client_info(void)", + "Get MySQL client info" + ], + "mysqli_get_client_stats": [ + "array mysqli_get_client_stats(void)", + "Returns statistics about the zval cache" + ], + "mysqli_get_client_version": [ + "int mysqli_get_client_version(void)", + "Get MySQL client info" + ], + "mysqli_get_connection_stats": [ + "array mysqli_get_connection_stats(void)", + "Returns statistics about the zval cache" + ], + "mysqli_get_host_info": [ + "string mysqli_get_host_info (object link)", + "Get MySQL host info" + ], + "mysqli_get_proto_info": [ + "int mysqli_get_proto_info(object link)", + "Get MySQL protocol information" + ], + "mysqli_get_server_info": [ + "string mysqli_get_server_info(object link)", + "Get MySQL server info" + ], + "mysqli_get_server_version": [ + "int mysqli_get_server_version(object link)", + "Return the MySQL version for the server referenced by the given link" + ], + "mysqli_get_warnings": [ + "object mysqli_get_warnings(object link) */", + "PHP_FUNCTION(mysqli_get_warnings) { MY_MYSQL *mysql; zval *mysql_link; MYSQLI_RESOURCE *mysqli_resource; MYSQLI_WARNING *w; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"O\", &mysql_link, mysqli_link_class_entry) == FAILURE) { return; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, \"mysqli_link\", MYSQLI_STATUS_VALID); if (mysql_warning_count(mysql->mysql)) { w = php_get_warnings(mysql->mysql TSRMLS_CC); } else { RETURN_FALSE; } mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); mysqli_resource->ptr = mysqli_resource->info = (void *)w; mysqli_resource->status = MYSQLI_STATUS_VALID; MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_warning_class_entry); } /* }}}" + ], + "mysqli_info": [ + "string mysqli_info(object link)", + "Get information about the most recent query" + ], + "mysqli_init": [ + "resource mysqli_init(void)", + "Initialize mysqli and return a resource for use with mysql_real_connect" + ], + "mysqli_insert_id": [ + "mixed mysqli_insert_id(object link)", + "Get the ID generated from the previous INSERT operation" + ], + "mysqli_kill": [ + "bool mysqli_kill(object link, int processid)", + "Kill a mysql process on the server" + ], + "mysqli_link_construct": [ + "object mysqli_link_construct()", + "" + ], + "mysqli_more_results": [ + "bool mysqli_more_results(object link)", + "check if there any more query results from a multi query" + ], + "mysqli_multi_query": [ + "bool mysqli_multi_query(object link, string query)", + "allows to execute multiple queries" + ], + "mysqli_next_result": [ + "bool mysqli_next_result(object link)", + "read next result from multi_query" + ], + "mysqli_num_fields": [ + "int mysqli_num_fields(object result)", + "Get number of fields in result" + ], + "mysqli_num_rows": [ + "mixed mysqli_num_rows(object result)", + "Get number of rows in result" + ], + "mysqli_options": [ + "bool mysqli_options(object link, int flags, mixed values)", + "Set options" + ], + "mysqli_ping": [ + "bool mysqli_ping(object link)", + "Ping a server connection or reconnect if there is no connection" + ], + "mysqli_poll": [ + "int mysqli_poll(array read, array write, array error, long sec [, long usec])", + "Poll connections" + ], + "mysqli_prepare": [ + "mixed mysqli_prepare(object link, string query)", + "Prepare a SQL statement for execution" + ], + "mysqli_query": [ + "mixed mysqli_query(object link, string query [,int resultmode]) */", + "PHP_FUNCTION(mysqli_query) { MY_MYSQL *mysql; zval *mysql_link; MYSQLI_RESOURCE *mysqli_resource; MYSQL_RES *result; char *query = NULL; unsigned int query_len; unsigned long resultmode = MYSQLI_STORE_RESULT; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"Os|l\", &mysql_link, mysqli_link_class_entry, &query, &query_len, &resultmode) == FAILURE) { return; } if (!query_len) { php_error_docref(NULL TSRMLS_CC, E_WARNING, \"Empty query\"); RETURN_FALSE; } if ((resultmode & ~MYSQLI_ASYNC) != MYSQLI_USE_RESULT && (resultmode & ~MYSQLI_ASYNC) != MYSQLI_STORE_RESULT) { php_error_docref(NULL TSRMLS_CC, E_WARNING, \"Invalid value for resultmode\"); RETURN_FALSE; } MYSQLI_FETCH_RESOURCE(mysql, MY_MYSQL*, &mysql_link, \"mysqli_link\", MYSQLI_STATUS_VALID); MYSQLI_DISABLE_MQ; #ifdef MYSQLI_USE_MYSQLND if (resultmode & MYSQLI_ASYNC) { if (mysqli_async_query(mysql->mysql, query, query_len)) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); RETURN_FALSE; } mysql->async_result_fetch_type = resultmode & ~MYSQLI_ASYNC; RETURN_TRUE; } #endif if (mysql_real_query(mysql->mysql, query, query_len)) { MYSQLI_REPORT_MYSQL_ERROR(mysql->mysql); RETURN_FALSE; } if (!mysql_field_count(mysql->mysql)) { /* no result set - not a SELECT" + ], + "mysqli_real_connect": [ + "bool mysqli_real_connect(object link [,string hostname [,string username [,string passwd [,string dbname [,int port [,string socket [,int flags]]]]]]])", + "Open a connection to a mysql server" + ], + "mysqli_real_escape_string": [ + "string mysqli_real_escape_string(object link, string escapestr)", + "Escapes special characters in a string for use in a SQL statement, taking into account the current charset of the connection" + ], + "mysqli_real_query": [ + "bool mysqli_real_query(object link, string query)", + "Binary-safe version of mysql_query()" + ], + "mysqli_reap_async_query": [ + "int mysqli_reap_async_query(object link)", + "Poll connections" + ], + "mysqli_refresh": [ + "bool mysqli_refresh(object link, long options)", + "Flush tables or caches, or reset replication server information" + ], + "mysqli_report": [ + "bool mysqli_report(int flags)", + "sets report level" + ], + "mysqli_rollback": [ + "bool mysqli_rollback(object link)", + "Undo actions from current transaction" + ], + "mysqli_select_db": [ + "bool mysqli_select_db(object link, string dbname)", + "Select a MySQL database" + ], + "mysqli_set_charset": [ + "bool mysqli_set_charset(object link, string csname)", + "sets client character set" + ], + "mysqli_set_local_infile_default": [ + "void mysqli_set_local_infile_default(object link)", + "unsets user defined handler for load local infile command" + ], + "mysqli_set_local_infile_handler": [ + "bool mysqli_set_local_infile_handler(object link, callback read_func)", + "Set callback functions for LOAD DATA LOCAL INFILE" + ], + "mysqli_sqlstate": [ + "string mysqli_sqlstate(object link)", + "Returns the SQLSTATE error from previous MySQL operation" + ], + "mysqli_ssl_set": [ + "bool mysqli_ssl_set(object link ,string key ,string cert ,string ca ,string capath ,string cipher])", + "" + ], + "mysqli_stat": [ + "mixed mysqli_stat(object link)", + "Get current system status" + ], + "mysqli_stmt_affected_rows": [ + "mixed mysqli_stmt_affected_rows(object stmt)", + "Return the number of rows affected in the last query for the given link" + ], + "mysqli_stmt_attr_get": [ + "int mysqli_stmt_attr_get(object stmt, long attr)", + "" + ], + "mysqli_stmt_attr_set": [ + "int mysqli_stmt_attr_set(object stmt, long attr, long mode)", + "" + ], + "mysqli_stmt_bind_param": [ + "bool mysqli_stmt_bind_param(object stmt, string types, mixed variable [,mixed,....])", + "Bind variables to a prepared statement as parameters" + ], + "mysqli_stmt_bind_result": [ + "bool mysqli_stmt_bind_result(object stmt, mixed var, [,mixed, ...])", + "Bind variables to a prepared statement for result storage" + ], + "mysqli_stmt_close": [ + "bool mysqli_stmt_close(object stmt)", + "Close statement" + ], + "mysqli_stmt_data_seek": [ + "void mysqli_stmt_data_seek(object stmt, int offset)", + "Move internal result pointer" + ], + "mysqli_stmt_errno": [ + "int mysqli_stmt_errno(object stmt)", + "" + ], + "mysqli_stmt_error": [ + "string mysqli_stmt_error(object stmt)", + "" + ], + "mysqli_stmt_execute": [ + "bool mysqli_stmt_execute(object stmt)", + "Execute a prepared statement" + ], + "mysqli_stmt_fetch": [ + "mixed mysqli_stmt_fetch(object stmt)", + "Fetch results from a prepared statement into the bound variables" + ], + "mysqli_stmt_field_count": [ + "int mysqli_stmt_field_count(object stmt) {", + "Return the number of result columns for the given statement" + ], + "mysqli_stmt_free_result": [ + "void mysqli_stmt_free_result(object stmt)", + "Free stored result memory for the given statement handle" + ], + "mysqli_stmt_get_result": [ + "object mysqli_stmt_get_result(object link)", + "Buffer result set on client" + ], + "mysqli_stmt_get_warnings": [ + "object mysqli_stmt_get_warnings(object link) */", + "PHP_FUNCTION(mysqli_stmt_get_warnings) { MY_STMT *stmt; zval *stmt_link; MYSQLI_RESOURCE *mysqli_resource; MYSQLI_WARNING *w; if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), \"O\", &stmt_link, mysqli_stmt_class_entry) == FAILURE) { return; } MYSQLI_FETCH_RESOURCE(stmt, MY_STMT*, &stmt_link, \"mysqli_stmt\", MYSQLI_STATUS_VALID); if (mysqli_stmt_warning_count(stmt->stmt)) { w = php_get_warnings(mysqli_stmt_get_connection(stmt->stmt) TSRMLS_CC); } else { RETURN_FALSE; } mysqli_resource = (MYSQLI_RESOURCE *)ecalloc (1, sizeof(MYSQLI_RESOURCE)); mysqli_resource->ptr = mysqli_resource->info = (void *)w; mysqli_resource->status = MYSQLI_STATUS_VALID; MYSQLI_RETURN_RESOURCE(mysqli_resource, mysqli_warning_class_entry); } /* }}}" + ], + "mysqli_stmt_init": [ + "mixed mysqli_stmt_init(object link)", + "Initialize statement object" + ], + "mysqli_stmt_insert_id": [ + "mixed mysqli_stmt_insert_id(object stmt)", + "Get the ID generated from the previous INSERT operation" + ], + "mysqli_stmt_next_result": [ + "bool mysqli_stmt_next_result(object link)", + "read next result from multi_query" + ], + "mysqli_stmt_num_rows": [ + "mixed mysqli_stmt_num_rows(object stmt)", + "Return the number of rows in statements result set" + ], + "mysqli_stmt_param_count": [ + "int mysqli_stmt_param_count(object stmt)", + "Return the number of parameter for the given statement" + ], + "mysqli_stmt_prepare": [ + "bool mysqli_stmt_prepare(object stmt, string query)", + "prepare server side statement with query" + ], + "mysqli_stmt_reset": [ + "bool mysqli_stmt_reset(object stmt)", + "reset a prepared statement" + ], + "mysqli_stmt_result_metadata": [ + "mixed mysqli_stmt_result_metadata(object stmt)", + "return result set from statement" + ], + "mysqli_stmt_send_long_data": [ + "bool mysqli_stmt_send_long_data(object stmt, int param_nr, string data)", + "" + ], + "mysqli_stmt_sqlstate": [ + "string mysqli_stmt_sqlstate(object stmt)", + "" + ], + "mysqli_stmt_store_result": [ + "bool mysqli_stmt_store_result(stmt)", + "" + ], + "mysqli_store_result": [ + "object mysqli_store_result(object link)", + "Buffer result set on client" + ], + "mysqli_thread_id": [ + "int mysqli_thread_id(object link)", + "Return the current thread ID" + ], + "mysqli_thread_safe": [ + "bool mysqli_thread_safe(void)", + "Return whether thread safety is given or not" + ], + "mysqli_use_result": [ + "mixed mysqli_use_result(object link)", + "Directly retrieve query results - do not buffer results on client side" + ], + "mysqli_warning_count": [ + "int mysqli_warning_count (object link)", + "Return number of warnings from the last query for the given link" + ], + "natcasesort": [ + "void natcasesort(array &array_arg)", + "Sort an array using case-insensitive natural sort" + ], + "natsort": [ + "void natsort(array &array_arg)", + "Sort an array using natural sort" + ], + "next": [ + "mixed next(array array_arg)", + "Move array argument's internal pointer to the next element and return it" + ], + "ngettext": [ + "string ngettext(string MSGID1, string MSGID2, int N)", + "Plural version of gettext()" + ], + "nl2br": [ + "string nl2br(string str [, bool is_xhtml])", + "Converts newlines to HTML line breaks" + ], + "nl_langinfo": [ + "string nl_langinfo(int item)", + "Query language and locale information" + ], + "normalizer_is_normalize": [ + "bool normalizer_is_normalize( string $input [, string $form = FORM_C] )", + "* Test if a string is in a given normalization form." + ], + "normalizer_normalize": [ + "string normalizer_normalize( string $input [, string $form = FORM_C] )", + "* Normalize a string." + ], + "nsapi_request_headers": [ + "array nsapi_request_headers(void)", + "Get all headers from the request" + ], + "nsapi_response_headers": [ + "array nsapi_response_headers(void)", + "Get all headers from the response" + ], + "nsapi_virtual": [ + "bool nsapi_virtual(string uri)", + "Perform an NSAPI sub-request" + ], + "number_format": [ + "string number_format(float number [, int num_decimal_places [, string dec_seperator, string thousands_seperator]])", + "Formats a number with grouped thousands" + ], + "numfmt_create": [ + "NumberFormatter numfmt_create( string $locale, int style[, string $pattern ] )", + "* Create number formatter." + ], + "numfmt_format": [ + "mixed numfmt_format( NumberFormatter $nf, mixed $num[, int type] )", + "* Format a number." + ], + "numfmt_format_currency": [ + "mixed numfmt_format_currency( NumberFormatter $nf, double $num, string $currency )", + "* Format a number as currency." + ], + "numfmt_get_attribute": [ + "mixed numfmt_get_attribute( NumberFormatter $nf, int $attr )", + "* Get formatter attribute value." + ], + "numfmt_get_error_code": [ + "int numfmt_get_error_code( NumberFormatter $nf )", + "* Get formatter's last error code." + ], + "numfmt_get_error_message": [ + "string numfmt_get_error_message( NumberFormatter $nf )", + "* Get text description for formatter's last error code." + ], + "numfmt_get_locale": [ + "string numfmt_get_locale( NumberFormatter $nf[, int type] )", + "* Get formatter locale." + ], + "numfmt_get_pattern": [ + "string numfmt_get_pattern( NumberFormatter $nf )", + "* Get formatter pattern." + ], + "numfmt_get_symbol": [ + "string numfmt_get_symbol( NumberFormatter $nf, int $attr )", + "* Get formatter symbol value." + ], + "numfmt_get_text_attribute": [ + "string numfmt_get_text_attribute( NumberFormatter $nf, int $attr )", + "* Get formatter attribute value." + ], + "numfmt_parse": [ + "mixed numfmt_parse( NumberFormatter $nf, string $str[, int $type, int &$position ])", + "* Parse a number." + ], + "numfmt_parse_currency": [ + "double numfmt_parse_currency( NumberFormatter $nf, string $str, string $¤cy[, int $&position] )", + "* Parse a number as currency." + ], + "numfmt_parse_message": [ + "array numfmt_parse_message( string $locale, string $pattern, string $source )", + "* Parse a message." + ], + "numfmt_set_attribute": [ + "bool numfmt_set_attribute( NumberFormatter $nf, int $attr, mixed $value )", + "* Get formatter attribute value." + ], + "numfmt_set_pattern": [ + "bool numfmt_set_pattern( NumberFormatter $nf, string $pattern )", + "* Set formatter pattern." + ], + "numfmt_set_symbol": [ + "bool numfmt_set_symbol( NumberFormatter $nf, int $attr, string $symbol )", + "* Set formatter symbol value." + ], + "numfmt_set_text_attribute": [ + "bool numfmt_set_text_attribute( NumberFormatter $nf, int $attr, string $value )", + "* Get formatter attribute value." + ], + "ob_clean": [ + "bool ob_clean(void)", + "Clean (delete) the current output buffer" + ], + "ob_end_clean": [ + "bool ob_end_clean(void)", + "Clean the output buffer, and delete current output buffer" + ], + "ob_end_flush": [ + "bool ob_end_flush(void)", + "Flush (send) the output buffer, and delete current output buffer" + ], + "ob_flush": [ + "bool ob_flush(void)", + "Flush (send) contents of the output buffer. The last buffer content is sent to next buffer" + ], + "ob_get_clean": [ + "bool ob_get_clean(void)", + "Get current buffer contents and delete current output buffer" + ], + "ob_get_contents": [ + "string ob_get_contents(void)", + "Return the contents of the output buffer" + ], + "ob_get_flush": [ + "bool ob_get_flush(void)", + "Get current buffer contents, flush (send) the output buffer, and delete current output buffer" + ], + "ob_get_length": [ + "int ob_get_length(void)", + "Return the length of the output buffer" + ], + "ob_get_level": [ + "int ob_get_level(void)", + "Return the nesting level of the output buffer" + ], + "ob_get_status": [ + "false|array ob_get_status([bool full_status])", + "Return the status of the active or all output buffers" + ], + "ob_gzhandler": [ + "string ob_gzhandler(string str, int mode)", + "Encode str based on accept-encoding setting - designed to be called from ob_start()" + ], + "ob_iconv_handler": [ + "string ob_iconv_handler(string contents, int status)", + "Returns str in output buffer converted to the iconv.output_encoding character set" + ], + "ob_implicit_flush": [ + "void ob_implicit_flush([int flag])", + "Turn implicit flush on/off and is equivalent to calling flush() after every output call" + ], + "ob_list_handlers": [ + "false|array ob_list_handlers()", + "* List all output_buffers in an array" + ], + "ob_start": [ + "bool ob_start([ string|array user_function [, int chunk_size [, bool erase]]])", + "Turn on Output Buffering (specifying an optional output handler)." + ], + "oci_bind_array_by_name": [ + "bool oci_bind_array_by_name(resource stmt, string name, array &var, int max_table_length [, int max_item_length [, int type ]])", + "Bind a PHP array to an Oracle PL/SQL type by name" + ], + "oci_bind_by_name": [ + "bool oci_bind_by_name(resource stmt, string name, mixed &var, [, int maxlength [, int type]])", + "Bind a PHP variable to an Oracle placeholder by name" + ], + "oci_cancel": [ + "bool oci_cancel(resource stmt)", + "Cancel reading from a cursor" + ], + "oci_close": [ + "bool oci_close(resource connection)", + "Disconnect from database" + ], + "oci_collection_append": [ + "bool oci_collection_append(string value)", + "Append an object to the collection" + ], + "oci_collection_assign": [ + "bool oci_collection_assign(object from)", + "Assign a collection from another existing collection" + ], + "oci_collection_element_assign": [ + "bool oci_collection_element_assign(int index, string val)", + "Assign element val to collection at index ndx" + ], + "oci_collection_element_get": [ + "string oci_collection_element_get(int ndx)", + "Retrieve the value at collection index ndx" + ], + "oci_collection_max": [ + "int oci_collection_max()", + "Return the max value of a collection. For a varray this is the maximum length of the array" + ], + "oci_collection_size": [ + "int oci_collection_size()", + "Return the size of a collection" + ], + "oci_collection_trim": [ + "bool oci_collection_trim(int num)", + "Trim num elements from the end of a collection" + ], + "oci_commit": [ + "bool oci_commit(resource connection)", + "Commit the current context" + ], + "oci_connect": [ + "resource oci_connect(string user, string pass [, string db [, string charset [, int session_mode ]])", + "Connect to an Oracle database and log on. Returns a new session." + ], + "oci_define_by_name": [ + "bool oci_define_by_name(resource stmt, string name, mixed &var [, int type])", + "Define a PHP variable to an Oracle column by name" + ], + "oci_error": [ + "array oci_error([resource stmt|connection|global])", + "Return the last error of stmt|connection|global. If no error happened returns false." + ], + "oci_execute": [ + "bool oci_execute(resource stmt [, int mode])", + "Execute a parsed statement" + ], + "oci_fetch": [ + "bool oci_fetch(resource stmt)", + "Prepare a new row of data for reading" + ], + "oci_fetch_all": [ + "int oci_fetch_all(resource stmt, array &output[, int skip[, int maxrows[, int flags]]])", + "Fetch all rows of result data into an array" + ], + "oci_fetch_array": [ + "array oci_fetch_array( resource stmt [, int mode ])", + "Fetch a result row as an array" + ], + "oci_fetch_assoc": [ + "array oci_fetch_assoc( resource stmt )", + "Fetch a result row as an associative array" + ], + "oci_fetch_object": [ + "object oci_fetch_object( resource stmt )", + "Fetch a result row as an object" + ], + "oci_fetch_row": [ + "array oci_fetch_row( resource stmt )", + "Fetch a result row as an enumerated array" + ], + "oci_field_is_null": [ + "bool oci_field_is_null(resource stmt, int col)", + "Tell whether a column is NULL" + ], + "oci_field_name": [ + "string oci_field_name(resource stmt, int col)", + "Tell the name of a column" + ], + "oci_field_precision": [ + "int oci_field_precision(resource stmt, int col)", + "Tell the precision of a column" + ], + "oci_field_scale": [ + "int oci_field_scale(resource stmt, int col)", + "Tell the scale of a column" + ], + "oci_field_size": [ + "int oci_field_size(resource stmt, int col)", + "Tell the maximum data size of a column" + ], + "oci_field_type": [ + "mixed oci_field_type(resource stmt, int col)", + "Tell the data type of a column" + ], + "oci_field_type_raw": [ + "int oci_field_type_raw(resource stmt, int col)", + "Tell the raw oracle data type of a column" + ], + "oci_free_collection": [ + "bool oci_free_collection()", + "Deletes collection object" + ], + "oci_free_descriptor": [ + "bool oci_free_descriptor()", + "Deletes large object description" + ], + "oci_free_statement": [ + "bool oci_free_statement(resource stmt)", + "Free all resources associated with a statement" + ], + "oci_internal_debug": [ + "void oci_internal_debug(int onoff)", + "Toggle internal debugging output for the OCI extension" + ], + "oci_lob_append": [ + "bool oci_lob_append( object lob )", + "Appends data from a LOB to another LOB" + ], + "oci_lob_close": [ + "bool oci_lob_close()", + "Closes lob descriptor" + ], + "oci_lob_copy": [ + "bool oci_lob_copy( object lob_to, object lob_from [, int length ] )", + "Copies data from a LOB to another LOB" + ], + "oci_lob_eof": [ + "bool oci_lob_eof()", + "Checks if EOF is reached" + ], + "oci_lob_erase": [ + "int oci_lob_erase( [ int offset [, int length ] ] )", + "Erases a specified portion of the internal LOB, starting at a specified offset" + ], + "oci_lob_export": [ + "bool oci_lob_export([string filename [, int start [, int length]]])", + "Writes a large object into a file" + ], + "oci_lob_flush": [ + "bool oci_lob_flush( [ int flag ] )", + "Flushes the LOB buffer" + ], + "oci_lob_import": [ + "bool oci_lob_import( string filename )", + "Loads file into a LOB" + ], + "oci_lob_is_equal": [ + "bool oci_lob_is_equal( object lob1, object lob2 )", + "Tests to see if two LOB/FILE locators are equal" + ], + "oci_lob_load": [ + "string oci_lob_load()", + "Loads a large object" + ], + "oci_lob_read": [ + "string oci_lob_read( int length )", + "Reads particular part of a large object" + ], + "oci_lob_rewind": [ + "bool oci_lob_rewind()", + "Rewind pointer of a LOB" + ], + "oci_lob_save": [ + "bool oci_lob_save( string data [, int offset ])", + "Saves a large object" + ], + "oci_lob_seek": [ + "bool oci_lob_seek( int offset [, int whence ])", + "Moves the pointer of a LOB" + ], + "oci_lob_size": [ + "int oci_lob_size()", + "Returns size of a large object" + ], + "oci_lob_tell": [ + "int oci_lob_tell()", + "Tells LOB pointer position" + ], + "oci_lob_truncate": [ + "bool oci_lob_truncate( [ int length ])", + "Truncates a LOB" + ], + "oci_lob_write": [ + "int oci_lob_write( string string [, int length ])", + "Writes data to current position of a LOB" + ], + "oci_lob_write_temporary": [ + "bool oci_lob_write_temporary(string var [, int lob_type])", + "Writes temporary blob" + ], + "oci_new_collection": [ + "object oci_new_collection(resource connection, string tdo [, string schema])", + "Initialize a new collection" + ], + "oci_new_connect": [ + "resource oci_new_connect(string user, string pass [, string db])", + "Connect to an Oracle database and log on. Returns a new session." + ], + "oci_new_cursor": [ + "resource oci_new_cursor(resource connection)", + "Return a new cursor (Statement-Handle) - use this to bind ref-cursors!" + ], + "oci_new_descriptor": [ + "object oci_new_descriptor(resource connection [, int type])", + "Initialize a new empty descriptor LOB/FILE (LOB is default)" + ], + "oci_num_fields": [ + "int oci_num_fields(resource stmt)", + "Return the number of result columns in a statement" + ], + "oci_num_rows": [ + "int oci_num_rows(resource stmt)", + "Return the row count of an OCI statement" + ], + "oci_parse": [ + "resource oci_parse(resource connection, string query)", + "Parse a query and return a statement" + ], + "oci_password_change": [ + "bool oci_password_change(resource connection, string username, string old_password, string new_password)", + "Changes the password of an account" + ], + "oci_pconnect": [ + "resource oci_pconnect(string user, string pass [, string db [, string charset ]])", + "Connect to an Oracle database using a persistent connection and log on. Returns a new session." + ], + "oci_result": [ + "string oci_result(resource stmt, mixed column)", + "Return a single column of result data" + ], + "oci_rollback": [ + "bool oci_rollback(resource connection)", + "Rollback the current context" + ], + "oci_server_version": [ + "string oci_server_version(resource connection)", + "Return a string containing server version information" + ], + "oci_set_action": [ + "bool oci_set_action(resource connection, string value)", + "Sets the action attribute on the connection" + ], + "oci_set_client_identifier": [ + "bool oci_set_client_identifier(resource connection, string value)", + "Sets the client identifier attribute on the connection" + ], + "oci_set_client_info": [ + "bool oci_set_client_info(resource connection, string value)", + "Sets the client info attribute on the connection" + ], + "oci_set_edition": [ + "bool oci_set_edition(string value)", + "Sets the edition attribute for all subsequent connections created" + ], + "oci_set_module_name": [ + "bool oci_set_module_name(resource connection, string value)", + "Sets the module attribute on the connection" + ], + "oci_set_prefetch": [ + "bool oci_set_prefetch(resource stmt, int prefetch_rows)", + "Sets the number of rows to be prefetched on execute to prefetch_rows for stmt" + ], + "oci_statement_type": [ + "string oci_statement_type(resource stmt)", + "Return the query type of an OCI statement" + ], + "ocifetchinto": [ + "int ocifetchinto(resource stmt, array &output [, int mode])", + "Fetch a row of result data into an array" + ], + "ocigetbufferinglob": [ + "bool ocigetbufferinglob()", + "Returns current state of buffering for a LOB" + ], + "ocisetbufferinglob": [ + "bool ocisetbufferinglob( boolean flag )", + "Enables/disables buffering for a LOB" + ], + "octdec": [ + "int octdec(string octal_number)", + "Returns the decimal equivalent of an octal string" + ], + "odbc_autocommit": [ + "mixed odbc_autocommit(resource connection_id [, int OnOff])", + "Toggle autocommit mode or get status" + ], + "odbc_binmode": [ + "bool odbc_binmode(int result_id, int mode)", + "Handle binary column data" + ], + "odbc_close": [ + "void odbc_close(resource connection_id)", + "Close an ODBC connection" + ], + "odbc_close_all": [ + "void odbc_close_all(void)", + "Close all ODBC connections" + ], + "odbc_columnprivileges": [ + "resource odbc_columnprivileges(resource connection_id, string catalog, string schema, string table, string column)", + "Returns a result identifier that can be used to fetch a list of columns and associated privileges for the specified table" + ], + "odbc_columns": [ + "resource odbc_columns(resource connection_id [, string qualifier [, string owner [, string table_name [, string column_name]]]])", + "Returns a result identifier that can be used to fetch a list of column names in specified tables" + ], + "odbc_commit": [ + "bool odbc_commit(resource connection_id)", + "Commit an ODBC transaction" + ], + "odbc_connect": [ + "resource odbc_connect(string DSN, string user, string password [, int cursor_option])", + "Connect to a datasource" + ], + "odbc_cursor": [ + "string odbc_cursor(resource result_id)", + "Get cursor name" + ], + "odbc_data_source": [ + "array odbc_data_source(resource connection_id, int fetch_type)", + "Return information about the currently connected data source" + ], + "odbc_error": [ + "string odbc_error([resource connection_id])", + "Get the last error code" + ], + "odbc_errormsg": [ + "string odbc_errormsg([resource connection_id])", + "Get the last error message" + ], + "odbc_exec": [ + "resource odbc_exec(resource connection_id, string query [, int flags])", + "Prepare and execute an SQL statement" + ], + "odbc_execute": [ + "bool odbc_execute(resource result_id [, array parameters_array])", + "Execute a prepared statement" + ], + "odbc_fetch_array": [ + "array odbc_fetch_array(int result [, int rownumber])", + "Fetch a result row as an associative array" + ], + "odbc_fetch_into": [ + "int odbc_fetch_into(resource result_id, array &result_array, [, int rownumber])", + "Fetch one result row into an array" + ], + "odbc_fetch_object": [ + "object odbc_fetch_object(int result [, int rownumber])", + "Fetch a result row as an object" + ], + "odbc_fetch_row": [ + "bool odbc_fetch_row(resource result_id [, int row_number])", + "Fetch a row" + ], + "odbc_field_len": [ + "int odbc_field_len(resource result_id, int field_number)", + "Get the length (precision) of a column" + ], + "odbc_field_name": [ + "string odbc_field_name(resource result_id, int field_number)", + "Get a column name" + ], + "odbc_field_num": [ + "int odbc_field_num(resource result_id, string field_name)", + "Return column number" + ], + "odbc_field_scale": [ + "int odbc_field_scale(resource result_id, int field_number)", + "Get the scale of a column" + ], + "odbc_field_type": [ + "string odbc_field_type(resource result_id, int field_number)", + "Get the datatype of a column" + ], + "odbc_foreignkeys": [ + "resource odbc_foreignkeys(resource connection_id, string pk_qualifier, string pk_owner, string pk_table, string fk_qualifier, string fk_owner, string fk_table)", + "Returns a result identifier to either a list of foreign keys in the specified table or a list of foreign keys in other tables that refer to the primary key in the specified table" + ], + "odbc_free_result": [ + "bool odbc_free_result(resource result_id)", + "Free resources associated with a result" + ], + "odbc_gettypeinfo": [ + "resource odbc_gettypeinfo(resource connection_id [, int data_type])", + "Returns a result identifier containing information about data types supported by the data source" + ], + "odbc_longreadlen": [ + "bool odbc_longreadlen(int result_id, int length)", + "Handle LONG columns" + ], + "odbc_next_result": [ + "bool odbc_next_result(resource result_id)", + "Checks if multiple results are avaiable" + ], + "odbc_num_fields": [ + "int odbc_num_fields(resource result_id)", + "Get number of columns in a result" + ], + "odbc_num_rows": [ + "int odbc_num_rows(resource result_id)", + "Get number of rows in a result" + ], + "odbc_pconnect": [ + "resource odbc_pconnect(string DSN, string user, string password [, int cursor_option])", + "Establish a persistent connection to a datasource" + ], + "odbc_prepare": [ + "resource odbc_prepare(resource connection_id, string query)", + "Prepares a statement for execution" + ], + "odbc_primarykeys": [ + "resource odbc_primarykeys(resource connection_id, string qualifier, string owner, string table)", + "Returns a result identifier listing the column names that comprise the primary key for a table" + ], + "odbc_procedurecolumns": [ + "resource odbc_procedurecolumns(resource connection_id [, string qualifier, string owner, string proc, string column])", + "Returns a result identifier containing the list of input and output parameters, as well as the columns that make up the result set for the specified procedures" + ], + "odbc_procedures": [ + "resource odbc_procedures(resource connection_id [, string qualifier, string owner, string name])", + "Returns a result identifier containg the list of procedure names in a datasource" + ], + "odbc_result": [ + "mixed odbc_result(resource result_id, mixed field)", + "Get result data" + ], + "odbc_result_all": [ + "int odbc_result_all(resource result_id [, string format])", + "Print result as HTML table" + ], + "odbc_rollback": [ + "bool odbc_rollback(resource connection_id)", + "Rollback a transaction" + ], + "odbc_setoption": [ + "bool odbc_setoption(resource conn_id|result_id, int which, int option, int value)", + "Sets connection or statement options" + ], + "odbc_specialcolumns": [ + "resource odbc_specialcolumns(resource connection_id, int type, string qualifier, string owner, string table, int scope, int nullable)", + "Returns a result identifier containing either the optimal set of columns that uniquely identifies a row in the table or columns that are automatically updated when any value in the row is updated by a transaction" + ], + "odbc_statistics": [ + "resource odbc_statistics(resource connection_id, string qualifier, string owner, string name, int unique, int accuracy)", + "Returns a result identifier that contains statistics about a single table and the indexes associated with the table" + ], + "odbc_tableprivileges": [ + "resource odbc_tableprivileges(resource connection_id, string qualifier, string owner, string name)", + "Returns a result identifier containing a list of tables and the privileges associated with each table" + ], + "odbc_tables": [ + "resource odbc_tables(resource connection_id [, string qualifier [, string owner [, string name [, string table_types]]]])", + "Call the SQLTables function" + ], + "opendir": [ + "mixed opendir(string path[, resource context])", + "Open a directory and return a dir_handle" + ], + "openlog": [ + "bool openlog(string ident, int option, int facility)", + "Open connection to system logger" + ], + "openssl_csr_export": [ + "bool openssl_csr_export(resource csr, string &out [, bool notext=true])", + "Exports a CSR to file or a var" + ], + "openssl_csr_export_to_file": [ + "bool openssl_csr_export_to_file(resource csr, string outfilename [, bool notext=true])", + "Exports a CSR to file" + ], + "openssl_csr_get_public_key": [ + "mixed openssl_csr_get_public_key(mixed csr)", + "Returns the subject of a CERT or FALSE on error" + ], + "openssl_csr_get_subject": [ + "mixed openssl_csr_get_subject(mixed csr)", + "Returns the subject of a CERT or FALSE on error" + ], + "openssl_csr_new": [ + "bool openssl_csr_new(array dn, resource &privkey [, array configargs [, array extraattribs]])", + "Generates a privkey and CSR" + ], + "openssl_csr_sign": [ + "resource openssl_csr_sign(mixed csr, mixed x509, mixed priv_key, long days [, array config_args [, long serial]])", + "Signs a cert with another CERT" + ], + "openssl_decrypt": [ + "string openssl_decrypt(string data, string method, string password [, bool raw_input=false])", + "Takes raw or base64 encoded string and dectupt it using given method and key" + ], + "openssl_dh_compute_key": [ + "string openssl_dh_compute_key(string pub_key, resource dh_key)", + "Computes shared sicret for public value of remote DH key and local DH key" + ], + "openssl_digest": [ + "string openssl_digest(string data, string method [, bool raw_output=false])", + "Computes digest hash value for given data using given method, returns raw or binhex encoded string" + ], + "openssl_encrypt": [ + "string openssl_encrypt(string data, string method, string password [, bool raw_output=false])", + "Encrypts given data with given method and key, returns raw or base64 encoded string" + ], + "openssl_error_string": [ + "mixed openssl_error_string(void)", + "Returns a description of the last error, and alters the index of the error messages. Returns false when the are no more messages" + ], + "openssl_get_cipher_methods": [ + "array openssl_get_cipher_methods([bool aliases = false])", + "Return array of available cipher methods" + ], + "openssl_get_md_methods": [ + "array openssl_get_md_methods([bool aliases = false])", + "Return array of available digest methods" + ], + "openssl_open": [ + "bool openssl_open(string data, &string opendata, string ekey, mixed privkey)", + "Opens data" + ], + "openssl_pkcs12_export": [ + "bool openssl_pkcs12_export(mixed x509, string &out, mixed priv_key, string pass[, array args])", + "Creates and exports a PKCS12 to a var" + ], + "openssl_pkcs12_export_to_file": [ + "bool openssl_pkcs12_export_to_file(mixed x509, string filename, mixed priv_key, string pass[, array args])", + "Creates and exports a PKCS to file" + ], + "openssl_pkcs12_read": [ + "bool openssl_pkcs12_read(string PKCS12, array &certs, string pass)", + "Parses a PKCS12 to an array" + ], + "openssl_pkcs7_decrypt": [ + "bool openssl_pkcs7_decrypt(string infilename, string outfilename, mixed recipcert [, mixed recipkey])", + "Decrypts the S/MIME message in the file name infilename and output the results to the file name outfilename. recipcert is a CERT for one of the recipients. recipkey specifies the private key matching recipcert, if recipcert does not include the key" + ], + "openssl_pkcs7_encrypt": [ + "bool openssl_pkcs7_encrypt(string infile, string outfile, mixed recipcerts, array headers [, long flags [, long cipher]])", + "Encrypts the message in the file named infile with the certificates in recipcerts and output the result to the file named outfile" + ], + "openssl_pkcs7_sign": [ + "bool openssl_pkcs7_sign(string infile, string outfile, mixed signcert, mixed signkey, array headers [, long flags [, string extracertsfilename]])", + "Signs the MIME message in the file named infile with signcert/signkey and output the result to file name outfile. headers lists plain text headers to exclude from the signed portion of the message, and should include to, from and subject as a minimum" + ], + "openssl_pkcs7_verify": [ + "bool openssl_pkcs7_verify(string filename, long flags [, string signerscerts [, array cainfo [, string extracerts [, string content]]]])", + "Verifys that the data block is intact, the signer is who they say they are, and returns the CERTs of the signers" + ], + "openssl_pkey_export": [ + "bool openssl_pkey_export(mixed key, &mixed out [, string passphrase [, array config_args]])", + "Gets an exportable representation of a key into a string or file" + ], + "openssl_pkey_export_to_file": [ + "bool openssl_pkey_export_to_file(mixed key, string outfilename [, string passphrase, array config_args)", + "Gets an exportable representation of a key into a file" + ], + "openssl_pkey_free": [ + "void openssl_pkey_free(int key)", + "Frees a key" + ], + "openssl_pkey_get_details": [ + "resource openssl_pkey_get_details(resource key)", + "returns an array with the key details (bits, pkey, type)" + ], + "openssl_pkey_get_private": [ + "int openssl_pkey_get_private(string key [, string passphrase])", + "Gets private keys" + ], + "openssl_pkey_get_public": [ + "int openssl_pkey_get_public(mixed cert)", + "Gets public key from X.509 certificate" + ], + "openssl_pkey_new": [ + "resource openssl_pkey_new([array configargs])", + "Generates a new private key" + ], + "openssl_private_decrypt": [ + "bool openssl_private_decrypt(string data, string &decrypted, mixed key [, int padding])", + "Decrypts data with private key" + ], + "openssl_private_encrypt": [ + "bool openssl_private_encrypt(string data, string &crypted, mixed key [, int padding])", + "Encrypts data with private key" + ], + "openssl_public_decrypt": [ + "bool openssl_public_decrypt(string data, string &crypted, resource key [, int padding])", + "Decrypts data with public key" + ], + "openssl_public_encrypt": [ + "bool openssl_public_encrypt(string data, string &crypted, mixed key [, int padding])", + "Encrypts data with public key" + ], + "openssl_random_pseudo_bytes": [ + "string openssl_random_pseudo_bytes(integer length [, &bool returned_strong_result])", + "Returns a string of the length specified filled with random pseudo bytes" + ], + "openssl_seal": [ + "int openssl_seal(string data, &string sealdata, &array ekeys, array pubkeys)", + "Seals data" + ], + "openssl_sign": [ + "bool openssl_sign(string data, &string signature, mixed key[, mixed method])", + "Signs data" + ], + "openssl_verify": [ + "int openssl_verify(string data, string signature, mixed key[, mixed method])", + "Verifys data" + ], + "openssl_x509_check_private_key": [ + "bool openssl_x509_check_private_key(mixed cert, mixed key)", + "Checks if a private key corresponds to a CERT" + ], + "openssl_x509_checkpurpose": [ + "int openssl_x509_checkpurpose(mixed x509cert, int purpose, array cainfo [, string untrustedfile])", + "Checks the CERT to see if it can be used for the purpose in purpose. cainfo holds information about trusted CAs" + ], + "openssl_x509_export": [ + "bool openssl_x509_export(mixed x509, string &out [, bool notext = true])", + "Exports a CERT to file or a var" + ], + "openssl_x509_export_to_file": [ + "bool openssl_x509_export_to_file(mixed x509, string outfilename [, bool notext = true])", + "Exports a CERT to file or a var" + ], + "openssl_x509_free": [ + "void openssl_x509_free(resource x509)", + "Frees X.509 certificates" + ], + "openssl_x509_parse": [ + "array openssl_x509_parse(mixed x509 [, bool shortnames=true])", + "Returns an array of the fields/values of the CERT" + ], + "openssl_x509_read": [ + "resource openssl_x509_read(mixed cert)", + "Reads X.509 certificates" + ], + "ord": [ + "int ord(string character)", + "Returns ASCII value of character" + ], + "output_add_rewrite_var": [ + "bool output_add_rewrite_var(string name, string value)", + "Add URL rewriter values" + ], + "output_reset_rewrite_vars": [ + "bool output_reset_rewrite_vars(void)", + "Reset(clear) URL rewriter values" + ], + "pack": [ + "string pack(string format, mixed arg1 [, mixed arg2 [, mixed ...]])", + "Takes one or more arguments and packs them into a binary string according to the format argument" + ], + "parse_ini_file": [ + "array parse_ini_file(string filename [, bool process_sections [, int scanner_mode]])", + "Parse configuration file" + ], + "parse_ini_string": [ + "array parse_ini_string(string ini_string [, bool process_sections [, int scanner_mode]])", + "Parse configuration string" + ], + "parse_locale": [ + "static array parse_locale($locale)", + "* parses a locale-id into an array the different parts of it" + ], + "parse_str": [ + "void parse_str(string encoded_string [, array result])", + "Parses GET/POST/COOKIE data and sets global variables" + ], + "parse_url": [ + "mixed parse_url(string url, [int url_component])", + "Parse a URL and return its components" + ], + "passthru": [ + "void passthru(string command [, int &return_value])", + "Execute an external program and display raw output" + ], + "pathinfo": [ + "array pathinfo(string path[, int options])", + "Returns information about a certain string" + ], + "pclose": [ + "int pclose(resource fp)", + "Close a file pointer opened by popen()" + ], + "pcnlt_sigwaitinfo": [ + "int pcnlt_sigwaitinfo(array set[, array &siginfo])", + "Synchronously wait for queued signals" + ], + "pcntl_alarm": [ + "int pcntl_alarm(int seconds)", + "Set an alarm clock for delivery of a signal" + ], + "pcntl_exec": [ + "bool pcntl_exec(string path [, array args [, array envs]])", + "Executes specified program in current process space as defined by exec(2)" + ], + "pcntl_fork": [ + "int pcntl_fork(void)", + "Forks the currently running process following the same behavior as the UNIX fork() system call" + ], + "pcntl_getpriority": [ + "int pcntl_getpriority([int pid [, int process_identifier]])", + "Get the priority of any process" + ], + "pcntl_setpriority": [ + "bool pcntl_setpriority(int priority [, int pid [, int process_identifier]])", + "Change the priority of any process" + ], + "pcntl_signal": [ + "bool pcntl_signal(int signo, callback handle [, bool restart_syscalls])", + "Assigns a system signal handler to a PHP function" + ], + "pcntl_signal_dispatch": [ + "bool pcntl_signal_dispatch()", + "Dispatch signals to signal handlers" + ], + "pcntl_sigprocmask": [ + "bool pcntl_sigprocmask(int how, array set[, array &oldset])", + "Examine and change blocked signals" + ], + "pcntl_sigtimedwait": [ + "int pcntl_sigtimedwait(array set[, array &siginfo[, int seconds[, int nanoseconds]]])", + "Wait for queued signals" + ], + "pcntl_wait": [ + "int pcntl_wait(int &status)", + "Waits on or returns the status of a forked child as defined by the waitpid() system call" + ], + "pcntl_waitpid": [ + "int pcntl_waitpid(int pid, int &status, int options)", + "Waits on or returns the status of a forked child as defined by the waitpid() system call" + ], + "pcntl_wexitstatus": [ + "int pcntl_wexitstatus(int status)", + "Returns the status code of a child's exit" + ], + "pcntl_wifexited": [ + "bool pcntl_wifexited(int status)", + "Returns true if the child status code represents a successful exit" + ], + "pcntl_wifsignaled": [ + "bool pcntl_wifsignaled(int status)", + "Returns true if the child status code represents a process that was terminated due to a signal" + ], + "pcntl_wifstopped": [ + "bool pcntl_wifstopped(int status)", + "Returns true if the child status code represents a stopped process (WUNTRACED must have been used with waitpid)" + ], + "pcntl_wstopsig": [ + "int pcntl_wstopsig(int status)", + "Returns the number of the signal that caused the process to stop who's status code is passed" + ], + "pcntl_wtermsig": [ + "int pcntl_wtermsig(int status)", + "Returns the number of the signal that terminated the process who's status code is passed" + ], + "pdo_drivers": [ + "array pdo_drivers()", + "Return array of available PDO drivers" + ], + "pfsockopen": [ + "resource pfsockopen(string hostname, int port [, int errno [, string errstr [, float timeout]]])", + "Open persistent Internet or Unix domain socket connection" + ], + "pg_affected_rows": [ + "int pg_affected_rows(resource result)", + "Returns the number of affected tuples" + ], + "pg_cancel_query": [ + "bool pg_cancel_query(resource connection)", + "Cancel request" + ], + "pg_client_encoding": [ + "string pg_client_encoding([resource connection])", + "Get the current client encoding" + ], + "pg_close": [ + "bool pg_close([resource connection])", + "Close a PostgreSQL connection" + ], + "pg_connect": [ + "resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database)", + "Open a PostgreSQL connection" + ], + "pg_connection_busy": [ + "bool pg_connection_busy(resource connection)", + "Get connection is busy or not" + ], + "pg_connection_reset": [ + "bool pg_connection_reset(resource connection)", + "Reset connection (reconnect)" + ], + "pg_connection_status": [ + "int pg_connection_status(resource connnection)", + "Get connection status" + ], + "pg_convert": [ + "array pg_convert(resource db, string table, array values[, int options])", + "Check and convert values for PostgreSQL SQL statement" + ], + "pg_copy_from": [ + "bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]])", + "Copy table from array" + ], + "pg_copy_to": [ + "array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]])", + "Copy table to array" + ], + "pg_dbname": [ + "string pg_dbname([resource connection])", + "Get the database name" + ], + "pg_delete": [ + "mixed pg_delete(resource db, string table, array ids[, int options])", + "Delete records has ids (id=>value)" + ], + "pg_end_copy": [ + "bool pg_end_copy([resource connection])", + "Sync with backend. Completes the Copy command" + ], + "pg_escape_bytea": [ + "string pg_escape_bytea([resource connection,] string data)", + "Escape binary for bytea type" + ], + "pg_escape_string": [ + "string pg_escape_string([resource connection,] string data)", + "Escape string for text/char type" + ], + "pg_execute": [ + "resource pg_execute([resource connection,] string stmtname, array params)", + "Execute a prepared query" + ], + "pg_fetch_all": [ + "array pg_fetch_all(resource result)", + "Fetch all rows into array" + ], + "pg_fetch_all_columns": [ + "array pg_fetch_all_columns(resource result [, int column_number])", + "Fetch all rows into array" + ], + "pg_fetch_array": [ + "array pg_fetch_array(resource result [, int row [, int result_type]])", + "Fetch a row as an array" + ], + "pg_fetch_assoc": [ + "array pg_fetch_assoc(resource result [, int row])", + "Fetch a row as an assoc array" + ], + "pg_fetch_object": [ + "object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]])", + "Fetch a row as an object" + ], + "pg_fetch_result": [ + "mixed pg_fetch_result(resource result, [int row_number,] mixed field_name)", + "Returns values from a result identifier" + ], + "pg_fetch_row": [ + "array pg_fetch_row(resource result [, int row [, int result_type]])", + "Get a row as an enumerated array" + ], + "pg_field_is_null": [ + "int pg_field_is_null(resource result, [int row,] mixed field_name_or_number)", + "Test if a field is NULL" + ], + "pg_field_name": [ + "string pg_field_name(resource result, int field_number)", + "Returns the name of the field" + ], + "pg_field_num": [ + "int pg_field_num(resource result, string field_name)", + "Returns the field number of the named field" + ], + "pg_field_prtlen": [ + "int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number)", + "Returns the printed length" + ], + "pg_field_size": [ + "int pg_field_size(resource result, int field_number)", + "Returns the internal size of the field" + ], + "pg_field_table": [ + "mixed pg_field_table(resource result, int field_number[, bool oid_only])", + "Returns the name of the table field belongs to, or table's oid if oid_only is true" + ], + "pg_field_type": [ + "string pg_field_type(resource result, int field_number)", + "Returns the type name for the given field" + ], + "pg_field_type_oid": [ + "string pg_field_type_oid(resource result, int field_number)", + "Returns the type oid for the given field" + ], + "pg_free_result": [ + "bool pg_free_result(resource result)", + "Free result memory" + ], + "pg_get_notify": [ + "array pg_get_notify([resource connection[, result_type]])", + "Get asynchronous notification" + ], + "pg_get_pid": [ + "int pg_get_pid([resource connection)", + "Get backend(server) pid" + ], + "pg_get_result": [ + "resource pg_get_result(resource connection)", + "Get asynchronous query result" + ], + "pg_host": [ + "string pg_host([resource connection])", + "Returns the host name associated with the connection" + ], + "pg_insert": [ + "mixed pg_insert(resource db, string table, array values[, int options])", + "Insert values (filed=>value) to table" + ], + "pg_last_error": [ + "string pg_last_error([resource connection])", + "Get the error message string" + ], + "pg_last_notice": [ + "string pg_last_notice(resource connection)", + "Returns the last notice set by the backend" + ], + "pg_last_oid": [ + "string pg_last_oid(resource result)", + "Returns the last object identifier" + ], + "pg_lo_close": [ + "bool pg_lo_close(resource large_object)", + "Close a large object" + ], + "pg_lo_create": [ + "mixed pg_lo_create([resource connection],[mixed large_object_oid])", + "Create a large object" + ], + "pg_lo_export": [ + "bool pg_lo_export([resource connection, ] int objoid, string filename)", + "Export large object direct to filesystem" + ], + "pg_lo_import": [ + "int pg_lo_import([resource connection, ] string filename [, mixed oid])", + "Import large object direct from filesystem" + ], + "pg_lo_open": [ + "resource pg_lo_open([resource connection,] int large_object_oid, string mode)", + "Open a large object and return fd" + ], + "pg_lo_read": [ + "string pg_lo_read(resource large_object [, int len])", + "Read a large object" + ], + "pg_lo_read_all": [ + "int pg_lo_read_all(resource large_object)", + "Read a large object and send straight to browser" + ], + "pg_lo_seek": [ + "bool pg_lo_seek(resource large_object, int offset [, int whence])", + "Seeks position of large object" + ], + "pg_lo_tell": [ + "int pg_lo_tell(resource large_object)", + "Returns current position of large object" + ], + "pg_lo_unlink": [ + "bool pg_lo_unlink([resource connection,] string large_object_oid)", + "Delete a large object" + ], + "pg_lo_write": [ + "int pg_lo_write(resource large_object, string buf [, int len])", + "Write a large object" + ], + "pg_meta_data": [ + "array pg_meta_data(resource db, string table)", + "Get meta_data" + ], + "pg_num_fields": [ + "int pg_num_fields(resource result)", + "Return the number of fields in the result" + ], + "pg_num_rows": [ + "int pg_num_rows(resource result)", + "Return the number of rows in the result" + ], + "pg_options": [ + "string pg_options([resource connection])", + "Get the options associated with the connection" + ], + "pg_parameter_status": [ + "string|false pg_parameter_status([resource connection,] string param_name)", + "Returns the value of a server parameter" + ], + "pg_pconnect": [ + "resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database)", + "Open a persistent PostgreSQL connection" + ], + "pg_ping": [ + "bool pg_ping([resource connection])", + "Ping database. If connection is bad, try to reconnect." + ], + "pg_port": [ + "int pg_port([resource connection])", + "Return the port number associated with the connection" + ], + "pg_prepare": [ + "resource pg_prepare([resource connection,] string stmtname, string query)", + "Prepare a query for future execution" + ], + "pg_put_line": [ + "bool pg_put_line([resource connection,] string query)", + "Send null-terminated string to backend server" + ], + "pg_query": [ + "resource pg_query([resource connection,] string query)", + "Execute a query" + ], + "pg_query_params": [ + "resource pg_query_params([resource connection,] string query, array params)", + "Execute a query" + ], + "pg_result_error": [ + "string pg_result_error(resource result)", + "Get error message associated with result" + ], + "pg_result_error_field": [ + "string pg_result_error_field(resource result, int fieldcode)", + "Get error message field associated with result" + ], + "pg_result_seek": [ + "bool pg_result_seek(resource result, int offset)", + "Set internal row offset" + ], + "pg_result_status": [ + "mixed pg_result_status(resource result[, long result_type])", + "Get status of query result" + ], + "pg_select": [ + "mixed pg_select(resource db, string table, array ids[, int options])", + "Select records that has ids (id=>value)" + ], + "pg_send_execute": [ + "bool pg_send_execute(resource connection, string stmtname, array params)", + "Executes prevriously prepared stmtname asynchronously" + ], + "pg_send_prepare": [ + "bool pg_send_prepare(resource connection, string stmtname, string query)", + "Asynchronously prepare a query for future execution" + ], + "pg_send_query": [ + "bool pg_send_query(resource connection, string query)", + "Send asynchronous query" + ], + "pg_send_query_params": [ + "bool pg_send_query_params(resource connection, string query, array params)", + "Send asynchronous parameterized query" + ], + "pg_set_client_encoding": [ + "int pg_set_client_encoding([resource connection,] string encoding)", + "Set client encoding" + ], + "pg_set_error_verbosity": [ + "int pg_set_error_verbosity([resource connection,] int verbosity)", + "Set error verbosity" + ], + "pg_trace": [ + "bool pg_trace(string filename [, string mode [, resource connection]])", + "Enable tracing a PostgreSQL connection" + ], + "pg_transaction_status": [ + "int pg_transaction_status(resource connnection)", + "Get transaction status" + ], + "pg_tty": [ + "string pg_tty([resource connection])", + "Return the tty name associated with the connection" + ], + "pg_unescape_bytea": [ + "string pg_unescape_bytea(string data)", + "Unescape binary for bytea type" + ], + "pg_untrace": [ + "bool pg_untrace([resource connection])", + "Disable tracing of a PostgreSQL connection" + ], + "pg_update": [ + "mixed pg_update(resource db, string table, array fields, array ids[, int options])", + "Update table using values (field=>value) and ids (id=>value)" + ], + "pg_version": [ + "array pg_version([resource connection])", + "Returns an array with client, protocol and server version (when available)" + ], + "php_egg_logo_guid": [ + "string php_egg_logo_guid(void)", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_ini_loaded_file": [ + "string php_ini_loaded_file(void)", + "Return the actual loaded ini filename" + ], + "php_ini_scanned_files": [ + "string php_ini_scanned_files(void)", + "Return comma-separated string of .ini files parsed from the additional ini dir" + ], + "php_logo_guid": [ + "string php_logo_guid(void)", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_real_logo_guid": [ + "string php_real_logo_guid(void)", + "Return the special ID used to request the PHP logo in phpinfo screens" + ], + "php_sapi_name": [ + "string php_sapi_name(void)", + "Return the current SAPI module name" + ], + "php_snmpv3": [ + "void php_snmpv3(INTERNAL_FUNCTION_PARAMETERS, int st)", + "* * Generic SNMPv3 object fetcher * From here is passed on the the common internal object fetcher. * * st=SNMP_CMD_GET snmp3_get() - query an agent and return a single value. * st=SNMP_CMD_GETNEXT snmp3_getnext() - query an agent and return the next single value. * st=SNMP_CMD_WALK snmp3_walk() - walk the mib and return a single dimensional array * containing the values. * st=SNMP_CMD_REALWALK snmp3_real_walk() - walk the mib and return an * array of oid,value pairs. * st=SNMP_CMD_SET snmp3_set() - query an agent and set a single value *" + ], + "php_strip_whitespace": [ + "string php_strip_whitespace(string file_name)", + "Return source with stripped comments and whitespace" + ], + "php_uname": [ + "string php_uname(void)", + "Return information about the system PHP was built on" + ], + "phpcredits": [ + "void phpcredits([int flag])", + "Prints the list of people who've contributed to the PHP project" + ], + "phpinfo": [ + "void phpinfo([int what])", + "Output a page of useful information about PHP and the current request" + ], + "phpversion": [ + "string phpversion([string extension])", + "Return the current PHP version" + ], + "pi": [ + "float pi(void)", + "Returns an approximation of pi" + ], + "png2wbmp": [ + "bool png2wbmp (string f_org, string f_dest, int d_height, int d_width, int threshold)", + "Convert PNG image to WBMP image" + ], + "popen": [ + "resource popen(string command, string mode)", + "Execute a command and open either a read or a write pipe to it" + ], + "posix_access": [ + "bool posix_access(string file [, int mode])", + "Determine accessibility of a file (POSIX.1 5.6.3)" + ], + "posix_ctermid": [ + "string posix_ctermid(void)", + "Generate terminal path name (POSIX.1, 4.7.1)" + ], + "posix_get_last_error": [ + "int posix_get_last_error(void)", + "Retrieve the error number set by the last posix function which failed." + ], + "posix_getcwd": [ + "string posix_getcwd(void)", + "Get working directory pathname (POSIX.1, 5.2.2)" + ], + "posix_getegid": [ + "int posix_getegid(void)", + "Get the current effective group id (POSIX.1, 4.2.1)" + ], + "posix_geteuid": [ + "int posix_geteuid(void)", + "Get the current effective user id (POSIX.1, 4.2.1)" + ], + "posix_getgid": [ + "int posix_getgid(void)", + "Get the current group id (POSIX.1, 4.2.1)" + ], + "posix_getgrgid": [ + "array posix_getgrgid(long gid)", + "Group database access (POSIX.1, 9.2.1)" + ], + "posix_getgrnam": [ + "array posix_getgrnam(string groupname)", + "Group database access (POSIX.1, 9.2.1)" + ], + "posix_getgroups": [ + "array posix_getgroups(void)", + "Get supplementary group id's (POSIX.1, 4.2.3)" + ], + "posix_getlogin": [ + "string posix_getlogin(void)", + "Get user name (POSIX.1, 4.2.4)" + ], + "posix_getpgid": [ + "int posix_getpgid(void)", + "Get the process group id of the specified process (This is not a POSIX function, but a SVR4ism, so we compile conditionally)" + ], + "posix_getpgrp": [ + "int posix_getpgrp(void)", + "Get current process group id (POSIX.1, 4.3.1)" + ], + "posix_getpid": [ + "int posix_getpid(void)", + "Get the current process id (POSIX.1, 4.1.1)" + ], + "posix_getppid": [ + "int posix_getppid(void)", + "Get the parent process id (POSIX.1, 4.1.1)" + ], + "posix_getpwnam": [ + "array posix_getpwnam(string groupname)", + "User database access (POSIX.1, 9.2.2)" + ], + "posix_getpwuid": [ + "array posix_getpwuid(long uid)", + "User database access (POSIX.1, 9.2.2)" + ], + "posix_getrlimit": [ + "array posix_getrlimit(void)", + "Get system resource consumption limits (This is not a POSIX function, but a BSDism and a SVR4ism. We compile conditionally)" + ], + "posix_getsid": [ + "int posix_getsid(void)", + "Get process group id of session leader (This is not a POSIX function, but a SVR4ism, so be compile conditionally)" + ], + "posix_getuid": [ + "int posix_getuid(void)", + "Get the current user id (POSIX.1, 4.2.1)" + ], + "posix_initgroups": [ + "bool posix_initgroups(string name, int base_group_id)", + "Calculate the group access list for the user specified in name." + ], + "posix_isatty": [ + "bool posix_isatty(int fd)", + "Determine if filedesc is a tty (POSIX.1, 4.7.1)" + ], + "posix_kill": [ + "bool posix_kill(int pid, int sig)", + "Send a signal to a process (POSIX.1, 3.3.2)" + ], + "posix_mkfifo": [ + "bool posix_mkfifo(string pathname, int mode)", + "Make a FIFO special file (POSIX.1, 5.4.2)" + ], + "posix_mknod": [ + "bool posix_mknod(string pathname, int mode [, int major [, int minor]])", + "Make a special or ordinary file (POSIX.1)" + ], + "posix_setegid": [ + "bool posix_setegid(long uid)", + "Set effective group id" + ], + "posix_seteuid": [ + "bool posix_seteuid(long uid)", + "Set effective user id" + ], + "posix_setgid": [ + "bool posix_setgid(int uid)", + "Set group id (POSIX.1, 4.2.2)" + ], + "posix_setpgid": [ + "bool posix_setpgid(int pid, int pgid)", + "Set process group id for job control (POSIX.1, 4.3.3)" + ], + "posix_setsid": [ + "int posix_setsid(void)", + "Create session and set process group id (POSIX.1, 4.3.2)" + ], + "posix_setuid": [ + "bool posix_setuid(long uid)", + "Set user id (POSIX.1, 4.2.2)" + ], + "posix_strerror": [ + "string posix_strerror(int errno)", + "Retrieve the system error message associated with the given errno." + ], + "posix_times": [ + "array posix_times(void)", + "Get process times (POSIX.1, 4.5.2)" + ], + "posix_ttyname": [ + "string posix_ttyname(int fd)", + "Determine terminal device name (POSIX.1, 4.7.2)" + ], + "posix_uname": [ + "array posix_uname(void)", + "Get system name (POSIX.1, 4.4.1)" + ], + "pow": [ + "number pow(number base, number exponent)", + "Returns base raised to the power of exponent. Returns integer result when possible" + ], + "preg_filter": [ + "mixed preg_filter(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement and only return matches." + ], + "preg_grep": [ + "array preg_grep(string regex, array input [, int flags])", + "Searches array and returns entries which match regex" + ], + "preg_last_error": [ + "int preg_last_error()", + "Returns the error code of the last regexp execution." + ], + "preg_match": [ + "int preg_match(string pattern, string subject [, array &subpatterns [, int flags [, int offset]]])", + "Perform a Perl-style regular expression match" + ], + "preg_match_all": [ + "int preg_match_all(string pattern, string subject, array &subpatterns [, int flags [, int offset]])", + "Perform a Perl-style global regular expression match" + ], + "preg_quote": [ + "string preg_quote(string str [, string delim_char])", + "Quote regular expression characters plus an optional character" + ], + "preg_replace": [ + "mixed preg_replace(mixed regex, mixed replace, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement." + ], + "preg_replace_callback": [ + "mixed preg_replace_callback(mixed regex, mixed callback, mixed subject [, int limit [, int &count]])", + "Perform Perl-style regular expression replacement using replacement callback." + ], + "preg_split": [ + "array preg_split(string pattern, string subject [, int limit [, int flags]])", + "Split string into an array using a perl-style regular expression as a delimiter" + ], + "prev": [ + "mixed prev(array array_arg)", + "Move array argument's internal pointer to the previous element and return it" + ], + "print": [ + "int print(string arg)", + "Output a string" + ], + "print_r": [ + "mixed print_r(mixed var [, bool return])", + "Prints out or returns information about the specified variable" + ], + "printf": [ + "int printf(string format [, mixed arg1 [, mixed ...]])", + "Output a formatted string" + ], + "proc_close": [ + "int proc_close(resource process)", + "close a process opened by proc_open" + ], + "proc_get_status": [ + "array proc_get_status(resource process)", + "get information about a process opened by proc_open" + ], + "proc_nice": [ + "bool proc_nice(int priority)", + "Change the priority of the current process" + ], + "proc_open": [ + "resource proc_open(string command, array descriptorspec, array &pipes [, string cwd [, array env [, array other_options]]])", + "Run a process with more control over it's file descriptors" + ], + "proc_terminate": [ + "bool proc_terminate(resource process [, long signal])", + "kill a process opened by proc_open" + ], + "property_exists": [ + "bool property_exists(mixed object_or_class, string property_name)", + "Checks if the object or class has a property" + ], + "pspell_add_to_personal": [ + "bool pspell_add_to_personal(int pspell, string word)", + "Adds a word to a personal list" + ], + "pspell_add_to_session": [ + "bool pspell_add_to_session(int pspell, string word)", + "Adds a word to the current session" + ], + "pspell_check": [ + "bool pspell_check(int pspell, string word)", + "Returns true if word is valid" + ], + "pspell_clear_session": [ + "bool pspell_clear_session(int pspell)", + "Clears the current session" + ], + "pspell_config_create": [ + "int pspell_config_create(string language [, string spelling [, string jargon [, string encoding]]])", + "Create a new config to be used later to create a manager" + ], + "pspell_config_data_dir": [ + "bool pspell_config_data_dir(int conf, string directory)", + "location of language data files" + ], + "pspell_config_dict_dir": [ + "bool pspell_config_dict_dir(int conf, string directory)", + "location of the main word list" + ], + "pspell_config_ignore": [ + "bool pspell_config_ignore(int conf, int ignore)", + "Ignore words <= n chars" + ], + "pspell_config_mode": [ + "bool pspell_config_mode(int conf, long mode)", + "Select mode for config (PSPELL_FAST, PSPELL_NORMAL or PSPELL_BAD_SPELLERS)" + ], + "pspell_config_personal": [ + "bool pspell_config_personal(int conf, string personal)", + "Use a personal dictionary for this config" + ], + "pspell_config_repl": [ + "bool pspell_config_repl(int conf, string repl)", + "Use a personal dictionary with replacement pairs for this config" + ], + "pspell_config_runtogether": [ + "bool pspell_config_runtogether(int conf, bool runtogether)", + "Consider run-together words as valid components" + ], + "pspell_config_save_repl": [ + "bool pspell_config_save_repl(int conf, bool save)", + "Save replacement pairs when personal list is saved for this config" + ], + "pspell_new": [ + "int pspell_new(string language [, string spelling [, string jargon [, string encoding [, int mode]]]])", + "Load a dictionary" + ], + "pspell_new_config": [ + "int pspell_new_config(int config)", + "Load a dictionary based on the given config" + ], + "pspell_new_personal": [ + "int pspell_new_personal(string personal, string language [, string spelling [, string jargon [, string encoding [, int mode]]]])", + "Load a dictionary with a personal wordlist" + ], + "pspell_save_wordlist": [ + "bool pspell_save_wordlist(int pspell)", + "Saves the current (personal) wordlist" + ], + "pspell_store_replacement": [ + "bool pspell_store_replacement(int pspell, string misspell, string correct)", + "Notify the dictionary of a user-selected replacement" + ], + "pspell_suggest": [ + "array pspell_suggest(int pspell, string word)", + "Returns array of suggestions" + ], + "putenv": [ + "bool putenv(string setting)", + "Set the value of an environment variable" + ], + "quoted_printable_decode": [ + "string quoted_printable_decode(string str)", + "Convert a quoted-printable string to an 8 bit string" + ], + "quoted_printable_encode": [ + "string quoted_printable_encode(string str) */", + "PHP_FUNCTION(quoted_printable_encode) { char *str, *new_str; int str_len; size_t new_str_len; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, \"s\", &str, &str_len) != SUCCESS) { return; } if (!str_len) { RETURN_EMPTY_STRING(); } new_str = (char *)php_quot_print_encode((unsigned char *)str, (size_t)str_len, &new_str_len); RETURN_STRINGL(new_str, new_str_len, 0); } /* }}}" + ], + "quotemeta": [ + "string quotemeta(string str)", + "Quotes meta characters" + ], + "rad2deg": [ + "float rad2deg(float number)", + "Converts the radian number to the equivalent number in degrees" + ], + "rand": [ + "int rand([int min, int max])", + "Returns a random number" + ], + "range": [ + "array range(mixed low, mixed high[, int step])", + "Create an array containing the range of integers or characters from low to high (inclusive)" + ], + "rawurldecode": [ + "string rawurldecode(string str)", + "Decodes URL-encodes string" + ], + "rawurlencode": [ + "string rawurlencode(string str)", + "URL-encodes string" + ], + "readdir": [ + "string readdir([resource dir_handle])", + "Read directory entry from dir_handle" + ], + "readfile": [ + "int readfile(string filename [, bool use_include_path[, resource context]])", + "Output a file or a URL" + ], + "readgzfile": [ + "int readgzfile(string filename [, int use_include_path])", + "Output a .gz-file" + ], + "readline": [ + "string readline([string prompt])", + "Reads a line" + ], + "readline_add_history": [ + "bool readline_add_history(string prompt)", + "Adds a line to the history" + ], + "readline_callback_handler_install": [ + "void readline_callback_handler_install(string prompt, mixed callback)", + "Initializes the readline callback interface and terminal, prints the prompt and returns immediately" + ], + "readline_callback_handler_remove": [ + "bool readline_callback_handler_remove()", + "Removes a previously installed callback handler and restores terminal settings" + ], + "readline_callback_read_char": [ + "void readline_callback_read_char()", + "Informs the readline callback interface that a character is ready for input" + ], + "readline_clear_history": [ + "bool readline_clear_history(void)", + "Clears the history" + ], + "readline_completion_function": [ + "bool readline_completion_function(string funcname)", + "Readline completion function?" + ], + "readline_info": [ + "mixed readline_info([string varname [, string newvalue]])", + "Gets/sets various internal readline variables." + ], + "readline_list_history": [ + "array readline_list_history(void)", + "Lists the history" + ], + "readline_on_new_line": [ + "void readline_on_new_line(void)", + "Inform readline that the cursor has moved to a new line" + ], + "readline_read_history": [ + "bool readline_read_history([string filename])", + "Reads the history" + ], + "readline_redisplay": [ + "void readline_redisplay(void)", + "Ask readline to redraw the display" + ], + "readline_write_history": [ + "bool readline_write_history([string filename])", + "Writes the history" + ], + "readlink": [ + "string readlink(string filename)", + "Return the target of a symbolic link" + ], + "realpath": [ + "string realpath(string path)", + "Return the resolved path" + ], + "realpath_cache_get": [ + "bool realpath_cache_get()", + "Get current size of realpath cache" + ], + "realpath_cache_size": [ + "bool realpath_cache_size()", + "Get current size of realpath cache" + ], + "recode_file": [ + "bool recode_file(string request, resource input, resource output)", + "Recode file input into file output according to request" + ], + "recode_string": [ + "string recode_string(string request, string str)", + "Recode string str according to request string" + ], + "register_shutdown_function": [ + "void register_shutdown_function(string function_name)", + "Register a user-level function to be called on request termination" + ], + "register_tick_function": [ + "bool register_tick_function(string function_name [, mixed arg [, mixed ... ]])", + "Registers a tick callback function" + ], + "rename": [ + "bool rename(string old_name, string new_name[, resource context])", + "Rename a file" + ], + "require": [ + "bool require(string path)", + "Includes and evaluates the specified file, erroring if the file cannot be included" + ], + "require_once": [ + "bool require_once(string path)", + "Includes and evaluates the specified file, erroring if the file cannot be included" + ], + "reset": [ + "mixed reset(array array_arg)", + "Set array argument's internal pointer to the first element and return it" + ], + "restore_error_handler": [ + "void restore_error_handler(void)", + "Restores the previously defined error handler function" + ], + "restore_exception_handler": [ + "void restore_exception_handler(void)", + "Restores the previously defined exception handler function" + ], + "restore_include_path": [ + "void restore_include_path()", + "Restore the value of the include_path configuration option" + ], + "rewind": [ + "bool rewind(resource fp)", + "Rewind the position of a file pointer" + ], + "rewinddir": [ + "void rewinddir([resource dir_handle])", + "Rewind dir_handle back to the start" + ], + "rmdir": [ + "bool rmdir(string dirname[, resource context])", + "Remove a directory" + ], + "round": [ + "float round(float number [, int precision [, int mode]])", + "Returns the number rounded to specified precision" + ], + "rsort": [ + "bool rsort(array &array_arg [, int sort_flags])", + "Sort an array in reverse order" + ], + "rtrim": [ + "string rtrim(string str [, string character_mask])", + "Removes trailing whitespace" + ], + "scandir": [ + "array scandir(string dir [, int sorting_order [, resource context]])", + "List files & directories inside the specified path" + ], + "sem_acquire": [ + "bool sem_acquire(resource id)", + "Acquires the semaphore with the given id, blocking if necessary" + ], + "sem_get": [ + "resource sem_get(int key [, int max_acquire [, int perm [, int auto_release]])", + "Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously" + ], + "sem_release": [ + "bool sem_release(resource id)", + "Releases the semaphore with the given id" + ], + "sem_remove": [ + "bool sem_remove(resource id)", + "Removes semaphore from Unix systems" + ], + "serialize": [ + "string serialize(mixed variable)", + "Returns a string representation of variable (which can later be unserialized)" + ], + "session_cache_expire": [ + "int session_cache_expire([int new_cache_expire])", + "Return the current cache expire. If new_cache_expire is given, the current cache_expire is replaced with new_cache_expire" + ], + "session_cache_limiter": [ + "string session_cache_limiter([string new_cache_limiter])", + "Return the current cache limiter. If new_cache_limited is given, the current cache_limiter is replaced with new_cache_limiter" + ], + "session_decode": [ + "bool session_decode(string data)", + "Deserializes data and reinitializes the variables" + ], + "session_destroy": [ + "bool session_destroy(void)", + "Destroy the current session and all data associated with it" + ], + "session_encode": [ + "string session_encode(void)", + "Serializes the current setup and returns the serialized representation" + ], + "session_get_cookie_params": [ + "array session_get_cookie_params(void)", + "Return the session cookie parameters" + ], + "session_id": [ + "string session_id([string newid])", + "Return the current session id. If newid is given, the session id is replaced with newid" + ], + "session_is_registered": [ + "bool session_is_registered(string varname)", + "Checks if a variable is registered in session" + ], + "session_module_name": [ + "string session_module_name([string newname])", + "Return the current module name used for accessing session data. If newname is given, the module name is replaced with newname" + ], + "session_name": [ + "string session_name([string newname])", + "Return the current session name. If newname is given, the session name is replaced with newname" + ], + "session_regenerate_id": [ + "bool session_regenerate_id([bool delete_old_session])", + "Update the current session id with a newly generated one. If delete_old_session is set to true, remove the old session." + ], + "session_register": [ + "bool session_register(mixed var_names [, mixed ...])", + "Adds varname(s) to the list of variables which are freezed at the session end" + ], + "session_save_path": [ + "string session_save_path([string newname])", + "Return the current save path passed to module_name. If newname is given, the save path is replaced with newname" + ], + "session_set_cookie_params": [ + "void session_set_cookie_params(int lifetime [, string path [, string domain [, bool secure[, bool httponly]]]])", + "Set session cookie parameters" + ], + "session_set_save_handler": [ + "void session_set_save_handler(string open, string close, string read, string write, string destroy, string gc)", + "Sets user-level functions" + ], + "session_start": [ + "bool session_start(void)", + "Begin session - reinitializes freezed variables, registers browsers etc" + ], + "session_unregister": [ + "bool session_unregister(string varname)", + "Removes varname from the list of variables which are freezed at the session end" + ], + "session_unset": [ + "void session_unset(void)", + "Unset all registered variables" + ], + "session_write_close": [ + "void session_write_close(void)", + "Write session data and end session" + ], + "set_error_handler": [ + "string set_error_handler(string error_handler [, int error_types])", + "Sets a user-defined error handler function. Returns the previously defined error handler, or false on error" + ], + "set_exception_handler": [ + "string set_exception_handler(callable exception_handler)", + "Sets a user-defined exception handler function. Returns the previously defined exception handler, or false on error" + ], + "set_include_path": [ + "string set_include_path(string new_include_path)", + "Sets the include_path configuration option" + ], + "set_magic_quotes_runtime": [ + "bool set_magic_quotes_runtime(int new_setting)", + "Set the current active configuration setting of magic_quotes_runtime and return previous" + ], + "set_time_limit": [ + "bool set_time_limit(int seconds)", + "Sets the maximum time a script can run" + ], + "setcookie": [ + "bool setcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])", + "Send a cookie" + ], + "setlocale": [ + "string setlocale(mixed category, string locale [, string ...])", + "Set locale information" + ], + "setrawcookie": [ + "bool setrawcookie(string name [, string value [, int expires [, string path [, string domain [, bool secure[, bool httponly]]]]]])", + "Send a cookie with no url encoding of the value" + ], + "settype": [ + "bool settype(mixed var, string type)", + "Set the type of the variable" + ], + "sha1": [ + "string sha1(string str [, bool raw_output])", + "Calculate the sha1 hash of a string" + ], + "sha1_file": [ + "string sha1_file(string filename [, bool raw_output])", + "Calculate the sha1 hash of given filename" + ], + "shell_exec": [ + "string shell_exec(string cmd)", + "Execute command via shell and return complete output as string" + ], + "shm_attach": [ + "int shm_attach(int key [, int memsize [, int perm]])", + "Creates or open a shared memory segment" + ], + "shm_detach": [ + "bool shm_detach(resource shm_identifier)", + "Disconnects from shared memory segment" + ], + "shm_get_var": [ + "mixed shm_get_var(resource id, int variable_key)", + "Returns a variable from shared memory" + ], + "shm_has_var": [ + "bool shm_has_var(resource id, int variable_key)", + "Checks whether a specific entry exists" + ], + "shm_put_var": [ + "bool shm_put_var(resource shm_identifier, int variable_key, mixed variable)", + "Inserts or updates a variable in shared memory" + ], + "shm_remove": [ + "bool shm_remove(resource shm_identifier)", + "Removes shared memory from Unix systems" + ], + "shm_remove_var": [ + "bool shm_remove_var(resource id, int variable_key)", + "Removes variable from shared memory" + ], + "shmop_close": [ + "void shmop_close (int shmid)", + "closes a shared memory segment" + ], + "shmop_delete": [ + "bool shmop_delete (int shmid)", + "mark segment for deletion" + ], + "shmop_open": [ + "int shmop_open (int key, string flags, int mode, int size)", + "gets and attaches a shared memory segment" + ], + "shmop_read": [ + "string shmop_read (int shmid, int start, int count)", + "reads from a shm segment" + ], + "shmop_size": [ + "int shmop_size (int shmid)", + "returns the shm size" + ], + "shmop_write": [ + "int shmop_write (int shmid, string data, int offset)", + "writes to a shared memory segment" + ], + "shuffle": [ + "bool shuffle(array array_arg)", + "Randomly shuffle the contents of an array" + ], + "similar_text": [ + "int similar_text(string str1, string str2 [, float percent])", + "Calculates the similarity between two strings" + ], + "simplexml_import_dom": [ + "simplemxml_element simplexml_import_dom(domNode node [, string class_name])", + "Get a simplexml_element object from dom to allow for processing" + ], + "simplexml_load_file": [ + "simplemxml_element simplexml_load_file(string filename [, string class_name [, int options [, string ns [, bool is_prefix]]]])", + "Load a filename and return a simplexml_element object to allow for processing" + ], + "simplexml_load_string": [ + "simplemxml_element simplexml_load_string(string data [, string class_name [, int options [, string ns [, bool is_prefix]]]])", + "Load a string and return a simplexml_element object to allow for processing" + ], + "sin": [ + "float sin(float number)", + "Returns the sine of the number in radians" + ], + "sinh": [ + "float sinh(float number)", + "Returns the hyperbolic sine of the number, defined as (exp(number) - exp(-number))/2" + ], + "sleep": [ + "void sleep(int seconds)", + "Delay for a given number of seconds" + ], + "smfi_addheader": [ + "bool smfi_addheader(string headerf, string headerv)", + "Adds a header to the current message." + ], + "smfi_addrcpt": [ + "bool smfi_addrcpt(string rcpt)", + "Add a recipient to the message envelope." + ], + "smfi_chgheader": [ + "bool smfi_chgheader(string headerf, string headerv)", + "Changes a header's value for the current message." + ], + "smfi_delrcpt": [ + "bool smfi_delrcpt(string rcpt)", + "Removes the named recipient from the current message's envelope." + ], + "smfi_getsymval": [ + "string smfi_getsymval(string macro)", + "Returns the value of the given macro or NULL if the macro is not defined." + ], + "smfi_replacebody": [ + "bool smfi_replacebody(string body)", + "Replaces the body of the current message. If called more than once, subsequent calls result in data being appended to the new body." + ], + "smfi_setflags": [ + "void smfi_setflags(long flags)", + "Sets the flags describing the actions the filter may take." + ], + "smfi_setreply": [ + "bool smfi_setreply(string rcode, string xcode, string message)", + "Directly set the SMTP error reply code for this connection. This code will be used on subsequent error replies resulting from actions taken by this filter." + ], + "smfi_settimeout": [ + "void smfi_settimeout(long timeout)", + "Sets the number of seconds libmilter will wait for an MTA connection before timing out a socket." + ], + "snmp2_get": [ + "string snmp2_get(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmp2_getnext": [ + "string snmp2_getnext(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmp2_real_walk": [ + "array snmp2_real_walk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects including their respective object id withing the specified one" + ], + "snmp2_set": [ + "int snmp2_set(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Set the value of a SNMP object" + ], + "snmp2_walk": [ + "array snmp2_walk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects under the specified object id" + ], + "snmp3_get": [ + "int snmp3_get(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_getnext": [ + "int snmp3_getnext(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_real_walk": [ + "int snmp3_real_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_set": [ + "int snmp3_set(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp3_walk": [ + "int snmp3_walk(string host, string sec_name, string sec_level, string auth_protocol, string auth_passphrase, string priv_protocol, string priv_passphrase, string object_id [, int timeout [, int retries]])", + "Fetch the value of a SNMP object" + ], + "snmp_get_quick_print": [ + "bool snmp_get_quick_print(void)", + "Return the current status of quick_print" + ], + "snmp_get_valueretrieval": [ + "int snmp_get_valueretrieval()", + "Return the method how the SNMP values will be returned" + ], + "snmp_read_mib": [ + "int snmp_read_mib(string filename)", + "Reads and parses a MIB file into the active MIB tree." + ], + "snmp_set_enum_print": [ + "void snmp_set_enum_print(int enum_print)", + "Return all values that are enums with their enum value instead of the raw integer" + ], + "snmp_set_oid_output_format": [ + "void snmp_set_oid_output_format(int oid_format)", + "Set the OID output format." + ], + "snmp_set_quick_print": [ + "void snmp_set_quick_print(int quick_print)", + "Return all objects including their respective object id withing the specified one" + ], + "snmp_set_valueretrieval": [ + "void snmp_set_valueretrieval(int method)", + "Specify the method how the SNMP values will be returned" + ], + "snmpget": [ + "string snmpget(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmpgetnext": [ + "string snmpgetnext(string host, string community, string object_id [, int timeout [, int retries]])", + "Fetch a SNMP object" + ], + "snmprealwalk": [ + "array snmprealwalk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects including their respective object id withing the specified one" + ], + "snmpset": [ + "int snmpset(string host, string community, string object_id, string type, mixed value [, int timeout [, int retries]])", + "Set the value of a SNMP object" + ], + "snmpwalk": [ + "array snmpwalk(string host, string community, string object_id [, int timeout [, int retries]])", + "Return all objects under the specified object id" + ], + "socket_accept": [ + "resource socket_accept(resource socket)", + "Accepts a connection on the listening socket fd" + ], + "socket_bind": [ + "bool socket_bind(resource socket, string addr [, int port])", + "Binds an open socket to a listening port, port is only specified in AF_INET family." + ], + "socket_clear_error": [ + "void socket_clear_error([resource socket])", + "Clears the error on the socket or the last error code." + ], + "socket_close": [ + "void socket_close(resource socket)", + "Closes a file descriptor" + ], + "socket_connect": [ + "bool socket_connect(resource socket, string addr [, int port])", + "Opens a connection to addr:port on the socket specified by socket" + ], + "socket_create": [ + "resource socket_create(int domain, int type, int protocol)", + "Creates an endpoint for communication in the domain specified by domain, of type specified by type" + ], + "socket_create_listen": [ + "resource socket_create_listen(int port[, int backlog])", + "Opens a socket on port to accept connections" + ], + "socket_create_pair": [ + "bool socket_create_pair(int domain, int type, int protocol, array &fd)", + "Creates a pair of indistinguishable sockets and stores them in fds." + ], + "socket_get_option": [ + "mixed socket_get_option(resource socket, int level, int optname)", + "Gets socket options for the socket" + ], + "socket_getpeername": [ + "bool socket_getpeername(resource socket, string &addr[, int &port])", + "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type." + ], + "socket_getsockname": [ + "bool socket_getsockname(resource socket, string &addr[, int &port])", + "Queries the remote side of the given socket which may either result in host/port or in a UNIX filesystem path, dependent on its type." + ], + "socket_last_error": [ + "int socket_last_error([resource socket])", + "Returns the last socket error (either the last used or the provided socket resource)" + ], + "socket_listen": [ + "bool socket_listen(resource socket[, int backlog])", + "Sets the maximum number of connections allowed to be waited for on the socket specified by fd" + ], + "socket_read": [ + "string socket_read(resource socket, int length [, int type])", + "Reads a maximum of length bytes from socket" + ], + "socket_recv": [ + "int socket_recv(resource socket, string &buf, int len, int flags)", + "Receives data from a connected socket" + ], + "socket_recvfrom": [ + "int socket_recvfrom(resource socket, string &buf, int len, int flags, string &name [, int &port])", + "Receives data from a socket, connected or not" + ], + "socket_select": [ + "int socket_select(array &read_fds, array &write_fds, array &except_fds, int tv_sec[, int tv_usec])", + "Runs the select() system call on the sets mentioned with a timeout specified by tv_sec and tv_usec" + ], + "socket_send": [ + "int socket_send(resource socket, string buf, int len, int flags)", + "Sends data to a connected socket" + ], + "socket_sendto": [ + "int socket_sendto(resource socket, string buf, int len, int flags, string addr [, int port])", + "Sends a message to a socket, whether it is connected or not" + ], + "socket_set_block": [ + "bool socket_set_block(resource socket)", + "Sets blocking mode on a socket resource" + ], + "socket_set_nonblock": [ + "bool socket_set_nonblock(resource socket)", + "Sets nonblocking mode on a socket resource" + ], + "socket_set_option": [ + "bool socket_set_option(resource socket, int level, int optname, int|array optval)", + "Sets socket options for the socket" + ], + "socket_shutdown": [ + "bool socket_shutdown(resource socket[, int how])", + "Shuts down a socket for receiving, sending, or both." + ], + "socket_strerror": [ + "string socket_strerror(int errno)", + "Returns a string describing an error" + ], + "socket_write": [ + "int socket_write(resource socket, string buf[, int length])", + "Writes the buffer to the socket resource, length is optional" + ], + "solid_fetch_prev": [ + "bool solid_fetch_prev(resource result_id)", + "" + ], + "sort": [ + "bool sort(array &array_arg [, int sort_flags])", + "Sort an array" + ], + "soundex": [ + "string soundex(string str)", + "Calculate the soundex key of a string" + ], + "spl_autoload": [ + "void spl_autoload(string class_name [, string file_extensions])", + "Default implementation for __autoload()" + ], + "spl_autoload_call": [ + "void spl_autoload_call(string class_name)", + "Try all registerd autoload function to load the requested class" + ], + "spl_autoload_extensions": [ + "string spl_autoload_extensions([string file_extensions])", + "Register and return default file extensions for spl_autoload" + ], + "spl_autoload_functions": [ + "false|array spl_autoload_functions()", + "Return all registered __autoload() functionns" + ], + "spl_autoload_register": [ + "bool spl_autoload_register([mixed autoload_function = \"spl_autoload\" [, throw = true [, prepend]]])", + "Register given function as __autoload() implementation" + ], + "spl_autoload_unregister": [ + "bool spl_autoload_unregister(mixed autoload_function)", + "Unregister given function as __autoload() implementation" + ], + "spl_classes": [ + "array spl_classes()", + "Return an array containing the names of all clsses and interfaces defined in SPL" + ], + "spl_object_hash": [ + "string spl_object_hash(object obj)", + "Return hash id for given object" + ], + "split": [ + "array split(string pattern, string string [, int limit])", + "Split string into array by regular expression" + ], + "spliti": [ + "array spliti(string pattern, string string [, int limit])", + "Split string into array by regular expression case-insensitive" + ], + "sprintf": [ + "string sprintf(string format [, mixed arg1 [, mixed ...]])", + "Return a formatted string" + ], + "sql_regcase": [ + "string sql_regcase(string string)", + "Make regular expression for case insensitive match" + ], + "sqlite_array_query": [ + "array sqlite_array_query(resource db, string query [ , int result_type [, bool decode_binary]])", + "Executes a query against a given database and returns an array of arrays." + ], + "sqlite_busy_timeout": [ + "void sqlite_busy_timeout(resource db, int ms)", + "Set busy timeout duration. If ms <= 0, all busy handlers are disabled." + ], + "sqlite_changes": [ + "int sqlite_changes(resource db)", + "Returns the number of rows that were changed by the most recent SQL statement." + ], + "sqlite_close": [ + "void sqlite_close(resource db)", + "Closes an open sqlite database." + ], + "sqlite_column": [ + "mixed sqlite_column(resource result, mixed index_or_name [, bool decode_binary])", + "Fetches a column from the current row of a result set." + ], + "sqlite_create_aggregate": [ + "bool sqlite_create_aggregate(resource db, string funcname, mixed step_func, mixed finalize_func[, long num_args])", + "Registers an aggregate function for queries." + ], + "sqlite_create_function": [ + "bool sqlite_create_function(resource db, string funcname, mixed callback[, long num_args])", + "Registers a \"regular\" function for queries." + ], + "sqlite_current": [ + "array sqlite_current(resource result [, int result_type [, bool decode_binary]])", + "Fetches the current row from a result set as an array." + ], + "sqlite_error_string": [ + "string sqlite_error_string(int error_code)", + "Returns the textual description of an error code." + ], + "sqlite_escape_string": [ + "string sqlite_escape_string(string item)", + "Escapes a string for use as a query parameter." + ], + "sqlite_exec": [ + "boolean sqlite_exec(string query, resource db[, string &error_message])", + "Executes a result-less query against a given database" + ], + "sqlite_factory": [ + "object sqlite_factory(string filename [, int mode [, string &error_message]])", + "Opens a SQLite database and creates an object for it. Will create the database if it does not exist." + ], + "sqlite_fetch_all": [ + "array sqlite_fetch_all(resource result [, int result_type [, bool decode_binary]])", + "Fetches all rows from a result set as an array of arrays." + ], + "sqlite_fetch_array": [ + "array sqlite_fetch_array(resource result [, int result_type [, bool decode_binary]])", + "Fetches the next row from a result set as an array." + ], + "sqlite_fetch_column_types": [ + "resource sqlite_fetch_column_types(string table_name, resource db [, int result_type])", + "Return an array of column types from a particular table." + ], + "sqlite_fetch_object": [ + "object sqlite_fetch_object(resource result [, string class_name [, NULL|array ctor_params [, bool decode_binary]]])", + "Fetches the next row from a result set as an object." + ], + "sqlite_fetch_single": [ + "string sqlite_fetch_single(resource result [, bool decode_binary])", + "Fetches the first column of a result set as a string." + ], + "sqlite_field_name": [ + "string sqlite_field_name(resource result, int field_index)", + "Returns the name of a particular field of a result set." + ], + "sqlite_has_prev": [ + "bool sqlite_has_prev(resource result)", + "* Returns whether a previous row is available." + ], + "sqlite_key": [ + "int sqlite_key(resource result)", + "Return the current row index of a buffered result." + ], + "sqlite_last_error": [ + "int sqlite_last_error(resource db)", + "Returns the error code of the last error for a database." + ], + "sqlite_last_insert_rowid": [ + "int sqlite_last_insert_rowid(resource db)", + "Returns the rowid of the most recently inserted row." + ], + "sqlite_libencoding": [ + "string sqlite_libencoding()", + "Returns the encoding (iso8859 or UTF-8) of the linked SQLite library." + ], + "sqlite_libversion": [ + "string sqlite_libversion()", + "Returns the version of the linked SQLite library." + ], + "sqlite_next": [ + "bool sqlite_next(resource result)", + "Seek to the next row number of a result set." + ], + "sqlite_num_fields": [ + "int sqlite_num_fields(resource result)", + "Returns the number of fields in a result set." + ], + "sqlite_num_rows": [ + "int sqlite_num_rows(resource result)", + "Returns the number of rows in a buffered result set." + ], + "sqlite_open": [ + "resource sqlite_open(string filename [, int mode [, string &error_message]])", + "Opens a SQLite database. Will create the database if it does not exist." + ], + "sqlite_popen": [ + "resource sqlite_popen(string filename [, int mode [, string &error_message]])", + "Opens a persistent handle to a SQLite database. Will create the database if it does not exist." + ], + "sqlite_prev": [ + "bool sqlite_prev(resource result)", + "* Seek to the previous row number of a result set." + ], + "sqlite_query": [ + "resource sqlite_query(string query, resource db [, int result_type [, string &error_message]])", + "Executes a query against a given database and returns a result handle." + ], + "sqlite_rewind": [ + "bool sqlite_rewind(resource result)", + "Seek to the first row number of a buffered result set." + ], + "sqlite_seek": [ + "bool sqlite_seek(resource result, int row)", + "Seek to a particular row number of a buffered result set." + ], + "sqlite_single_query": [ + "array sqlite_single_query(resource db, string query [, bool first_row_only [, bool decode_binary]])", + "Executes a query and returns either an array for one single column or the value of the first row." + ], + "sqlite_udf_decode_binary": [ + "string sqlite_udf_decode_binary(string data)", + "Decode binary encoding on a string parameter passed to an UDF." + ], + "sqlite_udf_encode_binary": [ + "string sqlite_udf_encode_binary(string data)", + "Apply binary encoding (if required) to a string to return from an UDF." + ], + "sqlite_unbuffered_query": [ + "resource sqlite_unbuffered_query(string query, resource db [ , int result_type [, string &error_message]])", + "Executes a query that does not prefetch and buffer all data." + ], + "sqlite_valid": [ + "bool sqlite_valid(resource result)", + "Returns whether more rows are available." + ], + "sqrt": [ + "float sqrt(float number)", + "Returns the square root of the number" + ], + "srand": [ + "void srand([int seed])", + "Seeds random number generator" + ], + "sscanf": [ + "mixed sscanf(string str, string format [, string ...])", + "Implements an ANSI C compatible sscanf" + ], + "stat": [ + "array stat(string filename)", + "Give information about a file" + ], + "str_getcsv": [ + "array str_getcsv(string input[, string delimiter[, string enclosure[, string escape]]])", + "Parse a CSV string into an array" + ], + "str_ireplace": [ + "mixed str_ireplace(mixed search, mixed replace, mixed subject [, int &replace_count])", + "Replaces all occurrences of search in haystack with replace / case-insensitive" + ], + "str_pad": [ + "string str_pad(string input, int pad_length [, string pad_string [, int pad_type]])", + "Returns input string padded on the left or right to specified length with pad_string" + ], + "str_repeat": [ + "string str_repeat(string input, int mult)", + "Returns the input string repeat mult times" + ], + "str_replace": [ + "mixed str_replace(mixed search, mixed replace, mixed subject [, int &replace_count])", + "Replaces all occurrences of search in haystack with replace" + ], + "str_rot13": [ + "string str_rot13(string str)", + "Perform the rot13 transform on a string" + ], + "str_shuffle": [ + "void str_shuffle(string str)", + "Shuffles string. One permutation of all possible is created" + ], + "str_split": [ + "array str_split(string str [, int split_length])", + "Convert a string to an array. If split_length is specified, break the string down into chunks each split_length characters long." + ], + "str_word_count": [ + "mixed str_word_count(string str, [int format [, string charlist]])", + "Counts the number of words inside a string. If format of 1 is specified, then the function will return an array containing all the words found inside the string. If format of 2 is specified, then the function will return an associated array where the position of the word is the key and the word itself is the value. For the purpose of this function, 'word' is defined as a locale dependent string containing alphabetic characters, which also may contain, but not start with \"'\" and \"-\" characters." + ], + "strcasecmp": [ + "int strcasecmp(string str1, string str2)", + "Binary safe case-insensitive string comparison" + ], + "strchr": [ + "string strchr(string haystack, string needle)", + "An alias for strstr" + ], + "strcmp": [ + "int strcmp(string str1, string str2)", + "Binary safe string comparison" + ], + "strcoll": [ + "int strcoll(string str1, string str2)", + "Compares two strings using the current locale" + ], + "strcspn": [ + "int strcspn(string str, string mask [, start [, len]])", + "Finds length of initial segment consisting entirely of characters not found in mask. If start or/and length is provide works like strcspn(substr($s,$start,$len),$bad_chars)" + ], + "stream_bucket_append": [ + "void stream_bucket_append(resource brigade, resource bucket)", + "Append bucket to brigade" + ], + "stream_bucket_make_writeable": [ + "object stream_bucket_make_writeable(resource brigade)", + "Return a bucket object from the brigade for operating on" + ], + "stream_bucket_new": [ + "resource stream_bucket_new(resource stream, string buffer)", + "Create a new bucket for use on the current stream" + ], + "stream_bucket_prepend": [ + "void stream_bucket_prepend(resource brigade, resource bucket)", + "Prepend bucket to brigade" + ], + "stream_context_create": [ + "resource stream_context_create([array options[, array params]])", + "Create a file context and optionally set parameters" + ], + "stream_context_get_default": [ + "resource stream_context_get_default([array options])", + "Get a handle on the default file/stream context and optionally set parameters" + ], + "stream_context_get_options": [ + "array stream_context_get_options(resource context|resource stream)", + "Retrieve options for a stream/wrapper/context" + ], + "stream_context_get_params": [ + "array stream_context_get_params(resource context|resource stream)", + "Get parameters of a file context" + ], + "stream_context_set_default": [ + "resource stream_context_set_default(array options)", + "Set default file/stream context, returns the context as a resource" + ], + "stream_context_set_option": [ + "bool stream_context_set_option(resource context|resource stream, string wrappername, string optionname, mixed value)", + "Set an option for a wrapper" + ], + "stream_context_set_params": [ + "bool stream_context_set_params(resource context|resource stream, array options)", + "Set parameters for a file context" + ], + "stream_copy_to_stream": [ + "long stream_copy_to_stream(resource source, resource dest [, long maxlen [, long pos]])", + "Reads up to maxlen bytes from source stream and writes them to dest stream." + ], + "stream_filter_append": [ + "resource stream_filter_append(resource stream, string filtername[, int read_write[, string filterparams]])", + "Append a filter to a stream" + ], + "stream_filter_prepend": [ + "resource stream_filter_prepend(resource stream, string filtername[, int read_write[, string filterparams]])", + "Prepend a filter to a stream" + ], + "stream_filter_register": [ + "bool stream_filter_register(string filtername, string classname)", + "Registers a custom filter handler class" + ], + "stream_filter_remove": [ + "bool stream_filter_remove(resource stream_filter)", + "Flushes any data in the filter's internal buffer, removes it from the chain, and frees the resource" + ], + "stream_get_contents": [ + "string stream_get_contents(resource source [, long maxlen [, long offset]])", + "Reads all remaining bytes (or up to maxlen bytes) from a stream and returns them as a string." + ], + "stream_get_filters": [ + "array stream_get_filters(void)", + "Returns a list of registered filters" + ], + "stream_get_line": [ + "string stream_get_line(resource stream, int maxlen [, string ending])", + "Read up to maxlen bytes from a stream or until the ending string is found" + ], + "stream_get_meta_data": [ + "array stream_get_meta_data(resource fp)", + "Retrieves header/meta data from streams/file pointers" + ], + "stream_get_transports": [ + "array stream_get_transports()", + "Retrieves list of registered socket transports" + ], + "stream_get_wrappers": [ + "array stream_get_wrappers()", + "Retrieves list of registered stream wrappers" + ], + "stream_is_local": [ + "bool stream_is_local(resource stream|string url)", + "" + ], + "stream_resolve_include_path": [ + "string stream_resolve_include_path(string filename)", + "Determine what file will be opened by calls to fopen() with a relative path" + ], + "stream_select": [ + "int stream_select(array &read_streams, array &write_streams, array &except_streams, int tv_sec[, int tv_usec])", + "Runs the select() system call on the sets of streams with a timeout specified by tv_sec and tv_usec" + ], + "stream_set_blocking": [ + "bool stream_set_blocking(resource socket, int mode)", + "Set blocking/non-blocking mode on a socket or stream" + ], + "stream_set_timeout": [ + "bool stream_set_timeout(resource stream, int seconds [, int microseconds])", + "Set timeout on stream read to seconds + microseonds" + ], + "stream_set_write_buffer": [ + "int stream_set_write_buffer(resource fp, int buffer)", + "Set file write buffer" + ], + "stream_socket_accept": [ + "resource stream_socket_accept(resource serverstream, [ double timeout [, string &peername ]])", + "Accept a client connection from a server socket" + ], + "stream_socket_client": [ + "resource stream_socket_client(string remoteaddress [, long &errcode [, string &errstring [, double timeout [, long flags [, resource context]]]]])", + "Open a client connection to a remote address" + ], + "stream_socket_enable_crypto": [ + "int stream_socket_enable_crypto(resource stream, bool enable [, int cryptokind [, resource sessionstream]])", + "Enable or disable a specific kind of crypto on the stream" + ], + "stream_socket_get_name": [ + "string stream_socket_get_name(resource stream, bool want_peer)", + "Returns either the locally bound or remote name for a socket stream" + ], + "stream_socket_pair": [ + "array stream_socket_pair(int domain, int type, int protocol)", + "Creates a pair of connected, indistinguishable socket streams" + ], + "stream_socket_recvfrom": [ + "string stream_socket_recvfrom(resource stream, long amount [, long flags [, string &remote_addr]])", + "Receives data from a socket stream" + ], + "stream_socket_sendto": [ + "long stream_socket_sendto(resouce stream, string data [, long flags [, string target_addr]])", + "Send data to a socket stream. If target_addr is specified it must be in dotted quad (or [ipv6]) format" + ], + "stream_socket_server": [ + "resource stream_socket_server(string localaddress [, long &errcode [, string &errstring [, long flags [, resource context]]]])", + "Create a server socket bound to localaddress" + ], + "stream_socket_shutdown": [ + "int stream_socket_shutdown(resource stream, int how)", + "causes all or part of a full-duplex connection on the socket associated with stream to be shut down. If how is SHUT_RD, further receptions will be disallowed. If how is SHUT_WR, further transmissions will be disallowed. If how is SHUT_RDWR, further receptions and transmissions will be disallowed." + ], + "stream_supports_lock": [ + "bool stream_supports_lock(resource stream)", + "Tells whether the stream supports locking through flock()." + ], + "stream_wrapper_register": [ + "bool stream_wrapper_register(string protocol, string classname[, integer flags])", + "Registers a custom URL protocol handler class" + ], + "stream_wrapper_restore": [ + "bool stream_wrapper_restore(string protocol)", + "Restore the original protocol handler, overriding if necessary" + ], + "stream_wrapper_unregister": [ + "bool stream_wrapper_unregister(string protocol)", + "Unregister a wrapper for the life of the current request." + ], + "strftime": [ + "string strftime(string format [, int timestamp])", + "Format a local time/date according to locale settings" + ], + "strip_tags": [ + "string strip_tags(string str [, string allowable_tags])", + "Strips HTML and PHP tags from a string" + ], + "stripcslashes": [ + "string stripcslashes(string str)", + "Strips backslashes from a string. Uses C-style conventions" + ], + "stripos": [ + "int stripos(string haystack, string needle [, int offset])", + "Finds position of first occurrence of a string within another, case insensitive" + ], + "stripslashes": [ + "string stripslashes(string str)", + "Strips backslashes from a string" + ], + "stristr": [ + "string stristr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another, case insensitive" + ], + "strlen": [ + "int strlen(string str)", + "Get string length" + ], + "strnatcasecmp": [ + "int strnatcasecmp(string s1, string s2)", + "Returns the result of case-insensitive string comparison using 'natural' algorithm" + ], + "strnatcmp": [ + "int strnatcmp(string s1, string s2)", + "Returns the result of string comparison using 'natural' algorithm" + ], + "strncasecmp": [ + "int strncasecmp(string str1, string str2, int len)", + "Binary safe string comparison" + ], + "strncmp": [ + "int strncmp(string str1, string str2, int len)", + "Binary safe string comparison" + ], + "strpbrk": [ + "array strpbrk(string haystack, string char_list)", + "Search a string for any of a set of characters" + ], + "strpos": [ + "int strpos(string haystack, string needle [, int offset])", + "Finds position of first occurrence of a string within another" + ], + "strptime": [ + "string strptime(string timestamp, string format)", + "Parse a time/date generated with strftime()" + ], + "strrchr": [ + "string strrchr(string haystack, string needle)", + "Finds the last occurrence of a character in a string within another" + ], + "strrev": [ + "string strrev(string str)", + "Reverse a string" + ], + "strripos": [ + "int strripos(string haystack, string needle [, int offset])", + "Finds position of last occurrence of a string within another string" + ], + "strrpos": [ + "int strrpos(string haystack, string needle [, int offset])", + "Finds position of last occurrence of a string within another string" + ], + "strspn": [ + "int strspn(string str, string mask [, start [, len]])", + "Finds length of initial segment consisting entirely of characters found in mask. If start or/and length is provided works like strspn(substr($s,$start,$len),$good_chars)" + ], + "strstr": [ + "string strstr(string haystack, string needle[, bool part])", + "Finds first occurrence of a string within another" + ], + "strtok": [ + "string strtok([string str,] string token)", + "Tokenize a string" + ], + "strtolower": [ + "string strtolower(string str)", + "Makes a string lowercase" + ], + "strtotime": [ + "int strtotime(string time [, int now ])", + "Convert string representation of date and time to a timestamp" + ], + "strtoupper": [ + "string strtoupper(string str)", + "Makes a string uppercase" + ], + "strtr": [ + "string strtr(string str, string from[, string to])", + "Translates characters in str using given translation tables" + ], + "strval": [ + "string strval(mixed var)", + "Get the string value of a variable" + ], + "substr": [ + "string substr(string str, int start [, int length])", + "Returns part of a string" + ], + "substr_compare": [ + "int substr_compare(string main_str, string str, int offset [, int length [, bool case_sensitivity]])", + "Binary safe optionally case insensitive comparison of 2 strings from an offset, up to length characters" + ], + "substr_count": [ + "int substr_count(string haystack, string needle [, int offset [, int length]])", + "Returns the number of times a substring occurs in the string" + ], + "substr_replace": [ + "mixed substr_replace(mixed str, mixed repl, mixed start [, mixed length])", + "Replaces part of a string with another string" + ], + "sybase_affected_rows": [ + "int sybase_affected_rows([resource link_id])", + "Get number of affected rows in last query" + ], + "sybase_close": [ + "bool sybase_close([resource link_id])", + "Close Sybase connection" + ], + "sybase_connect": [ + "int sybase_connect([string host [, string user [, string password [, string charset [, string appname [, bool new]]]]]])", + "Open Sybase server connection" + ], + "sybase_data_seek": [ + "bool sybase_data_seek(resource result, int offset)", + "Move internal row pointer" + ], + "sybase_deadlock_retry_count": [ + "void sybase_deadlock_retry_count(int retry_count)", + "Sets deadlock retry count" + ], + "sybase_fetch_array": [ + "array sybase_fetch_array(resource result)", + "Fetch row as array" + ], + "sybase_fetch_assoc": [ + "array sybase_fetch_assoc(resource result)", + "Fetch row as array without numberic indices" + ], + "sybase_fetch_field": [ + "object sybase_fetch_field(resource result [, int offset])", + "Get field information" + ], + "sybase_fetch_object": [ + "object sybase_fetch_object(resource result [, mixed object])", + "Fetch row as object" + ], + "sybase_fetch_row": [ + "array sybase_fetch_row(resource result)", + "Get row as enumerated array" + ], + "sybase_field_seek": [ + "bool sybase_field_seek(resource result, int offset)", + "Set field offset" + ], + "sybase_free_result": [ + "bool sybase_free_result(resource result)", + "Free result memory" + ], + "sybase_get_last_message": [ + "string sybase_get_last_message(void)", + "Returns the last message from server (over min_message_severity)" + ], + "sybase_min_client_severity": [ + "void sybase_min_client_severity(int severity)", + "Sets minimum client severity" + ], + "sybase_min_server_severity": [ + "void sybase_min_server_severity(int severity)", + "Sets minimum server severity" + ], + "sybase_num_fields": [ + "int sybase_num_fields(resource result)", + "Get number of fields in result" + ], + "sybase_num_rows": [ + "int sybase_num_rows(resource result)", + "Get number of rows in result" + ], + "sybase_pconnect": [ + "int sybase_pconnect([string host [, string user [, string password [, string charset [, string appname]]]]])", + "Open persistent Sybase connection" + ], + "sybase_query": [ + "int sybase_query(string query [, resource link_id])", + "Send Sybase query" + ], + "sybase_result": [ + "string sybase_result(resource result, int row, mixed field)", + "Get result data" + ], + "sybase_select_db": [ + "bool sybase_select_db(string database [, resource link_id])", + "Select Sybase database" + ], + "sybase_set_message_handler": [ + "bool sybase_set_message_handler(mixed error_func [, resource connection])", + "Set the error handler, to be called when a server message is raised. If error_func is NULL the handler will be deleted" + ], + "sybase_unbuffered_query": [ + "int sybase_unbuffered_query(string query [, resource link_id])", + "Send Sybase query" + ], + "symlink": [ + "int symlink(string target, string link)", + "Create a symbolic link" + ], + "sys_get_temp_dir": [ + "string sys_get_temp_dir()", + "Returns directory path used for temporary files" + ], + "sys_getloadavg": [ + "array sys_getloadavg()", + "" + ], + "syslog": [ + "bool syslog(int priority, string message)", + "Generate a system log message" + ], + "system": [ + "int system(string command [, int &return_value])", + "Execute an external program and display output" + ], + "tan": [ + "float tan(float number)", + "Returns the tangent of the number in radians" + ], + "tanh": [ + "float tanh(float number)", + "Returns the hyperbolic tangent of the number, defined as sinh(number)/cosh(number)" + ], + "tempnam": [ + "string tempnam(string dir, string prefix)", + "Create a unique filename in a directory" + ], + "textdomain": [ + "string textdomain(string domain)", + "Set the textdomain to \"domain\". Returns the current domain" + ], + "tidy_access_count": [ + "int tidy_access_count()", + "Returns the Number of Tidy accessibility warnings encountered for specified document." + ], + "tidy_clean_repair": [ + "boolean tidy_clean_repair()", + "Execute configured cleanup and repair operations on parsed markup" + ], + "tidy_config_count": [ + "int tidy_config_count()", + "Returns the Number of Tidy configuration errors encountered for specified document." + ], + "tidy_diagnose": [ + "boolean tidy_diagnose()", + "Run configured diagnostics on parsed and repaired markup." + ], + "tidy_error_count": [ + "int tidy_error_count()", + "Returns the Number of Tidy errors encountered for specified document." + ], + "tidy_get_body": [ + "TidyNode tidy_get_body(resource tidy)", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_config": [ + "array tidy_get_config()", + "Get current Tidy configuarion" + ], + "tidy_get_error_buffer": [ + "string tidy_get_error_buffer([boolean detailed])", + "Return warnings and errors which occured parsing the specified document" + ], + "tidy_get_head": [ + "TidyNode tidy_get_head()", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_html": [ + "TidyNode tidy_get_html()", + "Returns a TidyNode Object starting from the tag of the tidy parse tree" + ], + "tidy_get_html_ver": [ + "int tidy_get_html_ver()", + "Get the Detected HTML version for the specified document." + ], + "tidy_get_opt_doc": [ + "string tidy_get_opt_doc(tidy resource, string optname)", + "Returns the documentation for the given option name" + ], + "tidy_get_output": [ + "string tidy_get_output()", + "Return a string representing the parsed tidy markup" + ], + "tidy_get_release": [ + "string tidy_get_release()", + "Get release date (version) for Tidy library" + ], + "tidy_get_root": [ + "TidyNode tidy_get_root()", + "Returns a TidyNode Object representing the root of the tidy parse tree" + ], + "tidy_get_status": [ + "int tidy_get_status()", + "Get status of specfied document." + ], + "tidy_getopt": [ + "mixed tidy_getopt(string option)", + "Returns the value of the specified configuration option for the tidy document." + ], + "tidy_is_xhtml": [ + "boolean tidy_is_xhtml()", + "Indicates if the document is a XHTML document." + ], + "tidy_is_xml": [ + "boolean tidy_is_xml()", + "Indicates if the document is a generic (non HTML/XHTML) XML document." + ], + "tidy_parse_file": [ + "boolean tidy_parse_file(string file [, mixed config_options [, string encoding [, bool use_include_path]]])", + "Parse markup in file or URI" + ], + "tidy_parse_string": [ + "bool tidy_parse_string(string input [, mixed config_options [, string encoding]])", + "Parse a document stored in a string" + ], + "tidy_repair_file": [ + "boolean tidy_repair_file(string filename [, mixed config_file [, string encoding [, bool use_include_path]]])", + "Repair a file using an optionally provided configuration file" + ], + "tidy_repair_string": [ + "boolean tidy_repair_string(string data [, mixed config_file [, string encoding]])", + "Repair a string using an optionally provided configuration file" + ], + "tidy_warning_count": [ + "int tidy_warning_count()", + "Returns the Number of Tidy warnings encountered for specified document." + ], + "time": [ + "int time(void)", + "Return current UNIX timestamp" + ], + "time_nanosleep": [ + "mixed time_nanosleep(long seconds, long nanoseconds)", + "Delay for a number of seconds and nano seconds" + ], + "time_sleep_until": [ + "mixed time_sleep_until(float timestamp)", + "Make the script sleep until the specified time" + ], + "timezone_abbreviations_list": [ + "array timezone_abbreviations_list()", + "Returns associative array containing dst, offset and the timezone name" + ], + "timezone_identifiers_list": [ + "array timezone_identifiers_list([long what[, string country]])", + "Returns numerically index array with all timezone identifiers." + ], + "timezone_location_get": [ + "array timezone_location_get()", + "Returns location information for a timezone, including country code, latitude/longitude and comments" + ], + "timezone_name_from_abbr": [ + "string timezone_name_from_abbr(string abbr[, long gmtOffset[, long isdst]])", + "Returns the timezone name from abbrevation" + ], + "timezone_name_get": [ + "string timezone_name_get(DateTimeZone object)", + "Returns the name of the timezone." + ], + "timezone_offset_get": [ + "long timezone_offset_get(DateTimeZone object, DateTime object)", + "Returns the timezone offset." + ], + "timezone_open": [ + "DateTimeZone timezone_open(string timezone)", + "Returns new DateTimeZone object" + ], + "timezone_transitions_get": [ + "array timezone_transitions_get(DateTimeZone object [, long timestamp_begin [, long timestamp_end ]])", + "Returns numerically indexed array containing associative array for all transitions in the specified range for the timezone." + ], + "timezone_version_get": [ + "array timezone_version_get()", + "Returns the Olson database version number." + ], + "tmpfile": [ + "resource tmpfile(void)", + "Create a temporary file that will be deleted automatically after use" + ], + "token_get_all": [ + "array token_get_all(string source)", + "" + ], + "token_name": [ + "string token_name(int type)", + "" + ], + "touch": [ + "bool touch(string filename [, int time [, int atime]])", + "Set modification time of file" + ], + "trigger_error": [ + "void trigger_error(string messsage [, int error_type])", + "Generates a user-level error/warning/notice message" + ], + "trim": [ + "string trim(string str [, string character_mask])", + "Strips whitespace from the beginning and end of a string" + ], + "uasort": [ + "bool uasort(array array_arg, string cmp_function)", + "Sort an array with a user-defined comparison function and maintain index association" + ], + "ucfirst": [ + "string ucfirst(string str)", + "Make a string's first character lowercase" + ], + "ucwords": [ + "string ucwords(string str)", + "Uppercase the first character of every word in a string" + ], + "uksort": [ + "bool uksort(array array_arg, string cmp_function)", + "Sort an array by keys using a user-defined comparison function" + ], + "umask": [ + "int umask([int mask])", + "Return or change the umask" + ], + "uniqid": [ + "string uniqid([string prefix [, bool more_entropy]])", + "Generates a unique ID" + ], + "unixtojd": [ + "int unixtojd([int timestamp])", + "Convert UNIX timestamp to Julian Day" + ], + "unlink": [ + "bool unlink(string filename[, context context])", + "Delete a file" + ], + "unpack": [ + "array unpack(string format, string input)", + "Unpack binary string into named array elements according to format argument" + ], + "unregister_tick_function": [ + "void unregister_tick_function(string function_name)", + "Unregisters a tick callback function" + ], + "unserialize": [ + "mixed unserialize(string variable_representation)", + "Takes a string representation of variable and recreates it" + ], + "unset": [ + "void unset (mixed var [, mixed var])", + "Unset a given variable" + ], + "urldecode": [ + "string urldecode(string str)", + "Decodes URL-encoded string" + ], + "urlencode": [ + "string urlencode(string str)", + "URL-encodes string" + ], + "usleep": [ + "void usleep(int micro_seconds)", + "Delay for a given number of micro seconds" + ], + "usort": [ + "bool usort(array array_arg, string cmp_function)", + "Sort an array by values using a user-defined comparison function" + ], + "utf8_decode": [ + "string utf8_decode(string data)", + "Converts a UTF-8 encoded string to ISO-8859-1" + ], + "utf8_encode": [ + "string utf8_encode(string data)", + "Encodes an ISO-8859-1 string to UTF-8" + ], + "var_dump": [ + "void var_dump(mixed var)", + "Dumps a string representation of variable to output" + ], + "var_export": [ + "mixed var_export(mixed var [, bool return])", + "Outputs or returns a string representation of a variable" + ], + "variant_abs": [ + "mixed variant_abs(mixed left)", + "Returns the absolute value of a variant" + ], + "variant_add": [ + "mixed variant_add(mixed left, mixed right)", + "\"Adds\" two variant values together and returns the result" + ], + "variant_and": [ + "mixed variant_and(mixed left, mixed right)", + "performs a bitwise AND operation between two variants and returns the result" + ], + "variant_cast": [ + "object variant_cast(object variant, int type)", + "Convert a variant into a new variant object of another type" + ], + "variant_cat": [ + "mixed variant_cat(mixed left, mixed right)", + "concatenates two variant values together and returns the result" + ], + "variant_cmp": [ + "int variant_cmp(mixed left, mixed right [, int lcid [, int flags]])", + "Compares two variants" + ], + "variant_date_from_timestamp": [ + "object variant_date_from_timestamp(int timestamp)", + "Returns a variant date representation of a unix timestamp" + ], + "variant_date_to_timestamp": [ + "int variant_date_to_timestamp(object variant)", + "Converts a variant date/time value to unix timestamp" + ], + "variant_div": [ + "mixed variant_div(mixed left, mixed right)", + "Returns the result from dividing two variants" + ], + "variant_eqv": [ + "mixed variant_eqv(mixed left, mixed right)", + "Performs a bitwise equivalence on two variants" + ], + "variant_fix": [ + "mixed variant_fix(mixed left)", + "Returns the integer part ? of a variant" + ], + "variant_get_type": [ + "int variant_get_type(object variant)", + "Returns the VT_XXX type code for a variant" + ], + "variant_idiv": [ + "mixed variant_idiv(mixed left, mixed right)", + "Converts variants to integers and then returns the result from dividing them" + ], + "variant_imp": [ + "mixed variant_imp(mixed left, mixed right)", + "Performs a bitwise implication on two variants" + ], + "variant_int": [ + "mixed variant_int(mixed left)", + "Returns the integer portion of a variant" + ], + "variant_mod": [ + "mixed variant_mod(mixed left, mixed right)", + "Divides two variants and returns only the remainder" + ], + "variant_mul": [ + "mixed variant_mul(mixed left, mixed right)", + "multiplies the values of the two variants and returns the result" + ], + "variant_neg": [ + "mixed variant_neg(mixed left)", + "Performs logical negation on a variant" + ], + "variant_not": [ + "mixed variant_not(mixed left)", + "Performs bitwise not negation on a variant" + ], + "variant_or": [ + "mixed variant_or(mixed left, mixed right)", + "Performs a logical disjunction on two variants" + ], + "variant_pow": [ + "mixed variant_pow(mixed left, mixed right)", + "Returns the result of performing the power function with two variants" + ], + "variant_round": [ + "mixed variant_round(mixed left, int decimals)", + "Rounds a variant to the specified number of decimal places" + ], + "variant_set": [ + "void variant_set(object variant, mixed value)", + "Assigns a new value for a variant object" + ], + "variant_set_type": [ + "void variant_set_type(object variant, int type)", + "Convert a variant into another type. Variant is modified \"in-place\"" + ], + "variant_sub": [ + "mixed variant_sub(mixed left, mixed right)", + "subtracts the value of the right variant from the left variant value and returns the result" + ], + "variant_xor": [ + "mixed variant_xor(mixed left, mixed right)", + "Performs a logical exclusion on two variants" + ], + "version_compare": [ + "int version_compare(string ver1, string ver2 [, string oper])", + "Compares two \"PHP-standardized\" version number strings" + ], + "vfprintf": [ + "int vfprintf(resource stream, string format, array args)", + "Output a formatted string into a stream" + ], + "virtual": [ + "bool virtual(string filename)", + "Perform an Apache sub-request" + ], + "vprintf": [ + "int vprintf(string format, array args)", + "Output a formatted string" + ], + "vsprintf": [ + "string vsprintf(string format, array args)", + "Return a formatted string" + ], + "wddx_add_vars": [ + "int wddx_add_vars(resource packet_id, mixed var_names [, mixed ...])", + "Serializes given variables and adds them to packet given by packet_id" + ], + "wddx_deserialize": [ + "mixed wddx_deserialize(mixed packet)", + "Deserializes given packet and returns a PHP value" + ], + "wddx_packet_end": [ + "string wddx_packet_end(resource packet_id)", + "Ends specified WDDX packet and returns the string containing the packet" + ], + "wddx_packet_start": [ + "resource wddx_packet_start([string comment])", + "Starts a WDDX packet with optional comment and returns the packet id" + ], + "wddx_serialize_value": [ + "string wddx_serialize_value(mixed var [, string comment])", + "Creates a new packet and serializes the given value" + ], + "wddx_serialize_vars": [ + "string wddx_serialize_vars(mixed var_name [, mixed ...])", + "Creates a new packet and serializes given variables into a struct" + ], + "wordwrap": [ + "string wordwrap(string str [, int width [, string break [, boolean cut]]])", + "Wraps buffer to selected number of characters using string break char" + ], + "xml_error_string": [ + "string xml_error_string(int code)", + "Get XML parser error string" + ], + "xml_get_current_byte_index": [ + "int xml_get_current_byte_index(resource parser)", + "Get current byte index for an XML parser" + ], + "xml_get_current_column_number": [ + "int xml_get_current_column_number(resource parser)", + "Get current column number for an XML parser" + ], + "xml_get_current_line_number": [ + "int xml_get_current_line_number(resource parser)", + "Get current line number for an XML parser" + ], + "xml_get_error_code": [ + "int xml_get_error_code(resource parser)", + "Get XML parser error code" + ], + "xml_parse": [ + "int xml_parse(resource parser, string data [, int isFinal])", + "Start parsing an XML document" + ], + "xml_parse_into_struct": [ + "int xml_parse_into_struct(resource parser, string data, array &values [, array &index ])", + "Parsing a XML document" + ], + "xml_parser_create": [ + "resource xml_parser_create([string encoding])", + "Create an XML parser" + ], + "xml_parser_create_ns": [ + "resource xml_parser_create_ns([string encoding [, string sep]])", + "Create an XML parser" + ], + "xml_parser_free": [ + "int xml_parser_free(resource parser)", + "Free an XML parser" + ], + "xml_parser_get_option": [ + "int xml_parser_get_option(resource parser, int option)", + "Get options from an XML parser" + ], + "xml_parser_set_option": [ + "int xml_parser_set_option(resource parser, int option, mixed value)", + "Set options in an XML parser" + ], + "xml_set_character_data_handler": [ + "int xml_set_character_data_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_default_handler": [ + "int xml_set_default_handler(resource parser, string hdl)", + "Set up default handler" + ], + "xml_set_element_handler": [ + "int xml_set_element_handler(resource parser, string shdl, string ehdl)", + "Set up start and end element handlers" + ], + "xml_set_end_namespace_decl_handler": [ + "int xml_set_end_namespace_decl_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_external_entity_ref_handler": [ + "int xml_set_external_entity_ref_handler(resource parser, string hdl)", + "Set up external entity reference handler" + ], + "xml_set_notation_decl_handler": [ + "int xml_set_notation_decl_handler(resource parser, string hdl)", + "Set up notation declaration handler" + ], + "xml_set_object": [ + "int xml_set_object(resource parser, object &obj)", + "Set up object which should be used for callbacks" + ], + "xml_set_processing_instruction_handler": [ + "int xml_set_processing_instruction_handler(resource parser, string hdl)", + "Set up processing instruction (PI) handler" + ], + "xml_set_start_namespace_decl_handler": [ + "int xml_set_start_namespace_decl_handler(resource parser, string hdl)", + "Set up character data handler" + ], + "xml_set_unparsed_entity_decl_handler": [ + "int xml_set_unparsed_entity_decl_handler(resource parser, string hdl)", + "Set up unparsed entity declaration handler" + ], + "xmlrpc_decode": [ + "array xmlrpc_decode(string xml [, string encoding])", + "Decodes XML into native PHP types" + ], + "xmlrpc_decode_request": [ + "array xmlrpc_decode_request(string xml, string& method [, string encoding])", + "Decodes XML into native PHP types" + ], + "xmlrpc_encode": [ + "string xmlrpc_encode(mixed value)", + "Generates XML for a PHP value" + ], + "xmlrpc_encode_request": [ + "string xmlrpc_encode_request(string method, mixed params [, array output_options])", + "Generates XML for a method request" + ], + "xmlrpc_get_type": [ + "string xmlrpc_get_type(mixed value)", + "Gets xmlrpc type for a PHP value. Especially useful for base64 and datetime strings" + ], + "xmlrpc_is_fault": [ + "bool xmlrpc_is_fault(array)", + "Determines if an array value represents an XMLRPC fault." + ], + "xmlrpc_parse_method_descriptions": [ + "array xmlrpc_parse_method_descriptions(string xml)", + "Decodes XML into a list of method descriptions" + ], + "xmlrpc_server_add_introspection_data": [ + "int xmlrpc_server_add_introspection_data(resource server, array desc)", + "Adds introspection documentation" + ], + "xmlrpc_server_call_method": [ + "mixed xmlrpc_server_call_method(resource server, string xml, mixed user_data [, array output_options])", + "Parses XML requests and call methods" + ], + "xmlrpc_server_create": [ + "resource xmlrpc_server_create(void)", + "Creates an xmlrpc server" + ], + "xmlrpc_server_destroy": [ + "int xmlrpc_server_destroy(resource server)", + "Destroys server resources" + ], + "xmlrpc_server_register_introspection_callback": [ + "bool xmlrpc_server_register_introspection_callback(resource server, string function)", + "Register a PHP function to generate documentation" + ], + "xmlrpc_server_register_method": [ + "bool xmlrpc_server_register_method(resource server, string method_name, string function)", + "Register a PHP function to handle method matching method_name" + ], + "xmlrpc_set_type": [ + "bool xmlrpc_set_type(string value, string type)", + "Sets xmlrpc type, base64 or datetime, for a PHP string value" + ], + "xmlwriter_end_attribute": [ + "bool xmlwriter_end_attribute(resource xmlwriter)", + "End attribute - returns FALSE on error" + ], + "xmlwriter_end_cdata": [ + "bool xmlwriter_end_cdata(resource xmlwriter)", + "End current CDATA - returns FALSE on error" + ], + "xmlwriter_end_comment": [ + "bool xmlwriter_end_comment(resource xmlwriter)", + "Create end comment - returns FALSE on error" + ], + "xmlwriter_end_document": [ + "bool xmlwriter_end_document(resource xmlwriter)", + "End current document - returns FALSE on error" + ], + "xmlwriter_end_dtd": [ + "bool xmlwriter_end_dtd(resource xmlwriter)", + "End current DTD - returns FALSE on error" + ], + "xmlwriter_end_dtd_attlist": [ + "bool xmlwriter_end_dtd_attlist(resource xmlwriter)", + "End current DTD AttList - returns FALSE on error" + ], + "xmlwriter_end_dtd_element": [ + "bool xmlwriter_end_dtd_element(resource xmlwriter)", + "End current DTD element - returns FALSE on error" + ], + "xmlwriter_end_dtd_entity": [ + "bool xmlwriter_end_dtd_entity(resource xmlwriter)", + "End current DTD Entity - returns FALSE on error" + ], + "xmlwriter_end_element": [ + "bool xmlwriter_end_element(resource xmlwriter)", + "End current element - returns FALSE on error" + ], + "xmlwriter_end_pi": [ + "bool xmlwriter_end_pi(resource xmlwriter)", + "End current PI - returns FALSE on error" + ], + "xmlwriter_flush": [ + "mixed xmlwriter_flush(resource xmlwriter [,bool empty])", + "Output current buffer" + ], + "xmlwriter_full_end_element": [ + "bool xmlwriter_full_end_element(resource xmlwriter)", + "End current element - returns FALSE on error" + ], + "xmlwriter_open_memory": [ + "resource xmlwriter_open_memory()", + "Create new xmlwriter using memory for string output" + ], + "xmlwriter_open_uri": [ + "resource xmlwriter_open_uri(resource xmlwriter, string source)", + "Create new xmlwriter using source uri for output" + ], + "xmlwriter_output_memory": [ + "string xmlwriter_output_memory(resource xmlwriter [,bool flush])", + "Output current buffer as string" + ], + "xmlwriter_set_indent": [ + "bool xmlwriter_set_indent(resource xmlwriter, bool indent)", + "Toggle indentation on/off - returns FALSE on error" + ], + "xmlwriter_set_indent_string": [ + "bool xmlwriter_set_indent_string(resource xmlwriter, string indentString)", + "Set string used for indenting - returns FALSE on error" + ], + "xmlwriter_start_attribute": [ + "bool xmlwriter_start_attribute(resource xmlwriter, string name)", + "Create start attribute - returns FALSE on error" + ], + "xmlwriter_start_attribute_ns": [ + "bool xmlwriter_start_attribute_ns(resource xmlwriter, string prefix, string name, string uri)", + "Create start namespaced attribute - returns FALSE on error" + ], + "xmlwriter_start_cdata": [ + "bool xmlwriter_start_cdata(resource xmlwriter)", + "Create start CDATA tag - returns FALSE on error" + ], + "xmlwriter_start_comment": [ + "bool xmlwriter_start_comment(resource xmlwriter)", + "Create start comment - returns FALSE on error" + ], + "xmlwriter_start_document": [ + "bool xmlwriter_start_document(resource xmlwriter, string version, string encoding, string standalone)", + "Create document tag - returns FALSE on error" + ], + "xmlwriter_start_dtd": [ + "bool xmlwriter_start_dtd(resource xmlwriter, string name, string pubid, string sysid)", + "Create start DTD tag - returns FALSE on error" + ], + "xmlwriter_start_dtd_attlist": [ + "bool xmlwriter_start_dtd_attlist(resource xmlwriter, string name)", + "Create start DTD AttList - returns FALSE on error" + ], + "xmlwriter_start_dtd_element": [ + "bool xmlwriter_start_dtd_element(resource xmlwriter, string name)", + "Create start DTD element - returns FALSE on error" + ], + "xmlwriter_start_dtd_entity": [ + "bool xmlwriter_start_dtd_entity(resource xmlwriter, string name, bool isparam)", + "Create start DTD Entity - returns FALSE on error" + ], + "xmlwriter_start_element": [ + "bool xmlwriter_start_element(resource xmlwriter, string name)", + "Create start element tag - returns FALSE on error" + ], + "xmlwriter_start_element_ns": [ + "bool xmlwriter_start_element_ns(resource xmlwriter, string prefix, string name, string uri)", + "Create start namespaced element tag - returns FALSE on error" + ], + "xmlwriter_start_pi": [ + "bool xmlwriter_start_pi(resource xmlwriter, string target)", + "Create start PI tag - returns FALSE on error" + ], + "xmlwriter_text": [ + "bool xmlwriter_text(resource xmlwriter, string content)", + "Write text - returns FALSE on error" + ], + "xmlwriter_write_attribute": [ + "bool xmlwriter_write_attribute(resource xmlwriter, string name, string content)", + "Write full attribute - returns FALSE on error" + ], + "xmlwriter_write_attribute_ns": [ + "bool xmlwriter_write_attribute_ns(resource xmlwriter, string prefix, string name, string uri, string content)", + "Write full namespaced attribute - returns FALSE on error" + ], + "xmlwriter_write_cdata": [ + "bool xmlwriter_write_cdata(resource xmlwriter, string content)", + "Write full CDATA tag - returns FALSE on error" + ], + "xmlwriter_write_comment": [ + "bool xmlwriter_write_comment(resource xmlwriter, string content)", + "Write full comment tag - returns FALSE on error" + ], + "xmlwriter_write_dtd": [ + "bool xmlwriter_write_dtd(resource xmlwriter, string name, string pubid, string sysid, string subset)", + "Write full DTD tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_attlist": [ + "bool xmlwriter_write_dtd_attlist(resource xmlwriter, string name, string content)", + "Write full DTD AttList tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_element": [ + "bool xmlwriter_write_dtd_element(resource xmlwriter, string name, string content)", + "Write full DTD element tag - returns FALSE on error" + ], + "xmlwriter_write_dtd_entity": [ + "bool xmlwriter_write_dtd_entity(resource xmlwriter, string name, string content [, int pe [, string pubid [, string sysid [, string ndataid]]]])", + "Write full DTD Entity tag - returns FALSE on error" + ], + "xmlwriter_write_element": [ + "bool xmlwriter_write_element(resource xmlwriter, string name[, string content])", + "Write full element tag - returns FALSE on error" + ], + "xmlwriter_write_element_ns": [ + "bool xmlwriter_write_element_ns(resource xmlwriter, string prefix, string name, string uri[, string content])", + "Write full namespaced element tag - returns FALSE on error" + ], + "xmlwriter_write_pi": [ + "bool xmlwriter_write_pi(resource xmlwriter, string target, string content)", + "Write full PI tag - returns FALSE on error" + ], + "xmlwriter_write_raw": [ + "bool xmlwriter_write_raw(resource xmlwriter, string content)", + "Write text - returns FALSE on error" + ], + "xsl_xsltprocessor_get_parameter": [ + "string xsl_xsltprocessor_get_parameter(string namespace, string name);", + "" + ], + "xsl_xsltprocessor_has_exslt_support": [ + "bool xsl_xsltprocessor_has_exslt_support();", + "" + ], + "xsl_xsltprocessor_import_stylesheet": [ + "void xsl_xsltprocessor_import_stylesheet(domdocument doc);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since:" + ], + "xsl_xsltprocessor_register_php_functions": [ + "void xsl_xsltprocessor_register_php_functions([mixed $restrict]);", + "" + ], + "xsl_xsltprocessor_remove_parameter": [ + "bool xsl_xsltprocessor_remove_parameter(string namespace, string name);", + "" + ], + "xsl_xsltprocessor_set_parameter": [ + "bool xsl_xsltprocessor_set_parameter(string namespace, mixed name [, string value]);", + "" + ], + "xsl_xsltprocessor_set_profiling": [ + "bool xsl_xsltprocessor_set_profiling(string filename) */", + "PHP_FUNCTION(xsl_xsltprocessor_set_profiling) { zval *id; xsl_object *intern; char *filename = NULL; int filename_len; DOM_GET_THIS(id); if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, \"s!\", &filename, &filename_len) == SUCCESS) { intern = (xsl_object *)zend_object_store_get_object(id TSRMLS_CC); if (intern->profiling) { efree(intern->profiling); } if (filename != NULL) { intern->profiling = estrndup(filename,filename_len); } else { intern->profiling = NULL; } RETURN_TRUE; } else { WRONG_PARAM_COUNT; } } /* }}} end xsl_xsltprocessor_set_profiling" + ], + "xsl_xsltprocessor_transform_to_doc": [ + "domdocument xsl_xsltprocessor_transform_to_doc(domnode doc);", + "URL: http://www.w3.org/TR/2003/WD-DOM-Level-3-Core-20030226/DOM3-Core.html# Since:" + ], + "xsl_xsltprocessor_transform_to_uri": [ + "int xsl_xsltprocessor_transform_to_uri(domdocument doc, string uri);", + "" + ], + "xsl_xsltprocessor_transform_to_xml": [ + "string xsl_xsltprocessor_transform_to_xml(domdocument doc);", + "" + ], + "zend_logo_guid": [ + "string zend_logo_guid(void)", + "Return the special ID used to request the Zend logo in phpinfo screens" + ], + "zend_version": [ + "string zend_version(void)", + "Get the version of the Zend Engine" + ], + "zip_close": [ + "void zip_close(resource zip)", + "Close a Zip archive" + ], + "zip_entry_close": [ + "void zip_entry_close(resource zip_ent)", + "Close a zip entry" + ], + "zip_entry_compressedsize": [ + "int zip_entry_compressedsize(resource zip_entry)", + "Return the compressed size of a ZZip entry" + ], + "zip_entry_compressionmethod": [ + "string zip_entry_compressionmethod(resource zip_entry)", + "Return a string containing the compression method used on a particular entry" + ], + "zip_entry_filesize": [ + "int zip_entry_filesize(resource zip_entry)", + "Return the actual filesize of a ZZip entry" + ], + "zip_entry_name": [ + "string zip_entry_name(resource zip_entry)", + "Return the name given a ZZip entry" + ], + "zip_entry_open": [ + "bool zip_entry_open(resource zip_dp, resource zip_entry [, string mode])", + "Open a Zip File, pointed by the resource entry" + ], + "zip_entry_read": [ + "mixed zip_entry_read(resource zip_entry [, int len])", + "Read from an open directory entry" + ], + "zip_open": [ + "resource zip_open(string filename)", + "Create new zip using source uri for output" + ], + "zip_read": [ + "resource zip_read(resource zip)", + "Returns the next file in the archive" + ], + "zlib_get_coding_type": [ + "string zlib_get_coding_type(void)", + "Returns the coding type used for output compression" + ] +}; + +var variableMap = { + "$_COOKIE": { + type: "array" + }, + "$_ENV": { + type: "array" + }, + "$_FILES": { + type: "array" + }, + "$_GET": { + type: "array" + }, + "$_POST": { + type: "array" + }, + "$_REQUEST": { + type: "array" + }, + "$_SERVER": { + type: "array", + value: { + "DOCUMENT_ROOT": 1, + "GATEWAY_INTERFACE": 1, + "HTTP_ACCEPT": 1, + "HTTP_ACCEPT_CHARSET": 1, + "HTTP_ACCEPT_ENCODING": 1 , + "HTTP_ACCEPT_LANGUAGE": 1, + "HTTP_CONNECTION": 1, + "HTTP_HOST": 1, + "HTTP_REFERER": 1, + "HTTP_USER_AGENT": 1, + "PATH_TRANSLATED": 1, + "PHP_SELF": 1, + "QUERY_STRING": 1, + "REMOTE_ADDR": 1, + "REMOTE_PORT": 1, + "REQUEST_METHOD": 1, + "REQUEST_URI": 1, + "SCRIPT_FILENAME": 1, + "SCRIPT_NAME": 1, + "SERVER_ADMIN": 1, + "SERVER_NAME": 1, + "SERVER_PORT": 1, + "SERVER_PROTOCOL": 1, + "SERVER_SIGNATURE": 1, + "SERVER_SOFTWARE": 1 + } + }, + "$_SESSION": { + type: "array" + }, + "$GLOBALS": { + type: "array" + } +}; + +function is(token, type) { + return token.type.lastIndexOf(type) > -1; +} + +var PhpCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + + if (token.type==='support.php_tag' && token.value===' 0) { + var prevToken = session.getTokenAt(pos.row, token.start); + if (prevToken.type==='support.php_tag') { + return this.getTagCompletions(state, session, pos, prefix); + } + } + return this.getFunctionCompletions(state, session, pos, prefix); + } + if (is(token, "variable")) + return this.getVariableCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (token.type==='string' && /(\$[\w]*)\[["']([^'"]*)$/i.test(line)) + return this.getArrayKeyCompletions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + return [{ + caption: 'php', + value: 'php', + meta: "php tag", + score: 1000000 + }, { + caption: '=', + value: '=', + meta: "php tag", + score: 1000000 + }]; + }; + + this.getFunctionCompletions = function(state, session, pos, prefix) { + var functions = Object.keys(functionMap); + return functions.map(function(func){ + return { + caption: func, + snippet: func + '($0)', + meta: "php function", + score: 1000000, + docHTML: functionMap[func][1] + }; + }); + }; + + this.getVariableCompletions = function(state, session, pos, prefix) { + var variables = Object.keys(variableMap); + return variables.map(function(variable){ + return { + caption: variable, + value: variable, + meta: "php variable", + score: 1000000 + }; + }); + }; + + this.getArrayKeyCompletions = function(state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var variable = line.match(/(\$[\w]*)\[["']([^'"]*)$/i)[1]; + + if (!variableMap[variable]) { + return []; + } + + var keys = []; + if (variableMap[variable].type==='array' && variableMap[variable].value) + keys = Object.keys(variableMap[variable].value); + + return keys.map(function(key) { + return { + caption: key, + value: key, + meta: "php array key", + score: 1000000 + }; + }); + }; + +}).call(PhpCompletions.prototype); + +exports.PhpCompletions = PhpCompletions; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + this.$quotes = {'"': '"', "'": "'", "`": "`"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/javascript"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var propertyMap = { + "background": {"#$0": 1}, + "background-color": {"#$0": 1, "transparent": 1, "fixed": 1}, + "background-image": {"url('/$0')": 1}, + "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1}, + "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2}, + "background-attachment": {"scroll": 1, "fixed": 1}, + "background-size": {"cover": 1, "contain": 1}, + "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1}, + "border-color": {"#$0": 1}, + "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2}, + "border-collapse": {"collapse": 1, "separate": 1}, + "bottom": {"px": 1, "em": 1, "%": 1}, + "clear": {"left": 1, "right": 1, "both": 1, "none": 1}, + "color": {"#$0": 1, "rgb(#$00,0,0)": 1}, + "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1}, + "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1}, + "empty-cells": {"show": 1, "hide": 1}, + "float": {"left": 1, "right": 1, "none": 1}, + "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1}, + "font-size": {"px": 1, "em": 1, "%": 1}, + "font-weight": {"bold": 1, "normal": 1}, + "font-style": {"italic": 1, "normal": 1}, + "font-variant": {"normal": 1, "small-caps": 1}, + "height": {"px": 1, "em": 1, "%": 1}, + "left": {"px": 1, "em": 1, "%": 1}, + "letter-spacing": {"normal": 1}, + "line-height": {"normal": 1}, + "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1}, + "margin": {"px": 1, "em": 1, "%": 1}, + "margin-right": {"px": 1, "em": 1, "%": 1}, + "margin-left": {"px": 1, "em": 1, "%": 1}, + "margin-top": {"px": 1, "em": 1, "%": 1}, + "margin-bottom": {"px": 1, "em": 1, "%": 1}, + "max-height": {"px": 1, "em": 1, "%": 1}, + "max-width": {"px": 1, "em": 1, "%": 1}, + "min-height": {"px": 1, "em": 1, "%": 1}, + "min-width": {"px": 1, "em": 1, "%": 1}, + "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "padding": {"px": 1, "em": 1, "%": 1}, + "padding-top": {"px": 1, "em": 1, "%": 1}, + "padding-right": {"px": 1, "em": 1, "%": 1}, + "padding-bottom": {"px": 1, "em": 1, "%": 1}, + "padding-left": {"px": 1, "em": 1, "%": 1}, + "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1}, + "right": {"px": 1, "em": 1, "%": 1}, + "table-layout": {"fixed": 1, "auto": 1}, + "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1}, + "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1}, + "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1}, + "top": {"px": 1, "em": 1, "%": 1}, + "vertical-align": {"top": 1, "bottom": 1}, + "visibility": {"hidden": 1, "visible": 1}, + "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1}, + "width": {"px": 1, "em": 1, "%": 1}, + "word-spacing": {"normal": 1}, + "filter": {"alpha(opacity=$0100)": 1}, + + "text-shadow": {"$02px 2px 2px #777": 1}, + "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1}, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 } +}; + +var CssCompletions = function() { + +}; + +(function() { + + this.completionsDefined = false; + + this.defineCompletions = function() { + if (document) { + var style = document.createElement('c').style; + + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + + var name = i.replace(/[A-Z]/g, function(x) { + return '-' + x.toLowerCase(); + }); + + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + + this.completionsDefined = true; + }; + + this.getCompletions = function(state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + + return this.getPropertyValueCompletions(state, session, pos, prefix); + } else { + return this.getPropertyCompletions(state, session, pos, prefix); + } + } + + return []; + }; + + this.getPropertyCompletions = function(state, session, pos, prefix) { + var properties = Object.keys(propertyMap); + return properties.map(function(property){ + return { + caption: property, + snippet: property + ': $0;', + meta: "property", + score: 1000000 + }; + }); + }; + + this.getPropertyValueCompletions = function(state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; + +}).call(CssCompletions.prototype); + +exports.CssCompletions = CssCompletions; +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/css"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var lang = require("../../lib/lang"); + +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} + +var XmlBehaviour = function () { + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + + if (!token) + token = iterator.stepBackward(); + + if (!token) + return; + + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + + if (this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (token && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + + if (!token) { + return; + } + + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + + if (this.voidElements && !this.voidElements[tag]) { + var nextToken = session.getTokenAt(cursor.row, cursor.column+1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + + if (nextToken && nextToken.value === " -1; +} + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (!tag) + return this.getCommentFoldWidget(session, row); + + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + + return "start"; + }; + + this.getCommentFoldWidget = function(session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + + return null; + }; + + this._findEndTagInLine = function(session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + iterator.stepForward(); + return tag; + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + iterator.stepBackward(); + return tag; + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag) { + return this.getCommentFoldWidget(session, row) + && session.getCommentFoldRange(row, session.getLine(row).length); + } + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.start.column); + var start = { + row: row, + column: firstTag.start.column + firstTag.tagName.length + 2 + }; + if (firstTag.start.row == firstTag.end.row) + start.column = firstTag.end.column; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag); + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.end.column); + var end = { + row: row, + column: firstTag.start.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) + tag.start.column = tag.end.column; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag); + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; + +var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; + +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var TokenIterator = require("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1}, + "abbr": {}, + "address": {}, + "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1}, + "article": {"pubdate": 1}, + "aside": {}, + "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }}, + "b": {}, + "base": {"href": 1, "target": 1}, + "bdi": {}, + "bdo": {}, + "blockquote": {"cite": 1}, + "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1}, + "br": {}, + "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}}, + "canvas": {"width": 1, "height": 1}, + "caption": {}, + "cite": {}, + "code": {}, + "col": {"span": 1}, + "colgroup": {"span": 1}, + "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1}, + "data": {}, + "datalist": {}, + "dd": {}, + "del": {"cite": 1, "datetime": 1}, + "details": {"open": 1}, + "dfn": {}, + "dialog": {"open": 1}, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": {"src": 1, "height": 1, "width": 1, "type": 1}, + "fieldset": {"disabled": 1, "form": 1, "name": 1}, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}}, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": {"manifest": 1}, + "i": {}, + "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}}, + "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1}, + "input": { + "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1}, + "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1}, + "ins": {"cite": 1, "datetime": 1}, + "kbd": {}, + "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1}, + "label": {"form": 1, "for": 1}, + "legend": {}, + "li": {"value": 1}, + "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1}, + "main": {}, + "map": {"name": 1}, + "mark": {}, + "math": {}, + "menu": {"type": 1, "label": 1}, + "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1}, + "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1}, + "nav": {}, + "noscript": {"href": 1}, + "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1}, + "ol": {"start": 1, "reversed": 1}, + "optgroup": {"disabled": 1, "label": 1}, + "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1}, + "output": {"for": 1, "form": 1, "name": 1}, + "p": {}, + "param": {"name": 1, "value": 1}, + "pre": {}, + "progress": {"value": 1, "max": 1}, + "q": {"cite": 1}, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1}, + "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}}, + "small": {}, + "source": {"src": 1, "type": 1, "media": 1}, + "span": {}, + "strong": {}, + "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1}, + "sub": {}, + "sup": {}, + "svg": {}, + "table": {"summary": 1}, + "tbody": {}, + "td": {"headers": 1, "rowspan": 1, "colspan": 1}, + "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}}, + "tfoot": {}, + "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1}, + "thead": {}, + "time": {"datetime": 1}, + "title": {}, + "tr": {}, + "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1}, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}}, + "wbr": {} +}; + +var elements = Object.keys(attributeMap); + +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + return elements.map(function(element){ + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + + this.getAttributeCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + + this.getAttributeValueCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + + this.getHTMLEntityCompletions = function(state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; + +var Mode = function(options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.voidElements = lang.arrayToMap(voidElements); + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + if (this.fragmentContext) + worker.call("setOptions", [{context: this.fragmentContext}]); + + worker.on("error", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/html"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/php",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/php_highlight_rules","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/php_completions","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/unicode","ace/mode/html","ace/mode/javascript","ace/mode/css"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PhpHighlightRules = require("./php_highlight_rules").PhpHighlightRules; +var PhpLangHighlightRules = require("./php_highlight_rules").PhpLangHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var PhpCompletions = require("./php_completions").PhpCompletions; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var unicode = require("../unicode"); +var HtmlMode = require("./html").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; + +var PhpMode = function(opts) { + this.HighlightRules = PhpLangHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.$completer = new PhpCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(PhpMode, TextMode); + +(function() { + + this.tokenRe = new RegExp("^[" + unicode.wordChars + "_]+", "g"); + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "_]|\\s])+", "g"); + + this.lineCommentStart = ["//", "#"]; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState != "doc-start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.$id = "ace/mode/php-inline"; +}).call(PhpMode.prototype); + +var Mode = function(opts) { + if (opts && opts.inline) { + var mode = new PhpMode(); + mode.createWorker = this.createWorker; + mode.inlinePhp = true; + return mode; + } + HtmlMode.call(this); + this.HighlightRules = PhpHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "php-": PhpMode + }); + this.foldingRules.subModes["php-"] = new CStyleFoldMode(); +}; +oop.inherits(Mode, HtmlMode); + +(function() { + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/php_worker", "PhpWorker"); + worker.attachToDocument(session.getDocument()); + + if (this.inlinePhp) + worker.call("setOptions", [{inline: true}]); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/php"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/php_laravel_blade",["require","exports","module","ace/lib/oop","ace/mode/php_laravel_blade_highlight_rules","ace/mode/php","ace/mode/javascript","ace/mode/css","ace/mode/html"], function(require, exports, module) { + "use strict"; + + var oop = require("../lib/oop"); + var PHPLaravelBladeHighlightRules = require("./php_laravel_blade_highlight_rules").PHPLaravelBladeHighlightRules; + var PHPMode = require("./php").Mode; + var JavaScriptMode = require("./javascript").Mode; + var CssMode = require("./css").Mode; + var HtmlMode = require("./html").Mode; + + var Mode = function() { + PHPMode.call(this); + + this.HighlightRules = PHPLaravelBladeHighlightRules; + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode, + "html-": HtmlMode + }); + }; + oop.inherits(Mode, PHPMode); + + (function() { + + this.$id = "ace/mode/php_laravel_blade"; + }).call(Mode.prototype); + + exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/php_laravel_blade"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-pig.js b/htdocs/includes/ace/src/mode-pig.js similarity index 91% rename from htdocs/includes/ace/mode-pig.js rename to htdocs/includes/ace/src/mode-pig.js index e251e384125..06a00537776 100644 --- a/htdocs/includes/ace/mode-pig.js +++ b/htdocs/includes/ace/src/mode-pig.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/pig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/pig_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -122,7 +122,7 @@ var PigHighlightRules = function() { next: "pop" }] }] - } + }; this.normalizeRules(); }; @@ -131,7 +131,7 @@ PigHighlightRules.metaData = { fileTypes: ["pig"], name: "Pig", scopeName: "source.pig" -} +}; oop.inherits(PigHighlightRules, TextHighlightRules); @@ -139,7 +139,7 @@ oop.inherits(PigHighlightRules, TextHighlightRules); exports.PigHighlightRules = PigHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -160,8 +160,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -279,7 +279,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pig_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/pig",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/pig_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -296,8 +296,15 @@ oop.inherits(Mode, TextMode); (function() { this.lineCommentStart = "--"; this.blockComment = {start: "/*", end: "*/"}; - this.$id = "ace/mode/pig" + this.$id = "ace/mode/pig"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/pig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-plain_text.js b/htdocs/includes/ace/src/mode-plain_text.js similarity index 52% rename from htdocs/includes/ace/mode-plain_text.js rename to htdocs/includes/ace/src/mode-plain_text.js index 0f0c93805c4..8c03013ef59 100644 --- a/htdocs/includes/ace/mode-plain_text.js +++ b/htdocs/includes/ace/src/mode-plain_text.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"], function(require, exports, module) { +define("ace/mode/plain_text",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/behaviour"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -22,4 +22,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/plain_text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-powershell.js b/htdocs/includes/ace/src/mode-powershell.js similarity index 97% rename from htdocs/includes/ace/mode-powershell.js rename to htdocs/includes/ace/src/mode-powershell.js index 0b43a83e148..97aad7336ed 100644 --- a/htdocs/includes/ace/mode-powershell.js +++ b/htdocs/includes/ace/src/mode-powershell.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/powershell_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -168,7 +168,7 @@ oop.inherits(PowershellHighlightRules, TextHighlightRules); exports.PowershellHighlightRules = PowershellHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -208,7 +208,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -229,8 +229,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -348,7 +348,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/powershell",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/powershell_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -408,4 +408,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/powershell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-praat.js b/htdocs/includes/ace/src/mode-praat.js similarity index 90% rename from htdocs/includes/ace/mode-praat.js rename to htdocs/includes/ace/src/mode-praat.js index a3a50f7e1bf..171be549f74 100644 --- a/htdocs/includes/ace/mode-praat.js +++ b/htdocs/includes/ace/src/mode-praat.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/praat_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -98,10 +98,10 @@ var PraatHighlightRules = function() { "start" : [ { token : "string.interpolated", - regex : /'((?:[a-z][a-zA-Z0-9_]*)(?:\$|#|:[0-9]+)?)'/ + regex : /'((?:\.?[a-z][a-zA-Z0-9_.]*)(?:\$|#|:[0-9]+)?)'/ }, { token : ["text", "text", "keyword.operator", "text", "keyword"], - regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(stopwatch)/ + regex : /(^\s*)(?:(\.?[a-z][a-zA-Z0-9_.]*\$?\s+)(=)(\s+))?(stopwatch)/ }, { token : ["text", "keyword", "text", "string"], regex : /(^\s*)(print(?:line|tab)?|echo|exit|pause|send(?:praat|socket)|include|execute|system(?:_nocheck)?)(\s+)(.*)/ @@ -113,7 +113,10 @@ var PraatHighlightRules = function() { regex : /(\s+)((?:\+|-|\/|\*|<|>)=?|==?|!=|%|\^|\||and|or|not)(\s+)/ }, { token : ["text", "text", "keyword.operator", "text", "keyword", "text", "keyword"], - regex : /(^\s*)(?:([a-z][a-zA-Z0-9_]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|(?:unix_)?nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ + regex : /(^\s*)(?:(\.?[a-z][a-zA-Z0-9_.]*\$?\s+)(=)(\s+))?(?:((?:no)?warn|(?:unix_)?nocheck|noprogress)(\s+))?((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ + }, { + token : ["text", "keyword", "text", "keyword"], + regex : /(^\s*)((?:no(?:warn|check))?)(\s*)(\b(?:editor(?::?)|endeditor)\b)/ }, { token : ["text", "keyword", "text", "keyword"], regex : /(^\s*)(?:(demo)?(\s+))((?:[A-Z][^.:"]+)(?:$|(?:\.{3}|:)))/ @@ -155,7 +158,7 @@ var PraatHighlightRules = function() { regex : /\b[+-]?\d+(?:(?:\.\d*)?(?:[eE][+-]?\d+)?)?\b/ }, { token : ["keyword", "text", "entity.name.function"], - regex : /(procedure)(\s+)(\S+)/ + regex : /(procedure)(\s+)([^:\s]+)/ }, { token : ["entity.name.function", "text"], regex : /(@\S+)(:|\s*\()/ @@ -232,7 +235,7 @@ oop.inherits(PraatHighlightRules, TextHighlightRules); exports.PraatHighlightRules = PraatHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -272,7 +275,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -293,8 +296,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -412,7 +415,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/praat",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/praat_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -465,4 +468,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/praat"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-prolog.js b/htdocs/includes/ace/src/mode-prolog.js similarity index 92% rename from htdocs/includes/ace/mode-prolog.js rename to htdocs/includes/ace/src/mode-prolog.js index 6bf01adb490..ce244ab2e3d 100644 --- a/htdocs/includes/ace/mode-prolog.js +++ b/htdocs/includes/ace/src/mode-prolog.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/prolog_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,7 @@ var PrologHighlightRules = function() { [ { token: 'variable.language.anonymous.prolog', regex: '\\b_\\b' }, { token: 'variable.other.prolog', - regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] } + regex: '\\b[A-Z_][a-zA-Z0-9_]*\\b' } ] }; this.normalizeRules(); }; @@ -191,7 +191,7 @@ PrologHighlightRules.metaData = { fileTypes: [ 'plg', 'prolog' ], foldingStopMarker: '(%\\s*end(\\s*region)?)|(?=\\.)', keyEquivalent: '^~P', name: 'Prolog', - scopeName: 'source.prolog' } + scopeName: 'source.prolog' }; oop.inherits(PrologHighlightRules, TextHighlightRules); @@ -199,7 +199,7 @@ oop.inherits(PrologHighlightRules, TextHighlightRules); exports.PrologHighlightRules = PrologHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -220,8 +220,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -339,7 +339,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/prolog",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/prolog_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -361,4 +361,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/prolog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-properties.js b/htdocs/includes/ace/src/mode-properties.js similarity index 72% rename from htdocs/includes/ace/mode-properties.js rename to htdocs/includes/ace/src/mode-properties.js index 2e9ba725bd4..89be56e6baf 100644 --- a/htdocs/includes/ace/mode-properties.js +++ b/htdocs/includes/ace/src/mode-properties.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/properties_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -52,7 +52,7 @@ oop.inherits(PropertiesHighlightRules, TextHighlightRules); exports.PropertiesHighlightRules = PropertiesHighlightRules; }); -ace.define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module) { +define("ace/mode/properties",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/properties_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -70,4 +70,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/properties"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-protobuf.js b/htdocs/includes/ace/src/mode-protobuf.js similarity index 90% rename from htdocs/includes/ace/mode-protobuf.js rename to htdocs/includes/ace/src/mode-protobuf.js index 8cef657623d..0d1a19a5cc4 100644 --- a/htdocs/includes/ace/mode-protobuf.js +++ b/htdocs/includes/ace/src/mode-protobuf.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,13 +48,13 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/c_cpp_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b" +var cFunctions = exports.cFunctions = "\\b(?:hypot(?:f|l)?|s(?:scanf|ystem|nprintf|ca(?:nf|lb(?:n(?:f|l)?|ln(?:f|l)?))|i(?:n(?:h(?:f|l)?|f|l)?|gn(?:al|bit))|tr(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?)|error|pbrk|ftime|len|rchr|xfrm)|printf|et(?:jmp|vbuf|locale|buf)|qrt(?:f|l)?|w(?:scanf|printf)|rand)|n(?:e(?:arbyint(?:f|l)?|xt(?:toward(?:f|l)?|after(?:f|l)?))|an(?:f|l)?)|c(?:s(?:in(?:h(?:f|l)?|f|l)?|qrt(?:f|l)?)|cos(?:h(?:f)?|f|l)?|imag(?:f|l)?|t(?:ime|an(?:h(?:f|l)?|f|l)?)|o(?:s(?:h(?:f|l)?|f|l)?|nj(?:f|l)?|pysign(?:f|l)?)|p(?:ow(?:f|l)?|roj(?:f|l)?)|e(?:il(?:f|l)?|xp(?:f|l)?)|l(?:o(?:ck|g(?:f|l)?)|earerr)|a(?:sin(?:h(?:f|l)?|f|l)?|cos(?:h(?:f|l)?|f|l)?|tan(?:h(?:f|l)?|f|l)?|lloc|rg(?:f|l)?|bs(?:f|l)?)|real(?:f|l)?|brt(?:f|l)?)|t(?:ime|o(?:upper|lower)|an(?:h(?:f|l)?|f|l)?|runc(?:f|l)?|gamma(?:f|l)?|mp(?:nam|file))|i(?:s(?:space|n(?:ormal|an)|cntrl|inf|digit|u(?:nordered|pper)|p(?:unct|rint)|finite|w(?:space|c(?:ntrl|type)|digit|upper|p(?:unct|rint)|lower|al(?:num|pha)|graph|xdigit|blank)|l(?:ower|ess(?:equal|greater)?)|al(?:num|pha)|gr(?:eater(?:equal)?|aph)|xdigit|blank)|logb(?:f|l)?|max(?:div|abs))|di(?:v|fftime)|_Exit|unget(?:c|wc)|p(?:ow(?:f|l)?|ut(?:s|c(?:har)?|wc(?:har)?)|error|rintf)|e(?:rf(?:c(?:f|l)?|f|l)?|x(?:it|p(?:2(?:f|l)?|f|l|m1(?:f|l)?)?))|v(?:s(?:scanf|nprintf|canf|printf|w(?:scanf|printf))|printf|f(?:scanf|printf|w(?:scanf|printf))|w(?:scanf|printf)|a_(?:start|copy|end|arg))|qsort|f(?:s(?:canf|e(?:tpos|ek))|close|tell|open|dim(?:f|l)?|p(?:classify|ut(?:s|c|w(?:s|c))|rintf)|e(?:holdexcept|set(?:e(?:nv|xceptflag)|round)|clearexcept|testexcept|of|updateenv|r(?:aiseexcept|ror)|get(?:e(?:nv|xceptflag)|round))|flush|w(?:scanf|ide|printf|rite)|loor(?:f|l)?|abs(?:f|l)?|get(?:s|c|pos|w(?:s|c))|re(?:open|e|ad|xp(?:f|l)?)|m(?:in(?:f|l)?|od(?:f|l)?|a(?:f|l|x(?:f|l)?)?))|l(?:d(?:iv|exp(?:f|l)?)|o(?:ngjmp|cal(?:time|econv)|g(?:1(?:p(?:f|l)?|0(?:f|l)?)|2(?:f|l)?|f|l|b(?:f|l)?)?)|abs|l(?:div|abs|r(?:int(?:f|l)?|ound(?:f|l)?))|r(?:int(?:f|l)?|ound(?:f|l)?)|gamma(?:f|l)?)|w(?:scanf|c(?:s(?:s(?:tr|pn)|nc(?:py|at|mp)|c(?:spn|hr|oll|py|at|mp)|to(?:imax|d|u(?:l(?:l)?|max)|k|f|l(?:d|l)?|mbs)|pbrk|ftime|len|r(?:chr|tombs)|xfrm)|to(?:b|mb)|rtomb)|printf|mem(?:set|c(?:hr|py|mp)|move))|a(?:s(?:sert|ctime|in(?:h(?:f|l)?|f|l)?)|cos(?:h(?:f|l)?|f|l)?|t(?:o(?:i|f|l(?:l)?)|exit|an(?:h(?:f|l)?|2(?:f|l)?|f|l)?)|b(?:s|ort))|g(?:et(?:s|c(?:har)?|env|wc(?:har)?)|mtime)|r(?:int(?:f|l)?|ound(?:f|l)?|e(?:name|alloc|wind|m(?:ove|quo(?:f|l)?|ainder(?:f|l)?))|a(?:nd|ise))|b(?:search|towc)|m(?:odf(?:f|l)?|em(?:set|c(?:hr|py|mp)|move)|ktime|alloc|b(?:s(?:init|towcs|rtowcs)|towc|len|r(?:towc|len))))\\b"; var c_cppHighlightRules = function() { @@ -76,7 +76,7 @@ var c_cppHighlightRules = function() { ); var keywordOperators = ( - "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq" + + "and|and_eq|bitand|bitor|compl|not|not_eq|or|or_eq|typeid|xor|xor_eq|" + "const_cast|dynamic_cast|reinterpret_cast|static_cast|sizeof|namespace" ); @@ -95,6 +95,14 @@ var c_cppHighlightRules = function() { var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*\\b"; var escapeRe = /\\(?:['"?\\abfnrtv]|[0-7]{1,3}|x[a-fA-F\d]{2}|u[a-fA-F\d]{4}U[a-fA-F\d]{8}|.)/.source; + var formatRe = "%" + + /(\d+\$)?/.source // field (argument #) + + /[#0\- +']*/.source // flags + + /[,;:_]?/.source // separator character (AltiVec) + + /((-?\d+)|\*(-?\d+\$)?)?/.source // minimum field width + + /(\.((-?\d+)|\*(-?\d+\$)?)?)?/.source // precision + + /(hh|h|ll|l|j|t|z|q|L|vh|vl|v|hv|hl)?/.source // length modifier + + /(\[[^"\]]+\]|[diouxXDOUeEfFgGaACcSspn%])/.source; // conversion type this.$rules = { "start" : [ @@ -122,7 +130,7 @@ var c_cppHighlightRules = function() { next: [ { token: "string", regex: /\\\s*$/, next: "qqstring" }, { token: "constant.language.escape", regex: escapeRe }, - { token: "constant.language.escape", regex: /%[^'"\\]/ }, + { token: "constant.language.escape", regex: formatRe }, { token: "string.end", regex: '"|$', next: "start" }, { defaultToken: "string"} ] @@ -234,7 +242,7 @@ oop.inherits(c_cppHighlightRules, TextHighlightRules); exports.c_cppHighlightRules = c_cppHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -274,7 +282,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -295,8 +303,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -414,7 +422,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/c_cpp",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/c_cpp_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -486,7 +494,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/protobuf_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -552,7 +560,7 @@ ace.define("ace/mode/protobuf_highlight_rules",["require","exports","module","ac exports.ProtobufHighlightRules = ProtobufHighlightRules; }); -ace.define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/protobuf",["require","exports","module","ace/lib/oop","ace/mode/c_cpp","ace/mode/protobuf_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -574,4 +582,11 @@ oop.inherits(Mode, CMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/protobuf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-puppet.js b/htdocs/includes/ace/src/mode-puppet.js new file mode 100644 index 00000000000..ea6b2356261 --- /dev/null +++ b/htdocs/includes/ace/src/mode-puppet.js @@ -0,0 +1,369 @@ +define("ace/mode/puppet_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var PuppetHighlightRules = function () { + this.$rules = { + "start": [ + { + token: ['keyword.type.puppet', 'constant.class.puppet', 'keyword.inherits.puppet', 'constant.class.puppet'], + regex: "^\\s*(class)(\\s+(?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+\\s*)(?:(inherits\\s*)(\\s+(?:[-_A-Za-z0-9\".]+::)*[-_A-Za-z0-9\".]+\\s*))?" + }, + { + token: ['storage.function.puppet', 'name.function.puppet', 'punctuation.lpar'], + regex: "(^\\s*define)(\\s+[a-zA-Z0-9_:]+\\s*)(\\()", + push: + [{ + token: 'punctuation.rpar.puppet', + regex: "\\)", + next: 'pop' + }, + {include: "constants"}, + {include: "variable"}, + {include: "strings"}, + {include: "operators"}, + {defaultToken: 'string'}] + }, + { + token: ["language.support.class", "keyword.operator"], + regex: "\\b([a-zA-Z_]+)(\\s+=>)" + }, + { + token: ["exported.resource.puppet", "keyword.name.resource.puppet", "paren.lparen"], + regex: "(\\@\\@)?(\\s*[a-zA-Z_]*)(\\s*\\{)" + }, + { + token: "qualified.variable.puppet", + regex: "(\\$([a-z][a-z0-9_]*)?(::[a-z][a-z0-9_]*)*::[a-z0-9_][a-zA-Z0-9_]*)" + }, + + { + token: "singleline.comment.puppet", + regex: '#(.)*$' + }, + { + token: "multiline.comment.begin.puppet", + regex: '^\\s*\\/\\*\\s*$', + push: "blockComment" + }, + { + token: "keyword.control.puppet", + regex: "\\b(case|if|unless|else|elsif|in|default:|and|or)\\s+(?!::)" + }, + { + token: "keyword.control.puppet", + regex: "\\b(import|default|inherits|include|require|contain|node|application|consumes|environment|site|function|produces)\\b" + }, + { + token: "support.function.puppet", + regex: "\\b(lest|str2bool|escape|gsub|Timestamp|Timespan|with|alert|crit|debug|notice|sprintf|split|step|strftime|slice|shellquote|type|sha1|defined|scanf|reverse_each|regsubst|return|emerg|reduce|err|failed|fail|versioncmp|file|generate|then|info|realize|search|tag|tagged|template|epp|warning|hiera_include|each|assert_type|binary_file|create_resources|dig|digest|filter|lookup|find_file|fqdn_rand|hiera_array|hiera_hash|inline_epp|inline_template|map|match|md5|new|next)\\b" + }, + { + token: "constant.types.puppet", + regex: "\\b(String|File|Package|Service|Class|Integer|Array|Catalogentry|Variant|Boolean|Undef|Number|Hash|Float|Numeric|NotUndef|Callable|Optional|Any|Regexp|Sensitive|Sensitive.new|Type|Resource|Default|Enum|Scalar|Collection|Data|Pattern|Tuple|Struct)\\b" + }, + + { + token: "paren.lparen", + regex: "[[({]" + }, + { + token: "paren.rparen", + regex: "[\\])}]" + }, + {include: "variable"}, + {include: "constants"}, + {include: "strings"}, + {include: "operators"}, + { + token: "regexp.begin.string.puppet", + regex: "\\s*(\\/(\\S)+)\\/" + } + ], + blockComment: [{ + regex: "^\\s*\\/\\*\\s*$", + token: "multiline.comment.begin.puppet", + push: "blockComment" + }, { + regex: "^\\s*\\*\\/\\s*$", + token: "multiline.comment.end.puppet", + next: "pop" + }, { + defaultToken: "comment" + }], + "constants": [ + { + token: "constant.language.puppet", + regex: "\\b(false|true|running|stopped|installed|purged|latest|file|directory|held|undef|present|absent|link|mounted|unmounted)\\b" + } + ], + "variable": [ + { + token: "variable.puppet", + regex: "(\\$[a-z0-9_\{][a-zA-Z0-9_]*)" + } + ], + "strings": [ + { + token: "punctuation.quote.puppet", + regex: "'", + push: + [{ + token: 'punctuation.quote.puppet', + regex: "'", + next: 'pop' + }, + {include: "escaped_chars"}, + {defaultToken: 'string'}] + }, + { + token: "punctuation.quote.puppet", + regex: '"', + push: + [{ + token: 'punctuation.quote.puppet', + regex: '"', + next: 'pop' + }, + {include: "escaped_chars"}, + {include: "variable"}, + {defaultToken: 'string'}] + } + ], + "escaped_chars": [ + { + token: "constant.escaped_char.puppet", + regex: "\\\\." + } + ], + "operators": [ + { + token: "keyword.operator", + regex: "\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|=|::|," + } + ] + }; + this.normalizeRules(); +}; + + +oop.inherits(PuppetHighlightRules, TextHighlightRules); + +exports.PuppetHighlightRules = PuppetHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/puppet",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/puppet_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PuppetHighlightRules = require("./puppet_highlight_rules").PuppetHighlightRules; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function () { + TextMode.call(this); + this.HighlightRules = PuppetHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; + +oop.inherits(Mode, TextMode); + + +(function () { + this.$id = "ace/mode/puppet"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/puppet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-python.js b/htdocs/includes/ace/src/mode-python.js new file mode 100644 index 00000000000..e2045c8ac18 --- /dev/null +++ b/htdocs/includes/ace/src/mode-python.js @@ -0,0 +1,507 @@ +define("ace/mode/python_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var PythonHighlightRules = function() { + + var keywords = ( + "and|as|assert|break|class|continue|def|del|elif|else|except|exec|" + + "finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|" + + "raise|return|try|while|with|yield|async|await|nonlocal" + ); + + var builtinConstants = ( + "True|False|None|NotImplemented|Ellipsis|__debug__" + ); + + var builtinFunctions = ( + "abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" + + "eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" + + "binfile|bin|iter|property|tuple|bool|filter|len|range|type|bytearray|" + + "float|list|raw_input|unichr|callable|format|locals|reduce|unicode|" + + "chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|" + + "cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|" + + "__import__|complex|hash|min|apply|delattr|help|next|setattr|set|" + + "buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern|" + + "ascii|breakpoint|bytes" + ); + var keywordMapper = this.createKeywordMapper({ + "invalid.deprecated": "debugger", + "support.function": builtinFunctions, + "variable.language": "self|cls", + "constant.language": builtinConstants, + "keyword": keywords + }, "identifier"); + + var strPre = "[uU]?"; + var strRawPre = "[rR]"; + var strFormatPre = "[fF]"; + var strRawFormatPre = "(?:[rR][fF]|[fF][rR])"; + var decimalInteger = "(?:(?:[1-9]\\d*)|(?:0))"; + var octInteger = "(?:0[oO]?[0-7]+)"; + var hexInteger = "(?:0[xX][\\dA-Fa-f]+)"; + var binInteger = "(?:0[bB][01]+)"; + var integer = "(?:" + decimalInteger + "|" + octInteger + "|" + hexInteger + "|" + binInteger + ")"; + + var exponent = "(?:[eE][+-]?\\d+)"; + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + exponent + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + + var stringEscape = "\\\\(x[0-9A-Fa-f]{2}|[0-7]{3}|[\\\\abfnrtv'\"]|U[0-9A-Fa-f]{8}|u[0-9A-Fa-f]{4})"; + + this.$rules = { + "start" : [ { + token : "comment", + regex : "#.*$" + }, { + token : "string", // multi line """ string start + regex : strPre + '"{3}', + next : "qqstring3" + }, { + token : "string", // " string + regex : strPre + '"(?=.)', + next : "qqstring" + }, { + token : "string", // multi line ''' string start + regex : strPre + "'{3}", + next : "qstring3" + }, { + token : "string", // ' string + regex : strPre + "'(?=.)", + next : "qstring" + }, { + token: "string", + regex: strRawPre + '"{3}', + next: "rawqqstring3" + }, { + token: "string", + regex: strRawPre + '"(?=.)', + next: "rawqqstring" + }, { + token: "string", + regex: strRawPre + "'{3}", + next: "rawqstring3" + }, { + token: "string", + regex: strRawPre + "'(?=.)", + next: "rawqstring" + }, { + token: "string", + regex: strFormatPre + '"{3}', + next: "fqqstring3" + }, { + token: "string", + regex: strFormatPre + '"(?=.)', + next: "fqqstring" + }, { + token: "string", + regex: strFormatPre + "'{3}", + next: "fqstring3" + }, { + token: "string", + regex: strFormatPre + "'(?=.)", + next: "fqstring" + },{ + token: "string", + regex: strRawFormatPre + '"{3}', + next: "rfqqstring3" + }, { + token: "string", + regex: strRawFormatPre + '"(?=.)', + next: "rfqqstring" + }, { + token: "string", + regex: strRawFormatPre + "'{3}", + next: "rfqstring3" + }, { + token: "string", + regex: strRawFormatPre + "'(?=.)", + next: "rfqstring" + }, { + token: "keyword.operator", + regex: "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|@|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|=" + }, { + token: "punctuation", + regex: ",|:|;|\\->|\\+=|\\-=|\\*=|\\/=|\\/\\/=|%=|@=|&=|\\|=|^=|>>=|<<=|\\*\\*=" + }, { + token: "paren.lparen", + regex: "[\\[\\(\\{]" + }, { + token: "paren.rparen", + regex: "[\\]\\)\\}]" + }, { + token: "text", + regex: "\\s+" + }, { + include: "constants" + }], + "qqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "qstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "qqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "qstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "qstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + defaultToken: "string" + }], + "rawqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + defaultToken: "string" + }], + "rawqstring": [{ + token: "string", + regex: "\\\\$", + next: "rawqstring" + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + defaultToken: "string" + }], + "fqqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring3": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "\\\\$", + next: "fqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstring": [{ + token: "constant.language.escape", + regex: stringEscape + }, { + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring3": [{ + token: "string", // multi line """ string end + regex: '"{3}', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring3": [{ + token: "string", // multi line ''' string end + regex: "'{3}", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqqstring": [{ + token: "string", + regex: "\\\\$", + next: "rfqqstring" + }, { + token: "string", + regex: '"|$', + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "rfqstring": [{ + token: "string", + regex: "'|$", + next: "start" + }, { + token: "paren.lparen", + regex: "{", + push: "fqstringParRules" + }, { + defaultToken: "string" + }], + "fqstringParRules": [{//TODO: nested {} + token: "paren.lparen", + regex: "[\\[\\(]" + }, { + token: "paren.rparen", + regex: "[\\]\\)]" + }, { + token: "string", + regex: "\\s+" + }, { + token: "string", + regex: "'(.)*'" + }, { + token: "string", + regex: '"(.)*"' + }, { + token: "function.support", + regex: "(!s|!r|!a)" + }, { + include: "constants" + },{ + token: 'paren.rparen', + regex: "}", + next: 'pop' + },{ + token: 'paren.lparen', + regex: "{", + push: "fqstringParRules" + }], + "constants": [{ + token: "constant.numeric", // imaginary + regex: "(?:" + floatNumber + "|\\d+)[jJ]\\b" + }, { + token: "constant.numeric", // float + regex: floatNumber + }, { + token: "constant.numeric", // long integer + regex: integer + "[lL]\\b" + }, { + token: "constant.numeric", // integer + regex: integer + "\\b" + }, { + token: ["punctuation", "function.support"],// method + regex: "(\\.)([a-zA-Z_]+)\\b" + }, { + token: keywordMapper, + regex: "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }] + }; + this.normalizeRules(); +}; + +oop.inherits(PythonHighlightRules, TextHighlightRules); + +exports.PythonHighlightRules = PythonHighlightRules; +}); + +define("ace/mode/folding/pythonic",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(markers) { + this.foldingStartMarker = new RegExp("([\\[{])(?:\\s*)$|(" + markers + ")(?:\\s*)(?:#.*)?$"); +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var match = line.match(this.foldingStartMarker); + if (match) { + if (match[1]) + return this.openingBracketBlock(session, match[1], row, match.index); + if (match[2]) + return this.indentationBlock(session, row, match.index + match[2].length); + return this.indentationBlock(session, row); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/python",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/python_highlight_rules","ace/mode/folding/pythonic","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var PythonHighlightRules = require("./python_highlight_rules").PythonHighlightRules; +var PythonFoldMode = require("./folding/pythonic").FoldMode; +var Range = require("../range").Range; + +var Mode = function() { + this.HighlightRules = PythonHighlightRules; + this.foldingRules = new PythonFoldMode("\\:"); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + + this.$id = "ace/mode/python"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/python"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-r.js b/htdocs/includes/ace/src/mode-r.js similarity index 87% rename from htdocs/includes/ace/mode-r.js rename to htdocs/includes/ace/src/mode-r.js index 297d7e0569e..5a6ca976129 100644 --- a/htdocs/includes/ace/mode-r.js +++ b/htdocs/includes/ace/src/mode-r.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -77,7 +77,7 @@ oop.inherits(TexHighlightRules, TextHighlightRules); exports.TexHighlightRules = TexHighlightRules; }); -ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module) +define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules"], function(require, exports, module) { var oop = require("../lib/oop"); @@ -235,7 +235,7 @@ ace.define("ace/mode/r_highlight_rules",["require","exports","module","ace/lib/o exports.RHighlightRules = RHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -275,9 +275,10 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/r",["require","exports","module","ace/unicode","ace/range","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/r_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; + var unicode = require("../unicode"); var Range = require("../range").Range; var oop = require("../lib/oop"); var TextMode = require("./text").Mode; @@ -292,10 +293,19 @@ ace.define("ace/mode/r",["require","exports","module","ace/range","ace/lib/oop", }; oop.inherits(Mode, TextMode); - (function() - { + (function() { this.lineCommentStart = "#"; + this.tokenRe = new RegExp("^[" + unicode.wordChars + "._]+", "g"); + + this.nonTokenRe = new RegExp("^(?:[^" + unicode.wordChars + "._]|\s])+", "g"); this.$id = "ace/mode/r"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/r"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-razor.js b/htdocs/includes/ace/src/mode-razor.js similarity index 93% rename from htdocs/includes/ace/mode-razor.js rename to htdocs/includes/ace/src/mode-razor.js index c19ec55f39c..5733efd213e 100644 --- a/htdocs/includes/ace/mode-razor.js +++ b/htdocs/includes/ace/src/mode-razor.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && /*]|(?:\*\*\|\/\/|==|>>>?|<>|<<|=>|<=|=\?))(\s|(?=:))/}, + {token : "string.email", regex : /\w[-\w._]*\@\w[-\w._]*/}, + {token : "value.time", regex : /\b\d+:\d+(:\d+)?/}, + {token : "string.url", regex : /\w[-\w_]*\:(\/\/)?\w[-\w._]*(:\d+)?/}, + {token : "value.date", regex : /(\b\d{1,4}[-/]\d{1,2}[-/]\d{1,2}|\d{1,2}[-/]\d{1,2}[-/]\d{1,4})\b/}, + {token : "value.tuple", regex : /\b\d{1,3}\.\d{1,3}\.\d{1,3}(\.\d{1,3}){0,9}/}, + {token : "value.pair", regex: /[+-]?\d+x[-+]?\d+/}, + {token : "value.binary", regex : /\b2#{([01]{8})+}/}, + {token : "value.binary", regex : /\b64#{([\w/=+])+}/}, + {token : "value.binary", regex : /(16)?#{([\dabcdefABCDEF][\dabcdefABCDEF])*}/}, + {token : "value.issue", regex : /#\w[-\w'*.]*/}, + {token : "value.numeric", regex: /[+-]?\d['\d]*(?:\.\d+)?e[-+]?\d{1,3}\%?(?!\w)/}, + {token : "invalid.illegal", regex: /[+-]?\d['\d]*(?:\.\d+)?\%?[a-zA-Z]/}, + {token : "value.numeric", regex: /[+-]?\d['\d]*(?:\.\d+)?\%?(?![a-zA-Z])/}, + {token : "value.character", regex : /#"(\^[-@/_~^"HKLM\[]|.)"/}, + {token : "string.file", regex : /%[-\w\.\/]+/}, + {token : "string.tag", regex : //, next : "start"}, + {defaultToken : "string.tag"} + ], + "comment" : [ + {token : "comment", regex : /}/, next : "start"}, + {defaultToken : "comment"} + ] + }; +}; +oop.inherits(RedHighlightRules, TextHighlightRules); + +exports.RedHighlightRules = RedHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/red",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/red_highlight_rules","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RedHighlightRules = require("./red_highlight_rules").RedHighlightRules; +var RedFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; + +var Mode = function() { + this.HighlightRules = RedHighlightRules; + this.foldingRules = new RedFoldMode(); + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = ";"; + this.blockComment = { start: "comment {", end: "}" }; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\[\(]\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.$id = "ace/mode/red"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/red"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-redshift.js b/htdocs/includes/ace/src/mode-redshift.js new file mode 100644 index 00000000000..0be3b1bffb8 --- /dev/null +++ b/htdocs/includes/ace/src/mode-redshift.js @@ -0,0 +1,360 @@ +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/json_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var JsonHighlightRules = function() { + this.$rules = { + "start" : [ + { + token : "variable", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]\\s*(?=:)' + }, { + token : "string", // single line + regex : '"', + next : "string" + }, { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F]+\\b" + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : "text", // single quoted strings are not allowed + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "comment", // comments are not allowed, but who cares? + regex : "\\/\\/.*$" + }, { + token : "comment.start", // comments are not allowed, but who cares? + regex : "\\/\\*", + next : "comment" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "string" : [ + { + token : "constant.language.escape", + regex : /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|["\\\/bfnrt])/ + }, { + token : "string", + regex : '"|$', + next : "start" + }, { + defaultToken : "string" + } + ], + "comment" : [ + { + token : "comment.end", // comments are not allowed, but who cares? + regex : "\\*\\/", + next : "start" + }, { + defaultToken: "comment" + } + ] + }; + +}; + +oop.inherits(JsonHighlightRules, TextHighlightRules); + +exports.JsonHighlightRules = JsonHighlightRules; +}); + +define("ace/mode/redshift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules","ace/mode/json_highlight_rules"], function(require, exports, module) { + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var JsonHighlightRules = require("./json_highlight_rules").JsonHighlightRules; + +var RedshiftHighlightRules = function() { + var keywords = ( + "aes128|aes256|all|allowoverwrite|analyse|analyze|and|any|array|as|asc|authorization|backup|" + + "between|binary|blanksasnull|both|bytedict|bzip2|case|cast|check|collate|column|constraint|create|credentials|" + + "cross|current_date|current_time|current_timestamp|current_user|current_user_id|default|deferrable|deflate|defrag|delta|" + + "delta32k|desc|disable|distinct|do|else|emptyasnull|enable|encode|encrypt|encryption|end|except|explicit|false|for|foreign|" + + "freeze|from|full|globaldict256|globaldict64k|grant|group|gzip|having|identity|ignore|ilike|in|initially|inner|intersect|into|is|" + + "isnull|join|leading|left|like|limit|localtime|localtimestamp|lun|luns|lzo|lzop|minus|mostly13|mostly32|mostly8|natural|new|not|notnull|" + + "null|nulls|off|offline|offset|old|on|only|open|or|order|outer|overlaps|parallel|partition|percent|permissions|placing|primary|raw|readratio|" + + "recover|references|rejectlog|resort|restore|right|select|session_user|similar|some|sysdate|system|table|tag|tdes|text255|text32k|then|timestamp|" + + "to|top|trailing|true|truncatecolumns|union|unique|user|using|verbose|wallet|when|where|with|without" + ); + + + var builtinFunctions = ( + "current_schema|current_schemas|has_database_privilege|has_schema_privilege|has_table_privilege|age|current_time|current_timestamp|localtime|" + + "isfinite|now|ascii|get_bit|get_byte|octet_length|set_bit|set_byte|to_ascii|avg|count|listagg|max|min|stddev_samp|stddev_pop|sum|var_samp|var_pop|" + + "bit_and|bit_or|bool_and|bool_or|avg|count|cume_dist|dense_rank|first_value|last_value|lag|lead|listagg|max|median|min|nth_value|ntile|percent_rank|" + + "percentile_cont|percentile_disc|rank|ratio_to_report|row_number|case|coalesce|decode|greatest|least|nvl|nvl2|nullif|add_months|age|convert_timezone|" + + "current_date|timeofday|current_time|current_timestamp|date_cmp|date_cmp_timestamp|date_part_year|dateadd|datediff|date_part|date_trunc|extract|getdate|" + + "interval_cmp|isfinite|last_day|localtime|localtimestamp|months_between|next_day|now|sysdate|timestamp_cmp|timestamp_cmp_date|trunc|abs|acos|asin|atan|" + + "atan2|cbrt|ceiling|ceil|checksum|cos|cot|degrees|dexp|dlog1|dlog10|exp|floor|ln|log|mod|pi|power|radians|random|round|sin|sign|sqrt|tan|trunc|ascii|" + + "bpcharcmp|btrim|bttext_pattern_cmp|char_length|character_length|charindex|chr|concat|crc32|func_sha1|get_bit|get_byte|initcap|left|right|len|length|" + + "lower|lpad|rpad|ltrim|md5|octet_length|position|quote_ident|quote_literal|regexp_count|regexp_instr|regexp_replace|regexp_substr|repeat|replace|replicate|" + + "reverse|rtrim|set_bit|set_byte|split_part|strpos|strtol|substring|textlen|to_ascii|to_hex|translate|trim|upper|json_array_length|json_extract_array_element_text|" + + "json_extract_path_text|cast|convert|to_char|to_date|to_number|current_database|current_schema|current_schemas|current_user|current_user_id|has_database_privilege|" + + "has_schema_privilege|has_table_privilege|pg_backend_pid|pg_last_copy_count|pg_last_copy_id|pg_last_query_id|pg_last_unload_count|session_user|slice_num|user|version" + ); + + var keywordMapper = this.createKeywordMapper({ + "support.function": builtinFunctions, + "keyword": keywords + }, "identifier", true); + + + var sqlRules = [{ + token : "string", // single line string -- assume dollar strings if multi-line for now + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "variable.language", // pg identifier + regex : '".*?"' + }, { + token : "constant.numeric", // float + regex : "[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_][a-zA-Z0-9_$]*\\b" // TODO - Unicode in identifiers + }, { + token : "keyword.operator", + regex : "!|!!|!~|!~\\*|!~~|!~~\\*|#|##|#<|#<=|#<>|#=|#>|#>=|%|\\&|\\&\\&|\\&<|\\&<\\||\\&>|\\*|\\+|" + + "\\-|/|<|<#>|<\\->|<<|<<=|<<\\||<=|<>|<\\?>|<@|<\\^|=|>|>=|>>|>>=|>\\^|\\?#|\\?\\-|\\?\\-\\||" + + "\\?\\||\\?\\|\\||@|@\\-@|@>|@@|@@@|\\^|\\||\\|\\&>|\\|/|\\|>>|\\|\\||\\|\\|/|~|~\\*|~<=~|~<~|" + + "~=|~>=~|~>~|~~|~~\\*" + }, { + token : "paren.lparen", + regex : "[\\(]" + }, { + token : "paren.rparen", + regex : "[\\)]" + }, { + token : "text", + regex : "\\s+" + } + ]; + + + this.$rules = { + "start" : [{ + token : "comment", + regex : "--.*$" + }, + DocCommentHighlightRules.getStartRule("doc-start"), + { + token : "comment", // multi-line comment + regex : "\\/\\*", + next : "comment" + },{ + token : "keyword.statementBegin", + regex : "^[a-zA-Z]+", // Could enumerate starting keywords but this allows things to work when new statements are added. + next : "statement" + },{ + token : "support.buildin", // psql directive + regex : "^\\\\[\\S]+.*$" + } + ], + + "statement" : [{ + token : "comment", + regex : "--.*$" + }, { + token : "comment", // multi-line comment + regex : "\\/\\*", + next : "commentStatement" + }, { + token : "statementEnd", + regex : ";", + next : "start" + }, { + token : "string", + regex : "\\$json\\$", + next : "json-start" + }, { + token : "string", + regex : "\\$[\\w_0-9]*\\$$", // dollar quote at the end of a line + next : "dollarSql" + }, { + token : "string", + regex : "\\$[\\w_0-9]*\\$", + next : "dollarStatementString" + } + ].concat(sqlRules), + + "dollarSql" : [{ + token : "comment", + regex : "--.*$" + }, { + token : "comment", // multi-line comment + regex : "\\/\\*", + next : "commentDollarSql" + }, { + token : "string", // end quoting with dollar at the start of a line + regex : "^\\$[\\w_0-9]*\\$", + next : "statement" + }, { + token : "string", + regex : "\\$[\\w_0-9]*\\$", + next : "dollarSqlString" + } + ].concat(sqlRules), + + "comment" : [{ + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "commentStatement" : [{ + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "statement" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "commentDollarSql" : [{ + token : "comment", // closing comment + regex : ".*?\\*\\/", + next : "dollarSql" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ], + + "dollarStatementString" : [{ + token : "string", // closing dollarstring + regex : ".*?\\$[\\w_0-9]*\\$", + next : "statement" + }, { + token : "string", // dollarstring spanning whole line + regex : ".+" + } + ], + + "dollarSqlString" : [{ + token : "string", // closing dollarstring + regex : ".*?\\$[\\w_0-9]*\\$", + next : "dollarSql" + }, { + token : "string", // dollarstring spanning whole line + regex : ".+" + } + ] + }; + + this.embedRules(DocCommentHighlightRules, "doc-", [ DocCommentHighlightRules.getEndRule("start") ]); + this.embedRules(JsonHighlightRules, "json-", [{token : "string", regex : "\\$json\\$", next : "statement"}]); +}; + +oop.inherits(RedshiftHighlightRules, TextHighlightRules); + +exports.RedshiftHighlightRules = RedshiftHighlightRules; +}); + +define("ace/mode/redshift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/redshift_highlight_rules","ace/range"], function(require, exports, module) { + +var oop = require("../lib/oop"); +var TextMode = require("../mode/text").Mode; +var RedshiftHighlightRules = require("./redshift_highlight_rules").RedshiftHighlightRules; +var Range = require("../range").Range; + +var Mode = function() { + this.HighlightRules = RedshiftHighlightRules; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "--"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + if (state == "start" || state == "keyword.statementEnd") { + return ""; + } else { + return this.$getIndent(line); // Keep whatever indent the previous line has + } + }; + + this.$id = "ace/mode/redshift"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/redshift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-rhtml.js b/htdocs/includes/ace/src/mode-rhtml.js similarity index 93% rename from htdocs/includes/ace/mode-rhtml.js rename to htdocs/includes/ace/src/mode-rhtml.js index aae0378d251..f389e63d28e 100644 --- a/htdocs/includes/ace/mode-rhtml.js +++ b/htdocs/includes/ace/src/mode-rhtml.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && /|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "\\*\\/", + next : "start" + }, { + defaultToken : "comment" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(ScssHighlightRules, TextHighlightRules); + +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; + +var SassHighlightRules = function() { + ScssHighlightRules.call(this); + var start = this.$rules.start; + if (start[1].token == "comment") { + start.splice(1, 1, { + onMatch: function(value, currentState, stack) { + stack.unshift(this.next, -1, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\*/, + next: "comment" + }, { + token: "error.invalid", + regex: "/\\*|[{;}]" + }, { + token: "support.type", + regex: /^\s*:[\w\-]+\s/ + }); + + this.$rules.comment = [ + {regex: /^\s*/, onMatch: function(value, currentState, stack) { + if (stack[1] === -1) + stack[1] = Math.max(stack[2], value.length - 1); + if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); + this.next = stack.shift(); + return "text"; + } else { + this.next = ""; + return "comment"; + } + }, next: "start"}, + {defaultToken: "comment"} + ]; + } +}; + +oop.inherits(SassHighlightRules, ScssHighlightRules); + +exports.SassHighlightRules = SassHighlightRules; + +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = SassHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; + this.$id = "ace/mode/sass"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/sass"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-scad.js b/htdocs/includes/ace/src/mode-scad.js similarity index 89% rename from htdocs/includes/ace/mode-scad.js rename to htdocs/includes/ace/src/mode-scad.js index c9a767b9ceb..4150aab42e8 100644 --- a/htdocs/includes/ace/mode-scad.js +++ b/htdocs/includes/ace/src/mode-scad.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/scad_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -157,7 +157,7 @@ oop.inherits(scadHighlightRules, TextHighlightRules); exports.scadHighlightRules = scadHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -197,7 +197,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -218,8 +218,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -337,7 +337,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/scad",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -404,4 +404,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/scad"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-scala.js b/htdocs/includes/ace/src/mode-scala.js similarity index 95% rename from htdocs/includes/ace/mode-scala.js rename to htdocs/includes/ace/src/mode-scala.js index 94c645c1013..b3cd18a601b 100644 --- a/htdocs/includes/ace/mode-scala.js +++ b/htdocs/includes/ace/src/mode-scala.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,7 +789,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/scala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -949,7 +950,7 @@ oop.inherits(ScalaHighlightRules, TextHighlightRules); exports.ScalaHighlightRules = ScalaHighlightRules; }); -ace.define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module) { +define("ace/mode/scala",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/scala_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -972,4 +973,11 @@ oop.inherits(Mode, JavaScriptMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/scala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-scheme.js b/htdocs/includes/ace/src/mode-scheme.js similarity index 88% rename from htdocs/includes/ace/mode-scheme.js rename to htdocs/includes/ace/src/mode-scheme.js index 2e6b7fff5b0..9e069b0b678 100644 --- a/htdocs/includes/ace/mode-scheme.js +++ b/htdocs/includes/ace/src/mode-scheme.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/scheme_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -75,7 +75,7 @@ var SchemeHighlightRules = function() { "merge" : true } ] -} +}; }; @@ -84,7 +84,7 @@ oop.inherits(SchemeHighlightRules, TextHighlightRules); exports.SchemeHighlightRules = SchemeHighlightRules; }); -ace.define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -129,7 +129,7 @@ var MatchingParensOutdent = function() {}; exports.MatchingParensOutdent = MatchingParensOutdent; }); -ace.define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) { +define("ace/mode/scheme",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scheme_highlight_rules","ace/mode/matching_parens_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -222,4 +222,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/scheme"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-scss.js b/htdocs/includes/ace/src/mode-scss.js new file mode 100644 index 00000000000..6c5c573cacd --- /dev/null +++ b/htdocs/includes/ace/src/mode-scss.js @@ -0,0 +1,873 @@ +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token : "constant.numeric", + regex : numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media": [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + + "comments" : [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }] + }], + + "ruleset" : [{ + regex : "-(webkit|ms|moz|o)-", + token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" + }, { + token : "paren.rparen", + regex : "\\}", + next : "start" + }, { + include : ["strings", "url", "comments"] + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + include: "url" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }], + + url: [{ + token : "support.function", + regex : "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token : "support.function", + regex : "\\)", + next : "pop" + }, { + defaultToken: "string" + }] + }], + + strings: [{ + token : "string.start", + regex : "'", + push : [{ + token : "string.end", + regex : "'|$", + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : '"', + push : [{ + token : "string.end", + regex : '"|$', + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token : "constant.language.escape", + regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); + +var ScssHighlightRules = function() { + + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + + var functions = lang.arrayToMap( + ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|") + ); + + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + + var keywords = lang.arrayToMap( + ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|") + ); + + var tags = lang.arrayToMap( + ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|") + ); + + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", + regex : numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : function(value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex : "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token : "variable", + regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token : "keyword.operator", + regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "\\*\\/", + next : "start" + }, { + defaultToken : "comment" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(ScssHighlightRules, TextHighlightRules); + +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var propertyMap = { + "background": {"#$0": 1}, + "background-color": {"#$0": 1, "transparent": 1, "fixed": 1}, + "background-image": {"url('/$0')": 1}, + "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1}, + "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2}, + "background-attachment": {"scroll": 1, "fixed": 1}, + "background-size": {"cover": 1, "contain": 1}, + "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1}, + "border-color": {"#$0": 1}, + "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2}, + "border-collapse": {"collapse": 1, "separate": 1}, + "bottom": {"px": 1, "em": 1, "%": 1}, + "clear": {"left": 1, "right": 1, "both": 1, "none": 1}, + "color": {"#$0": 1, "rgb(#$00,0,0)": 1}, + "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1}, + "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1}, + "empty-cells": {"show": 1, "hide": 1}, + "float": {"left": 1, "right": 1, "none": 1}, + "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1}, + "font-size": {"px": 1, "em": 1, "%": 1}, + "font-weight": {"bold": 1, "normal": 1}, + "font-style": {"italic": 1, "normal": 1}, + "font-variant": {"normal": 1, "small-caps": 1}, + "height": {"px": 1, "em": 1, "%": 1}, + "left": {"px": 1, "em": 1, "%": 1}, + "letter-spacing": {"normal": 1}, + "line-height": {"normal": 1}, + "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1}, + "margin": {"px": 1, "em": 1, "%": 1}, + "margin-right": {"px": 1, "em": 1, "%": 1}, + "margin-left": {"px": 1, "em": 1, "%": 1}, + "margin-top": {"px": 1, "em": 1, "%": 1}, + "margin-bottom": {"px": 1, "em": 1, "%": 1}, + "max-height": {"px": 1, "em": 1, "%": 1}, + "max-width": {"px": 1, "em": 1, "%": 1}, + "min-height": {"px": 1, "em": 1, "%": 1}, + "min-width": {"px": 1, "em": 1, "%": 1}, + "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "padding": {"px": 1, "em": 1, "%": 1}, + "padding-top": {"px": 1, "em": 1, "%": 1}, + "padding-right": {"px": 1, "em": 1, "%": 1}, + "padding-bottom": {"px": 1, "em": 1, "%": 1}, + "padding-left": {"px": 1, "em": 1, "%": 1}, + "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1}, + "right": {"px": 1, "em": 1, "%": 1}, + "table-layout": {"fixed": 1, "auto": 1}, + "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1}, + "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1}, + "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1}, + "top": {"px": 1, "em": 1, "%": 1}, + "vertical-align": {"top": 1, "bottom": 1}, + "visibility": {"hidden": 1, "visible": 1}, + "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1}, + "width": {"px": 1, "em": 1, "%": 1}, + "word-spacing": {"normal": 1}, + "filter": {"alpha(opacity=$0100)": 1}, + + "text-shadow": {"$02px 2px 2px #777": 1}, + "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1}, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 } +}; + +var CssCompletions = function() { + +}; + +(function() { + + this.completionsDefined = false; + + this.defineCompletions = function() { + if (document) { + var style = document.createElement('c').style; + + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + + var name = i.replace(/[A-Z]/g, function(x) { + return '-' + x.toLowerCase(); + }); + + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + + this.completionsDefined = true; + }; + + this.getCompletions = function(state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + + return this.getPropertyValueCompletions(state, session, pos, prefix); + } else { + return this.getPropertyCompletions(state, session, pos, prefix); + } + } + + return []; + }; + + this.getPropertyCompletions = function(state, session, pos, prefix) { + var properties = Object.keys(propertyMap); + return properties.map(function(property){ + return { + caption: property, + snippet: property + ': $0;', + meta: "property", + score: 1000000 + }; + }); + }; + + this.getPropertyValueCompletions = function(state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; + +}).call(CssCompletions.prototype); + +exports.CssCompletions = CssCompletions; +}); + +define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CssCompletions = require("./css_completions").CssCompletions; + + +var Mode = function() { + this.HighlightRules = ScssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + + this.$id = "ace/mode/scss"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); (function() { + window.require(["ace/mode/scss"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-sh.js b/htdocs/includes/ace/src/mode-sh.js similarity index 92% rename from htdocs/includes/ace/mode-sh.js rename to htdocs/includes/ace/src/mode-sh.js index bcded08909e..db130f99563 100644 --- a/htdocs/includes/ace/mode-sh.js +++ b/htdocs/includes/ace/src/mode-sh.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -39,7 +39,7 @@ var ShHighlightRules = function() { var fileDescriptor = "(?:&" + intPart + ")"; var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; - var variable = "(?:" + variableName + "=)"; + var variable = "(?:" + variableName + "(?==))"; var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; @@ -217,7 +217,7 @@ oop.inherits(ShHighlightRules, TextHighlightRules); exports.ShHighlightRules = ShHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -238,8 +238,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -357,7 +357,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -438,4 +438,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/sh"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-sjs.js b/htdocs/includes/ace/src/mode-sjs.js similarity index 95% rename from htdocs/includes/ace/mode-sjs.js rename to htdocs/includes/ace/src/mode-sjs.js index 6bcd0bce684..218cab19b44 100644 --- a/htdocs/includes/ace/mode-sjs.js +++ b/htdocs/includes/ace/src/mode-sjs.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,7 +789,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/sjs_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -973,13 +974,13 @@ var SJSHighlightRules = function() { regex: "\\)" }) ].concat(embeddableRules); -} +}; oop.inherits(SJSHighlightRules, TextHighlightRules); exports.SJSHighlightRules = SJSHighlightRules; }); -ace.define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/sjs",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/sjs_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JSMode = require("./javascript").Mode; @@ -998,9 +999,16 @@ oop.inherits(Mode, JSMode); (function() { this.createWorker = function(session) { return null; - } + }; this.$id = "ace/mode/sjs"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/sjs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-slim.js b/htdocs/includes/ace/src/mode-slim.js new file mode 100644 index 00000000000..320e6a75b92 --- /dev/null +++ b/htdocs/includes/ace/src/mode-slim.js @@ -0,0 +1,4642 @@ +define("ace/mode/slim_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var modes = require("../config").$modes; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var SlimHighlightRules = function() { + + this.$rules = { + "start": [ + { + token: "keyword", + regex: /^(\s*)(\w+):\s*/, + onMatch: function(value, state, stack, line) { + var indent = /^\s*/.exec(line)[0]; + var m = value.match(/^(\s*)(\w+):/); + var language = m[2]; + if (!/^(javascript|ruby|coffee|markdown|css|scss|sass|less)$/.test(language)) + language = ""; + stack.unshift("language-embed", [], [indent, language], state); + return this.token; + }, + stateName: "language-embed", + next: [{ + token: "string", + regex: /^(\s*)/, + onMatch: function(value, state, stack, line) { + var indent = stack[2][0]; + if (indent.length >= value.length) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + return [{type: "text", value: indent}]; + }, + next: "" + }, { + token: "string", + regex: /.+/, + onMatch: function(value, state, stack, line) { + var indent = stack[2][0]; + var language = stack[2][1]; + var embedState = stack[1]; + + if (modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(line.slice(indent.length), embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }] + }, + { + token: 'constant.begin.javascript.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(ruby):$' + }, { + token: 'constant.begin.coffeescript.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(markdown):$' + }, { + token: 'constant.begin.css.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin.scss.filter.slim', + regex: '^(\\s*)():$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(sass):$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(less):$' + }, { + token: 'constant.begin..filter.slim', + regex: '^(\\s*)(erb):$' + }, { + token: 'keyword.html.tags.slim', + regex: '^(\\s*)((:?\\*(\\w)+)|doctype html|abbr|acronym|address|applet|area|article|aside|audio|base|basefont|bdo|big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|command|datalist|dd|del|details|dialog|dfn|dir|div|dl|dt|embed|fieldset|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|link|li|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|source|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video|xmp|b|u|s|em|a)(?:([.#](\\w|\\.)+)+\\s?)?\\b' + + }, { + token: 'keyword.slim', + regex: '^(\\s*)(?:([.#](\\w|\\.)+)+\\s?)' + }, { + token: "string", + regex: /^(\s*)('|\||\/|(\/!))\s*/, + onMatch: function(val, state, stack, line) { + var indent = /^\s*/.exec(line)[0]; + if (stack.length < 1) { + stack.push(this.next); + } + else { + stack[0] = "mlString"; + } + + if (stack.length < 2) { + stack.push(indent.length); + } + else { + stack[1] = indent.length; + } + return this.token; + }, + next: "mlString" + }, { + token: 'keyword.control.slim', + regex: '^(\\s*)(\\-|==|=)', + push: [{ + token: 'control.end.slim', + regex: '$', + next: "pop" + }, { + include: "rubyline" + }, { + include: "misc" + }] + + }, { + token: 'paren', + regex: '\\(', + push: [{ + token: 'paren', + regex: '\\)', + next: "pop" + }, { + include: "misc" + }] + + }, { + token: 'paren', + regex: '\\[', + push: [{ + token: 'paren', + regex: '\\]', + next: "pop" + }, { + include: "misc" + }] + }, { + include: "misc" + } + ], + "mlString": [{ + token: "indent", + regex: /^\s*/, + onMatch: function(val, state, stack) { + var curIndent = stack[1]; + + if (curIndent >= val.length) { + this.next = "start"; + stack.splice(0); + } + else { + this.next = "mlString"; + } + return this.token; + }, + next: "start" + }, { + defaultToken: "string" + }], + "rubyline": [{ + token: "keyword.operator.ruby.embedded.slim", + regex: "(==|=)(<>|><|<'|'<|<|>)?|-" + }, { + token: "list.ruby.operators.slim", + regex: "(\\b)(for|in|do|if|else|elsif|unless|while|yield|not|and|or)\\b" + }, { + token: "string", + regex: "['](.)*?[']" + }, { + token: "string", + regex: "[\"](.)*?[\"]" + }], + "misc": [{ + token: 'class.variable.slim', + regex: '\\@([a-zA-Z_][a-zA-Z0-9_]*)\\b' + }, { + token: "list.meta.slim", + regex: "(\\b)(true|false|nil)(\\b)" + }, { + token: 'keyword.operator.equals.slim', + regex: '=' + }, { + token: "string", + regex: "['](.)*?[']" + }, { + token: "string", + regex: "[\"](.)*?[\"]" + }] + }; + this.normalizeRules(); +}; + + +oop.inherits(SlimHighlightRules, TextHighlightRules); + +exports.SlimHighlightRules = SlimHighlightRules; +}); + +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var DocCommentHighlightRules = function() { + this.$rules = { + "start" : [ { + token : "comment.doc.tag", + regex : "@[\\w\\d_]+" // TODO: fix email addresses + }, + DocCommentHighlightRules.getTagRule(), + { + defaultToken : "comment.doc", + caseInsensitive: true + }] + }; +}; + +oop.inherits(DocCommentHighlightRules, TextHighlightRules); + +DocCommentHighlightRules.getTagRule = function(start) { + return { + token : "comment.doc.tag.storage.type", + regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" + }; +}; + +DocCommentHighlightRules.getStartRule = function(start) { + return { + token : "comment.doc", // doc comment + regex : "\\/\\*(?=\\*)", + next : start + }; +}; + +DocCommentHighlightRules.getEndRule = function (start) { + return { + token : "comment.doc", // closing comment + regex : "\\*\\/", + next : start + }; +}; + + +exports.DocCommentHighlightRules = DocCommentHighlightRules; + +}); + +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var DocCommentHighlightRules = require("./doc_comment_highlight_rules").DocCommentHighlightRules; +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var identifierRe = "[a-zA-Z\\$_\u00a1-\uffff][a-zA-Z\\d\\$_\u00a1-\uffff]*"; + +var JavaScriptHighlightRules = function(options) { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "Array|Boolean|Date|Function|Iterator|Number|Object|RegExp|String|Proxy|" + // Constructors + "Namespace|QName|XML|XMLList|" + // E4X + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + // Errors + "SyntaxError|TypeError|URIError|" + + "decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|" + // Non-constructor functions + "isNaN|parseFloat|parseInt|" + + "JSON|Math|" + // Other + "this|arguments|prototype|window|document" , // Pseudo + "keyword": + "const|yield|import|get|set|async|await|" + + "break|case|catch|continue|default|delete|do|else|finally|for|function|" + + "if|in|of|instanceof|new|return|switch|throw|try|typeof|let|var|while|with|debugger|" + + "__parent__|__count__|escape|unescape|with|__proto__|" + + "class|enum|extends|super|export|implements|private|public|interface|package|protected|static", + "storage.type": + "const|let|var|function", + "constant.language": + "null|Infinity|NaN|undefined", + "support.function": + "alert", + "constant.language.boolean": "true|false" + }, "identifier"); + var kwBeforeRe = "case|do|else|finally|in|instanceof|return|throw|try|typeof|yield|void"; + + var escapedRe = "\\\\(?:x[0-9a-fA-F]{2}|" + // hex + "u[0-9a-fA-F]{4}|" + // unicode + "u{[0-9a-fA-F]{1,6}}|" + // es6 unicode + "[0-2][0-7]{0,2}|" + // oct + "3[0-7][0-7]?|" + // oct + "[4-7][0-7]?|" + //oct + ".)"; + + this.$rules = { + "no_regex" : [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("no_regex"), + { + token : "string", + regex : "'(?=.)", + next : "qstring" + }, { + token : "string", + regex : '"(?=.)', + next : "qqstring" + }, { + token : "constant.numeric", // hexadecimal, octal and binary + regex : /0(?:[xX][0-9a-fA-F]+|[oO][0-7]+|[bB][01]+)\b/ + }, { + token : "constant.numeric", // decimal integers and floats + regex : /(?:\d\d*(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+\b)?/ + }, { + token : [ + "storage.type", "punctuation.operator", "support.function", + "punctuation.operator", "entity.name.function", "text","keyword.operator" + ], + regex : "(" + identifierRe + ")(\\.)(prototype)(\\.)(" + identifierRe +")(\\s*)(=)", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "keyword.operator", "text", "storage.type", + "text", "paren.lparen" + ], + regex : "(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(\\s+)(\\w+)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(function)(\\s+)(" + identifierRe + ")(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "entity.name.function", "text", "punctuation.operator", + "text", "storage.type", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\s*)(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : [ + "text", "text", "storage.type", "text", "paren.lparen" + ], + regex : "(:)(\\s*)(function)(\\s*)(\\()", + next: "function_arguments" + }, { + token : "keyword", + regex : "from(?=\\s*('|\"))" + }, { + token : "keyword", + regex : "(?:" + kwBeforeRe + ")\\b", + next : "start" + }, { + token : ["support.constant"], + regex : /that\b/ + }, { + token : ["storage.type", "punctuation.operator", "support.function.firebug"], + regex : /(console)(\.)(warn|info|log|error|time|trace|timeEnd|assert)\b/ + }, { + token : keywordMapper, + regex : identifierRe + }, { + token : "punctuation.operator", + regex : /[.](?![.])/, + next : "property" + }, { + token : "storage.type", + regex : /=>/, + next : "start" + }, { + token : "keyword.operator", + regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token : "text", + regex : "\\s+" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", + next: "function_arguments" + }, { + token : "punctuation.operator", + regex : /[.](?![.])/ + }, { + token : "support.function", + regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : "support.function.dom", + regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : "support.constant", + regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : "identifier", + regex : identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.quasi.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : escapedRe + }, { + token : "paren.quasi.start", + regex : /\${/, + push : "start" + }, { + token : "string.quasi.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string.quasi" + }] + }); + + if (!options || options.jsx != false) + JSX.call(this); + } + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); + + this.normalizeRules(); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch : function(val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex : "", + onMatch : function(value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{type: this.token, value: value}]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + token : "text.tag-whitespace.xml", + regex : "\\s+" + }, { + token : "string.attribute-value.xml", + regex : "'", + stateName : "jsx_attr_q", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + stateName : "jsx_attr_qq", + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} + +function comments(next) { + return [ + { + token : "comment", // multi line comment + regex : /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "comment", + regex : "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + this.$quotes = {'"': '"', "'": "'", "`": "`"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/javascript"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + + this.$rules = { + start : [ + {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction" + }, + {token : "comment.start.xml", regex : "<\\!--", next : "comment"}, + { + token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true + }, + {include : "tag"}, + {token : "text.end-tag-open.xml", regex: "", + next : "start" + }], + + doctype : [ + {include : "whitespace"}, + {include : "string"}, + {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, + {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} + ], + + int_subset : [{ + token : "text.xml", + regex : "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex : "(<\\!)(" + tagRegex + ")", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.markup-decl.xml", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, + {token : "text.xml", regex : "\\s+"}, + {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment.end.xml", regex : "-->", next : "start"}, + {defaultToken : "comment.xml"} + ], + + reference : [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + attr_reference : [{ + token : "constant.language.escape.reference.attribute-value.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + tag : [{ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex : "(?:(<)|(", next : "start"} + ] + }], + + tag_whitespace : [ + {token : "text.tag-whitespace.xml", regex : "\\s+"} + ], + whitespace : [ + {token : "text.whitespace.xml", regex : "\\s+"} + ], + string: [{ + token : "string.xml", + regex : "'", + push : [ + {token : "string.xml", regex: "'", next: "pop"}, + {defaultToken : "string.xml"} + ] + }, { + token : "string.xml", + regex : '"', + push : [ + {token : "string.xml", regex: '"', next: "pop"}, + {defaultToken : "string.xml"} + ] + }], + + attributes: [{ + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + + attribute_value: [{ + token : "string.attribute-value.xml", + regex : "'", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(<)(" + tag + "(?=\\s|>|$))", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ]; + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex : "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex : "\\]\\]>" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var lang = require("../../lib/lang"); + +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} + +var XmlBehaviour = function () { + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + + if (!token) + token = iterator.stepBackward(); + + if (!token) + return; + + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + + if (this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (token && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + + if (!token) { + return; + } + + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + + if (this.voidElements && !this.voidElements[tag]) { + var nextToken = session.getTokenAt(cursor.row, cursor.column+1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + + if (nextToken && nextToken.value === " -1; +} + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (!tag) + return this.getCommentFoldWidget(session, row); + + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + + return "start"; + }; + + this.getCommentFoldWidget = function(session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + + return null; + }; + + this._findEndTagInLine = function(session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + iterator.stepForward(); + return tag; + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + iterator.stepBackward(); + return tag; + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag) { + return this.getCommentFoldWidget(session, row) + && session.getCommentFoldRange(row, session.getLine(row).length); + } + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.start.column); + var start = { + row: row, + column: firstTag.start.column + firstTag.tagName.length + 2 + }; + if (firstTag.start.row == firstTag.end.row) + start.column = firstTag.end.column; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag); + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.end.column); + var end = { + row: row, + column: firstTag.start.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) + tag.start.column = tag.end.column; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag); + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/xml_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/xml","ace/worker/worker_client"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var XmlFoldMode = require("./folding/xml").FoldMode; +var WorkerClient = require("../worker/worker_client").WorkerClient; + +var Mode = function() { + this.HighlightRules = XmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.foldingRules = new XmlFoldMode(); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.voidElements = lang.arrayToMap([]); + + this.blockComment = {start: ""}; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/xml_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("error", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/xml"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token : "constant.numeric", + regex : numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media": [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + + "comments" : [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }] + }], + + "ruleset" : [{ + regex : "-(webkit|ms|moz|o)-", + token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" + }, { + token : "paren.rparen", + regex : "\\}", + next : "start" + }, { + include : ["strings", "url", "comments"] + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + include: "url" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }], + + url: [{ + token : "support.function", + regex : "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token : "support.function", + regex : "\\)", + next : "pop" + }, { + defaultToken: "string" + }] + }], + + strings: [{ + token : "string.start", + regex : "'", + push : [{ + token : "string.end", + regex : "'|$", + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : '"', + push : [{ + token : "string.end", + regex : '"|$', + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token : "constant.language.escape", + regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var propertyMap = { + "background": {"#$0": 1}, + "background-color": {"#$0": 1, "transparent": 1, "fixed": 1}, + "background-image": {"url('/$0')": 1}, + "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1}, + "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2}, + "background-attachment": {"scroll": 1, "fixed": 1}, + "background-size": {"cover": 1, "contain": 1}, + "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1}, + "border-color": {"#$0": 1}, + "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2}, + "border-collapse": {"collapse": 1, "separate": 1}, + "bottom": {"px": 1, "em": 1, "%": 1}, + "clear": {"left": 1, "right": 1, "both": 1, "none": 1}, + "color": {"#$0": 1, "rgb(#$00,0,0)": 1}, + "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1}, + "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1}, + "empty-cells": {"show": 1, "hide": 1}, + "float": {"left": 1, "right": 1, "none": 1}, + "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1}, + "font-size": {"px": 1, "em": 1, "%": 1}, + "font-weight": {"bold": 1, "normal": 1}, + "font-style": {"italic": 1, "normal": 1}, + "font-variant": {"normal": 1, "small-caps": 1}, + "height": {"px": 1, "em": 1, "%": 1}, + "left": {"px": 1, "em": 1, "%": 1}, + "letter-spacing": {"normal": 1}, + "line-height": {"normal": 1}, + "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1}, + "margin": {"px": 1, "em": 1, "%": 1}, + "margin-right": {"px": 1, "em": 1, "%": 1}, + "margin-left": {"px": 1, "em": 1, "%": 1}, + "margin-top": {"px": 1, "em": 1, "%": 1}, + "margin-bottom": {"px": 1, "em": 1, "%": 1}, + "max-height": {"px": 1, "em": 1, "%": 1}, + "max-width": {"px": 1, "em": 1, "%": 1}, + "min-height": {"px": 1, "em": 1, "%": 1}, + "min-width": {"px": 1, "em": 1, "%": 1}, + "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "padding": {"px": 1, "em": 1, "%": 1}, + "padding-top": {"px": 1, "em": 1, "%": 1}, + "padding-right": {"px": 1, "em": 1, "%": 1}, + "padding-bottom": {"px": 1, "em": 1, "%": 1}, + "padding-left": {"px": 1, "em": 1, "%": 1}, + "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1}, + "right": {"px": 1, "em": 1, "%": 1}, + "table-layout": {"fixed": 1, "auto": 1}, + "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1}, + "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1}, + "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1}, + "top": {"px": 1, "em": 1, "%": 1}, + "vertical-align": {"top": 1, "bottom": 1}, + "visibility": {"hidden": 1, "visible": 1}, + "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1}, + "width": {"px": 1, "em": 1, "%": 1}, + "word-spacing": {"normal": 1}, + "filter": {"alpha(opacity=$0100)": 1}, + + "text-shadow": {"$02px 2px 2px #777": 1}, + "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1}, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 } +}; + +var CssCompletions = function() { + +}; + +(function() { + + this.completionsDefined = false; + + this.defineCompletions = function() { + if (document) { + var style = document.createElement('c').style; + + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + + var name = i.replace(/[A-Z]/g, function(x) { + return '-' + x.toLowerCase(); + }); + + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + + this.completionsDefined = true; + }; + + this.getCompletions = function(state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + + return this.getPropertyValueCompletions(state, session, pos, prefix); + } else { + return this.getPropertyCompletions(state, session, pos, prefix); + } + } + + return []; + }; + + this.getPropertyCompletions = function(state, session, pos, prefix) { + var properties = Object.keys(propertyMap); + return properties.map(function(property){ + return { + caption: property, + snippet: property + ': $0;', + meta: "property", + score: 1000000 + }; + }); + }; + + this.getPropertyValueCompletions = function(state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; + +}).call(CssCompletions.prototype); + +exports.CssCompletions = CssCompletions; +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/css"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "tag_whitespace" + }, { + token : "entity.other.attribute-name.xml", + regex : "[-_a-zA-Z0-9:.]+" + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=", + push : [{ + include: "tag_whitespace" + }, { + token : "string.unquoted.attribute-value.html", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "attribute_value" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex : "(", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(defaultMode, subModes) { + this.defaultMode = defaultMode; + this.subModes = subModes; +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + + this.$getMode = function(state) { + if (typeof state != "string") + state = state[0]; + for (var key in this.subModes) { + if (state.indexOf(key) === 0) + return this.subModes[key]; + } + return null; + }; + + this.$tryMode = function(state, session, foldStyle, row) { + var mode = this.$getMode(state); + return (mode ? mode.getFoldWidget(session, foldStyle, row) : ""); + }; + + this.getFoldWidget = function(session, foldStyle, row) { + return ( + this.$tryMode(session.getState(row-1), session, foldStyle, row) || + this.$tryMode(session.getState(row), session, foldStyle, row) || + this.defaultMode.getFoldWidget(session, foldStyle, row) + ); + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var mode = this.$getMode(session.getState(row-1)); + + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.$getMode(session.getState(row)); + + if (!mode || !mode.getFoldWidget(session, foldStyle, row)) + mode = this.defaultMode; + + return mode.getFoldWidgetRange(session, foldStyle, row); + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; + +var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; + +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var TokenIterator = require("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1}, + "abbr": {}, + "address": {}, + "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1}, + "article": {"pubdate": 1}, + "aside": {}, + "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }}, + "b": {}, + "base": {"href": 1, "target": 1}, + "bdi": {}, + "bdo": {}, + "blockquote": {"cite": 1}, + "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1}, + "br": {}, + "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}}, + "canvas": {"width": 1, "height": 1}, + "caption": {}, + "cite": {}, + "code": {}, + "col": {"span": 1}, + "colgroup": {"span": 1}, + "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1}, + "data": {}, + "datalist": {}, + "dd": {}, + "del": {"cite": 1, "datetime": 1}, + "details": {"open": 1}, + "dfn": {}, + "dialog": {"open": 1}, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": {"src": 1, "height": 1, "width": 1, "type": 1}, + "fieldset": {"disabled": 1, "form": 1, "name": 1}, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}}, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": {"manifest": 1}, + "i": {}, + "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}}, + "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1}, + "input": { + "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1}, + "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1}, + "ins": {"cite": 1, "datetime": 1}, + "kbd": {}, + "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1}, + "label": {"form": 1, "for": 1}, + "legend": {}, + "li": {"value": 1}, + "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1}, + "main": {}, + "map": {"name": 1}, + "mark": {}, + "math": {}, + "menu": {"type": 1, "label": 1}, + "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1}, + "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1}, + "nav": {}, + "noscript": {"href": 1}, + "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1}, + "ol": {"start": 1, "reversed": 1}, + "optgroup": {"disabled": 1, "label": 1}, + "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1}, + "output": {"for": 1, "form": 1, "name": 1}, + "p": {}, + "param": {"name": 1, "value": 1}, + "pre": {}, + "progress": {"value": 1, "max": 1}, + "q": {"cite": 1}, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1}, + "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}}, + "small": {}, + "source": {"src": 1, "type": 1, "media": 1}, + "span": {}, + "strong": {}, + "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1}, + "sub": {}, + "sup": {}, + "svg": {}, + "table": {"summary": 1}, + "tbody": {}, + "td": {"headers": 1, "rowspan": 1, "colspan": 1}, + "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}}, + "tfoot": {}, + "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1}, + "thead": {}, + "time": {"datetime": 1}, + "title": {}, + "tr": {}, + "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1}, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}}, + "wbr": {} +}; + +var elements = Object.keys(attributeMap); + +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + return elements.map(function(element){ + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + + this.getAttributeCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + + this.getAttributeValueCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + + this.getHTMLEntityCompletions = function(state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; + +var Mode = function(options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.voidElements = lang.arrayToMap(voidElements); + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + if (this.fragmentContext) + worker.call("setOptions", [{context: this.fragmentContext}]); + + worker.on("error", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/html"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/markdown_highlight_rules",["require","exports","module","ace/config","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/html_highlight_rules"], function(require, exports, module) { +"use strict"; + +var modes = require("../config").$modes; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; + +var escaped = function(ch) { + return "(?:[^" + lang.escapeRegExp(ch) + "\\\\]|\\\\.)*"; +}; + +var MarkdownHighlightRules = function() { + HtmlHighlightRules.call(this); + var codeBlockStartRule = { + token : "support.function", + regex : /^\s*(```+[^`]*|~~~+[^~]*)$/, + onMatch: function(value, state, stack, line) { + var m = value.match(/^(\s*)([`~]+)(.*)/); + var language = /[\w-]+|$/.exec(m[3])[0]; + if (!modes[language]) + language = ""; + stack.unshift("githubblock", [], [m[1], m[2], language], state); + return this.token; + }, + next : "githubblock" + }; + var codeBlockRules = [{ + token : "support.function", + regex : ".*", + onMatch: function(value, state, stack, line) { + var embedState = stack[1]; + var indent = stack[2][0]; + var endMarker = stack[2][1]; + var language = stack[2][2]; + + var m = /^(\s*)(`+|~+)\s*$/.exec(value); + if ( + m && m[1].length < indent.length + 3 + && m[2].length >= endMarker.length && m[2][0] == endMarker[0] + ) { + stack.splice(0, 3); + this.next = stack.shift(); + return this.token; + } + this.next = ""; + if (language && modes[language]) { + var data = modes[language].getTokenizer().getLineTokens(value, embedState.slice(0)); + stack[1] = data.state; + return data.tokens; + } + return this.token; + } + }]; + + this.$rules["start"].unshift({ + token : "empty_line", + regex : '^$', + next: "allowBlock" + }, { // h1 + token: "markup.heading.1", + regex: "^=+(?=\\s*$)" + }, { // h2 + token: "markup.heading.2", + regex: "^\\-+(?=\\s*$)" + }, { + token : function(value) { + return "markup.heading." + value.length; + }, + regex : /^#{1,6}(?=\s|$)/, + next : "header" + }, + codeBlockStartRule, + { // block quote + token : "string.blockquote", + regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next : "blockquote" + }, { // HR * - _ + token : "constant", + regex : "^ {0,2}(?:(?: ?\\* ?){3,}|(?: ?\\- ?){3,}|(?: ?\\_ ?){3,})\\s*$", + next: "allowBlock" + }, { // list + token : "markup.list", + regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next : "listblock-start" + }, { + include : "basic" + }); + + this.addRules({ + "basic" : [{ + token : "constant.language.escape", + regex : /\\[\\`*_{}\[\]()#+\-.!]/ + }, { // code span ` + token : "support.function", + regex : "(`+)(.*?[^`])(\\1)" + }, { // reference + token : ["text", "constant", "text", "url", "string", "text"], + regex : "^([ ]{0,3}\\[)([^\\]]+)(\\]:\\s*)([^ ]+)(\\s*(?:[\"][^\"]+[\"])?(\\s*))$" + }, { // link by reference + token : ["text", "string", "text", "constant", "text"], + regex : "(\\[)(" + escaped("]") + ")(\\]\\s*\\[)("+ escaped("]") + ")(\\])" + }, { // link by url + token : ["text", "string", "text", "markup.underline", "string", "text"], + regex : "(\\!?\\[)(" + // [ + escaped("]") + // link text or alt text + ")(\\]\\()"+ // ]( + '((?:[^\\)\\s\\\\]|\\\\.|\\s(?=[^"]))*)' + // href or image + '(\\s*"' + escaped('"') + '"\\s*)?' + // "title" + "(\\))" // ) + }, { // strong ** __ + token : "string.strong", + regex : "([*]{2}|[_]{2}(?=\\S))(.*?\\S[*_]*)(\\1)" + }, { // emphasis * _ + token : "string.emphasis", + regex : "([*]|[_](?=\\S))(.*?\\S[*_]*)(\\1)" + }, { // + token : ["text", "url", "text"], + regex : "(<)("+ + "(?:https?|ftp|dict):[^'\">\\s]+"+ + "|"+ + "(?:mailto:)?[-.\\w]+\\@[-a-z0-9]+(?:\\.[-a-z0-9]+)*\\.[a-z]+"+ + ")(>)" + }], + "allowBlock": [ + {token : "support.function", regex : "^ {4}.+", next : "allowBlock"}, + {token : "empty_line", regex : '^$', next: "allowBlock"}, + {token : "empty", regex : "", next : "start"} + ], + + "header" : [{ + regex: "$", + next : "start" + }, { + include: "basic" + }, { + defaultToken : "heading" + } ], + + "listblock-start" : [{ + token : "support.variable", + regex : /(?:\[[ x]\])?/, + next : "listblock" + }], + + "listblock" : [ { // Lists only escape on completely blank lines. + token : "empty_line", + regex : "^$", + next : "start" + }, { // list + token : "markup.list", + regex : "^\\s{0,3}(?:[*+-]|\\d+\\.)\\s+", + next : "listblock-start" + }, { + include : "basic", noEscape: true + }, + codeBlockStartRule, + { + defaultToken : "list" //do not use markup.list to allow stling leading `*` differntly + } ], + + "blockquote" : [ { // Blockquotes only escape on blank lines. + token : "empty_line", + regex : "^\\s*$", + next : "start" + }, { // block quote + token : "string.blockquote", + regex : "^\\s*>\\s*(?:[*+-]|\\d+\\.)?\\s+", + next : "blockquote" + }, { + include : "basic", noEscape: true + }, { + defaultToken : "string.blockquote" + } ], + + "githubblock" : codeBlockRules + }); + + this.normalizeRules(); +}; +oop.inherits(MarkdownHighlightRules, TextHighlightRules); + +exports.MarkdownHighlightRules = MarkdownHighlightRules; +}); + +define("ace/mode/folding/markdown",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + this.foldingStartMarker = /^(?:[=-]+\s*$|#{1,6} |`{3})/; + + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + if (!this.foldingStartMarker.test(line)) + return ""; + + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) == "start") + return "end"; + return "start"; + } + + return "start"; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var line = session.getLine(row); + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + if (!line.match(this.foldingStartMarker)) + return; + + if (line[0] == "`") { + if (session.bgTokenizer.getState(row) !== "start") { + while (++row < maxRow) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(startRow, startColumn, row, 0); + } else { + while (row -- > 0) { + line = session.getLine(row); + if (line[0] == "`" & line.substring(0, 3) == "```") + break; + } + return new Range(row, line.length, startRow, 0); + } + } + + var token; + function isHeading(row) { + token = session.getTokens(row)[0]; + return token && token.type.lastIndexOf(heading, 0) === 0; + } + + var heading = "markup.heading"; + function getLevel() { + var ch = token.value[0]; + if (ch == "=") return 6; + if (ch == "-") return 5; + return 7 - token.value.search(/[^#]|$/); + } + + if (isHeading(row)) { + var startHeadingLevel = getLevel(); + while (++row < maxRow) { + if (!isHeading(row)) + continue; + var level = getLevel(); + if (level >= startHeadingLevel) + break; + } + + endRow = row - (!token || ["=", "-"].indexOf(token.value[0]) == -1 ? 1 : 2); + + if (endRow > startRow) { + while (endRow > startRow && /^\s*$/.test(session.getLine(endRow))) + endRow--; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/sh_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var reservedKeywords = exports.reservedKeywords = ( + '!|{|}|case|do|done|elif|else|'+ + 'esac|fi|for|if|in|then|until|while|'+ + '&|;|export|local|read|typeset|unset|'+ + 'elif|select|set|function|declare|readonly' + ); + +var languageConstructs = exports.languageConstructs = ( + '[|]|alias|bg|bind|break|builtin|'+ + 'cd|command|compgen|complete|continue|'+ + 'dirs|disown|echo|enable|eval|exec|'+ + 'exit|fc|fg|getopts|hash|help|history|'+ + 'jobs|kill|let|logout|popd|printf|pushd|'+ + 'pwd|return|set|shift|shopt|source|'+ + 'suspend|test|times|trap|type|ulimit|'+ + 'umask|unalias|wait' +); + +var ShHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "keyword": reservedKeywords, + "support.function.builtin": languageConstructs, + "invalid.deprecated": "debugger" + }, "identifier"); + + var integer = "(?:(?:[1-9]\\d*)|(?:0))"; + + var fraction = "(?:\\.\\d+)"; + var intPart = "(?:\\d+)"; + var pointFloat = "(?:(?:" + intPart + "?" + fraction + ")|(?:" + intPart + "\\.))"; + var exponentFloat = "(?:(?:" + pointFloat + "|" + intPart + ")" + ")"; + var floatNumber = "(?:" + exponentFloat + "|" + pointFloat + ")"; + var fileDescriptor = "(?:&" + intPart + ")"; + + var variableName = "[a-zA-Z_][a-zA-Z0-9_]*"; + var variable = "(?:" + variableName + "(?==))"; + + var builtinVariable = "(?:\\$(?:SHLVL|\\$|\\!|\\?))"; + + var func = "(?:" + variableName + "\\s*\\(\\))"; + + this.$rules = { + "start" : [{ + token : "constant", + regex : /\\./ + }, { + token : ["text", "comment"], + regex : /(^|\s)(#.*)$/ + }, { + token : "string.start", + regex : '"', + push : [{ + token : "constant.language.escape", + regex : /\\(?:[$`"\\]|$)/ + }, { + include : "variables" + }, { + token : "keyword.operator", + regex : /`/ // TODO highlight ` + }, { + token : "string.end", + regex : '"', + next: "pop" + }, { + defaultToken: "string" + }] + }, { + token : "string", + regex : "\\$'", + push : [{ + token : "constant.language.escape", + regex : /\\(?:[abeEfnrtv\\'"]|x[a-fA-F\d]{1,2}|u[a-fA-F\d]{4}([a-fA-F\d]{4})?|c.|\d{1,3})/ + }, { + token : "string", + regex : "'", + next: "pop" + }, { + defaultToken: "string" + }] + }, { + regex : "<<<", + token : "keyword.operator" + }, { + stateName: "heredoc", + regex : "(<<-?)(\\s*)(['\"`]?)([\\w\\-]+)(['\"`]?)", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[4]); + return [ + {type:"constant", value: tokens[1]}, + {type:"text", value: tokens[2]}, + {type:"string", value: tokens[3]}, + {type:"support.class", value: tokens[4]}, + {type:"string", value: tokens[5]} + ]; + }, + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^\t+" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : ["keyword", "text", "text", "text", "variable"], + regex : /(declare|local|readonly)(\s+)(?:(-[fixar]+)(\s+))?([a-zA-Z_][a-zA-Z0-9_]*\b)/ + }, { + token : "variable.language", + regex : builtinVariable + }, { + token : "variable", + regex : variable + }, { + include : "variables" + }, { + token : "support.function", + regex : func + }, { + token : "support.function", + regex : fileDescriptor + }, { + token : "string", // ' string + start : "'", end : "'" + }, { + token : "constant.numeric", // float + regex : floatNumber + }, { + token : "constant.numeric", // integer + regex : integer + "\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_][a-zA-Z0-9_]*\\b" + }, { + token : "keyword.operator", + regex : "\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|~|<|>|<=|=>|=|!=|[%&|`]" + }, { + token : "punctuation.operator", + regex : ";" + }, { + token : "paren.lparen", + regex : "[\\[\\(\\{]" + }, { + token : "paren.rparen", + regex : "[\\]]" + }, { + token : "paren.rparen", + regex : "[\\)\\}]", + next : "pop" + }], + variables: [{ + token : "variable", + regex : /(\$)(\w+)/ + }, { + token : ["variable", "paren.lparen"], + regex : /(\$)(\()/, + push : "start" + }, { + token : ["variable", "paren.lparen", "keyword.operator", "variable", "keyword.operator"], + regex : /(\$)(\{)([#!]?)(\w+|[*@#?\-$!0_])(:[?+\-=]?|##?|%%?|,,?\/|\^\^?)?/, + push : "start" + }, { + token : "variable", + regex : /\$[*@#?\-$!0_]/ + }, { + token : ["variable", "paren.lparen"], + regex : /(\$)(\{)/, + push : "start" + }] + }; + + this.normalizeRules(); +}; + +oop.inherits(ShHighlightRules, TextHighlightRules); + +exports.ShHighlightRules = ShHighlightRules; +}); + +define("ace/mode/sh",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sh_highlight_rules","ace/range","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ShHighlightRules = require("./sh_highlight_rules").ShHighlightRules; +var Range = require("../range").Range; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; + +var Mode = function() { + this.HighlightRules = ShHighlightRules; + this.foldingRules = new CStyleFoldMode(); + this.$behaviour = new CstyleBehaviour(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[:]\s*$/); + if (match) { + indent += tab; + } + } + + return indent; + }; + + var outdents = { + "pass": 1, + "return": 1, + "raise": 1, + "break": 1, + "continue": 1 + }; + + this.checkOutdent = function(state, line, input) { + if (input !== "\r\n" && input !== "\r" && input !== "\n") + return false; + + var tokens = this.getTokenizer().getLineTokens(line.trim(), state).tokens; + + if (!tokens) + return false; + do { + var last = tokens.pop(); + } while (last && (last.type == "comment" || (last.type == "text" && last.value.match(/^\s+$/)))); + + if (!last) + return false; + + return (last.type == "keyword" && outdents[last.value]); + }; + + this.autoOutdent = function(state, doc, row) { + + row += 1; + var indent = this.$getIndent(doc.getLine(row)); + var tab = doc.getTabString(); + if (indent.slice(-tab.length) == tab) + doc.remove(new Range(row, indent.length-tab.length, row, indent.length)); + }; + + this.$id = "ace/mode/sh"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/markdown",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript","ace/mode/xml","ace/mode/html","ace/mode/markdown_highlight_rules","ace/mode/folding/markdown","ace/mode/javascript","ace/mode/html","ace/mode/sh","ace/mode/sh","ace/mode/xml","ace/mode/css"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var XmlMode = require("./xml").Mode; +var HtmlMode = require("./html").Mode; +var MarkdownHighlightRules = require("./markdown_highlight_rules").MarkdownHighlightRules; +var MarkdownFoldMode = require("./folding/markdown").FoldMode; + +var Mode = function() { + this.HighlightRules = MarkdownHighlightRules; + + this.createModeDelegates({ + javascript: require("./javascript").Mode, + html: require("./html").Mode, + bash: require("./sh").Mode, + sh: require("./sh").Mode, + xml: require("./xml").Mode, + css: require("./css").Mode + }); + + this.foldingRules = new MarkdownFoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.type = "text"; + this.blockComment = {start: ""}; + this.$quotes = {'"': '"', "`": "`"}; + + this.getNextLineIndent = function(state, line, tab) { + if (state == "listblock") { + var match = /^(\s*)(?:([-+*])|(\d+)\.)(\s+)/.exec(line); + if (!match) + return ""; + var marker = match[2]; + if (!marker) + marker = parseInt(match[3], 10) + 1 + "."; + return match[1] + marker + match[4]; + } else { + return this.$getIndent(line); + } + }; + this.$id = "ace/mode/markdown"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/coffee_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + + var oop = require("../lib/oop"); + var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + + oop.inherits(CoffeeHighlightRules, TextHighlightRules); + + function CoffeeHighlightRules() { + var identifier = "[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*"; + + var keywords = ( + "this|throw|then|try|typeof|super|switch|return|break|by|continue|" + + "catch|class|in|instanceof|is|isnt|if|else|extends|for|own|" + + "finally|function|while|when|new|no|not|delete|debugger|do|loop|of|off|" + + "or|on|unless|until|and|yes|yield|export|import|default" + ); + + var langConstant = ( + "true|false|null|undefined|NaN|Infinity" + ); + + var illegal = ( + "case|const|function|var|void|with|enum|implements|" + + "interface|let|package|private|protected|public|static" + ); + + var supportClass = ( + "Array|Boolean|Date|Function|Number|Object|RegExp|ReferenceError|String|" + + "Error|EvalError|InternalError|RangeError|ReferenceError|StopIteration|" + + "SyntaxError|TypeError|URIError|" + + "ArrayBuffer|Float32Array|Float64Array|Int16Array|Int32Array|Int8Array|" + + "Uint16Array|Uint32Array|Uint8Array|Uint8ClampedArray" + ); + + var supportFunction = ( + "Math|JSON|isNaN|isFinite|parseInt|parseFloat|encodeURI|" + + "encodeURIComponent|decodeURI|decodeURIComponent|String|" + ); + + var variableLanguage = ( + "window|arguments|prototype|document" + ); + + var keywordMapper = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": langConstant, + "invalid.illegal": illegal, + "language.support.class": supportClass, + "language.support.function": supportFunction, + "variable.language": variableLanguage + }, "identifier"); + + var functionRule = { + token: ["paren.lparen", "variable.parameter", "paren.rparen", "text", "storage.type"], + regex: /(?:(\()((?:"[^")]*?"|'[^')]*?'|\/[^\/)]*?\/|[^()"'\/])*?)(\))(\s*))?([\-=]>)/.source + }; + + var stringEscape = /\\(?:x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.)/; + + this.$rules = { + start : [ + { + token : "constant.numeric", + regex : "(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)" + }, { + stateName: "qdoc", + token : "string", regex : "'''", next : [ + {token : "string", regex : "'''", next : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "qqdoc", + token : "string", + regex : '"""', + next : [ + {token : "string", regex : '"""', next : "start"}, + {token : "paren.string", regex : '#{', push : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "qstring", + token : "string", regex : "'", next : [ + {token : "string", regex : "'", next : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "qqstring", + token : "string.start", regex : '"', next : [ + {token : "string.end", regex : '"', next : "start"}, + {token : "paren.string", regex : '#{', push : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + stateName: "js", + token : "string", regex : "`", next : [ + {token : "string", regex : "`", next : "start"}, + {token : "constant.language.escape", regex : stringEscape}, + {defaultToken: "string"} + ] + }, { + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift() || ""; + if (this.next.indexOf("string") != -1) + return "paren.string"; + } + return "paren"; + } + }, { + token : "string.regex", + regex : "///", + next : "heregex" + }, { + token : "string.regex", + regex : /(?:\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/)(?:[imgy]{0,4})(?!\w)/ + }, { + token : "comment", + regex : "###(?!#)", + next : "comment" + }, { + token : "comment", + regex : "#.*" + }, { + token : ["punctuation.operator", "text", "identifier"], + regex : "(\\.)(\\s*)(" + illegal + ")" + }, { + token : "punctuation.operator", + regex : "\\.{1,3}" + }, { + token : ["keyword", "text", "language.support.class", + "text", "keyword", "text", "language.support.class"], + regex : "(class)(\\s+)(" + identifier + ")(?:(\\s+)(extends)(\\s+)(" + identifier + "))?" + }, { + token : ["entity.name.function", "text", "keyword.operator", "text"].concat(functionRule.token), + regex : "(" + identifier + ")(\\s*)([=:])(\\s*)" + functionRule.regex + }, + functionRule, + { + token : "variable", + regex : "@(?:" + identifier + ")?" + }, { + token: keywordMapper, + regex : identifier + }, { + token : "punctuation.operator", + regex : "\\,|\\." + }, { + token : "storage.type", + regex : "[\\-=]>" + }, { + token : "keyword.operator", + regex : "(?:[-+*/%<>&|^!?=]=|>>>=?|\\-\\-|\\+\\+|::|&&=|\\|\\|=|<<=|>>=|\\?\\.|\\.{2,3}|[!*+-=><])" + }, { + token : "paren.lparen", + regex : "[({[]" + }, { + token : "paren.rparen", + regex : "[\\]})]" + }, { + token : "text", + regex : "\\s+" + }], + + + heregex : [{ + token : "string.regex", + regex : '.*?///[imgy]{0,4}', + next : "start" + }, { + token : "comment.regex", + regex : "\\s+(?:#.*)?" + }, { + token : "string.regex", + regex : "\\S+" + }], + + comment : [{ + token : "comment", + regex : '###', + next : "start" + }, { + defaultToken : "comment" + }] + }; + this.normalizeRules(); + } + + exports.CoffeeHighlightRules = CoffeeHighlightRules; +}); + +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var BaseFoldMode = require("./fold_mode").FoldMode; +var Range = require("../../range").Range; + +var FoldMode = exports.FoldMode = function() {}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var range = this.indentationBlock(session, row); + if (range) + return range; + + var re = /\S/; + var line = session.getLine(row); + var startLevel = line.search(re); + if (startLevel == -1 || line[startLevel] != "#") + return; + + var startColumn = line.length; + var maxRow = session.getLength(); + var startRow = row; + var endRow = row; + + while (++row < maxRow) { + line = session.getLine(row); + var level = line.search(re); + + if (level == -1) + continue; + + if (line[level] != "#") + break; + + endRow = row; + } + + if (endRow > startRow) { + var endColumn = session.getLine(endRow).length; + return new Range(startRow, startColumn, endRow, endColumn); + } + }; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + var indent = line.search(/\S/); + var next = session.getLine(row + 1); + var prev = session.getLine(row - 1); + var prevIndent = prev.search(/\S/); + var nextIndent = next.search(/\S/); + + if (indent == -1) { + session.foldWidgets[row - 1] = prevIndent!= -1 && prevIndent < nextIndent ? "start" : ""; + return ""; + } + if (prevIndent == -1) { + if (indent == nextIndent && line[indent] == "#" && next[indent] == "#") { + session.foldWidgets[row - 1] = ""; + session.foldWidgets[row + 1] = ""; + return "start"; + } + } else if (prevIndent == indent && line[indent] == "#" && prev[indent] == "#") { + if (session.getLine(row - 2).search(/\S/) == -1) { + session.foldWidgets[row - 1] = "start"; + session.foldWidgets[row + 1] = ""; + return ""; + } + } + + if (prevIndent!= -1 && prevIndent < indent) + session.foldWidgets[row - 1] = "start"; + else + session.foldWidgets[row - 1] = ""; + + if (indent < nextIndent) + return "start"; + else + return ""; + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/coffee",["require","exports","module","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee","ace/range","ace/mode/text","ace/worker/worker_client","ace/lib/oop"], function(require, exports, module) { +"use strict"; + +var Rules = require("./coffee_highlight_rules").CoffeeHighlightRules; +var Outdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var FoldMode = require("./folding/coffee").FoldMode; +var Range = require("../range").Range; +var TextMode = require("./text").Mode; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var oop = require("../lib/oop"); + +function Mode() { + this.HighlightRules = Rules; + this.$outdent = new Outdent(); + this.foldingRules = new FoldMode(); +} + +oop.inherits(Mode, TextMode); + +(function() { + var indenter = /(?:[({[=:]|[-=]>|\b(?:else|try|(?:swi|ca)tch(?:\s+[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$|^\s*(else\b\s*)?(?:if|for|while|loop)\b(?!.*\bthen\b)/; + + this.lineCommentStart = "#"; + this.blockComment = {start: "###", end: "###"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + + if (!(tokens.length && tokens[tokens.length - 1].type === 'comment') && + state === 'start' && indenter.test(line)) + indent += tab; + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/coffee_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/coffee"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/scss_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require("./css_highlight_rules"); + +var ScssHighlightRules = function() { + + var properties = lang.arrayToMap(CssHighlightRules.supportType.split("|")); + + var functions = lang.arrayToMap( + ("hsl|hsla|rgb|rgba|url|attr|counter|counters|abs|adjust_color|adjust_hue|" + + "alpha|join|blue|ceil|change_color|comparable|complement|darken|desaturate|" + + "floor|grayscale|green|hue|if|invert|join|length|lighten|lightness|mix|" + + "nth|opacify|opacity|percentage|quote|red|round|saturate|saturation|" + + "scale_color|transparentize|type_of|unit|unitless|unquote").split("|") + ); + + var constants = lang.arrayToMap(CssHighlightRules.supportConstant.split("|")); + + var colors = lang.arrayToMap(CssHighlightRules.supportConstantColor.split("|")); + + var keywords = lang.arrayToMap( + ("@mixin|@extend|@include|@import|@media|@debug|@warn|@if|@for|@each|@while|@else|@font-face|@-webkit-keyframes|if|and|!default|module|def|end|declare").split("|") + ); + + var tags = lang.arrayToMap( + ("a|abbr|acronym|address|applet|area|article|aside|audio|b|base|basefont|bdo|" + + "big|blockquote|body|br|button|canvas|caption|center|cite|code|col|colgroup|" + + "command|datalist|dd|del|details|dfn|dir|div|dl|dt|em|embed|fieldset|" + + "figcaption|figure|font|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|" + + "header|hgroup|hr|html|i|iframe|img|input|ins|keygen|kbd|label|legend|li|" + + "link|map|mark|menu|meta|meter|nav|noframes|noscript|object|ol|optgroup|" + + "option|output|p|param|pre|progress|q|rp|rt|ruby|s|samp|script|section|select|" + + "small|source|span|strike|strong|style|sub|summary|sup|table|tbody|td|" + + "textarea|tfoot|th|thead|time|title|tr|tt|u|ul|var|video|wbr|xmp").split("|") + ); + + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // multi line string start + regex : '["].*\\\\$', + next : "qqstring" + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : "string", // multi line string start + regex : "['].*\\\\$", + next : "qstring" + }, { + token : "constant.numeric", + regex : numRe + "(?:ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : ["support.function", "string", "support.function"], + regex : "(url\\()(.*)(\\))" + }, { + token : function(value) { + if (properties.hasOwnProperty(value.toLowerCase())) + return "support.type"; + if (keywords.hasOwnProperty(value)) + return "keyword"; + else if (constants.hasOwnProperty(value)) + return "constant.language"; + else if (functions.hasOwnProperty(value)) + return "support.function"; + else if (colors.hasOwnProperty(value.toLowerCase())) + return "support.constant.color"; + else if (tags.hasOwnProperty(value.toLowerCase())) + return "variable.language"; + else + return "text"; + }, + regex : "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token : "variable", + regex : "[a-z_\\-$][a-z0-9_\\-$]*\\b" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z0-9-_]+" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token : "keyword.operator", + regex : "<|>|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "\\*\\/", + next : "start" + }, { + defaultToken : "comment" + } + ], + "qqstring" : [ + { + token : "string", + regex : '(?:(?:\\\\.)|(?:[^"\\\\]))*?"', + next : "start" + }, { + token : "string", + regex : '.+' + } + ], + "qstring" : [ + { + token : "string", + regex : "(?:(?:\\\\.)|(?:[^'\\\\]))*?'", + next : "start" + }, { + token : "string", + regex : '.+' + } + ] + }; +}; + +oop.inherits(ScssHighlightRules, TextHighlightRules); + +exports.ScssHighlightRules = ScssHighlightRules; + +}); + +define("ace/mode/scss",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/folding/cstyle","ace/mode/css_completions"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var CssCompletions = require("./css_completions").CssCompletions; + + +var Mode = function() { + this.HighlightRules = ScssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + + this.$id = "ace/mode/scss"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/sass_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/scss_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var ScssHighlightRules = require("./scss_highlight_rules").ScssHighlightRules; + +var SassHighlightRules = function() { + ScssHighlightRules.call(this); + var start = this.$rules.start; + if (start[1].token == "comment") { + start.splice(1, 1, { + onMatch: function(value, currentState, stack) { + stack.unshift(this.next, -1, value.length - 2, currentState); + return "comment"; + }, + regex: /^\s*\/\*/, + next: "comment" + }, { + token: "error.invalid", + regex: "/\\*|[{;}]" + }, { + token: "support.type", + regex: /^\s*:[\w\-]+\s/ + }); + + this.$rules.comment = [ + {regex: /^\s*/, onMatch: function(value, currentState, stack) { + if (stack[1] === -1) + stack[1] = Math.max(stack[2], value.length - 1); + if (value.length <= stack[1]) {stack.shift();stack.shift();stack.shift(); + this.next = stack.shift(); + return "text"; + } else { + this.next = ""; + return "comment"; + } + }, next: "start"}, + {defaultToken: "comment"} + ]; + } +}; + +oop.inherits(SassHighlightRules, ScssHighlightRules); + +exports.SassHighlightRules = SassHighlightRules; + +}); + +define("ace/mode/sass",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/sass_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SassHighlightRules = require("./sass_highlight_rules").SassHighlightRules; +var FoldMode = require("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = SassHighlightRules; + this.foldingRules = new FoldMode(); + this.$behaviour = this.$defaultBehaviour; +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "//"; + this.$id = "ace/mode/sass"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/less_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules","ace/mode/css_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var CssHighlightRules = require('./css_highlight_rules'); + +var LessHighlightRules = function() { + + + var keywordList = "@import|@media|@font-face|@keyframes|@-webkit-keyframes|@supports|" + + "@charset|@plugin|@namespace|@document|@page|@viewport|@-ms-viewport|" + + "or|and|when|not"; + + var keywords = keywordList.split('|'); + + var properties = CssHighlightRules.supportType.split('|'); + + var keywordMapper = this.createKeywordMapper({ + "support.constant": CssHighlightRules.supportConstant, + "keyword": keywordList, + "support.constant.color": CssHighlightRules.supportConstantColor, + "support.constant.fonts": CssHighlightRules.supportConstantFonts + }, "identifier", true); + + var numRe = "\\-?(?:(?:[0-9]+)|(?:[0-9]*\\.[0-9]+))"; + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "\\/\\/.*$" + }, + { + token : "comment", // multi line comment + regex : "\\/\\*", + next : "comment" + }, { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' + }, { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : ["support.function", "paren.lparen", "string", "paren.rparen"], + regex : "(url)(\\()(.*)(\\))" + }, { + token : ["support.function", "paren.lparen"], + regex : "(:extend|[a-z0-9_\\-]+)(\\()" + }, { + token : function(value) { + if (keywords.indexOf(value.toLowerCase()) > -1) + return "keyword"; + else + return "variable"; + }, + regex : "[@\\$][a-z0-9_\\-@\\$]*\\b" + }, { + token : "variable", + regex : "[@\\$]\\{[a-z0-9_\\-@\\$]*\\}" + }, { + token : function(first, second) { + if(properties.indexOf(first.toLowerCase()) > -1) { + return ["support.type.property", "text"]; + } + else { + return ["support.type.unknownProperty", "text"]; + } + }, + regex : "([a-z0-9-_]+)(\\s*:)" + }, { + token : "keyword", + regex : "&" // special case - always treat as keyword + }, { + token : keywordMapper, + regex : "\\-?[@a-z_][@a-z0-9_\\-]*" + }, { + token: "variable.language", + regex: "#[a-z0-9-_]+" + }, { + token: "variable.language", + regex: "\\.[a-z0-9-_]+" + }, { + token: "variable.language", + regex: ":[a-z_][a-z0-9-_]*" + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + token : "keyword.operator", + regex : "<|>|<=|>=|=|!=|-|%|\\+|\\*" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + }, { + caseInsensitive: true + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "\\*\\/", + next : "start" + }, { + defaultToken : "comment" + } + ] + }; + this.normalizeRules(); +}; + +oop.inherits(LessHighlightRules, TextHighlightRules); + +exports.LessHighlightRules = LessHighlightRules; + +}); + +define("ace/mode/less",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/less_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/css","ace/mode/css_completions","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var LessHighlightRules = require("./less_highlight_rules").LessHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CssCompletions = require("./css_completions").CssCompletions; + +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = LessHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions("ruleset", session, pos, prefix); + }; + + this.$id = "ace/mode/less"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/ruby_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var constantOtherSymbol = exports.constantOtherSymbol = { + token : "constant.other.symbol.ruby", // symbol + regex : "[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?" +}; + +var qString = exports.qString = { + token : "string", // single line + regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" +}; + +var qqString = exports.qqString = { + token : "string", // single line + regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' +}; + +var tString = exports.tString = { + token : "string", // backtick string + regex : "[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]" +}; + +var constantNumericHex = exports.constantNumericHex = { + token : "constant.numeric", // hex + regex : "0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b" +}; + +var constantNumericFloat = exports.constantNumericFloat = { + token : "constant.numeric", // float + regex : "[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b" +}; + +var instanceVariable = exports.instanceVariable = { + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" +}; + +var RubyHighlightRules = function() { + + var builtinFunctions = ( + "abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|" + + "assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|" + + "assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|" + + "assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|" + + "assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|" + + "assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|" + + "attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|" + + "caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|" + + "exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|" + + "gsub!|get_via_redirect|host!|https?|https!|include|Integer|lambda|link_to|" + + "link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|" + + "p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|" + + "raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|" + + "set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|" + + "throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|" + + "render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|" + + "content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|" + + "fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|" + + "time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|" + + "select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|" + + "file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|" + + "protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|" + + "send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|" + + "validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|" + + "validates_inclusion_of|validates_numericality_of|validates_with|validates_each|" + + "authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|" + + "filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|" + + "translate|localize|extract_locale_from_tld|caches_page|expire_page|caches_action|expire_action|" + + "cache|expire_fragment|expire_cache_for|observe|cache_sweeper|" + + "has_many|has_one|belongs_to|has_and_belongs_to_many" + ); + + var keywords = ( + "alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|" + + "__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|" + + "redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield" + ); + + var buildinConstants = ( + "true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|" + + "RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING" + ); + + var builtinVariables = ( + "$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|" + + "$!|root_url|flash|session|cookies|params|request|response|logger|self" + ); + + var keywordMapper = this.$keywords = this.createKeywordMapper({ + "keyword": keywords, + "constant.language": buildinConstants, + "variable.language": builtinVariables, + "support.function": builtinFunctions, + "invalid.deprecated": "debugger" // TODO is this a remnant from js mode? + }, "identifier"); + + this.$rules = { + "start" : [ + { + token : "comment", + regex : "#.*$" + }, { + token : "comment", // multi line comment + regex : "^=begin(?:$|\\s.*$)", + next : "comment" + }, { + token : "string.regexp", + regex : "[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)" + }, + + [{ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + return "paren.lparen"; + } + if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1) + return "paren.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.start", + regex : /"/, + push : [{ + token : "constant.language.escape", + regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ + }, { + token : "paren.start", + regex : /#{/, + push : "start" + }, { + token : "string.end", + regex : /"/, + next : "pop" + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : /\\(?:[nsrtvfbae'"\\]|c.|C-.|M-.(?:\\C-.)?|[0-7]{3}|x[\da-fA-F]{2}|u[\da-fA-F]{4})/ + }, { + token : "paren.start", + regex : /#{/, + push : "start" + }, { + token : "string.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : /'/, + push : [{ + token : "constant.language.escape", + regex : /\\['\\]/ + }, { + token : "string.end", + regex : /'/, + next : "pop" + }, { + defaultToken: "string" + }] + }], + + { + token : "text", // namespaces aren't symbols + regex : "::" + }, { + token : "variable.instance", // instance variable + regex : "@{1,2}[a-zA-Z_\\d]+" + }, { + token : "support.class", // class name + regex : "[A-Z][a-zA-Z_\\d]+" + }, + + constantOtherSymbol, + constantNumericHex, + constantNumericFloat, + + { + token : "constant.language.boolean", + regex : "(?:true|false)\\b" + }, { + token : keywordMapper, + regex : "[a-zA-Z_$][a-zA-Z0-9_$]*\\b" + }, { + token : "punctuation.separator.key-value", + regex : "=>" + }, { + stateName: "heredoc", + onMatch : function(value, currentState, stack) { + var next = value[2] == '-' ? "indentedHeredoc" : "heredoc"; + var tokens = value.split(this.splitRegex); + stack.push(next, tokens[3]); + return [ + {type:"constant", value: tokens[1]}, + {type:"string", value: tokens[2]}, + {type:"support.class", value: tokens[3]}, + {type:"string", value: tokens[4]} + ]; + }, + regex : "(<<-?)(['\"`]?)([\\w]+)(['\"`]?)", + rules: { + heredoc: [{ + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }], + indentedHeredoc: [{ + token: "string", + regex: "^ +" + }, { + onMatch: function(value, currentState, stack) { + if (value === stack[1]) { + stack.shift(); + stack.shift(); + this.next = stack[0] || "start"; + return "support.class"; + } + this.next = ""; + return "string"; + }, + regex: ".*$", + next: "start" + }] + } + }, { + regex : "$", + token : "empty", + next : function(currentState, stack) { + if (stack[0] === "heredoc" || stack[0] === "indentedHeredoc") + return stack[0]; + return currentState; + } + }, { + token : "string.character", + regex : "\\B\\?." + }, { + token : "keyword.operator", + regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)" + }, { + token : "paren.lparen", + regex : "[[({]" + }, { + token : "paren.rparen", + regex : "[\\])}]" + }, { + token : "text", + regex : "\\s+" + } + ], + "comment" : [ + { + token : "comment", // closing comment + regex : "^=end(?:$|\\s.*$)", + next : "start" + }, { + token : "comment", // comment spanning whole line + regex : ".+" + } + ] + }; + + this.normalizeRules(); +}; + +oop.inherits(RubyHighlightRules, TextHighlightRules); + +exports.RubyHighlightRules = RubyHighlightRules; +}); + +define("ace/mode/ruby",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle","ace/mode/folding/coffee"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var RubyHighlightRules = require("./ruby_highlight_rules").RubyHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var Range = require("../range").Range; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var FoldMode = require("./folding/coffee").FoldMode; + +var Mode = function() { + this.HighlightRules = RubyHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + + this.lineCommentStart = "#"; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start") { + var match = line.match(/^.*[\{\(\[]\s*$/); + var startingClassOrMethod = line.match(/^\s*(class|def|module)\s.*$/); + var startingDoBlock = line.match(/.*do(\s*|\s+\|.*\|\s*)$/); + var startingConditional = line.match(/^\s*(if|else|when)\s*/); + if (match || startingClassOrMethod || startingDoBlock || startingConditional) { + indent += tab; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return /^\s+(end|else)$/.test(line + input) || this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, session, row) { + var line = session.getLine(row); + if (/}/.test(line)) + return this.$outdent.autoOutdent(session, row); + var indent = this.$getIndent(line); + var prevLine = session.getLine(row - 1); + var prevIndent = this.$getIndent(prevLine); + var tab = session.getTabString(); + if (prevIndent.length <= indent.length) { + if (indent.slice(-tab.length) == tab) + session.remove(new Range(row, indent.length-tab.length, row, indent.length)); + } + }; + + this.$id = "ace/mode/ruby"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/slim",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/slim_highlight_rules","ace/mode/javascript","ace/mode/markdown","ace/mode/coffee","ace/mode/scss","ace/mode/sass","ace/mode/less","ace/mode/ruby","ace/mode/css"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var SlimHighlightRules = require("./slim_highlight_rules").SlimHighlightRules; + +var Mode = function() { + TextMode.call(this); + this.HighlightRules = SlimHighlightRules; + this.createModeDelegates({ + javascript: require("./javascript").Mode, + markdown: require("./markdown").Mode, + coffee: require("./coffee").Mode, + scss: require("./scss").Mode, + sass: require("./sass").Mode, + less: require("./less").Mode, + ruby: require("./ruby").Mode, + css: require("./css").Mode + }); +}; + +oop.inherits(Mode, TextMode); + +(function() { + + this.$id = "ace/mode/slim"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/slim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-smarty.js b/htdocs/includes/ace/src/mode-smarty.js similarity index 93% rename from htdocs/includes/ace/mode-smarty.js rename to htdocs/includes/ace/src/mode-smarty.js index 448ced333aa..8c044c1698b 100644 --- a/htdocs/includes/ace/mode-smarty.js +++ b/htdocs/includes/ace/src/mode-smarty.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && /)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' } ] } + regex: '(->)([a-zA-Z_][a-zA-Z0-9_]*)(\\()(.*?)(\\))' } ] }; var smartyStart = smartyRules.start; @@ -2575,7 +2594,7 @@ SmartyHighlightRules.metaData = { fileTypes: [ 'tpl' ], foldingStartMarker: '\\{%?', foldingStopMarker: '%?\\}', name: 'Smarty', - scopeName: 'text.html.smarty' } + scopeName: 'text.html.smarty' }; oop.inherits(SmartyHighlightRules, HtmlHighlightRules); @@ -2583,7 +2602,7 @@ oop.inherits(SmartyHighlightRules, HtmlHighlightRules); exports.SmartyHighlightRules = SmartyHighlightRules; }); -ace.define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module) { +define("ace/mode/smarty",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/smarty_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -2603,4 +2622,11 @@ oop.inherits(Mode, HtmlMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/smarty"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-snippets.js b/htdocs/includes/ace/src/mode-snippets.js similarity index 82% rename from htdocs/includes/ace/mode-snippets.js rename to htdocs/includes/ace/src/mode-snippets.js index a528501fc4b..600463bf3e5 100644 --- a/htdocs/includes/ace/mode-snippets.js +++ b/htdocs/includes/ace/src/mode-snippets.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -85,7 +85,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { +define("ace/mode/snippets",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -153,26 +153,26 @@ exports.SnippetHighlightRules = SnippetHighlightRules; var SnippetGroupHighlightRules = function() { this.$rules = { "start" : [ - {token: "text", regex: "^\\t", next: "sn-start"}, - {token:"invalid", regex: /^ \s*/}, + {token: "text", regex: "^\\t", next: "sn-start"}, + {token:"invalid", regex: /^ \s*/}, {token:"comment", regex: /^#.*/}, {token:"constant.language.escape", regex: "^regex ", next: "regex"}, {token:"constant.language.escape", regex: "^(trigger|endTrigger|name|snippet|guard|endGuard|tabTrigger|key)\\b"} ], - "regex" : [ - {token:"text", regex: "\\."}, - {token:"keyword", regex: "/"}, - {token:"empty", regex: "$", next: "start"} - ] + "regex" : [ + {token:"text", regex: "\\."}, + {token:"keyword", regex: "/"}, + {token:"empty", regex: "$", next: "start"} + ] }; - this.embedRules(SnippetHighlightRules, "sn-", [ - {token: "text", regex: "^\\t", next: "sn-start"}, - {onMatch: function(value, state, stack) { - stack.splice(stack.length); - return this.tokenName; - }, tokenName: "text", regex: "^(?!\t)", next: "start"} - ]) - + this.embedRules(SnippetHighlightRules, "sn-", [ + {token: "text", regex: "^\\t", next: "sn-start"}, + {onMatch: function(value, state, stack) { + stack.splice(stack.length); + return this.tokenName; + }, tokenName: "text", regex: "^(?!\t)", next: "start"} + ]); + }; oop.inherits(SnippetGroupHighlightRules, TextHighlightRules); @@ -196,4 +196,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/snippets"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-soy_template.js b/htdocs/includes/ace/src/mode-soy_template.js similarity index 94% rename from htdocs/includes/ace/mode-soy_template.js rename to htdocs/includes/ace/src/mode-soy_template.js index df831bb3bda..83b35c0c673 100644 --- a/htdocs/includes/ace/mode-soy_template.js +++ b/htdocs/includes/ace/src/mode-soy_template.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && / -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -280,14 +280,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -368,7 +373,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -423,7 +428,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -1186,7 +1192,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1226,7 +1232,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1247,8 +1253,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -1366,7 +1372,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1453,7 +1459,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/svg_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1473,7 +1479,7 @@ oop.inherits(SvgHighlightRules, XmlHighlightRules); exports.SvgHighlightRules = SvgHighlightRules; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1527,7 +1533,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/svg",["require","exports","module","ace/lib/oop","ace/mode/xml","ace/mode/javascript","ace/mode/svg_highlight_rules","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1565,4 +1571,11 @@ oop.inherits(Mode, XmlMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/svg"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-swift.js b/htdocs/includes/ace/src/mode-swift.js similarity index 90% rename from htdocs/includes/ace/mode-swift.js rename to htdocs/includes/ace/src/mode-swift.js index dc5a4303b7a..b207deb7652 100644 --- a/htdocs/includes/ace/mode-swift.js +++ b/htdocs/includes/ace/src/mode-swift.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/swift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/swift_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -69,7 +69,7 @@ var SwiftHighlightRules = function() { + "|convenience|dynamic|final|infix|lazy|mutating|nonmutating|optional|override|postfix" + "|prefix|required|static|guard|defer", "storage.type": "bool|double|Double" - + "|extension|float|Float|int|Int|private|public|string|String", + + "|extension|float|Float|int|Int|open|internal|fileprivate|private|public|string|String", "constant.language": "false|Infinity|NaN|nil|no|null|null|off|on|super|this|true|undefined|yes", "support.function": @@ -133,7 +133,7 @@ var SwiftHighlightRules = function() { return val == open ? "paren.lparen" : "paren.rparen"; }, nextState: interpStart - } + }; return [counter, mainRule]; } @@ -171,7 +171,7 @@ var SwiftHighlightRules = function() { error: /\\./, multiline: false }), - comments({type: "c", nestable: true}), + comments(), { regex: /@[a-zA-Z_$][a-zA-Z_$\d\u0080-\ufffe]*/, token: "variable.parameter" @@ -214,7 +214,7 @@ oop.inherits(SwiftHighlightRules, TextHighlightRules); exports.HighlightRules = SwiftHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -235,8 +235,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -354,7 +354,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/swift",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/swift_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -375,8 +375,15 @@ oop.inherits(Mode, TextMode); this.lineCommentStart = "//"; this.blockComment = {start: "/*", end: "*/", nestable: true}; - this.$id = "ace/mode/swift" + this.$id = "ace/mode/swift"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/swift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-tcl.js b/htdocs/includes/ace/src/mode-tcl.js similarity index 90% rename from htdocs/includes/ace/mode-tcl.js rename to htdocs/includes/ace/src/mode-tcl.js index 1f878c31d49..b898da9c528 100644 --- a/htdocs/includes/ace/mode-tcl.js +++ b/htdocs/includes/ace/src/mode-tcl.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -19,8 +19,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -138,7 +138,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/tcl_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -229,6 +229,9 @@ var TclHighlightRules = function() { }, { token : "paren.rparen", regex : "[\\])}]" + }, { + token : "paren.lparen", + regex : "[[({]" }, { token : "support.function", regex : "!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|{\\*}|;|::" @@ -279,7 +282,7 @@ oop.inherits(TclHighlightRules, TextHighlightRules); exports.TclHighlightRules = TclHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -319,7 +322,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { +define("ace/mode/tcl",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/folding/cstyle","ace/mode/tcl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -373,4 +376,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/tcl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-terraform.js b/htdocs/includes/ace/src/mode-terraform.js new file mode 100644 index 00000000000..76e2cf2db63 --- /dev/null +++ b/htdocs/includes/ace/src/mode-terraform.js @@ -0,0 +1,397 @@ +define("ace/mode/terraform_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var TerraformHighlightRules = function () { + + + this.$rules = { + "start": [ + { + token: ['storage.function.terraform'], + regex: '\\b(output|resource|data|variable|module|export)\\b' + }, + { + token: "variable.terraform", + regex: "\\$\\s", + push: [ + { + token: "keyword.terraform", + regex: "(-var-file|-var)" + }, + { + token: "variable.terraform", + regex: "\\n|$", + next: "pop" + }, + + {include: "strings"}, + {include: "variables"}, + {include: "operators"}, + + {defaultToken: "text"} + ] + }, + { + token: "language.support.class", + regex: "\\b(timeouts|provider|connection|provisioner|lifecycleprovider|atlas)\\b" + }, + + { + token: "singleline.comment.terraform", + regex: '#(.)*$' + }, + { + token: "multiline.comment.begin.terraform", + regex: '^\\s*\\/\\*', + push: "blockComment" + }, + { + token: "storage.function.terraform", + regex: "^\\s*(locals|terraform)\\s*{" + }, + { + token: "paren.lparen", + regex: "[[({]" + }, + + { + token: "paren.rparen", + regex: "[\\])}]" + }, + {include: "constants"}, + {include: "strings"}, + {include: "operators"}, + {include: "variables"} + ], + blockComment: [{ + regex: "^\\s*\\/\\*", + token: "multiline.comment.begin.terraform", + push: "blockComment" + }, { + regex: "\\*\\/\\s*$", + token: "multiline.comment.end.terraform", + next: "pop" + }, { + defaultToken: "comment" + }], + "constants": [ + { + token: "constant.language.terraform", + regex: "\\b(true|false|yes|no|on|off|EOF)\\b" + }, + { + token: "constant.numeric.terraform", + regex: "(\\b([0-9]+)([kKmMgG]b?)?\\b)|(\\b(0x[0-9A-Fa-f]+)([kKmMgG]b?)?\\b)" + } + ], + "variables": [ + { + token: ["variable.assignment.terraform", "keyword.operator"], + regex: "\\b([a-zA-Z_]+)(\\s*=)" + } + ], + "interpolated_variables": [ + { + token: "variable.terraform", + regex: "\\b(var|self|count|path|local)\\b(?:\\.*[a-zA-Z_-]*)?" + } + ], + "strings": [ + { + token: "punctuation.quote.terraform", + regex: "'", + push: + [{ + token: 'punctuation.quote.terraform', + regex: "'", + next: 'pop' + }, + {include: "escaped_chars"}, + {defaultToken: 'string'}] + }, + { + token: "punctuation.quote.terraform", + regex: '"', + push: + [{ + token: 'punctuation.quote.terraform', + regex: '"', + next: 'pop' + }, + {include: "interpolation"}, + {include: "escaped_chars"}, + {defaultToken: 'string'}] + } + ], + "escaped_chars": [ + { + token: "constant.escaped_char.terraform", + regex: "\\\\." + } + ], + "operators": [ + { + token: "keyword.operator", + regex: "\\?|:|==|!=|>|<|>=|<=|&&|\\|\\\||!|%|&|\\*|\\+|\\-|/|=" + } + ], + "interpolation": [ + {// TODO: double $ + token: "punctuation.interpolated.begin.terraform", + regex: "\\$?\\$\\{", + push: [{ + token: "punctuation.interpolated.end.terraform", + regex: "\\}", + next: "pop" + }, + {include: "interpolated_variables"}, + {include: "operators"}, + {include: "constants"}, + {include: "strings"}, + {include: "functions"}, + {include: "parenthesis"}, + {defaultToken: "punctuation"} + ] + } + ], + "functions": [ + { + token: "keyword.function.terraform", + regex: "\\b(abs|basename|base64decode|base64encode|base64gzip|base64sha256|base64sha512|bcrypt|ceil|chomp|chunklist|cidrhost|cidrnetmask|cidrsubnet|coalesce|coalescelist|compact|concat|contains|dirname|distinct|element|file|floor|flatten|format|formatlist|indent|index|join|jsonencode|keys|length|list|log|lookup|lower|map|matchkeys|max|merge|min|md5|pathexpand|pow|replace|rsadecrypt|sha1|sha256|sha512|signum|slice|sort|split|substr|timestamp|timeadd|title|transpose|trimspace|upper|urlencode|uuid|values|zipmap)\\b" + } + ], + "parenthesis": [ + { + token: "paren.lparen", + regex: "\\[" + }, + { + token: "paren.rparen", + regex: "\\]" + } + ] + }; + this.normalizeRules(); +}; + +oop.inherits(TerraformHighlightRules, TextHighlightRules); + +exports.TerraformHighlightRules = TerraformHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/terraform",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/terraform_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function (require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var TerraformHighlightRules = require("./terraform_highlight_rules").TerraformHighlightRules; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; + +var Mode = function () { + TextMode.call(this); + this.HighlightRules = TerraformHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; + +oop.inherits(Mode, TextMode); + + +(function () { + this.$id = "ace/mode/terraform"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/terraform"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-tex.js b/htdocs/includes/ace/src/mode-tex.js similarity index 84% rename from htdocs/includes/ace/mode-tex.js rename to htdocs/includes/ace/src/mode-tex.js index f4f13baa179..22673ec6222 100644 --- a/htdocs/includes/ace/mode-tex.js +++ b/htdocs/includes/ace/src/mode-tex.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/tex_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -77,7 +77,7 @@ oop.inherits(TexHighlightRules, TextHighlightRules); exports.TexHighlightRules = TexHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -117,7 +117,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/tex",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/tex_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -149,4 +149,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/tex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-text.js b/htdocs/includes/ace/src/mode-text.js new file mode 100644 index 00000000000..13aa31f23ef --- /dev/null +++ b/htdocs/includes/ace/src/mode-text.js @@ -0,0 +1,9 @@ + +; (function() { + window.require(["ace/mode/text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-textile.js b/htdocs/includes/ace/src/mode-textile.js similarity index 81% rename from htdocs/includes/ace/mode-textile.js rename to htdocs/includes/ace/src/mode-textile.js index 94ed5c778dc..203bbbeb31a 100644 --- a/htdocs/includes/ace/mode-textile.js +++ b/htdocs/includes/ace/src/mode-textile.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/textile_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -62,7 +62,7 @@ exports.TextileHighlightRules = TextileHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -102,7 +102,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/textile",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/textile_highlight_rules","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -139,4 +139,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/textile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-toml.js b/htdocs/includes/ace/src/mode-toml.js similarity index 80% rename from htdocs/includes/ace/mode-toml.js rename to htdocs/includes/ace/src/mode-toml.js index 2f348937d89..d90ff9d2f2d 100644 --- a/htdocs/includes/ace/mode-toml.js +++ b/htdocs/includes/ace/src/mode-toml.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/toml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -62,7 +62,7 @@ var TomlHighlightRules = function() { defaultToken: "string" } ] - } + }; }; @@ -71,7 +71,7 @@ oop.inherits(TomlHighlightRules, TextHighlightRules); exports.TomlHighlightRules = TomlHighlightRules; }); -ace.define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/ini",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -122,7 +122,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) { +define("ace/mode/toml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/toml_highlight_rules","ace/mode/folding/ini"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -143,4 +143,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/toml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-tsx.js b/htdocs/includes/ace/src/mode-tsx.js similarity index 91% rename from htdocs/includes/ace/mode-tsx.js rename to htdocs/includes/ace/src/mode-tsx.js index 9db47ac0b98..b4292219847 100644 --- a/htdocs/includes/ace/mode-tsx.js +++ b/htdocs/includes/ace/src/mode-tsx.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,52 +789,40 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module) { +define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var TypeScriptHighlightRules = function(options) { +var TypeScriptHighlightRules = function (options) { - var tsRules = [ + var tsRules = [ { - token: ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"], - regex: "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)" - }, - { - token: ["storage.type.variable.ts", "text", "keyword.other.ts", "text"], - regex: "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))" - }, - { - token: ["entity.name.function.ts","paren.lparen", "paren.rparen"], - regex: "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))" - }, - { - token: ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"], - regex: "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)" - }, - { - token: ["keyword.operator.ts"], - regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)" - }, - { - token: ["storage.type.variable.ts"], - regex: "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)" - }, - { - token: ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"], - regex: "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?" + token: ["storage.type", "text", "entity.name.function.ts"], + regex: "(function)(\\s+)([a-zA-Z0-9\$_\u00a1-\uffff][a-zA-Z0-9\d\$_\u00a1-\uffff]*)" }, { token: "keyword", - regex: "(?:super|export|class|extends|import)\\b" + regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)" + }, + { + token: ["keyword", "storage.type.variable.ts"], + regex: "(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)" + }, + { + token: "keyword", + regex: "\\b(?:super|export|import|keyof|infer)\\b" + }, + { + token: ["storage.type.variable.ts"], + regex: "(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))" } ]; var JSRules = new JavaScriptHighlightRules({jsx: (options && options.jsx) == true}).getRules(); - JSRules.start = tsRules.concat(JSRules.start); + JSRules.no_regex = tsRules.concat(JSRules.no_regex); this.$rules = JSRules; }; @@ -842,7 +831,7 @@ oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); exports.TypeScriptHighlightRules = TypeScriptHighlightRules; }); -ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -871,7 +860,7 @@ oop.inherits(Mode, jsMode); exports.Mode = Mode; }); -ace.define("ace/mode/tsx",["require","exports","module","ace/lib/oop","ace/mode/typescript"], function(require, exports, module) { +define("ace/mode/tsx",["require","exports","module","ace/lib/oop","ace/mode/typescript"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -888,4 +877,11 @@ oop.inherits(Mode, tsMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/tsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-turtle.js b/htdocs/includes/ace/src/mode-turtle.js similarity index 89% rename from htdocs/includes/ace/mode-turtle.js rename to htdocs/includes/ace/src/mode-turtle.js index 4eef543d2a8..8a48ae10440 100644 --- a/htdocs/includes/ace/mode-turtle.js +++ b/htdocs/includes/ace/src/mode-turtle.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/turtle_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/turtle_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -110,7 +110,7 @@ var TurtleHighlightRules = function() { token: "support.type.datatype.xml.schema.turtle", regex: /xsd?:[a-z][a-zA-Z]+/ }] - } + }; this.normalizeRules(); }; @@ -119,7 +119,7 @@ TurtleHighlightRules.metaData = { fileTypes: ["ttl", "nt"], name: "Turtle", scopeName: "source.turtle" -} +}; oop.inherits(TurtleHighlightRules, TextHighlightRules); @@ -127,7 +127,7 @@ oop.inherits(TurtleHighlightRules, TextHighlightRules); exports.TurtleHighlightRules = TurtleHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -148,8 +148,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -267,7 +267,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/turtle",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/turtle_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/turtle",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/turtle_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -282,8 +282,15 @@ var Mode = function() { oop.inherits(Mode, TextMode); (function() { - this.$id = "ace/mode/turtle" + this.$id = "ace/mode/turtle"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/turtle"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-twig.js b/htdocs/includes/ace/src/mode-twig.js similarity index 93% rename from htdocs/includes/ace/mode-twig.js rename to htdocs/includes/ace/src/mode-twig.js index 557c124b671..a7c3c2b4bd2 100644 --- a/htdocs/includes/ace/mode-twig.js +++ b/htdocs/includes/ace/src/mode-twig.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && // + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,52 +789,40 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function(require, exports, module) { +define("ace/mode/typescript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/javascript_highlight_rules"], function (require, exports, module) { "use strict"; var oop = require("../lib/oop"); var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; -var TypeScriptHighlightRules = function(options) { +var TypeScriptHighlightRules = function (options) { - var tsRules = [ + var tsRules = [ { - token: ["keyword.operator.ts", "text", "variable.parameter.function.ts", "text"], - regex: "\\b(module)(\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*\\{)" - }, - { - token: ["storage.type.variable.ts", "text", "keyword.other.ts", "text"], - regex: "(super)(\\s*\\()([a-zA-Z0-9,_?.$\\s]+\\s*)(\\))" - }, - { - token: ["entity.name.function.ts","paren.lparen", "paren.rparen"], - regex: "([a-zA-Z_?.$][\\w?.$]*)(\\()(\\))" - }, - { - token: ["variable.parameter.function.ts", "text", "variable.parameter.function.ts"], - regex: "([a-zA-Z0-9_?.$][\\w?.$]*)(\\s*:\\s*)([a-zA-Z0-9_?.$][\\w?.$]*)" - }, - { - token: ["keyword.operator.ts"], - regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|class|extends|export|super)\\b)" - }, - { - token: ["storage.type.variable.ts"], - regex: "(?:\\b(this\\.|string\\b|bool\\b|number)\\b)" - }, - { - token: ["keyword.operator.ts", "storage.type.variable.ts", "keyword.operator.ts", "storage.type.variable.ts"], - regex: "(class)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)(extends)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*\\s+)?" + token: ["storage.type", "text", "entity.name.function.ts"], + regex: "(function)(\\s+)([a-zA-Z0-9\$_\u00a1-\uffff][a-zA-Z0-9\d\$_\u00a1-\uffff]*)" }, { token: "keyword", - regex: "(?:super|export|class|extends|import)\\b" + regex: "(?:\\b(constructor|declare|interface|as|AS|public|private|extends|export|super|readonly|module|namespace|abstract|implements)\\b)" + }, + { + token: ["keyword", "storage.type.variable.ts"], + regex: "(class|type)(\\s+[a-zA-Z0-9_?.$][\\w?.$]*)" + }, + { + token: "keyword", + regex: "\\b(?:super|export|import|keyof|infer)\\b" + }, + { + token: ["storage.type.variable.ts"], + regex: "(?:\\b(this\\.|string\\b|bool\\b|boolean\\b|number\\b|true\\b|false\\b|undefined\\b|any\\b|null\\b|(?:unique )?symbol\\b|object\\b|never\\b|enum\\b))" } ]; var JSRules = new JavaScriptHighlightRules({jsx: (options && options.jsx) == true}).getRules(); - JSRules.start = tsRules.concat(JSRules.start); + JSRules.no_regex = tsRules.concat(JSRules.no_regex); this.$rules = JSRules; }; @@ -842,7 +831,7 @@ oop.inherits(TypeScriptHighlightRules, JavaScriptHighlightRules); exports.TypeScriptHighlightRules = TypeScriptHighlightRules; }); -ace.define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/typescript",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/typescript_highlight_rules","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -869,4 +858,11 @@ oop.inherits(Mode, jsMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/typescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-vala.js b/htdocs/includes/ace/src/mode-vala.js similarity index 95% rename from htdocs/includes/ace/mode-vala.js rename to htdocs/includes/ace/src/mode-vala.js index 75340fb4c86..5e51a584107 100644 --- a/htdocs/includes/ace/mode-vala.js +++ b/htdocs/includes/ace/src/mode-vala.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/vala_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -399,7 +399,7 @@ var ValaHighlightRules = function() { '#values': [ { include: '#strings' }, { include: '#object-types' }, - { include: '#constants-and-special-vars' } ] } + { include: '#constants-and-special-vars' } ] }; this.normalizeRules(); }; @@ -410,7 +410,7 @@ ValaHighlightRules.metaData = { foldingStartMarker: '(\\{\\s*(//.*)?$|^\\s*// \\{\\{\\{)', foldingStopMarker: '^\\s*(\\}|// \\}\\}\\}$)', name: 'Vala', - scopeName: 'source.vala' } + scopeName: 'source.vala' }; oop.inherits(ValaHighlightRules, TextHighlightRules); @@ -418,7 +418,7 @@ oop.inherits(ValaHighlightRules, TextHighlightRules); exports.ValaHighlightRules = ValaHighlightRules; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -439,8 +439,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -558,7 +558,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -598,7 +598,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { +define("ace/mode/vala",["require","exports","module","ace/lib/oop","ace/mode/text","ace/tokenizer","ace/mode/vala_highlight_rules","ace/mode/folding/cstyle","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle","ace/mode/matching_brace_outdent"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -662,8 +662,15 @@ oop.inherits(Mode, TextMode); this.autoOutdent = function(state, doc, row) { this.$outdent.autoOutdent(doc, row); }; - this.$id = "ace/mode/vala" + this.$id = "ace/mode/vala"; }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/vala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-vbscript.js b/htdocs/includes/ace/src/mode-vbscript.js similarity index 91% rename from htdocs/includes/ace/mode-vbscript.js rename to htdocs/includes/ace/src/mode-vbscript.js index 010be5be404..482c2f95c96 100644 --- a/htdocs/includes/ace/mode-vbscript.js +++ b/htdocs/includes/ace/src/mode-vbscript.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/vbscript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -166,7 +166,7 @@ var VBScriptHighlightRules = function() { defaultToken: "string.quoted.double.asp" } ] -} +}; }; @@ -175,7 +175,7 @@ oop.inherits(VBScriptHighlightRules, TextHighlightRules); exports.VBScriptHighlightRules = VBScriptHighlightRules; }); -ace.define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"], function(require, exports, module) { +define("ace/mode/vbscript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/vbscript_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -196,4 +196,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/vbscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-velocity.js b/htdocs/includes/ace/src/mode-velocity.js similarity index 93% rename from htdocs/includes/ace/mode-velocity.js rename to htdocs/includes/ace/src/mode-velocity.js index 2a420b669d7..ea94a8fd9ad 100644 --- a/htdocs/includes/ace/mode-velocity.js +++ b/htdocs/includes/ace/src/mode-velocity.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,15 +789,15 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); var lang = require("../lib/lang"); var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; -var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|min-height|min-width|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; -var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; @@ -826,7 +827,7 @@ var CssHighlightRules = function() { regex: "\\}" }, { token: "string", - regex: "@", + regex: "@(?!viewport)", next: "media" }, { token: "keyword", @@ -849,7 +850,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + "media": [{ include : ["strings", "url", "comments"] }, { @@ -886,6 +887,9 @@ var CssHighlightRules = function() { "ruleset" : [{ regex : "-(webkit|ms|moz|o)-", token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" }, { token : "paren.rparen", regex : "\\}", @@ -894,7 +898,7 @@ var CssHighlightRules = function() { include : ["strings", "url", "comments"] }, { token : ["constant.numeric", "keyword"], - regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vm|vw|%)" + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" }, { token : "constant.numeric", regex : numRe @@ -918,7 +922,7 @@ var CssHighlightRules = function() { }, { caseInsensitive: true }], - + url: [{ token : "support.function", regex : "(?:url(:?-prefix)?|domain|regexp)\\(", @@ -930,7 +934,7 @@ var CssHighlightRules = function() { defaultToken: "string" }] }], - + strings: [{ token : "string.start", regex : "'", @@ -968,7 +972,7 @@ var CssHighlightRules = function() { token : "constant.language.escape", regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ }] - + }; this.normalizeRules(); @@ -980,7 +984,7 @@ exports.CssHighlightRules = CssHighlightRules; }); -ace.define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { "use strict"; var propertyMap = { @@ -1092,18 +1096,14 @@ var CssCompletions = function() { } this.completionsDefined = true; - } + }; this.getCompletions = function(state, session, pos, prefix) { if (!this.completionsDefined) { this.defineCompletions(); } - var token = session.getTokenAt(pos.row, pos.column); - - if (!token) - return []; - if (state==='ruleset'){ + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { var line = session.getLine(pos.row).substr(0, pos.column); if (/:[^;]+$/.test(line)) { /([\w\-]+):[^:]*$/.test(line); @@ -1122,9 +1122,9 @@ var CssCompletions = function() { return properties.map(function(property){ return { caption: property, - snippet: property + ': $0', + snippet: property + ': $0;', meta: "property", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1144,7 +1144,7 @@ var CssCompletions = function() { caption: value, snippet: value, meta: "property value", - score: Number.MAX_VALUE + score: 1000000 }; }); }; @@ -1154,7 +1154,7 @@ var CssCompletions = function() { exports.CssCompletions = CssCompletions; }); -ace.define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1167,7 +1167,7 @@ var CssBehaviour = function () { this.inherit(CstyleBehaviour); this.add("colon", "insertion", function (state, action, editor, session, text) { - if (text === ':') { + if (text === ':' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var iterator = new TokenIterator(session, cursor.row, cursor.column); var token = iterator.getCurrentToken(); @@ -1181,13 +1181,13 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } - if (!line.substring(cursor.column).match(/^\s*;/)) { + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { return { text: ':;', selection: [1, 1] - } + }; } } } @@ -1214,7 +1214,7 @@ var CssBehaviour = function () { }); this.add("semicolon", "insertion", function (state, action, editor, session, text) { - if (text === ';') { + if (text === ';' && editor.selection.isEmpty()) { var cursor = editor.getCursorPosition(); var line = session.doc.getLine(cursor.row); var rightChar = line.substring(cursor.column, cursor.column + 1); @@ -1222,18 +1222,32 @@ var CssBehaviour = function () { return { text: '', selection: [1, 1] - } + }; } } }); -} + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; oop.inherits(CssBehaviour, CstyleBehaviour); exports.CssBehaviour = CssBehaviour; }); -ace.define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1308,7 +1322,7 @@ exports.Mode = Mode; }); -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1489,7 +1503,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -1511,7 +1525,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -1593,7 +1607,7 @@ oop.inherits(HtmlHighlightRules, XmlHighlightRules); exports.HtmlHighlightRules = HtmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1602,7 +1616,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -1672,14 +1686,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -1760,7 +1779,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/mixed",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1814,7 +1833,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -1869,7 +1888,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && //, + next : "start" + }, { + token : "keyword.operator", + regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, + next : "start" + }, { + token : "punctuation.operator", + regex : /[?:,;.]/, + next : "start" + }, { + token : "paren.lparen", + regex : /[\[({]/, + next : "start" + }, { + token : "paren.rparen", + regex : /[\])}]/ + }, { + token: "comment", + regex: /^#!.*$/ + } + ], + property: [{ + token : "text", + regex : "\\s+" + }, { + token : [ + "storage.type", "punctuation.operator", "entity.name.function", "text", + "keyword.operator", "text", + "storage.type", "text", "entity.name.function", "text", "paren.lparen" + ], + regex : "(" + identifierRe + ")(\\.)(" + identifierRe +")(\\s*)(=)(\\s*)(function)(?:(\\s+)(\\w+))?(\\s*)(\\()", + next: "function_arguments" + }, { + token : "punctuation.operator", + regex : /[.](?![.])/ + }, { + token : "support.function", + regex : /(s(?:h(?:ift|ow(?:Mod(?:elessDialog|alDialog)|Help))|croll(?:X|By(?:Pages|Lines)?|Y|To)?|t(?:op|rike)|i(?:n|zeToContent|debar|gnText)|ort|u(?:p|b(?:str(?:ing)?)?)|pli(?:ce|t)|e(?:nd|t(?:Re(?:sizable|questHeader)|M(?:i(?:nutes|lliseconds)|onth)|Seconds|Ho(?:tKeys|urs)|Year|Cursor|Time(?:out)?|Interval|ZOptions|Date|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Date|FullYear)|FullYear|Active)|arch)|qrt|lice|avePreferences|mall)|h(?:ome|andleEvent)|navigate|c(?:har(?:CodeAt|At)|o(?:s|n(?:cat|textual|firm)|mpile)|eil|lear(?:Timeout|Interval)?|a(?:ptureEvents|ll)|reate(?:StyleSheet|Popup|EventObject))|t(?:o(?:GMTString|S(?:tring|ource)|U(?:TCString|pperCase)|Lo(?:caleString|werCase))|est|a(?:n|int(?:Enabled)?))|i(?:s(?:NaN|Finite)|ndexOf|talics)|d(?:isableExternalCapture|ump|etachEvent)|u(?:n(?:shift|taint|escape|watch)|pdateCommands)|j(?:oin|avaEnabled)|p(?:o(?:p|w)|ush|lugins.refresh|a(?:ddings|rse(?:Int|Float)?)|r(?:int|ompt|eference))|e(?:scape|nableExternalCapture|val|lementFromPoint|x(?:p|ec(?:Script|Command)?))|valueOf|UTC|queryCommand(?:State|Indeterm|Enabled|Value)|f(?:i(?:nd|le(?:ModifiedDate|Size|CreatedDate|UpdatedDate)|xed)|o(?:nt(?:size|color)|rward)|loor|romCharCode)|watch|l(?:ink|o(?:ad|g)|astIndexOf)|a(?:sin|nchor|cos|t(?:tachEvent|ob|an(?:2)?)|pply|lert|b(?:s|ort))|r(?:ou(?:nd|teEvents)|e(?:size(?:By|To)|calc|turnValue|place|verse|l(?:oad|ease(?:Capture|Events)))|andom)|g(?:o|et(?:ResponseHeader|M(?:i(?:nutes|lliseconds)|onth)|Se(?:conds|lection)|Hours|Year|Time(?:zoneOffset)?|Da(?:y|te)|UTC(?:M(?:i(?:nutes|lliseconds)|onth)|Seconds|Hours|Da(?:y|te)|FullYear)|FullYear|A(?:ttention|llResponseHeaders)))|m(?:in|ove(?:B(?:y|elow)|To(?:Absolute)?|Above)|ergeAttributes|a(?:tch|rgins|x))|b(?:toa|ig|o(?:ld|rderWidths)|link|ack))\b(?=\()/ + }, { + token : "support.function.dom", + regex : /(s(?:ub(?:stringData|mit)|plitText|e(?:t(?:NamedItem|Attribute(?:Node)?)|lect))|has(?:ChildNodes|Feature)|namedItem|c(?:l(?:ick|o(?:se|neNode))|reate(?:C(?:omment|DATASection|aption)|T(?:Head|extNode|Foot)|DocumentFragment|ProcessingInstruction|E(?:ntityReference|lement)|Attribute))|tabIndex|i(?:nsert(?:Row|Before|Cell|Data)|tem)|open|delete(?:Row|C(?:ell|aption)|T(?:Head|Foot)|Data)|focus|write(?:ln)?|a(?:dd|ppend(?:Child|Data))|re(?:set|place(?:Child|Data)|move(?:NamedItem|Child|Attribute(?:Node)?)?)|get(?:NamedItem|Element(?:sBy(?:Name|TagName|ClassName)|ById)|Attribute(?:Node)?)|blur)\b(?=\()/ + }, { + token : "support.constant", + regex : /(s(?:ystemLanguage|cr(?:ipts|ollbars|een(?:X|Y|Top|Left))|t(?:yle(?:Sheets)?|atus(?:Text|bar)?)|ibling(?:Below|Above)|ource|uffixes|e(?:curity(?:Policy)?|l(?:ection|f)))|h(?:istory|ost(?:name)?|as(?:h|Focus))|y|X(?:MLDocument|SLDocument)|n(?:ext|ame(?:space(?:s|URI)|Prop))|M(?:IN_VALUE|AX_VALUE)|c(?:haracterSet|o(?:n(?:structor|trollers)|okieEnabled|lorDepth|mp(?:onents|lete))|urrent|puClass|l(?:i(?:p(?:boardData)?|entInformation)|osed|asses)|alle(?:e|r)|rypto)|t(?:o(?:olbar|p)|ext(?:Transform|Indent|Decoration|Align)|ags)|SQRT(?:1_2|2)|i(?:n(?:ner(?:Height|Width)|put)|ds|gnoreCase)|zIndex|o(?:scpu|n(?:readystatechange|Line)|uter(?:Height|Width)|p(?:sProfile|ener)|ffscreenBuffering)|NEGATIVE_INFINITY|d(?:i(?:splay|alog(?:Height|Top|Width|Left|Arguments)|rectories)|e(?:scription|fault(?:Status|Ch(?:ecked|arset)|View)))|u(?:ser(?:Profile|Language|Agent)|n(?:iqueID|defined)|pdateInterval)|_content|p(?:ixelDepth|ort|ersonalbar|kcs11|l(?:ugins|atform)|a(?:thname|dding(?:Right|Bottom|Top|Left)|rent(?:Window|Layer)?|ge(?:X(?:Offset)?|Y(?:Offset)?))|r(?:o(?:to(?:col|type)|duct(?:Sub)?|mpter)|e(?:vious|fix)))|e(?:n(?:coding|abledPlugin)|x(?:ternal|pando)|mbeds)|v(?:isibility|endor(?:Sub)?|Linkcolor)|URLUnencoded|P(?:I|OSITIVE_INFINITY)|f(?:ilename|o(?:nt(?:Size|Family|Weight)|rmName)|rame(?:s|Element)|gColor)|E|whiteSpace|l(?:i(?:stStyleType|n(?:eHeight|kColor))|o(?:ca(?:tion(?:bar)?|lName)|wsrc)|e(?:ngth|ft(?:Context)?)|a(?:st(?:M(?:odified|atch)|Index|Paren)|yer(?:s|X)|nguage))|a(?:pp(?:MinorVersion|Name|Co(?:deName|re)|Version)|vail(?:Height|Top|Width|Left)|ll|r(?:ity|guments)|Linkcolor|bove)|r(?:ight(?:Context)?|e(?:sponse(?:XML|Text)|adyState))|global|x|m(?:imeTypes|ultiline|enubar|argin(?:Right|Bottom|Top|Left))|L(?:N(?:10|2)|OG(?:10E|2E))|b(?:o(?:ttom|rder(?:Width|RightWidth|BottomWidth|Style|Color|TopWidth|LeftWidth))|ufferDepth|elow|ackground(?:Color|Image)))\b/ + }, { + token : "identifier", + regex : identifierRe + }, { + regex: "", + token: "empty", + next: "no_regex" + } + ], + "start": [ + DocCommentHighlightRules.getStartRule("doc-start"), + comments("start"), + { + token: "string.regexp", + regex: "\\/", + next: "regex" + }, { + token : "text", + regex : "\\s+|^$", + next : "start" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "regex": [ + { + token: "regexp.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "string.regexp", + regex: "/[sxngimy]*", + next: "no_regex" + }, { + token : "invalid", + regex: /\{\d+\b,?\d*\}[+*]|[+*$^?][+*]|[$^][?]|\?{3,}/ + }, { + token : "constant.language.escape", + regex: /\(\?[:=!]|\)|\{\d+\b,?\d*\}|[+*]\?|[()$^+*?.]/ + }, { + token : "constant.language.delimiter", + regex: /\|/ + }, { + token: "constant.language.escape", + regex: /\[\^?/, + next: "regex_character_class" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp" + } + ], + "regex_character_class": [ + { + token: "regexp.charclass.keyword.operator", + regex: "\\\\(?:u[\\da-fA-F]{4}|x[\\da-fA-F]{2}|.)" + }, { + token: "constant.language.escape", + regex: "]", + next: "regex" + }, { + token: "constant.language.escape", + regex: "-" + }, { + token: "empty", + regex: "$", + next: "no_regex" + }, { + defaultToken: "string.regexp.charachterclass" + } + ], + "function_arguments": [ + { + token: "variable.parameter", + regex: identifierRe + }, { + token: "punctuation.operator", + regex: "[, ]+" + }, { + token: "punctuation.operator", + regex: "$" + }, { + token: "empty", + regex: "", + next: "no_regex" + } + ], + "qqstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : '"|$', + next : "no_regex" + }, { + defaultToken: "string" + } + ], + "qstring" : [ + { + token : "constant.language.escape", + regex : escapedRe + }, { + token : "string", + regex : "\\\\$", + consumeLineEnd : true + }, { + token : "string", + regex : "'|$", + next : "no_regex" + }, { + defaultToken: "string" + } + ] + }; + + + if (!options || !options.noES6) { + this.$rules.no_regex.unshift({ + regex: "[{}]", onMatch: function(val, state, stack) { + this.next = val == "{" ? this.nextState : ""; + if (val == "{" && stack.length) { + stack.unshift("start", state); + } + else if (val == "}" && stack.length) { + stack.shift(); + this.next = stack.shift(); + if (this.next.indexOf("string") != -1 || this.next.indexOf("jsx") != -1) + return "paren.quasi.end"; + } + return val == "{" ? "paren.lparen" : "paren.rparen"; + }, + nextState: "start" + }, { + token : "string.quasi.start", + regex : /`/, + push : [{ + token : "constant.language.escape", + regex : escapedRe + }, { + token : "paren.quasi.start", + regex : /\${/, + push : "start" + }, { + token : "string.quasi.end", + regex : /`/, + next : "pop" + }, { + defaultToken: "string.quasi" + }] + }); + + if (!options || options.jsx != false) + JSX.call(this); + } + + this.embedRules(DocCommentHighlightRules, "doc-", + [ DocCommentHighlightRules.getEndRule("no_regex") ]); + + this.normalizeRules(); +}; + +oop.inherits(JavaScriptHighlightRules, TextHighlightRules); + +function JSX() { + var tagRegex = identifierRe.replace("\\d", "\\d\\-"); + var jsxTag = { + onMatch : function(val, state, stack) { + var offset = val.charAt(1) == "/" ? 2 : 1; + if (offset == 1) { + if (state != this.nextState) + stack.unshift(this.next, this.nextState, 0); + else + stack.unshift(this.next); + stack[2]++; + } else if (offset == 2) { + if (state == this.nextState) { + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.shift(); + stack.shift(); + } + } + } + return [{ + type: "meta.tag.punctuation." + (offset == 1 ? "" : "end-") + "tag-open.xml", + value: val.slice(0, offset) + }, { + type: "meta.tag.tag-name.xml", + value: val.substr(offset) + }]; + }, + regex : "", + onMatch : function(value, currentState, stack) { + if (currentState == stack[0]) + stack.shift(); + if (value.length == 2) { + if (stack[0] == this.nextState) + stack[1]--; + if (!stack[1] || stack[1] < 0) { + stack.splice(0, 2); + } + } + this.next = stack[0] || "start"; + return [{type: this.token, value: value}]; + }, + nextState: "jsx" + }, + jsxJsRule, + comments("jsxAttributes"), + { + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + token : "text.tag-whitespace.xml", + regex : "\\s+" + }, { + token : "string.attribute-value.xml", + regex : "'", + stateName : "jsx_attr_q", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + stateName : "jsx_attr_qq", + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, + jsxTag + ]; + this.$rules.reference = [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }]; +} + +function comments(next) { + return [ + { + token : "comment", // multi line comment + regex : /\/\*/, + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "\\*\\/", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "comment", + regex : "\\/\\/", + next: [ + DocCommentHighlightRules.getTagRule(), + {token : "comment", regex : "$|^", next : next || "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + } + ]; +} +exports.JavaScriptHighlightRules = JavaScriptHighlightRules; +}); + +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +"use strict"; + +var Range = require("../range").Range; + +var MatchingBraceOutdent = function() {}; + +(function() { + + this.checkOutdent = function(line, input) { + if (! /^\s+$/.test(line)) + return false; + + return /^\s*\}/.test(input); + }; + + this.autoOutdent = function(doc, row) { + var line = doc.getLine(row); + var match = line.match(/^(\s*\})/); + + if (!match) return 0; + + var column = match[1].length; + var openBracePos = doc.findMatchingBracket({row: row, column: column}); + + if (!openBracePos || openBracePos.row == row) return 0; + + var indent = this.$getIndent(doc.getLine(openBracePos.row)); + doc.replace(new Range(row, 0, row, column-1), indent); + }; + + this.$getIndent = function(line) { + return line.match(/^\s*/)[0]; + }; + +}).call(MatchingBraceOutdent.prototype); + +exports.MatchingBraceOutdent = MatchingBraceOutdent; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CstyleBehaviour = require("./behaviour/cstyle").CstyleBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = JavaScriptHighlightRules; + + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CstyleBehaviour(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.lineCommentStart = "//"; + this.blockComment = {start: "/*", end: "*/"}; + this.$quotes = {'"': '"', "'": "'", "`": "`"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + + var tokenizedLine = this.getTokenizer().getLineTokens(line, state); + var tokens = tokenizedLine.tokens; + var endState = tokenizedLine.state; + + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + if (state == "start" || state == "no_regex") { + var match = line.match(/^.*(?:\bcase\b.*:|[\{\(\[])\s*$/); + if (match) { + indent += tab; + } + } else if (state == "doc-start") { + if (endState == "start" || endState == "no_regex") { + return ""; + } + var match = line.match(/^\s*(\/?)\*/); + if (match) { + if (match[1]) { + indent += " "; + } + indent += "* "; + } + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/javascript_worker", "JavaScriptWorker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(results) { + session.setAnnotations(results.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/javascript"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/css_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; +var supportType = exports.supportType = "align-content|align-items|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-shadow|box-sizing|caption-side|clear|clip|color|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|column-span|column-width|columns|content|counter-increment|counter-reset|cursor|direction|display|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|font|font-family|font-size|font-size-adjust|font-stretch|font-style|font-variant|font-weight|hanging-punctuation|height|justify-content|left|letter-spacing|line-height|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|max-height|max-width|max-zoom|min-height|min-width|min-zoom|nav-down|nav-index|nav-left|nav-right|nav-up|opacity|order|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page-break-after|page-break-before|page-break-inside|perspective|perspective-origin|position|quotes|resize|right|tab-size|table-layout|text-align|text-align-last|text-decoration|text-decoration-color|text-decoration-line|text-decoration-style|text-indent|text-justify|text-overflow|text-shadow|text-transform|top|transform|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|user-zoom|vertical-align|visibility|white-space|width|word-break|word-spacing|word-wrap|z-index"; +var supportFunction = exports.supportFunction = "rgb|rgba|url|attr|counter|counters"; +var supportConstant = exports.supportConstant = "absolute|after-edge|after|all-scroll|all|alphabetic|always|antialiased|armenian|auto|avoid-column|avoid-page|avoid|balance|baseline|before-edge|before|below|bidi-override|block-line-height|block|bold|bolder|border-box|both|bottom|box|break-all|break-word|capitalize|caps-height|caption|center|central|char|circle|cjk-ideographic|clone|close-quote|col-resize|collapse|column|consider-shifts|contain|content-box|cover|crosshair|cubic-bezier|dashed|decimal-leading-zero|decimal|default|disabled|disc|disregard-shifts|distribute-all-lines|distribute-letter|distribute-space|distribute|dotted|double|e-resize|ease-in|ease-in-out|ease-out|ease|ellipsis|end|exclude-ruby|fill|fixed|georgian|glyphs|grid-height|groove|hand|hanging|hebrew|help|hidden|hiragana-iroha|hiragana|horizontal|icon|ideograph-alpha|ideograph-numeric|ideograph-parenthesis|ideograph-space|ideographic|inactive|include-ruby|inherit|initial|inline-block|inline-box|inline-line-height|inline-table|inline|inset|inside|inter-ideograph|inter-word|invert|italic|justify|katakana-iroha|katakana|keep-all|last|left|lighter|line-edge|line-through|line|linear|list-item|local|loose|lower-alpha|lower-greek|lower-latin|lower-roman|lowercase|lr-tb|ltr|mathematical|max-height|max-size|medium|menu|message-box|middle|move|n-resize|ne-resize|newspaper|no-change|no-close-quote|no-drop|no-open-quote|no-repeat|none|normal|not-allowed|nowrap|nw-resize|oblique|open-quote|outset|outside|overline|padding-box|page|pointer|pre-line|pre-wrap|pre|preserve-3d|progress|relative|repeat-x|repeat-y|repeat|replaced|reset-size|ridge|right|round|row-resize|rtl|s-resize|scroll|se-resize|separate|slice|small-caps|small-caption|solid|space|square|start|static|status-bar|step-end|step-start|steps|stretch|strict|sub|super|sw-resize|table-caption|table-cell|table-column-group|table-column|table-footer-group|table-header-group|table-row-group|table-row|table|tb-rl|text-after-edge|text-before-edge|text-bottom|text-size|text-top|text|thick|thin|transparent|underline|upper-alpha|upper-latin|upper-roman|uppercase|use-script|vertical-ideographic|vertical-text|visible|w-resize|wait|whitespace|z-index|zero|zoom"; +var supportConstantColor = exports.supportConstantColor = "aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkgrey|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkslategrey|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dimgrey|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|grey|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightgrey|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightslategrey|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|rebeccapurple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|slategrey|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen"; +var supportConstantFonts = exports.supportConstantFonts = "arial|century|comic|courier|cursive|fantasy|garamond|georgia|helvetica|impact|lucida|symbol|system|tahoma|times|trebuchet|utopia|verdana|webdings|sans-serif|serif|monospace"; + +var numRe = exports.numRe = "\\-?(?:(?:[0-9]+(?:\\.[0-9]+)?)|(?:\\.[0-9]+))"; +var pseudoElements = exports.pseudoElements = "(\\:+)\\b(after|before|first-letter|first-line|moz-selection|selection)\\b"; +var pseudoClasses = exports.pseudoClasses = "(:)\\b(active|checked|disabled|empty|enabled|first-child|first-of-type|focus|hover|indeterminate|invalid|last-child|last-of-type|link|not|nth-child|nth-last-child|nth-last-of-type|nth-of-type|only-child|only-of-type|required|root|target|valid|visited)\\b"; + +var CssHighlightRules = function() { + + var keywordMapper = this.createKeywordMapper({ + "support.function": supportFunction, + "support.constant": supportConstant, + "support.type": supportType, + "support.constant.color": supportConstantColor, + "support.constant.fonts": supportConstantFonts + }, "text", true); + + this.$rules = { + "start" : [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "ruleset" + }, { + token: "paren.rparen", + regex: "\\}" + }, { + token: "string", + regex: "@(?!viewport)", + next: "media" + }, { + token: "keyword", + regex: "#[a-z0-9-_]+" + }, { + token: "keyword", + regex: "%" + }, { + token: "variable", + regex: "\\.[a-z0-9-_]+" + }, { + token: "string", + regex: ":[a-z0-9-_]+" + }, { + token : "constant.numeric", + regex : numRe + }, { + token: "constant", + regex: "[a-z0-9-_]+" + }, { + caseInsensitive: true + }], + + "media": [{ + include : ["strings", "url", "comments"] + }, { + token: "paren.lparen", + regex: "\\{", + next: "start" + }, { + token: "paren.rparen", + regex: "\\}", + next: "start" + }, { + token: "string", + regex: ";", + next: "start" + }, { + token: "keyword", + regex: "(?:media|supports|document|charset|import|namespace|media|supports|document" + + "|page|font|keyframes|viewport|counter-style|font-feature-values" + + "|swash|ornaments|annotation|stylistic|styleset|character-variant)" + }], + + "comments" : [{ + token: "comment", // multi line comment + regex: "\\/\\*", + push: [{ + token : "comment", + regex : "\\*\\/", + next : "pop" + }, { + defaultToken : "comment" + }] + }], + + "ruleset" : [{ + regex : "-(webkit|ms|moz|o)-", + token : "text" + }, { + token : "punctuation.operator", + regex : "[:;]" + }, { + token : "paren.rparen", + regex : "\\}", + next : "start" + }, { + include : ["strings", "url", "comments"] + }, { + token : ["constant.numeric", "keyword"], + regex : "(" + numRe + ")(ch|cm|deg|em|ex|fr|gd|grad|Hz|in|kHz|mm|ms|pc|pt|px|rad|rem|s|turn|vh|vmax|vmin|vm|vw|%)" + }, { + token : "constant.numeric", + regex : numRe + }, { + token : "constant.numeric", // hex6 color + regex : "#[a-f0-9]{6}" + }, { + token : "constant.numeric", // hex3 color + regex : "#[a-f0-9]{3}" + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-element.css"], + regex : pseudoElements + }, { + token : ["punctuation", "entity.other.attribute-name.pseudo-class.css"], + regex : pseudoClasses + }, { + include: "url" + }, { + token : keywordMapper, + regex : "\\-?[a-zA-Z_][a-zA-Z0-9_\\-]*" + }, { + caseInsensitive: true + }], + + url: [{ + token : "support.function", + regex : "(?:url(:?-prefix)?|domain|regexp)\\(", + push: [{ + token : "support.function", + regex : "\\)", + next : "pop" + }, { + defaultToken: "string" + }] + }], + + strings: [{ + token : "string.start", + regex : "'", + push : [{ + token : "string.end", + regex : "'|$", + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }, { + token : "string.start", + regex : '"', + push : [{ + token : "string.end", + regex : '"|$', + next: "pop" + }, { + include : "escapes" + }, { + token : "constant.language.escape", + regex : /\\$/, + consumeLineEnd: true + }, { + defaultToken: "string" + }] + }], + escapes: [{ + token : "constant.language.escape", + regex : /\\([a-fA-F\d]{1,6}|[^a-fA-F\d])/ + }] + + }; + + this.normalizeRules(); +}; + +oop.inherits(CssHighlightRules, TextHighlightRules); + +exports.CssHighlightRules = CssHighlightRules; + +}); + +define("ace/mode/css_completions",["require","exports","module"], function(require, exports, module) { +"use strict"; + +var propertyMap = { + "background": {"#$0": 1}, + "background-color": {"#$0": 1, "transparent": 1, "fixed": 1}, + "background-image": {"url('/$0')": 1}, + "background-repeat": {"repeat": 1, "repeat-x": 1, "repeat-y": 1, "no-repeat": 1, "inherit": 1}, + "background-position": {"bottom":2, "center":2, "left":2, "right":2, "top":2, "inherit":2}, + "background-attachment": {"scroll": 1, "fixed": 1}, + "background-size": {"cover": 1, "contain": 1}, + "background-clip": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "background-origin": {"border-box": 1, "padding-box": 1, "content-box": 1}, + "border": {"solid $0": 1, "dashed $0": 1, "dotted $0": 1, "#$0": 1}, + "border-color": {"#$0": 1}, + "border-style": {"solid":2, "dashed":2, "dotted":2, "double":2, "groove":2, "hidden":2, "inherit":2, "inset":2, "none":2, "outset":2, "ridged":2}, + "border-collapse": {"collapse": 1, "separate": 1}, + "bottom": {"px": 1, "em": 1, "%": 1}, + "clear": {"left": 1, "right": 1, "both": 1, "none": 1}, + "color": {"#$0": 1, "rgb(#$00,0,0)": 1}, + "cursor": {"default": 1, "pointer": 1, "move": 1, "text": 1, "wait": 1, "help": 1, "progress": 1, "n-resize": 1, "ne-resize": 1, "e-resize": 1, "se-resize": 1, "s-resize": 1, "sw-resize": 1, "w-resize": 1, "nw-resize": 1}, + "display": {"none": 1, "block": 1, "inline": 1, "inline-block": 1, "table-cell": 1}, + "empty-cells": {"show": 1, "hide": 1}, + "float": {"left": 1, "right": 1, "none": 1}, + "font-family": {"Arial":2,"Comic Sans MS":2,"Consolas":2,"Courier New":2,"Courier":2,"Georgia":2,"Monospace":2,"Sans-Serif":2, "Segoe UI":2,"Tahoma":2,"Times New Roman":2,"Trebuchet MS":2,"Verdana": 1}, + "font-size": {"px": 1, "em": 1, "%": 1}, + "font-weight": {"bold": 1, "normal": 1}, + "font-style": {"italic": 1, "normal": 1}, + "font-variant": {"normal": 1, "small-caps": 1}, + "height": {"px": 1, "em": 1, "%": 1}, + "left": {"px": 1, "em": 1, "%": 1}, + "letter-spacing": {"normal": 1}, + "line-height": {"normal": 1}, + "list-style-type": {"none": 1, "disc": 1, "circle": 1, "square": 1, "decimal": 1, "decimal-leading-zero": 1, "lower-roman": 1, "upper-roman": 1, "lower-greek": 1, "lower-latin": 1, "upper-latin": 1, "georgian": 1, "lower-alpha": 1, "upper-alpha": 1}, + "margin": {"px": 1, "em": 1, "%": 1}, + "margin-right": {"px": 1, "em": 1, "%": 1}, + "margin-left": {"px": 1, "em": 1, "%": 1}, + "margin-top": {"px": 1, "em": 1, "%": 1}, + "margin-bottom": {"px": 1, "em": 1, "%": 1}, + "max-height": {"px": 1, "em": 1, "%": 1}, + "max-width": {"px": 1, "em": 1, "%": 1}, + "min-height": {"px": 1, "em": 1, "%": 1}, + "min-width": {"px": 1, "em": 1, "%": 1}, + "overflow": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-x": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "overflow-y": {"hidden": 1, "visible": 1, "auto": 1, "scroll": 1}, + "padding": {"px": 1, "em": 1, "%": 1}, + "padding-top": {"px": 1, "em": 1, "%": 1}, + "padding-right": {"px": 1, "em": 1, "%": 1}, + "padding-bottom": {"px": 1, "em": 1, "%": 1}, + "padding-left": {"px": 1, "em": 1, "%": 1}, + "page-break-after": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "page-break-before": {"auto": 1, "always": 1, "avoid": 1, "left": 1, "right": 1}, + "position": {"absolute": 1, "relative": 1, "fixed": 1, "static": 1}, + "right": {"px": 1, "em": 1, "%": 1}, + "table-layout": {"fixed": 1, "auto": 1}, + "text-decoration": {"none": 1, "underline": 1, "line-through": 1, "blink": 1}, + "text-align": {"left": 1, "right": 1, "center": 1, "justify": 1}, + "text-transform": {"capitalize": 1, "uppercase": 1, "lowercase": 1, "none": 1}, + "top": {"px": 1, "em": 1, "%": 1}, + "vertical-align": {"top": 1, "bottom": 1}, + "visibility": {"hidden": 1, "visible": 1}, + "white-space": {"nowrap": 1, "normal": 1, "pre": 1, "pre-line": 1, "pre-wrap": 1}, + "width": {"px": 1, "em": 1, "%": 1}, + "word-spacing": {"normal": 1}, + "filter": {"alpha(opacity=$0100)": 1}, + + "text-shadow": {"$02px 2px 2px #777": 1}, + "text-overflow": {"ellipsis-word": 1, "clip": 1, "ellipsis": 1}, + "-moz-border-radius": 1, + "-moz-border-radius-topright": 1, + "-moz-border-radius-bottomright": 1, + "-moz-border-radius-topleft": 1, + "-moz-border-radius-bottomleft": 1, + "-webkit-border-radius": 1, + "-webkit-border-top-right-radius": 1, + "-webkit-border-top-left-radius": 1, + "-webkit-border-bottom-right-radius": 1, + "-webkit-border-bottom-left-radius": 1, + "-moz-box-shadow": 1, + "-webkit-box-shadow": 1, + "transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-moz-transform": {"rotate($00deg)": 1, "skew($00deg)": 1}, + "-webkit-transform": {"rotate($00deg)": 1, "skew($00deg)": 1 } +}; + +var CssCompletions = function() { + +}; + +(function() { + + this.completionsDefined = false; + + this.defineCompletions = function() { + if (document) { + var style = document.createElement('c').style; + + for (var i in style) { + if (typeof style[i] !== 'string') + continue; + + var name = i.replace(/[A-Z]/g, function(x) { + return '-' + x.toLowerCase(); + }); + + if (!propertyMap.hasOwnProperty(name)) + propertyMap[name] = 1; + } + } + + this.completionsDefined = true; + }; + + this.getCompletions = function(state, session, pos, prefix) { + if (!this.completionsDefined) { + this.defineCompletions(); + } + + if (state==='ruleset' || session.$mode.$id == "ace/mode/scss") { + var line = session.getLine(pos.row).substr(0, pos.column); + if (/:[^;]+$/.test(line)) { + /([\w\-]+):[^:]*$/.test(line); + + return this.getPropertyValueCompletions(state, session, pos, prefix); + } else { + return this.getPropertyCompletions(state, session, pos, prefix); + } + } + + return []; + }; + + this.getPropertyCompletions = function(state, session, pos, prefix) { + var properties = Object.keys(propertyMap); + return properties.map(function(property){ + return { + caption: property, + snippet: property + ': $0;', + meta: "property", + score: 1000000 + }; + }); + }; + + this.getPropertyValueCompletions = function(state, session, pos, prefix) { + var line = session.getLine(pos.row).substr(0, pos.column); + var property = (/([\w\-]+):[^:]*$/.exec(line) || {})[1]; + + if (!property) + return []; + var values = []; + if (property in propertyMap && typeof propertyMap[property] === "object") { + values = Object.keys(propertyMap[property]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "property value", + score: 1000000 + }; + }); + }; + +}).call(CssCompletions.prototype); + +exports.CssCompletions = CssCompletions; +}); + +define("ace/mode/behaviour/css",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var CstyleBehaviour = require("./cstyle").CstyleBehaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; + +var CssBehaviour = function () { + + this.inherit(CstyleBehaviour); + + this.add("colon", "insertion", function (state, action, editor, session, text) { + if (text === ':' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ':') { + return { + text: '', + selection: [1, 1] + }; + } + if (/^(\s+[^;]|\s*$)/.test(line.substring(cursor.column))) { + return { + text: ':;', + selection: [1, 1] + }; + } + } + } + }); + + this.add("colon", "deletion", function (state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && selected === ':') { + var cursor = editor.getCursorPosition(); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + if (token && token.value.match(/\s+/)) { + token = iterator.stepBackward(); + } + if (token && token.type === 'support.type') { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.end.column, range.end.column + 1); + if (rightChar === ';') { + range.end.column ++; + return range; + } + } + } + }); + + this.add("semicolon", "insertion", function (state, action, editor, session, text) { + if (text === ';' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + if (rightChar === ';') { + return { + text: '', + selection: [1, 1] + }; + } + } + }); + + this.add("!important", "insertion", function (state, action, editor, session, text) { + if (text === '!' && editor.selection.isEmpty()) { + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + + if (/^\s*(;|}|$)/.test(line.substring(cursor.column))) { + return { + text: '!important', + selection: [10, 10] + }; + } + } + }); + +}; +oop.inherits(CssBehaviour, CstyleBehaviour); + +exports.CssBehaviour = CssBehaviour; +}); + +define("ace/mode/css",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/css_completions","ace/mode/behaviour/css","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var MatchingBraceOutdent = require("./matching_brace_outdent").MatchingBraceOutdent; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var CssCompletions = require("./css_completions").CssCompletions; +var CssBehaviour = require("./behaviour/css").CssBehaviour; +var CStyleFoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = CssHighlightRules; + this.$outdent = new MatchingBraceOutdent(); + this.$behaviour = new CssBehaviour(); + this.$completer = new CssCompletions(); + this.foldingRules = new CStyleFoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.foldingRules = "cStyle"; + this.blockComment = {start: "/*", end: "*/"}; + + this.getNextLineIndent = function(state, line, tab) { + var indent = this.$getIndent(line); + var tokens = this.getTokenizer().getLineTokens(line, state).tokens; + if (tokens.length && tokens[tokens.length-1].type == "comment") { + return indent; + } + + var match = line.match(/^.*\{\s*$/); + if (match) { + indent += tab; + } + + return indent; + }; + + this.checkOutdent = function(state, line, input) { + return this.$outdent.checkOutdent(line, input); + }; + + this.autoOutdent = function(state, doc, row) { + this.$outdent.autoOutdent(doc, row); + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + var worker = new WorkerClient(["ace"], "ace/mode/css_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + worker.on("annotate", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/css"; +}).call(Mode.prototype); + +exports.Mode = Mode; + +}); + +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var XmlHighlightRules = function(normalize) { + var tagRegex = "[_:a-zA-Z\xc0-\uffff][-_:.a-zA-Z0-9\xc0-\uffff]*"; + + this.$rules = { + start : [ + {token : "string.cdata.xml", regex : "<\\!\\[CDATA\\[", next : "cdata"}, + { + token : ["punctuation.instruction.xml", "keyword.instruction.xml"], + regex : "(<\\?)(" + tagRegex + ")", next : "processing_instruction" + }, + {token : "comment.start.xml", regex : "<\\!--", next : "comment"}, + { + token : ["xml-pe.doctype.xml", "xml-pe.doctype.xml"], + regex : "(<\\!)(DOCTYPE)(?=[\\s])", next : "doctype", caseInsensitive: true + }, + {include : "tag"}, + {token : "text.end-tag-open.xml", regex: "", + next : "start" + }], + + doctype : [ + {include : "whitespace"}, + {include : "string"}, + {token : "xml-pe.doctype.xml", regex : ">", next : "start"}, + {token : "xml-pe.xml", regex : "[-_a-zA-Z0-9:]+"}, + {token : "punctuation.int-subset", regex : "\\[", push : "int_subset"} + ], + + int_subset : [{ + token : "text.xml", + regex : "\\s+" + }, { + token: "punctuation.int-subset.xml", + regex: "]", + next: "pop" + }, { + token : ["punctuation.markup-decl.xml", "keyword.markup-decl.xml"], + regex : "(<\\!)(" + tagRegex + ")", + push : [{ + token : "text", + regex : "\\s+" + }, + { + token : "punctuation.markup-decl.xml", + regex : ">", + next : "pop" + }, + {include : "string"}] + }], + + cdata : [ + {token : "string.cdata.xml", regex : "\\]\\]>", next : "start"}, + {token : "text.xml", regex : "\\s+"}, + {token : "text.xml", regex : "(?:[^\\]]|\\](?!\\]>))+"} + ], + + comment : [ + {token : "comment.end.xml", regex : "-->", next : "start"}, + {defaultToken : "comment.xml"} + ], + + reference : [{ + token : "constant.language.escape.reference.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + attr_reference : [{ + token : "constant.language.escape.reference.attribute-value.xml", + regex : "(?:&#[0-9]+;)|(?:&#x[0-9a-fA-F]+;)|(?:&[a-zA-Z0-9_:\\.-]+;)" + }], + + tag : [{ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag.punctuation.end-tag-open.xml", "meta.tag.tag-name.xml"], + regex : "(?:(<)|(", next : "start"} + ] + }], + + tag_whitespace : [ + {token : "text.tag-whitespace.xml", regex : "\\s+"} + ], + whitespace : [ + {token : "text.whitespace.xml", regex : "\\s+"} + ], + string: [{ + token : "string.xml", + regex : "'", + push : [ + {token : "string.xml", regex: "'", next: "pop"}, + {defaultToken : "string.xml"} + ] + }, { + token : "string.xml", + regex : '"', + push : [ + {token : "string.xml", regex: '"', next: "pop"}, + {defaultToken : "string.xml"} + ] + }], + + attributes: [{ + token : "entity.other.attribute-name.xml", + regex : tagRegex + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=" + }, { + include: "tag_whitespace" + }, { + include: "attribute_value" + }], + + attribute_value: [{ + token : "string.attribute-value.xml", + regex : "'", + push : [ + {token : "string.attribute-value.xml", regex: "'", next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }, { + token : "string.attribute-value.xml", + regex : '"', + push : [ + {token : "string.attribute-value.xml", regex: '"', next: "pop"}, + {include : "attr_reference"}, + {defaultToken : "string.attribute-value.xml"} + ] + }] + }; + + if (this.constructor === XmlHighlightRules) + this.normalizeRules(); +}; + + +(function() { + + this.embedTagRules = function(HighlightRules, prefix, tag){ + this.$rules.tag.unshift({ + token : ["meta.tag.punctuation.tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(<)(" + tag + "(?=\\s|>|$))", + next: [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next : prefix + "start"} + ] + }); + + this.$rules[tag + "-end"] = [ + {include : "attributes"}, + {token : "meta.tag.punctuation.tag-close.xml", regex : "/?>", next: "start", + onMatch : function(value, currentState, stack) { + stack.splice(0); + return this.token; + }} + ]; + + this.embedRules(HighlightRules, prefix, [{ + token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], + regex : "(|$))", + next: tag + "-end" + }, { + token: "string.cdata.xml", + regex : "<\\!\\[CDATA\\[" + }, { + token: "string.cdata.xml", + regex : "\\]\\]>" + }]); + }; + +}).call(TextHighlightRules.prototype); + +oop.inherits(XmlHighlightRules, TextHighlightRules); + +exports.XmlHighlightRules = XmlHighlightRules; +}); + +define("ace/mode/html_highlight_rules",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/css_highlight_rules","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var CssHighlightRules = require("./css_highlight_rules").CssHighlightRules; +var JavaScriptHighlightRules = require("./javascript_highlight_rules").JavaScriptHighlightRules; +var XmlHighlightRules = require("./xml_highlight_rules").XmlHighlightRules; + +var tagMap = lang.createMap({ + a : 'anchor', + button : 'form', + form : 'form', + img : 'image', + input : 'form', + label : 'form', + option : 'form', + script : 'script', + select : 'form', + textarea : 'form', + style : 'style', + table : 'table', + tbody : 'table', + td : 'table', + tfoot : 'table', + th : 'table', + tr : 'table' +}); + +var HtmlHighlightRules = function() { + XmlHighlightRules.call(this); + + this.addRules({ + attributes: [{ + include : "tag_whitespace" + }, { + token : "entity.other.attribute-name.xml", + regex : "[-_a-zA-Z0-9:.]+" + }, { + token : "keyword.operator.attribute-equals.xml", + regex : "=", + push : [{ + include: "tag_whitespace" + }, { + token : "string.unquoted.attribute-value.html", + regex : "[^<>='\"`\\s]+", + next : "pop" + }, { + token : "empty", + regex : "", + next : "pop" + }] + }, { + include : "attribute_value" + }], + tag: [{ + token : function(start, tag) { + var group = tagMap[tag]; + return ["meta.tag.punctuation." + (start == "<" ? "" : "end-") + "tag-open.xml", + "meta.tag" + (group ? "." + group : "") + ".tag-name.xml"]; + }, + regex : "(", next : "start"} + ] + }); + + this.embedTagRules(CssHighlightRules, "css-", "style"); + this.embedTagRules(new JavaScriptHighlightRules({jsx: false}).getRules(), "js-", "script"); + + if (this.constructor === HtmlHighlightRules) + this.normalizeRules(); +}; + +oop.inherits(HtmlHighlightRules, XmlHighlightRules); + +exports.HtmlHighlightRules = HtmlHighlightRules; +}); + +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Behaviour = require("../behaviour").Behaviour; +var TokenIterator = require("../../token_iterator").TokenIterator; +var lang = require("../../lib/lang"); + +function is(token, type) { + return token && token.type.lastIndexOf(type + ".xml") > -1; +} + +var XmlBehaviour = function () { + + this.add("string_dquotes", "insertion", function (state, action, editor, session, text) { + if (text == '"' || text == "'") { + var quote = text; + var selected = session.doc.getTextRange(editor.getSelectionRange()); + if (selected !== "" && selected !== "'" && selected != '"' && editor.getWrapBehavioursEnabled()) { + return { + text: quote + selected + quote, + selection: false + }; + } + + var cursor = editor.getCursorPosition(); + var line = session.doc.getLine(cursor.row); + var rightChar = line.substring(cursor.column, cursor.column + 1); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (rightChar == quote && (is(token, "attribute-value") || is(token, "string"))) { + return { + text: "", + selection: [1, 1] + }; + } + + if (!token) + token = iterator.stepBackward(); + + if (!token) + return; + + while (is(token, "tag-whitespace") || is(token, "whitespace")) { + token = iterator.stepBackward(); + } + var rightSpace = !rightChar || rightChar.match(/\s/); + if (is(token, "attribute-equals") && (rightSpace || rightChar == '>') || (is(token, "decl-attribute-equals") && (rightSpace || rightChar == '?'))) { + return { + text: quote + quote, + selection: [1, 1] + }; + } + } + }); + + this.add("string_dquotes", "deletion", function(state, action, editor, session, range) { + var selected = session.doc.getTextRange(range); + if (!range.isMultiLine() && (selected == '"' || selected == "'")) { + var line = session.doc.getLine(range.start.row); + var rightChar = line.substring(range.start.column + 1, range.start.column + 2); + if (rightChar == selected) { + range.end.column++; + return range; + } + } + }); + + this.add("autoclosing", "insertion", function (state, action, editor, session, text) { + if (text == '>') { + var position = editor.getSelectionRange().start; + var iterator = new TokenIterator(session, position.row, position.column); + var token = iterator.getCurrentToken() || iterator.stepBackward(); + if (!token || !(is(token, "tag-name") || is(token, "tag-whitespace") || is(token, "attribute-name") || is(token, "attribute-equals") || is(token, "attribute-value"))) + return; + if (is(token, "reference.attribute-value")) + return; + if (is(token, "attribute-value")) { + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) + return; + iterator.stepBackward(); + } + } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; + while (!is(token, "tag-name")) { + token = iterator.stepBackward(); + if (token.value == "<") { + token = iterator.stepForward(); + break; + } + } + + var tokenRow = iterator.getCurrentTokenRow(); + var tokenColumn = iterator.getCurrentTokenColumn(); + if (is(iterator.stepBackward(), "end-tag-open")) + return; + + var element = token.value; + if (tokenRow == position.row) + element = element.substring(0, position.column - tokenColumn); + + if (this.voidElements.hasOwnProperty(element.toLowerCase())) + return; + + return { + text: ">" + "", + selection: [1, 1] + }; + } + }); + + this.add("autoindent", "insertion", function (state, action, editor, session, text) { + if (text == "\n") { + var cursor = editor.getCursorPosition(); + var line = session.getLine(cursor.row); + var iterator = new TokenIterator(session, cursor.row, cursor.column); + var token = iterator.getCurrentToken(); + + if (token && token.type.indexOf("tag-close") !== -1) { + if (token.value == "/>") + return; + while (token && token.type.indexOf("tag-name") === -1) { + token = iterator.stepBackward(); + } + + if (!token) { + return; + } + + var tag = token.value; + var row = iterator.getCurrentTokenRow(); + token = iterator.stepBackward(); + if (!token || token.type.indexOf("end-tag") !== -1) { + return; + } + + if (this.voidElements && !this.voidElements[tag]) { + var nextToken = session.getTokenAt(cursor.row, cursor.column+1); + var line = session.getLine(row); + var nextIndent = this.$getIndent(line); + var indent = nextIndent + session.getTabString(); + + if (nextToken && nextToken.value === " -1; +} + +(function() { + + this.getFoldWidget = function(session, foldStyle, row) { + var tag = this._getFirstTagInLine(session, row); + + if (!tag) + return this.getCommentFoldWidget(session, row); + + if (tag.closing || (!tag.tagName && tag.selfClosing)) + return foldStyle == "markbeginend" ? "end" : ""; + + if (!tag.tagName || tag.selfClosing || this.voidElements.hasOwnProperty(tag.tagName.toLowerCase())) + return ""; + + if (this._findEndTagInLine(session, row, tag.tagName, tag.end.column)) + return ""; + + return "start"; + }; + + this.getCommentFoldWidget = function(session, row) { + if (/comment/.test(session.getState(row)) && /'; + break; + } + } + return tag; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == '/>'; + return tag; + } + tag.start.column += token.value.length; + } + + return null; + }; + + this._findEndTagInLine = function(session, row, tagName, startColumn) { + var tokens = session.getTokens(row); + var column = 0; + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + column += token.value.length; + if (column < startColumn) + continue; + if (is(token, "end-tag-open")) { + token = tokens[i + 1]; + if (token && token.value == tagName) + return true; + } + } + return false; + }; + this._readTagForward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + iterator.stepForward(); + return tag; + } + } while(token = iterator.stepForward()); + + return null; + }; + + this._readTagBackward = function(iterator) { + var token = iterator.getCurrentToken(); + if (!token) + return null; + + var tag = new Tag(); + do { + if (is(token, "tag-open")) { + tag.closing = is(token, "end-tag-open"); + tag.start.row = iterator.getCurrentTokenRow(); + tag.start.column = iterator.getCurrentTokenColumn(); + iterator.stepBackward(); + return tag; + } else if (is(token, "tag-name")) { + tag.tagName = token.value; + } else if (is(token, "tag-close")) { + tag.selfClosing = token.value == "/>"; + tag.end.row = iterator.getCurrentTokenRow(); + tag.end.column = iterator.getCurrentTokenColumn() + token.value.length; + } + } while(token = iterator.stepBackward()); + + return null; + }; + + this._pop = function(stack, tag) { + while (stack.length) { + + var top = stack[stack.length-1]; + if (!tag || top.tagName == tag.tagName) { + return stack.pop(); + } + else if (this.optionalEndTags.hasOwnProperty(top.tagName)) { + stack.pop(); + continue; + } else { + return null; + } + } + }; + + this.getFoldWidgetRange = function(session, foldStyle, row) { + var firstTag = this._getFirstTagInLine(session, row); + + if (!firstTag) { + return this.getCommentFoldWidget(session, row) + && session.getCommentFoldRange(row, session.getLine(row).length); + } + + var isBackward = firstTag.closing || firstTag.selfClosing; + var stack = []; + var tag; + + if (!isBackward) { + var iterator = new TokenIterator(session, row, firstTag.start.column); + var start = { + row: row, + column: firstTag.start.column + firstTag.tagName.length + 2 + }; + if (firstTag.start.row == firstTag.end.row) + start.column = firstTag.end.column; + while (tag = this._readTagForward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) + return Range.fromPoints(start, tag.start); + } + else { + stack.push(tag); + } + } + } + else { + var iterator = new TokenIterator(session, row, firstTag.end.column); + var end = { + row: row, + column: firstTag.start.column + }; + + while (tag = this._readTagBackward(iterator)) { + if (tag.selfClosing) { + if (!stack.length) { + tag.start.column += tag.tagName.length + 2; + tag.end.column -= 2; + return Range.fromPoints(tag.start, tag.end); + } else + continue; + } + + if (!tag.closing) { + this._pop(stack, tag); + if (stack.length == 0) { + tag.start.column += tag.tagName.length + 2; + if (tag.start.row == tag.end.row && tag.start.column < tag.end.column) + tag.start.column = tag.end.column; + return Range.fromPoints(tag.start, end); + } + } + else { + stack.push(tag); + } + } + } + + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/folding/html",["require","exports","module","ace/lib/oop","ace/mode/folding/mixed","ace/mode/folding/xml","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var MixedFoldMode = require("./mixed").FoldMode; +var XmlFoldMode = require("./xml").FoldMode; +var CStyleFoldMode = require("./cstyle").FoldMode; + +var FoldMode = exports.FoldMode = function(voidElements, optionalTags) { + MixedFoldMode.call(this, new XmlFoldMode(voidElements, optionalTags), { + "js-": new CStyleFoldMode(), + "css-": new CStyleFoldMode() + }); +}; + +oop.inherits(FoldMode, MixedFoldMode); + +}); + +define("ace/mode/html_completions",["require","exports","module","ace/token_iterator"], function(require, exports, module) { +"use strict"; + +var TokenIterator = require("../token_iterator").TokenIterator; + +var commonAttributes = [ + "accesskey", + "class", + "contenteditable", + "contextmenu", + "dir", + "draggable", + "dropzone", + "hidden", + "id", + "inert", + "itemid", + "itemprop", + "itemref", + "itemscope", + "itemtype", + "lang", + "spellcheck", + "style", + "tabindex", + "title", + "translate" +]; + +var eventAttributes = [ + "onabort", + "onblur", + "oncancel", + "oncanplay", + "oncanplaythrough", + "onchange", + "onclick", + "onclose", + "oncontextmenu", + "oncuechange", + "ondblclick", + "ondrag", + "ondragend", + "ondragenter", + "ondragleave", + "ondragover", + "ondragstart", + "ondrop", + "ondurationchange", + "onemptied", + "onended", + "onerror", + "onfocus", + "oninput", + "oninvalid", + "onkeydown", + "onkeypress", + "onkeyup", + "onload", + "onloadeddata", + "onloadedmetadata", + "onloadstart", + "onmousedown", + "onmousemove", + "onmouseout", + "onmouseover", + "onmouseup", + "onmousewheel", + "onpause", + "onplay", + "onplaying", + "onprogress", + "onratechange", + "onreset", + "onscroll", + "onseeked", + "onseeking", + "onselect", + "onshow", + "onstalled", + "onsubmit", + "onsuspend", + "ontimeupdate", + "onvolumechange", + "onwaiting" +]; + +var globalAttributes = commonAttributes.concat(eventAttributes); + +var attributeMap = { + "a": {"href": 1, "target": {"_blank": 1, "top": 1}, "ping": 1, "rel": {"nofollow": 1, "alternate": 1, "author": 1, "bookmark": 1, "help": 1, "license": 1, "next": 1, "noreferrer": 1, "prefetch": 1, "prev": 1, "search": 1, "tag": 1}, "media": 1, "hreflang": 1, "type": 1}, + "abbr": {}, + "address": {}, + "area": {"shape": 1, "coords": 1, "href": 1, "hreflang": 1, "alt": 1, "target": 1, "media": 1, "rel": 1, "ping": 1, "type": 1}, + "article": {"pubdate": 1}, + "aside": {}, + "audio": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1 }}, + "b": {}, + "base": {"href": 1, "target": 1}, + "bdi": {}, + "bdo": {}, + "blockquote": {"cite": 1}, + "body": {"onafterprint": 1, "onbeforeprint": 1, "onbeforeunload": 1, "onhashchange": 1, "onmessage": 1, "onoffline": 1, "onpopstate": 1, "onredo": 1, "onresize": 1, "onstorage": 1, "onundo": 1, "onunload": 1}, + "br": {}, + "button": {"autofocus": 1, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": 1, "formmethod": 1, "formnovalidate": 1, "formtarget": 1, "name": 1, "value": 1, "type": {"button": 1, "submit": 1}}, + "canvas": {"width": 1, "height": 1}, + "caption": {}, + "cite": {}, + "code": {}, + "col": {"span": 1}, + "colgroup": {"span": 1}, + "command": {"type": 1, "label": 1, "icon": 1, "disabled": 1, "checked": 1, "radiogroup": 1, "command": 1}, + "data": {}, + "datalist": {}, + "dd": {}, + "del": {"cite": 1, "datetime": 1}, + "details": {"open": 1}, + "dfn": {}, + "dialog": {"open": 1}, + "div": {}, + "dl": {}, + "dt": {}, + "em": {}, + "embed": {"src": 1, "height": 1, "width": 1, "type": 1}, + "fieldset": {"disabled": 1, "form": 1, "name": 1}, + "figcaption": {}, + "figure": {}, + "footer": {}, + "form": {"accept-charset": 1, "action": 1, "autocomplete": 1, "enctype": {"multipart/form-data": 1, "application/x-www-form-urlencoded": 1}, "method": {"get": 1, "post": 1}, "name": 1, "novalidate": 1, "target": {"_blank": 1, "top": 1}}, + "h1": {}, + "h2": {}, + "h3": {}, + "h4": {}, + "h5": {}, + "h6": {}, + "head": {}, + "header": {}, + "hr": {}, + "html": {"manifest": 1}, + "i": {}, + "iframe": {"name": 1, "src": 1, "height": 1, "width": 1, "sandbox": {"allow-same-origin": 1, "allow-top-navigation": 1, "allow-forms": 1, "allow-scripts": 1}, "seamless": {"seamless": 1}}, + "img": {"alt": 1, "src": 1, "height": 1, "width": 1, "usemap": 1, "ismap": 1}, + "input": { + "type": {"text": 1, "password": 1, "hidden": 1, "checkbox": 1, "submit": 1, "radio": 1, "file": 1, "button": 1, "reset": 1, "image": 31, "color": 1, "date": 1, "datetime": 1, "datetime-local": 1, "email": 1, "month": 1, "number": 1, "range": 1, "search": 1, "tel": 1, "time": 1, "url": 1, "week": 1}, + "accept": 1, "alt": 1, "autocomplete": {"on": 1, "off": 1}, "autofocus": {"autofocus": 1}, "checked": {"checked": 1}, "disabled": {"disabled": 1}, "form": 1, "formaction": 1, "formenctype": {"application/x-www-form-urlencoded": 1, "multipart/form-data": 1, "text/plain": 1}, "formmethod": {"get": 1, "post": 1}, "formnovalidate": {"formnovalidate": 1}, "formtarget": {"_blank": 1, "_self": 1, "_parent": 1, "_top": 1}, "height": 1, "list": 1, "max": 1, "maxlength": 1, "min": 1, "multiple": {"multiple": 1}, "name": 1, "pattern": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "size": 1, "src": 1, "step": 1, "width": 1, "files": 1, "value": 1}, + "ins": {"cite": 1, "datetime": 1}, + "kbd": {}, + "keygen": {"autofocus": 1, "challenge": {"challenge": 1}, "disabled": {"disabled": 1}, "form": 1, "keytype": {"rsa": 1, "dsa": 1, "ec": 1}, "name": 1}, + "label": {"form": 1, "for": 1}, + "legend": {}, + "li": {"value": 1}, + "link": {"href": 1, "hreflang": 1, "rel": {"stylesheet": 1, "icon": 1}, "media": {"all": 1, "screen": 1, "print": 1}, "type": {"text/css": 1, "image/png": 1, "image/jpeg": 1, "image/gif": 1}, "sizes": 1}, + "main": {}, + "map": {"name": 1}, + "mark": {}, + "math": {}, + "menu": {"type": 1, "label": 1}, + "meta": {"http-equiv": {"content-type": 1}, "name": {"description": 1, "keywords": 1}, "content": {"text/html; charset=UTF-8": 1}, "charset": 1}, + "meter": {"value": 1, "min": 1, "max": 1, "low": 1, "high": 1, "optimum": 1}, + "nav": {}, + "noscript": {"href": 1}, + "object": {"param": 1, "data": 1, "type": 1, "height" : 1, "width": 1, "usemap": 1, "name": 1, "form": 1, "classid": 1}, + "ol": {"start": 1, "reversed": 1}, + "optgroup": {"disabled": 1, "label": 1}, + "option": {"disabled": 1, "selected": 1, "label": 1, "value": 1}, + "output": {"for": 1, "form": 1, "name": 1}, + "p": {}, + "param": {"name": 1, "value": 1}, + "pre": {}, + "progress": {"value": 1, "max": 1}, + "q": {"cite": 1}, + "rp": {}, + "rt": {}, + "ruby": {}, + "s": {}, + "samp": {}, + "script": {"charset": 1, "type": {"text/javascript": 1}, "src": 1, "defer": 1, "async": 1}, + "select": {"autofocus": 1, "disabled": 1, "form": 1, "multiple": {"multiple": 1}, "name": 1, "size": 1, "readonly":{"readonly": 1}}, + "small": {}, + "source": {"src": 1, "type": 1, "media": 1}, + "span": {}, + "strong": {}, + "style": {"type": 1, "media": {"all": 1, "screen": 1, "print": 1}, "scoped": 1}, + "sub": {}, + "sup": {}, + "svg": {}, + "table": {"summary": 1}, + "tbody": {}, + "td": {"headers": 1, "rowspan": 1, "colspan": 1}, + "textarea": {"autofocus": {"autofocus": 1}, "disabled": {"disabled": 1}, "form": 1, "maxlength": 1, "name": 1, "placeholder": 1, "readonly": {"readonly": 1}, "required": {"required": 1}, "rows": 1, "cols": 1, "wrap": {"on": 1, "off": 1, "hard": 1, "soft": 1}}, + "tfoot": {}, + "th": {"headers": 1, "rowspan": 1, "colspan": 1, "scope": 1}, + "thead": {}, + "time": {"datetime": 1}, + "title": {}, + "tr": {}, + "track": {"kind": 1, "src": 1, "srclang": 1, "label": 1, "default": 1}, + "section": {}, + "summary": {}, + "u": {}, + "ul": {}, + "var": {}, + "video": {"src": 1, "autobuffer": 1, "autoplay": {"autoplay": 1}, "loop": {"loop": 1}, "controls": {"controls": 1}, "width": 1, "height": 1, "poster": 1, "muted": {"muted": 1}, "preload": {"auto": 1, "metadata": 1, "none": 1}}, + "wbr": {} +}; + +var elements = Object.keys(attributeMap); + +function is(token, type) { + return token.type.lastIndexOf(type + ".xml") > -1; +} + +function findTagName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "tag-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +function findAttributeName(session, pos) { + var iterator = new TokenIterator(session, pos.row, pos.column); + var token = iterator.getCurrentToken(); + while (token && !is(token, "attribute-name")){ + token = iterator.stepBackward(); + } + if (token) + return token.value; +} + +var HtmlCompletions = function() { + +}; + +(function() { + + this.getCompletions = function(state, session, pos, prefix) { + var token = session.getTokenAt(pos.row, pos.column); + + if (!token) + return []; + if (is(token, "tag-name") || is(token, "tag-open") || is(token, "end-tag-open")) + return this.getTagCompletions(state, session, pos, prefix); + if (is(token, "tag-whitespace") || is(token, "attribute-name")) + return this.getAttributeCompletions(state, session, pos, prefix); + if (is(token, "attribute-value")) + return this.getAttributeValueCompletions(state, session, pos, prefix); + var line = session.getLine(pos.row).substr(0, pos.column); + if (/&[a-z]*$/i.test(line)) + return this.getHTMLEntityCompletions(state, session, pos, prefix); + + return []; + }; + + this.getTagCompletions = function(state, session, pos, prefix) { + return elements.map(function(element){ + return { + value: element, + meta: "tag", + score: 1000000 + }; + }); + }; + + this.getAttributeCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + if (!tagName) + return []; + var attributes = globalAttributes; + if (tagName in attributeMap) { + attributes = attributes.concat(Object.keys(attributeMap[tagName])); + } + return attributes.map(function(attribute){ + return { + caption: attribute, + snippet: attribute + '="$0"', + meta: "attribute", + score: 1000000 + }; + }); + }; + + this.getAttributeValueCompletions = function(state, session, pos, prefix) { + var tagName = findTagName(session, pos); + var attributeName = findAttributeName(session, pos); + + if (!tagName) + return []; + var values = []; + if (tagName in attributeMap && attributeName in attributeMap[tagName] && typeof attributeMap[tagName][attributeName] === "object") { + values = Object.keys(attributeMap[tagName][attributeName]); + } + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "attribute value", + score: 1000000 + }; + }); + }; + + this.getHTMLEntityCompletions = function(state, session, pos, prefix) { + var values = ['Aacute;', 'aacute;', 'Acirc;', 'acirc;', 'acute;', 'AElig;', 'aelig;', 'Agrave;', 'agrave;', 'alefsym;', 'Alpha;', 'alpha;', 'amp;', 'and;', 'ang;', 'Aring;', 'aring;', 'asymp;', 'Atilde;', 'atilde;', 'Auml;', 'auml;', 'bdquo;', 'Beta;', 'beta;', 'brvbar;', 'bull;', 'cap;', 'Ccedil;', 'ccedil;', 'cedil;', 'cent;', 'Chi;', 'chi;', 'circ;', 'clubs;', 'cong;', 'copy;', 'crarr;', 'cup;', 'curren;', 'Dagger;', 'dagger;', 'dArr;', 'darr;', 'deg;', 'Delta;', 'delta;', 'diams;', 'divide;', 'Eacute;', 'eacute;', 'Ecirc;', 'ecirc;', 'Egrave;', 'egrave;', 'empty;', 'emsp;', 'ensp;', 'Epsilon;', 'epsilon;', 'equiv;', 'Eta;', 'eta;', 'ETH;', 'eth;', 'Euml;', 'euml;', 'euro;', 'exist;', 'fnof;', 'forall;', 'frac12;', 'frac14;', 'frac34;', 'frasl;', 'Gamma;', 'gamma;', 'ge;', 'gt;', 'hArr;', 'harr;', 'hearts;', 'hellip;', 'Iacute;', 'iacute;', 'Icirc;', 'icirc;', 'iexcl;', 'Igrave;', 'igrave;', 'image;', 'infin;', 'int;', 'Iota;', 'iota;', 'iquest;', 'isin;', 'Iuml;', 'iuml;', 'Kappa;', 'kappa;', 'Lambda;', 'lambda;', 'lang;', 'laquo;', 'lArr;', 'larr;', 'lceil;', 'ldquo;', 'le;', 'lfloor;', 'lowast;', 'loz;', 'lrm;', 'lsaquo;', 'lsquo;', 'lt;', 'macr;', 'mdash;', 'micro;', 'middot;', 'minus;', 'Mu;', 'mu;', 'nabla;', 'nbsp;', 'ndash;', 'ne;', 'ni;', 'not;', 'notin;', 'nsub;', 'Ntilde;', 'ntilde;', 'Nu;', 'nu;', 'Oacute;', 'oacute;', 'Ocirc;', 'ocirc;', 'OElig;', 'oelig;', 'Ograve;', 'ograve;', 'oline;', 'Omega;', 'omega;', 'Omicron;', 'omicron;', 'oplus;', 'or;', 'ordf;', 'ordm;', 'Oslash;', 'oslash;', 'Otilde;', 'otilde;', 'otimes;', 'Ouml;', 'ouml;', 'para;', 'part;', 'permil;', 'perp;', 'Phi;', 'phi;', 'Pi;', 'pi;', 'piv;', 'plusmn;', 'pound;', 'Prime;', 'prime;', 'prod;', 'prop;', 'Psi;', 'psi;', 'quot;', 'radic;', 'rang;', 'raquo;', 'rArr;', 'rarr;', 'rceil;', 'rdquo;', 'real;', 'reg;', 'rfloor;', 'Rho;', 'rho;', 'rlm;', 'rsaquo;', 'rsquo;', 'sbquo;', 'Scaron;', 'scaron;', 'sdot;', 'sect;', 'shy;', 'Sigma;', 'sigma;', 'sigmaf;', 'sim;', 'spades;', 'sub;', 'sube;', 'sum;', 'sup;', 'sup1;', 'sup2;', 'sup3;', 'supe;', 'szlig;', 'Tau;', 'tau;', 'there4;', 'Theta;', 'theta;', 'thetasym;', 'thinsp;', 'THORN;', 'thorn;', 'tilde;', 'times;', 'trade;', 'Uacute;', 'uacute;', 'uArr;', 'uarr;', 'Ucirc;', 'ucirc;', 'Ugrave;', 'ugrave;', 'uml;', 'upsih;', 'Upsilon;', 'upsilon;', 'Uuml;', 'uuml;', 'weierp;', 'Xi;', 'xi;', 'Yacute;', 'yacute;', 'yen;', 'Yuml;', 'yuml;', 'Zeta;', 'zeta;', 'zwj;', 'zwnj;']; + + return values.map(function(value){ + return { + caption: value, + snippet: value, + meta: "html entity", + score: 1000000 + }; + }); + }; + +}).call(HtmlCompletions.prototype); + +exports.HtmlCompletions = HtmlCompletions; +}); + +define("ace/mode/html",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/mode/html_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html","ace/mode/html_completions","ace/worker/worker_client"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var lang = require("../lib/lang"); +var TextMode = require("./text").Mode; +var JavaScriptMode = require("./javascript").Mode; +var CssMode = require("./css").Mode; +var HtmlHighlightRules = require("./html_highlight_rules").HtmlHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; +var HtmlCompletions = require("./html_completions").HtmlCompletions; +var WorkerClient = require("../worker/worker_client").WorkerClient; +var voidElements = ["area", "base", "br", "col", "embed", "hr", "img", "input", "keygen", "link", "meta", "menuitem", "param", "source", "track", "wbr"]; +var optionalEndTags = ["li", "dt", "dd", "p", "rt", "rp", "optgroup", "option", "colgroup", "td", "th"]; + +var Mode = function(options) { + this.fragmentContext = options && options.fragmentContext; + this.HighlightRules = HtmlHighlightRules; + this.$behaviour = new XmlBehaviour(); + this.$completer = new HtmlCompletions(); + + this.createModeDelegates({ + "js-": JavaScriptMode, + "css-": CssMode + }); + + this.foldingRules = new HtmlFoldMode(this.voidElements, lang.arrayToMap(optionalEndTags)); +}; +oop.inherits(Mode, TextMode); + +(function() { + + this.blockComment = {start: ""}; + + this.voidElements = lang.arrayToMap(voidElements); + + this.getNextLineIndent = function(state, line, tab) { + return this.$getIndent(line); + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.getCompletions = function(state, session, pos, prefix) { + return this.$completer.getCompletions(state, session, pos, prefix); + }; + + this.createWorker = function(session) { + if (this.constructor != Mode) + return; + var worker = new WorkerClient(["ace"], "ace/mode/html_worker", "Worker"); + worker.attachToDocument(session.getDocument()); + + if (this.fragmentContext) + worker.call("setOptions", [{context: this.fragmentContext}]); + + worker.on("error", function(e) { + session.setAnnotations(e.data); + }); + + worker.on("terminate", function() { + session.clearAnnotations(); + }); + + return worker; + }; + + this.$id = "ace/mode/html"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); + +define("ace/mode/visualforce_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/html_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var HtmlHighlightRules = require("../mode/html_highlight_rules").HtmlHighlightRules; + +function string(options) { + return { + token: options.token + ".start", + regex: options.start, + push: [{ + token : "constant.language.escape", + regex : options.escape + }, { + token: options.token + ".end", + regex: options.start, + next: "pop" + }, { + defaultToken: options.token + }] + }; +} +var VisualforceHighlightRules = function() { + var keywordMapper = this.createKeywordMapper({ + "variable.language": + "$Action|$Api|$Component|$ComponentLabel|$CurrentPage|$FieldSet|$Label|$Label|" + + "$ObjectType|$Organization|$Page|$Permission|$Profile|$Resource|$SControl|" + + "$Setup|$Site|$System.OriginDateTime|$User|$UserRole|" + + "Site|UITheme|UIThemeDisplayed", + "keyword": + "", + "storage.type": + "", + "constant.language": + "true|false|null|TRUE|FALSE|NULL", + "support.function": + "DATE|DATEVALUE|DATETIMEVALUE|DAY|MONTH|NOW|TODAY|YEAR|BLANKVALUE|ISBLANK|" + + "NULLVALUE|PRIORVALUE|AND|CASE|IF|ISCHANGED|ISNEW|ISNUMBER|NOT|OR|ABS|" + + "CEILING|EXP|FLOOR|LN|LOG|MAX|MIN|MOD|ROUND|SQRT|BEGINS|BR|CASESAFEID|" + + "CONTAINS|FIND|GETSESSIONID|HTMLENCODE|ISPICKVAL|JSENCODE|JSINHTMLENCODE|" + + "LEFT|LEN|LOWER|LPAD|MID|RIGHT|RPAD|SUBSTITUTE|TEXT|TRIM|UPPER|URLENCODE|VALUE|" + + "GETRECORDIDS|INCLUDE|LINKTO|REGEX|REQUIRESCRIPT|URLFOR|VLOOKUP|HTMLENCODE|JSENCODE|" + + "JSINHTMLENCODE|URLENCODE" + }, "identifier"); + + HtmlHighlightRules.call(this); + var hbs = { + token : "keyword.start", + regex : "{!", + push : "Visualforce" + }; + for (var key in this.$rules) { + this.$rules[key].unshift(hbs); + } + this.$rules.Visualforce = [ + string({ + start: '"', + escape: /\\[btnfr"'\\]/, + token: "string", + multiline: true + }), + string({ + start: "'", + escape: /\\[btnfr"'\\]/, + token: "string", + multiline: true + }), + { + token: "comment.start", + regex : "\\/\\*", + push: [ + {token : "comment.end", regex : "\\*\\/|(?=})", next : "pop"}, + {defaultToken : "comment", caseInsensitive: true} + ] + }, { + token : "keyword.end", + regex : "}", + next : "pop" + }, { + token : keywordMapper, + regex : /[a-zA-Z$_\u00a1-\uffff][a-zA-Z\d$_\u00a1-\uffff]*\b/ + }, { + token : "keyword.operator", + regex : /==|<>|!=|<=|>=|&&|\|\||[+\-*/^()=<>&]/ + }, { + token : "punctuation.operator", + regex : /[?:,;.]/ + }, { + token : "paren.lparen", + regex : /[\[({]/ + }, { + token : "paren.rparen", + regex : /[\])}]/ + } + ]; + + this.normalizeRules(); +}; + +oop.inherits(VisualforceHighlightRules, HtmlHighlightRules); + +exports.VisualforceHighlightRules = VisualforceHighlightRules; +}); + +define("ace/mode/visualforce",["require","exports","module","ace/lib/oop","ace/mode/html","ace/mode/visualforce_highlight_rules","ace/mode/behaviour/xml","ace/mode/folding/html"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var HtmlMode = require("./html").Mode; +var VisualforceHighlightRules = require("./visualforce_highlight_rules").VisualforceHighlightRules; +var XmlBehaviour = require("./behaviour/xml").XmlBehaviour; +var HtmlFoldMode = require("./folding/html").FoldMode; + +function VisualforceMode() { + HtmlMode.call(this); + + this.HighlightRules = VisualforceHighlightRules; + this.foldingRules = new HtmlFoldMode(); + this.$behaviour = new XmlBehaviour(); +} + +oop.inherits(VisualforceMode, HtmlMode); + +VisualforceMode.prototype.emmetConfig = { + profile: "xhtml" +}; + +exports.Mode = VisualforceMode; + +}); (function() { + window.require(["ace/mode/visualforce"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-wollok.js b/htdocs/includes/ace/src/mode-wollok.js similarity index 94% rename from htdocs/includes/ace/mode-wollok.js rename to htdocs/includes/ace/src/mode-wollok.js index 22c64ac23f1..a4dba0f9ce4 100644 --- a/htdocs/includes/ace/mode-wollok.js +++ b/htdocs/includes/ace/src/mode-wollok.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/doc_comment_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -25,7 +25,7 @@ DocCommentHighlightRules.getTagRule = function(start) { token : "comment.doc.tag.storage.type", regex : "\\b(?:TODO|FIXME|XXX|HACK)\\b" }; -} +}; DocCommentHighlightRules.getStartRule = function(start) { return { @@ -48,7 +48,7 @@ exports.DocCommentHighlightRules = DocCommentHighlightRules; }); -ace.define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/javascript_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -181,7 +181,8 @@ var JavaScriptHighlightRules = function(options) { next : "property" }, { token : "storage.type", - regex : /=>/ + regex : /=>/, + next : "start" }, { token : "keyword.operator", regex : /--|\+\+|\.{3}|===|==|=|!=|!==|<+=?|>+=?|!|&&|\|\||\?:|[!$%&*+\-~\/^]=?/, @@ -521,7 +522,7 @@ function comments(next) { exports.JavaScriptHighlightRules = JavaScriptHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -561,7 +562,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -582,8 +583,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -701,7 +702,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { +define("ace/mode/javascript",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client","ace/mode/behaviour/cstyle","ace/mode/folding/cstyle"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -788,7 +789,7 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; }); -ace.define("ace/mode/wollok_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/wollok_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -797,19 +798,18 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; var WollokHighlightRules = function() { var keywords = ( - "test|package|inherits|false|import|else|or|class|and|not|native|override|program|this|try|val|var|catch|object|super|throw|if|null|return|true|new|method" + "test|describe|package|inherits|false|import|else|or|class|and|not|native|override|program|self|try|const|var|catch|object|super|throw|if|null|return|true|new|constructor|method|mixin" ); var buildinConstants = ("null|assert|console"); - var langClasses = ( "Object|Pair|String|Boolean|Number|Integer|Double|Collection|Set|List|Exception|Range" + "|StackTraceElement" ); var keywordMapper = this.createKeywordMapper({ - "variable.language": "this", + "variable.language": "self", "keyword": keywords, "constant.language": buildinConstants, "support.function": langClasses @@ -879,7 +879,7 @@ oop.inherits(WollokHighlightRules, TextHighlightRules); exports.WollokHighlightRules = WollokHighlightRules; }); -ace.define("ace/mode/wollok",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/wollok_highlight_rules"], function(require, exports, module) { +define("ace/mode/wollok",["require","exports","module","ace/lib/oop","ace/mode/javascript","ace/mode/wollok_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -902,4 +902,11 @@ oop.inherits(Mode, JavaScriptMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/wollok"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-xml.js b/htdocs/includes/ace/src/mode-xml.js similarity index 92% rename from htdocs/includes/ace/mode-xml.js rename to htdocs/includes/ace/src/mode-xml.js index f5f840a9b2c..ac4fbd711df 100644 --- a/htdocs/includes/ace/mode-xml.js +++ b/htdocs/includes/ace/src/mode-xml.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/xml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -179,7 +179,7 @@ var XmlHighlightRules = function(normalize) { stack.splice(0); return this.token; }} - ] + ]; this.embedRules(HighlightRules, prefix, [{ token: ["meta.tag.punctuation.end-tag-open.xml", "meta.tag." + tag + ".tag-name.xml"], @@ -201,7 +201,7 @@ oop.inherits(XmlHighlightRules, TextHighlightRules); exports.XmlHighlightRules = XmlHighlightRules; }); -ace.define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { +define("ace/mode/behaviour/xml",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/token_iterator","ace/lib/lang"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -210,7 +210,7 @@ var TokenIterator = require("../../token_iterator").TokenIterator; var lang = require("../../lib/lang"); function is(token, type) { - return token.type.lastIndexOf(type + ".xml") > -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -280,14 +280,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -368,7 +373,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/folding/xml",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/range","ace/mode/folding/fold_mode","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -423,7 +428,7 @@ function is(token, type) { if (/comment/.test(session.getState(row)) && / -1; + return token && token.type.lastIndexOf(type + ".xml") > -1; } var XmlBehaviour = function () { @@ -2163,14 +2163,19 @@ var XmlBehaviour = function () { if (is(token, "reference.attribute-value")) return; if (is(token, "attribute-value")) { - var firstChar = token.value.charAt(0); - if (firstChar == '"' || firstChar == "'") { - var lastChar = token.value.charAt(token.value.length - 1); - var tokenEnd = iterator.getCurrentTokenColumn() + token.value.length; - if (tokenEnd > position.column || tokenEnd == position.column && firstChar != lastChar) + var tokenEndColumn = iterator.getCurrentTokenColumn() + token.value.length; + if (position.column < tokenEndColumn) + return; + if (position.column == tokenEndColumn) { + var nextToken = iterator.stepForward(); + if (nextToken && is(nextToken, "attribute-value")) return; + iterator.stepBackward(); } } + + if (/^\s*>/.test(session.getLine(position.row).slice(position.column))) + return; while (!is(token, "tag-name")) { token = iterator.stepBackward(); if (token.value == "<") { @@ -2251,7 +2256,7 @@ oop.inherits(XmlBehaviour, Behaviour); exports.XmlBehaviour = XmlBehaviour; }); -ace.define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) { +define("ace/mode/behaviour/xquery",["require","exports","module","ace/lib/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle","ace/mode/behaviour/xml","ace/token_iterator"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2295,7 +2300,7 @@ function hasType(token, type) { } var previous = iterator.stepBackward(); if (!token || !hasType(token, 'meta.tag') || (previous !== null && previous.value.match('/'))) { - return + return; } var tag = token.value.substring(1); if (atCursor){ @@ -2305,17 +2310,17 @@ function hasType(token, type) { return { text: '>' + '', selection: [1, 1] - } + }; } }); - } + }; oop.inherits(XQueryBehaviour, Behaviour); exports.XQueryBehaviour = XQueryBehaviour; }); -ace.define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -2336,8 +2341,8 @@ oop.inherits(FoldMode, BaseFoldMode); (function() { - this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/; - this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/; + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; @@ -2455,7 +2460,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { +define("ace/mode/xquery",["require","exports","module","ace/worker/worker_client","ace/lib/oop","ace/mode/text","ace/mode/text_highlight_rules","ace/mode/xquery/xquery_lexer","ace/range","ace/mode/behaviour/xquery","ace/mode/folding/cstyle","ace/anchor"], function(require, exports, module) { "use strict"; var WorkerClient = require("../worker/worker_client").WorkerClient; @@ -2628,4 +2633,11 @@ oop.inherits(Mode, TextMode); }).call(Mode.prototype); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/xquery"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/mode-yaml.js b/htdocs/includes/ace/src/mode-yaml.js similarity index 73% rename from htdocs/includes/ace/mode-yaml.js rename to htdocs/includes/ace/src/mode-yaml.js index 8fbc403f126..b1c6f1da174 100644 --- a/htdocs/includes/ace/mode-yaml.js +++ b/htdocs/includes/ace/src/mode-yaml.js @@ -1,4 +1,4 @@ -ace.define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +define("ace/mode/yaml_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -24,10 +24,10 @@ var YamlHighlightRules = function() { regex: "[&\\*][a-zA-Z0-9-_]+" }, { token: ["meta.tag", "keyword"], - regex: /^(\s*\w.*?)(:(?:\s+|$))/ + regex: /^(\s*\w.*?)(:(?=\s|$))/ },{ token: ["meta.tag", "keyword"], - regex: /(\w+?)(\s*:(?:\s+|$))/ + regex: /(\w+?)(\s*:(?=\s|$))/ }, { token : "keyword.operator", regex : "<<\\w*:\\w*" @@ -39,20 +39,25 @@ var YamlHighlightRules = function() { regex : '["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]' }, { token : "string", // multi line string start - regex : /[|>][-+\d\s]*$/, + regex : /[|>][-+\d]*(?:$|\s+(?:$|#))/, onMatch: function(val, state, stack, line) { - var indent = /^\s*/.exec(line)[0]; - if (stack.length < 1) { - stack.push(this.next); + line = line.replace(/ #.*/, ""); + var indent = /^ *((:\s*)?-(\s*[^|>])?)?/.exec(line)[0] + .replace(/\S\s*$/, "").length; + var indentationIndicator = parseInt(/\d+[\s+-]*$/.exec(line)); + + if (indentationIndicator) { + indent += indentationIndicator - 1; + this.next = "mlString"; } else { - stack[0] = "mlString"; + this.next = "mlStringPre"; } - - if (stack.length < 2) { - stack.push(indent.length); - } - else { - stack[1] = indent.length; + if (!stack.length) { + stack.push(this.next); + stack.push(indent); + } else { + stack[0] = this.next; + stack[1] = indent; } return this.token; }, @@ -62,7 +67,7 @@ var YamlHighlightRules = function() { regex : "['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']" }, { token : "constant.numeric", // float - regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)/ + regex : /(\b|[+\-\.])[\d_]+(?:(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)(?=[^\d-\w]|$)/ }, { token : "constant.numeric", // other number regex : /[+\-]?\.inf\b|NaN\b|0x[\dA-Fa-f_]+|0b[10_]+/ @@ -75,15 +80,44 @@ var YamlHighlightRules = function() { }, { token : "paren.rparen", regex : "[\\])}]" + }, { + token : "text", + regex : /[^\s,:\[\]\{\}]+/ + } + ], + "mlStringPre" : [ + { + token : "indent", + regex : /^ *$/ + }, { + token : "indent", + regex : /^ */, + onMatch: function(val, state, stack) { + var curIndent = stack[1]; + + if (curIndent >= val.length) { + this.next = "start"; + stack.shift(); + stack.shift(); + } + else { + stack[1] = val.length - 1; + this.next = stack[0] = "mlString"; + } + return this.token; + }, + next : "mlString" + }, { + defaultToken : "string" } ], "mlString" : [ { token : "indent", - regex : /^\s*$/ + regex : /^ *$/ }, { token : "indent", - regex : /^\s*/, + regex : /^ */, onMatch: function(val, state, stack) { var curIndent = stack[1]; @@ -111,7 +145,7 @@ oop.inherits(YamlHighlightRules, TextHighlightRules); exports.YamlHighlightRules = YamlHighlightRules; }); -ace.define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { +define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -151,7 +185,7 @@ var MatchingBraceOutdent = function() {}; exports.MatchingBraceOutdent = MatchingBraceOutdent; }); -ace.define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { +define("ace/mode/folding/coffee",["require","exports","module","ace/lib/oop","ace/mode/folding/fold_mode","ace/range"], function(require, exports, module) { "use strict"; var oop = require("../../lib/oop"); @@ -238,7 +272,7 @@ oop.inherits(FoldMode, BaseFoldMode); }); -ace.define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], function(require, exports, module) { +define("ace/mode/yaml",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/yaml_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/folding/coffee"], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -257,7 +291,7 @@ oop.inherits(Mode, TextMode); (function() { - this.lineCommentStart = "#"; + this.lineCommentStart = ["#"]; this.getNextLineIndent = function(state, line, tab) { var indent = this.$getIndent(line); @@ -286,4 +320,11 @@ oop.inherits(Mode, TextMode); exports.Mode = Mode; -}); +}); (function() { + window.require(["ace/mode/yaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/mode-zeek.js b/htdocs/includes/ace/src/mode-zeek.js new file mode 100644 index 00000000000..6cd3f6504ac --- /dev/null +++ b/htdocs/includes/ace/src/mode-zeek.js @@ -0,0 +1,539 @@ +define("ace/mode/zeek_highlight_rules",["require","exports","module","ace/lib/oop","ace/mode/text_highlight_rules"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules; + +var ZeekHighlightRules = function() { + + this.$rules = { + "start": [ + { + token: "comment.line", + regex: "#.*$" + }, + { + token: "string.double", + regex: /"/, + next: "string-state" + }, + { + token: "string.regexp", + regex: "(/)(?=.*/)", + next: "pattern-state" + }, + { + token: ["keyword.other", "meta.preprocessor"], + regex: /(@(?:load-plugin|load-sigs|load|unload))(.*$)/ + }, + { + token: "keyword.other", + regex: /@(?:DEBUG|DIR|FILENAME|deprecated|if|ifdef|ifndef|else|endif)/ + }, + { + token: [ + "keyword.other", + "meta.preprocessor", + "keyword.operator", + "meta.preprocessor" + ], + regex: /(@prefixes)(\s*)(\+?=)(.*$)/ + }, + { + token: "storage.modifier.attribute", + regex: /\&\b(?:redef|priority|log|optional|default|add_func|delete_func|expire_func|read_expire|write_expire|create_expire|synchronized|persistent|rotate_interval|rotate_size|encrypt|raw_output|mergeable|error_handler|type_column|deprecated)\b/ + }, + { + token: "constant.language", + regex: /\b(?:T|F)\b/ + }, + { + token: "constant.numeric.port", + regex: /\b\d{1,5}\/(?:udp|tcp|icmp|unknown)\b/ + }, + { + token: "constant.numeric.addr", + regex: /\b(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\b/, + comment: "IPv4 address" + }, + { + token: "constant.numeric.addr", + regex: /\[(?:[0-9a-fA-F]{0,4}:){2,7}(?:[0-9a-fA-F]{0,4})?(?:(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2})\.(?:25[0-5]|2[0-4][0-9]|[0-1][0-9]{2}|[0-9]{1,2}))?\]/, + comment: "IPv6 address" + }, + { + token: "constant.numeric.float.decimal.interval", + regex: /(?:(?:\d*\.\d*(?:[eE][+-]?\d+)?|\d*[eE][+-]?\d+|\d*\.\d*)|\d+)\s*(?:day|hr|min|msec|usec|sec)s?/ + }, + { + token: "constant.numeric.float.decimal", + regex: /\d*\.\d*(?:[eE][+-]?\d+)?|\d*[eE][+-]?\d+|\d*\.\d*/ + }, + { + token: "constant.numeric.hostname", + regex: /\b[A-Za-z0-9][A-Za-z0-9\-]*(?:\.[A-Za-z0-9][A-Za-z0-9\-]*)+\b/ + }, + { + token: "constant.numeric.integer.hexadecimal", + regex: /\b0x[0-9a-fA-F]+\b/ + }, + { + token: "constant.numeric.integer.decimal", + regex: /\b\d+\b/ + }, + { + token: "keyword.operator", + regex: /==|!=|<=|<|>=|>/ + }, + { + token: "keyword.operator", + regex: /(&&)|(\|\|)|(!)/ + }, + { + token: "keyword.operator", + regex: /=|\+=|-=/ + }, + { + token: "keyword.operator", + regex: /\+\+|\+|--|-|\*|\/|%/ + }, + { + token: "keyword.operator", + regex: /&|\||\^|~/ + }, + { + token: "keyword.operator", + regex: /\b(?:in|as|is)\b/ + }, + { + token: "punctuation.terminator", + regex: /;/ + }, + { + token: "punctuation.accessor", + regex: /\??\$/ + }, + { + token: "punctuation.accessor", + regex: /::/ + }, + { + token: "keyword.operator", + regex: /\?/ + }, + { + token: "punctuation.separator", + regex: /:/ + }, + { + token: "punctuation.separator", + regex: /,/ + }, + { + token: [ + "keyword.other", + "meta.namespace", + "entity.name.namespace" + ], + regex: /(module)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)/ + }, + { + token: "keyword.other", + regex: /\bexport\b/ + }, + { + token: "keyword.control.conditional", + regex: /\b(?:if|else)\b/ + }, + { + token: "keyword.control", + regex: /\b(?:for|while)\b/ + }, + { + token: "keyword.control", + regex: /\b(?:return|break|next|continue|fallthrough)\b/ + }, + { + token: "keyword.control", + regex: /\b(?:switch|default|case)\b/ + }, + { + token: "keyword.other", + regex: /\b(?:add|delete)\b/ + }, + { + token: "keyword.other", + regex: /\bprint\b/ + }, + { + token: "keyword.control", + regex: /\b(?:when|timeout|schedule)\b/ + }, + { + token: [ + "keyword.other", + "meta.struct.record", + "entity.name.struct.record", + "meta.struct.record", + "punctuation.separator", + "meta.struct.record", + "storage.type.struct.record" + ], + regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(record)\b/ + }, + { + token: [ + "keyword.other", + "meta.enum", + "entity.name.enum", + "meta.enum", + "punctuation.separator", + "meta.enum", + "storage.type.enum" + ], + regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)(\s*\b)(enum)\b/ + }, + { + token: [ + "keyword.other", + "meta.type", + "entity.name.type", + "meta.type", + "punctuation.separator" + ], + regex: /\b(type)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(\s*)(:)/ + }, + { + token: [ + "keyword.other", + "meta.struct.record", + "storage.type.struct.record", + "meta.struct.record", + "entity.name.struct.record" + ], + regex: /\b(redef)(\s+)(record)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/ + }, + { + token: [ + "keyword.other", + "meta.enum", + "storage.type.enum", + "meta.enum", + "entity.name.enum" + ], + regex: /\b(redef)(\s+)(enum)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/ + }, + { + token: [ + "storage.type", + "text", + "entity.name.function.event" + ], + regex: /\b(event)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/ + }, + { + token: [ + "storage.type", + "text", + "entity.name.function.hook" + ], + regex: /\b(hook)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/ + }, + { + token: [ + "storage.type", + "text", + "entity.name.function" + ], + regex: /\b(function)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)(?=s*\()/ + }, + { + token: "keyword.other", + regex: /\bredef\b/ + }, + { + token: "storage.type", + regex: /\bany\b/ + }, + { + token: "storage.type", + regex: /\b(?:enum|record|set|table|vector)\b/ + }, + { + token: [ + "storage.type", + "text", + "keyword.operator", + "text", + "storage.type" + ], + regex: /\b(opaque)(\s+)(of)(\s+)([A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*)\b/ + }, + { + token: "keyword.operator", + regex: /\bof\b/ + }, + { + token: "storage.type", + regex: /\b(?:addr|bool|count|double|file|int|interval|pattern|port|string|subnet|time)\b/ + }, + { + token: "storage.type", + regex: /\b(?:function|hook|event)\b/ + }, + { + token: "storage.modifier", + regex: /\b(?:global|local|const|option)\b/ + }, + { + token: "entity.name.function.call", + regex: /\b[A-Za-z_][A-Za-z_0-9]*(?:::[A-Za-z_][A-Za-z_0-9]*)*(?=s*\()/ + }, + { + token: "punctuation.section.block.begin", + regex: /\{/ + }, + { + token: "punctuation.section.block.end", + regex: /\}/ + }, + { + token: "punctuation.section.brackets.begin", + regex: /\[/ + }, + { + token: "punctuation.section.brackets.end", + regex: /\]/ + }, + { + token: "punctuation.section.parens.begin", + regex: /\(/ + }, + { + token: "punctuation.section.parens.end", + regex: /\)/ + } + + ], // state: start + + "string-state": [ + { + token: "constant.character.escape", + regex: /\\./ + }, + { + token: "string.double", + regex: /"/, + next: "start" + }, + { + token: "constant.other.placeholder", + regex: /%-?[0-9]*(\.[0-9]+)?[DTdxsefg]/ + }, + { + token: "string.double", + regex: "." + } + ], // state: string-state + + "pattern-state": [ + { + token: "constant.character.escape", + regex: /\\./ + }, + { + token: "string.regexp", + regex: "/", + next: "start" + }, + { + token: "string.regexp", + regex: "." + } + ] // state: pattern-state + + }; + + this.normalizeRules(); +}; + +ZeekHighlightRules.metaData = { + fileTypes: ["bro", "zeek"], + name: "Zeek", + scopeName: "source.zeek" +}; + + +oop.inherits(ZeekHighlightRules, TextHighlightRules); + +exports.ZeekHighlightRules = ZeekHighlightRules; +}); + +define("ace/mode/folding/cstyle",["require","exports","module","ace/lib/oop","ace/range","ace/mode/folding/fold_mode"], function(require, exports, module) { +"use strict"; + +var oop = require("../../lib/oop"); +var Range = require("../../range").Range; +var BaseFoldMode = require("./fold_mode").FoldMode; + +var FoldMode = exports.FoldMode = function(commentRegex) { + if (commentRegex) { + this.foldingStartMarker = new RegExp( + this.foldingStartMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.start) + ); + this.foldingStopMarker = new RegExp( + this.foldingStopMarker.source.replace(/\|[^|]*?$/, "|" + commentRegex.end) + ); + } +}; +oop.inherits(FoldMode, BaseFoldMode); + +(function() { + + this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/; + this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/; + this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/; + this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/; + this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/; + this._getFoldWidgetBase = this.getFoldWidget; + this.getFoldWidget = function(session, foldStyle, row) { + var line = session.getLine(row); + + if (this.singleLineBlockCommentRe.test(line)) { + if (!this.startRegionRe.test(line) && !this.tripleStarBlockCommentRe.test(line)) + return ""; + } + + var fw = this._getFoldWidgetBase(session, foldStyle, row); + + if (!fw && this.startRegionRe.test(line)) + return "start"; // lineCommentRegionStart + + return fw; + }; + + this.getFoldWidgetRange = function(session, foldStyle, row, forceMultiline) { + var line = session.getLine(row); + + if (this.startRegionRe.test(line)) + return this.getCommentRegionBlock(session, line, row); + + var match = line.match(this.foldingStartMarker); + if (match) { + var i = match.index; + + if (match[1]) + return this.openingBracketBlock(session, match[1], row, i); + + var range = session.getCommentFoldRange(row, i + match[0].length, 1); + + if (range && !range.isMultiLine()) { + if (forceMultiline) { + range = this.getSectionRange(session, row); + } else if (foldStyle != "all") + range = null; + } + + return range; + } + + if (foldStyle === "markbegin") + return; + + var match = line.match(this.foldingStopMarker); + if (match) { + var i = match.index + match[0].length; + + if (match[1]) + return this.closingBracketBlock(session, match[1], row, i); + + return session.getCommentFoldRange(row, i, -1); + } + }; + + this.getSectionRange = function(session, row) { + var line = session.getLine(row); + var startIndent = line.search(/\S/); + var startRow = row; + var startColumn = line.length; + row = row + 1; + var endRow = row; + var maxRow = session.getLength(); + while (++row < maxRow) { + line = session.getLine(row); + var indent = line.search(/\S/); + if (indent === -1) + continue; + if (startIndent > indent) + break; + var subRange = this.getFoldWidgetRange(session, "all", row); + + if (subRange) { + if (subRange.start.row <= startRow) { + break; + } else if (subRange.isMultiLine()) { + row = subRange.end.row; + } else if (startIndent == indent) { + break; + } + } + endRow = row; + } + + return new Range(startRow, startColumn, endRow, session.getLine(endRow).length); + }; + this.getCommentRegionBlock = function(session, line, row) { + var startColumn = line.search(/\s*$/); + var maxRow = session.getLength(); + var startRow = row; + + var re = /^\s*(?:\/\*|\/\/|--)#?(end)?region\b/; + var depth = 1; + while (++row < maxRow) { + line = session.getLine(row); + var m = re.exec(line); + if (!m) continue; + if (m[1]) depth--; + else depth++; + + if (!depth) break; + } + + var endRow = row; + if (endRow > startRow) { + return new Range(startRow, startColumn, endRow, line.length); + } + }; + +}).call(FoldMode.prototype); + +}); + +define("ace/mode/zeek",["require","exports","module","ace/lib/oop","ace/mode/text","ace/mode/zeek_highlight_rules","ace/mode/folding/cstyle"], function(require, exports, module) { +"use strict"; + +var oop = require("../lib/oop"); +var TextMode = require("./text").Mode; +var ZeekHighlightRules = require("./zeek_highlight_rules").ZeekHighlightRules; +var FoldMode = require("./folding/cstyle").FoldMode; + +var Mode = function() { + this.HighlightRules = ZeekHighlightRules; + this.foldingRules = new FoldMode(); +}; +oop.inherits(Mode, TextMode); + +(function() { + this.lineCommentStart = "#"; + this.$id = "ace/mode/zeek"; +}).call(Mode.prototype); + +exports.Mode = Mode; +}); (function() { + window.require(["ace/mode/zeek"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/abap.js b/htdocs/includes/ace/src/snippets/abap.js new file mode 100644 index 00000000000..39342f476a4 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/abap.js @@ -0,0 +1,14 @@ +define("ace/snippets/abap",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "abap"; + +}); (function() { + window.require(["ace/snippets/abap"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/abc.js b/htdocs/includes/ace/src/snippets/abc.js similarity index 70% rename from htdocs/includes/ace/snippets/abc.js rename to htdocs/includes/ace/src/snippets/abc.js index 17030761574..f46e77a7a8b 100644 --- a/htdocs/includes/ace/snippets/abc.js +++ b/htdocs/includes/ace/src/snippets/abc.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/abc",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/abc",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "\n\ @@ -35,4 +35,11 @@ snippet zupfnoter.annotation\n\ "; exports.scope = "abc"; -}); +}); (function() { + window.require(["ace/snippets/abc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/actionscript.js b/htdocs/includes/ace/src/snippets/actionscript.js similarity index 87% rename from htdocs/includes/ace/snippets/actionscript.js rename to htdocs/includes/ace/src/snippets/actionscript.js index bc899d16128..1a298186007 100644 --- a/htdocs/includes/ace/snippets/actionscript.js +++ b/htdocs/includes/ace/src/snippets/actionscript.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/actionscript",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/actionscript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet main\n\ @@ -161,4 +161,11 @@ snippet FlxSprite\n\ "; exports.scope = "actionscript"; -}); +}); (function() { + window.require(["ace/snippets/actionscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/ada.js b/htdocs/includes/ace/src/snippets/ada.js new file mode 100644 index 00000000000..94be2e5962e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/ada.js @@ -0,0 +1,14 @@ +define("ace/snippets/ada",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ada"; + +}); (function() { + window.require(["ace/snippets/ada"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/apache_conf.js b/htdocs/includes/ace/src/snippets/apache_conf.js new file mode 100644 index 00000000000..c4e29459270 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/apache_conf.js @@ -0,0 +1,14 @@ +define("ace/snippets/apache_conf",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "apache_conf"; + +}); (function() { + window.require(["ace/snippets/apache_conf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/apex.js b/htdocs/includes/ace/src/snippets/apex.js new file mode 100644 index 00000000000..0c1f767377d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/apex.js @@ -0,0 +1,14 @@ +define("ace/snippets/apex",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "apex"; + +}); (function() { + window.require(["ace/snippets/apex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/applescript.js b/htdocs/includes/ace/src/snippets/applescript.js new file mode 100644 index 00000000000..2412c72c9af --- /dev/null +++ b/htdocs/includes/ace/src/snippets/applescript.js @@ -0,0 +1,14 @@ +define("ace/snippets/applescript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "applescript"; + +}); (function() { + window.require(["ace/snippets/applescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/aql.js b/htdocs/includes/ace/src/snippets/aql.js new file mode 100644 index 00000000000..f9ef46d179d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/aql.js @@ -0,0 +1,14 @@ +define("ace/snippets/aql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "aql"; + +}); (function() { + window.require(["ace/snippets/aql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/asciidoc.js b/htdocs/includes/ace/src/snippets/asciidoc.js new file mode 100644 index 00000000000..7c68e42e3f0 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/asciidoc.js @@ -0,0 +1,14 @@ +define("ace/snippets/asciidoc",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "asciidoc"; + +}); (function() { + window.require(["ace/snippets/asciidoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/asl.js b/htdocs/includes/ace/src/snippets/asl.js new file mode 100644 index 00000000000..e077ac0e4ab --- /dev/null +++ b/htdocs/includes/ace/src/snippets/asl.js @@ -0,0 +1,13 @@ +define("ace/snippets/asl",["require","exports","module"], function (require, exports, module) { + "use strict"; + + exports.snippetText =undefined; + exports.scope = "asl"; +}); (function() { + window.require(["ace/snippets/asl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/assembly_x86.js b/htdocs/includes/ace/src/snippets/assembly_x86.js new file mode 100644 index 00000000000..7b16369e1be --- /dev/null +++ b/htdocs/includes/ace/src/snippets/assembly_x86.js @@ -0,0 +1,14 @@ +define("ace/snippets/assembly_x86",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "assembly_x86"; + +}); (function() { + window.require(["ace/snippets/assembly_x86"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/autohotkey.js b/htdocs/includes/ace/src/snippets/autohotkey.js new file mode 100644 index 00000000000..601d201ce16 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/autohotkey.js @@ -0,0 +1,14 @@ +define("ace/snippets/autohotkey",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "autohotkey"; + +}); (function() { + window.require(["ace/snippets/autohotkey"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/batchfile.js b/htdocs/includes/ace/src/snippets/batchfile.js new file mode 100644 index 00000000000..dfae8ab00bc --- /dev/null +++ b/htdocs/includes/ace/src/snippets/batchfile.js @@ -0,0 +1,14 @@ +define("ace/snippets/batchfile",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "batchfile"; + +}); (function() { + window.require(["ace/snippets/batchfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/bro.js b/htdocs/includes/ace/src/snippets/bro.js new file mode 100644 index 00000000000..9412c6003e3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/bro.js @@ -0,0 +1,14 @@ +define("ace/snippets/bro",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/bro"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/c9search.js b/htdocs/includes/ace/src/snippets/c9search.js new file mode 100644 index 00000000000..b5c7058137b --- /dev/null +++ b/htdocs/includes/ace/src/snippets/c9search.js @@ -0,0 +1,14 @@ +define("ace/snippets/c9search",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "c9search"; + +}); (function() { + window.require(["ace/snippets/c9search"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/c_cpp.js b/htdocs/includes/ace/src/snippets/c_cpp.js similarity index 86% rename from htdocs/includes/ace/snippets/c_cpp.js rename to htdocs/includes/ace/src/snippets/c_cpp.js index a232b56f94f..7a0ac3b6f95 100644 --- a/htdocs/includes/ace/snippets/c_cpp.js +++ b/htdocs/includes/ace/src/snippets/c_cpp.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/c_cpp",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/c_cpp",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "## STL Collections\n\ @@ -135,4 +135,11 @@ snippet lld\n\ "; exports.scope = "c_cpp"; -}); +}); (function() { + window.require(["ace/snippets/c_cpp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/cirru.js b/htdocs/includes/ace/src/snippets/cirru.js new file mode 100644 index 00000000000..882b0c9741f --- /dev/null +++ b/htdocs/includes/ace/src/snippets/cirru.js @@ -0,0 +1,14 @@ +define("ace/snippets/cirru",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "cirru"; + +}); (function() { + window.require(["ace/snippets/cirru"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/clojure.js b/htdocs/includes/ace/src/snippets/clojure.js similarity index 83% rename from htdocs/includes/ace/snippets/clojure.js rename to htdocs/includes/ace/src/snippets/clojure.js index 49f23cac473..8392fad95dc 100644 --- a/htdocs/includes/ace/snippets/clojure.js +++ b/htdocs/includes/ace/src/snippets/clojure.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/clojure",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/clojure",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet comm\n\ @@ -94,4 +94,11 @@ snippet when-let\n\ "; exports.scope = "clojure"; -}); +}); (function() { + window.require(["ace/snippets/clojure"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/cobol.js b/htdocs/includes/ace/src/snippets/cobol.js new file mode 100644 index 00000000000..303dea71778 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/cobol.js @@ -0,0 +1,14 @@ +define("ace/snippets/cobol",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "cobol"; + +}); (function() { + window.require(["ace/snippets/cobol"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/coffee.js b/htdocs/includes/ace/src/snippets/coffee.js similarity index 84% rename from htdocs/includes/ace/snippets/coffee.js rename to htdocs/includes/ace/src/snippets/coffee.js index eb1a76d7fd3..be831570ad4 100644 --- a/htdocs/includes/ace/snippets/coffee.js +++ b/htdocs/includes/ace/src/snippets/coffee.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/coffee",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Closure loop\n\ @@ -99,4 +99,11 @@ snippet exp\n\ "; exports.scope = "coffee"; -}); +}); (function() { + window.require(["ace/snippets/coffee"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/coldfusion.js b/htdocs/includes/ace/src/snippets/coldfusion.js new file mode 100644 index 00000000000..db72fad9320 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/coldfusion.js @@ -0,0 +1,14 @@ +define("ace/snippets/coldfusion",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "coldfusion"; + +}); (function() { + window.require(["ace/snippets/coldfusion"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/crystal.js b/htdocs/includes/ace/src/snippets/crystal.js new file mode 100644 index 00000000000..ef64a9fdce1 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/crystal.js @@ -0,0 +1,14 @@ +define("ace/snippets/crystal",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "crystal"; + +}); (function() { + window.require(["ace/snippets/crystal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/csharp.js b/htdocs/includes/ace/src/snippets/csharp.js new file mode 100644 index 00000000000..f36041cbcd7 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/csharp.js @@ -0,0 +1,14 @@ +define("ace/snippets/csharp",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "csharp"; + +}); (function() { + window.require(["ace/snippets/csharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/csound_document.js b/htdocs/includes/ace/src/snippets/csound_document.js new file mode 100644 index 00000000000..30e1fe61ed4 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/csound_document.js @@ -0,0 +1,24 @@ +define("ace/snippets/csound_document",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# \n\ +snippet synth\n\ + \n\ + \n\ + ${1}\n\ + \n\ + \n\ + e\n\ + \n\ + \n\ +"; +exports.scope = "csound_document"; + +}); (function() { + window.require(["ace/snippets/csound_document"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/csound_orchestra.js b/htdocs/includes/ace/src/snippets/csound_orchestra.js new file mode 100644 index 00000000000..43a19f7303e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/csound_orchestra.js @@ -0,0 +1,61 @@ +define("ace/snippets/csound_orchestra",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# else\n\ +snippet else\n\ + else\n\ + ${1:/* statements */}\n\ +# elseif\n\ +snippet elseif\n\ + elseif ${1:/* condition */} then\n\ + ${2:/* statements */}\n\ +# if\n\ +snippet if\n\ + if ${1:/* condition */} then\n\ + ${2:/* statements */}\n\ + endif\n\ +# instrument block\n\ +snippet instr\n\ + instr ${1:name}\n\ + ${2:/* statements */}\n\ + endin\n\ +# i-time while loop\n\ +snippet iwhile\n\ + i${1:Index} = ${2:0}\n\ + while i${1:Index} < ${3:/* count */} do\n\ + ${4:/* statements */}\n\ + i${1:Index} += 1\n\ + od\n\ +# k-rate while loop\n\ +snippet kwhile\n\ + k${1:Index} = ${2:0}\n\ + while k${1:Index} < ${3:/* count */} do\n\ + ${4:/* statements */}\n\ + k${1:Index} += 1\n\ + od\n\ +# opcode\n\ +snippet opcode\n\ + opcode ${1:name}, ${2:/* output types */ 0}, ${3:/* input types */ 0}\n\ + ${4:/* statements */}\n\ + endop\n\ +# until loop\n\ +snippet until\n\ + until ${1:/* condition */} do\n\ + ${2:/* statements */}\n\ + od\n\ +# while loop\n\ +snippet while\n\ + while ${1:/* condition */} do\n\ + ${2:/* statements */}\n\ + od\n\ +"; +exports.scope = "csound_orchestra"; + +}); (function() { + window.require(["ace/snippets/csound_orchestra"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/csound_score.js b/htdocs/includes/ace/src/snippets/csound_score.js new file mode 100644 index 00000000000..82ee2c17d35 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/csound_score.js @@ -0,0 +1,14 @@ +define("ace/snippets/csound_score",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "csound_score"; + +}); (function() { + window.require(["ace/snippets/csound_score"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/csp.js b/htdocs/includes/ace/src/snippets/csp.js new file mode 100644 index 00000000000..8225367a49b --- /dev/null +++ b/htdocs/includes/ace/src/snippets/csp.js @@ -0,0 +1,14 @@ +define("ace/snippets/csp",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/csp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/css.js b/htdocs/includes/ace/src/snippets/css.js similarity index 98% rename from htdocs/includes/ace/snippets/css.js rename to htdocs/includes/ace/src/snippets/css.js index db5a8c0ac28..4842e89e789 100644 --- a/htdocs/includes/ace/snippets/css.js +++ b/htdocs/includes/ace/src/snippets/css.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/css",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/css",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet .\n\ @@ -971,4 +971,11 @@ snippet zoo\n\ "; exports.scope = "css"; -}); +}); (function() { + window.require(["ace/snippets/css"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/curly.js b/htdocs/includes/ace/src/snippets/curly.js new file mode 100644 index 00000000000..1d7b8f7b290 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/curly.js @@ -0,0 +1,14 @@ +define("ace/snippets/curly",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "curly"; + +}); (function() { + window.require(["ace/snippets/curly"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/d.js b/htdocs/includes/ace/src/snippets/d.js new file mode 100644 index 00000000000..117da84d0eb --- /dev/null +++ b/htdocs/includes/ace/src/snippets/d.js @@ -0,0 +1,14 @@ +define("ace/snippets/d",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "d"; + +}); (function() { + window.require(["ace/snippets/d"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/dart.js b/htdocs/includes/ace/src/snippets/dart.js similarity index 76% rename from htdocs/includes/ace/snippets/dart.js rename to htdocs/includes/ace/src/snippets/dart.js index e96cc5d26e2..f4612f327b9 100644 --- a/htdocs/includes/ace/snippets/dart.js +++ b/htdocs/includes/ace/src/snippets/dart.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/dart",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/dart",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet lib\n\ @@ -87,4 +87,11 @@ snippet tryf\n\ "; exports.scope = "dart"; -}); +}); (function() { + window.require(["ace/snippets/dart"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/diff.js b/htdocs/includes/ace/src/snippets/diff.js similarity index 54% rename from htdocs/includes/ace/snippets/diff.js rename to htdocs/includes/ace/src/snippets/diff.js index 8fe075ecf9b..478e6fe24ac 100644 --- a/htdocs/includes/ace/snippets/diff.js +++ b/htdocs/includes/ace/src/snippets/diff.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/diff",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/diff",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# DEP-3 (http://dep.debian.net/deps/dep3/) style patch header\n\ @@ -15,4 +15,11 @@ snippet header DEP-3 style header\n\ "; exports.scope = "diff"; -}); +}); (function() { + window.require(["ace/snippets/diff"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/django.js b/htdocs/includes/ace/src/snippets/django.js similarity index 90% rename from htdocs/includes/ace/snippets/django.js rename to htdocs/includes/ace/src/snippets/django.js index c1dacbed824..f9c45b39ca9 100644 --- a/htdocs/includes/ace/snippets/django.js +++ b/htdocs/includes/ace/src/snippets/django.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/django",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/django",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Model Fields\n\ @@ -112,4 +112,11 @@ snippet r2r\n\ "; exports.scope = "django"; -}); +}); (function() { + window.require(["ace/snippets/django"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/dockerfile.js b/htdocs/includes/ace/src/snippets/dockerfile.js new file mode 100644 index 00000000000..6ebfb397359 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/dockerfile.js @@ -0,0 +1,14 @@ +define("ace/snippets/dockerfile",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "dockerfile"; + +}); (function() { + window.require(["ace/snippets/dockerfile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/dot.js b/htdocs/includes/ace/src/snippets/dot.js new file mode 100644 index 00000000000..0af0a491752 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/dot.js @@ -0,0 +1,14 @@ +define("ace/snippets/dot",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "dot"; + +}); (function() { + window.require(["ace/snippets/dot"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/drools.js b/htdocs/includes/ace/src/snippets/drools.js new file mode 100644 index 00000000000..11996e41e0d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/drools.js @@ -0,0 +1,33 @@ +define("ace/snippets/drools",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "\n\ +snippet rule\n\ + rule \"${1?:rule_name}\"\n\ + when\n\ + ${2:// when...} \n\ + then\n\ + ${3:// then...}\n\ + end\n\ +\n\ +snippet query\n\ + query ${1?:query_name}\n\ + ${2:// find} \n\ + end\n\ + \n\ +snippet declare\n\ + declare ${1?:type_name}\n\ + ${2:// attributes} \n\ + end\n\ +\n\ +"; +exports.scope = "drools"; + +}); (function() { + window.require(["ace/snippets/drools"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/edifact.js b/htdocs/includes/ace/src/snippets/edifact.js new file mode 100644 index 00000000000..c5b8e4cfece --- /dev/null +++ b/htdocs/includes/ace/src/snippets/edifact.js @@ -0,0 +1,254 @@ +define("ace/snippets/edifact",["require","exports","module"], function(require, exports, module) { + "use strict"; + + exports.snippetText = "## Access Modifiers\n\ +snippet u\n\ + UN\n\ +snippet un\n\ + UNB\n\ +snippet pr\n\ + private\n\ +##\n\ +## Annotations\n\ +snippet before\n\ + @Before\n\ + static void ${1:intercept}(${2:args}) { ${3} }\n\ +snippet mm\n\ + @ManyToMany\n\ + ${1}\n\ +snippet mo\n\ + @ManyToOne\n\ + ${1}\n\ +snippet om\n\ + @OneToMany${1:(cascade=CascadeType.ALL)}\n\ + ${2}\n\ +snippet oo\n\ + @OneToOne\n\ + ${1}\n\ +##\n\ +## Basic Java packages and import\n\ +snippet im\n\ + import\n\ +snippet j.b\n\ + java.beans.\n\ +snippet j.i\n\ + java.io.\n\ +snippet j.m\n\ + java.math.\n\ +snippet j.n\n\ + java.net.\n\ +snippet j.u\n\ + java.util.\n\ +##\n\ +## Class\n\ +snippet cl\n\ + class ${1:`Filename(\"\", \"untitled\")`} ${2}\n\ +snippet in\n\ + interface ${1:`Filename(\"\", \"untitled\")`} ${2:extends Parent}${3}\n\ +snippet tc\n\ + public class ${1:`Filename()`} extends ${2:TestCase}\n\ +##\n\ +## Class Enhancements\n\ +snippet ext\n\ + extends \n\ +snippet imp\n\ + implements\n\ +##\n\ +## Comments\n\ +snippet /*\n\ + /*\n\ + * ${1}\n\ + */\n\ +##\n\ +## Constants\n\ +snippet co\n\ + static public final ${1:String} ${2:var} = ${3};${4}\n\ +snippet cos\n\ + static public final String ${1:var} = \"${2}\";${3}\n\ +##\n\ +## Control Statements\n\ +snippet case\n\ + case ${1}:\n\ + ${2}\n\ +snippet def\n\ + default:\n\ + ${2}\n\ +snippet el\n\ + else\n\ +snippet elif\n\ + else if (${1}) ${2}\n\ +snippet if\n\ + if (${1}) ${2}\n\ +snippet sw\n\ + switch (${1}) {\n\ + ${2}\n\ + }\n\ +##\n\ +## Create a Method\n\ +snippet m\n\ + ${1:void} ${2:method}(${3}) ${4:throws }${5}\n\ +##\n\ +## Create a Variable\n\ +snippet v\n\ + ${1:String} ${2:var}${3: = null}${4};${5}\n\ +##\n\ +## Enhancements to Methods, variables, classes, etc.\n\ +snippet ab\n\ + abstract\n\ +snippet fi\n\ + final\n\ +snippet st\n\ + static\n\ +snippet sy\n\ + synchronized\n\ +##\n\ +## Error Methods\n\ +snippet err\n\ + System.err.print(\"${1:Message}\");\n\ +snippet errf\n\ + System.err.printf(\"${1:Message}\", ${2:exception});\n\ +snippet errln\n\ + System.err.println(\"${1:Message}\");\n\ +##\n\ +## Exception Handling\n\ +snippet as\n\ + assert ${1:test} : \"${2:Failure message}\";${3}\n\ +snippet ca\n\ + catch(${1:Exception} ${2:e}) ${3}\n\ +snippet thr\n\ + throw\n\ +snippet ths\n\ + throws\n\ +snippet try\n\ + try {\n\ + ${3}\n\ + } catch(${1:Exception} ${2:e}) {\n\ + }\n\ +snippet tryf\n\ + try {\n\ + ${3}\n\ + } catch(${1:Exception} ${2:e}) {\n\ + } finally {\n\ + }\n\ +##\n\ +## Find Methods\n\ +snippet findall\n\ + List<${1:listName}> ${2:items} = ${1}.findAll();${3}\n\ +snippet findbyid\n\ + ${1:var} ${2:item} = ${1}.findById(${3});${4}\n\ +##\n\ +## Javadocs\n\ +snippet /**\n\ + /**\n\ + * ${1}\n\ + */\n\ +snippet @au\n\ + @author `system(\"grep \\`id -un\\` /etc/passwd | cut -d \\\":\\\" -f5 | cut -d \\\",\\\" -f1\")`\n\ +snippet @br\n\ + @brief ${1:Description}\n\ +snippet @fi\n\ + @file ${1:`Filename()`}.java\n\ +snippet @pa\n\ + @param ${1:param}\n\ +snippet @re\n\ + @return ${1:param}\n\ +##\n\ +## Logger Methods\n\ +snippet debug\n\ + Logger.debug(${1:param});${2}\n\ +snippet error\n\ + Logger.error(${1:param});${2}\n\ +snippet info\n\ + Logger.info(${1:param});${2}\n\ +snippet warn\n\ + Logger.warn(${1:param});${2}\n\ +##\n\ +## Loops\n\ +snippet enfor\n\ + for (${1} : ${2}) ${3}\n\ +snippet for\n\ + for (${1}; ${2}; ${3}) ${4}\n\ +snippet wh\n\ + while (${1}) ${2}\n\ +##\n\ +## Main method\n\ +snippet main\n\ + public static void main (String[] args) {\n\ + ${1:/* code */}\n\ + }\n\ +##\n\ +## Print Methods\n\ +snippet print\n\ + System.out.print(\"${1:Message}\");\n\ +snippet printf\n\ + System.out.printf(\"${1:Message}\", ${2:args});\n\ +snippet println\n\ + System.out.println(${1});\n\ +##\n\ +## Render Methods\n\ +snippet ren\n\ + render(${1:param});${2}\n\ +snippet rena\n\ + renderArgs.put(\"${1}\", ${2});${3}\n\ +snippet renb\n\ + renderBinary(${1:param});${2}\n\ +snippet renj\n\ + renderJSON(${1:param});${2}\n\ +snippet renx\n\ + renderXml(${1:param});${2}\n\ +##\n\ +## Setter and Getter Methods\n\ +snippet set\n\ + ${1:public} void set${3:}(${2:String} ${4:}){\n\ + this.$4 = $4;\n\ + }\n\ +snippet get\n\ + ${1:public} ${2:String} get${3:}(){\n\ + return this.${4:};\n\ + }\n\ +##\n\ +## Terminate Methods or Loops\n\ +snippet re\n\ + return\n\ +snippet br\n\ + break;\n\ +##\n\ +## Test Methods\n\ +snippet t\n\ + public void test${1:Name}() throws Exception {\n\ + ${2}\n\ + }\n\ +snippet test\n\ + @Test\n\ + public void test${1:Name}() throws Exception {\n\ + ${2}\n\ + }\n\ +##\n\ +## Utils\n\ +snippet Sc\n\ + Scanner\n\ +##\n\ +## Miscellaneous\n\ +snippet action\n\ + public static void ${1:index}(${2:args}) { ${3} }\n\ +snippet rnf\n\ + notFound(${1:param});${2}\n\ +snippet rnfin\n\ + notFoundIfNull(${1:param});${2}\n\ +snippet rr\n\ + redirect(${1:param});${2}\n\ +snippet ru\n\ + unauthorized(${1:param});${2}\n\ +snippet unless\n\ + (unless=${1:param});${2}\n\ +"; + exports.scope = "edifact"; + +}); (function() { + window.require(["ace/snippets/edifact"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/eiffel.js b/htdocs/includes/ace/src/snippets/eiffel.js new file mode 100644 index 00000000000..bc6a66a93b3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/eiffel.js @@ -0,0 +1,14 @@ +define("ace/snippets/eiffel",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "eiffel"; + +}); (function() { + window.require(["ace/snippets/eiffel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/ejs.js b/htdocs/includes/ace/src/snippets/ejs.js new file mode 100644 index 00000000000..83368d91ee0 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/ejs.js @@ -0,0 +1,14 @@ +define("ace/snippets/ejs",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ejs"; + +}); (function() { + window.require(["ace/snippets/ejs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/elixir.js b/htdocs/includes/ace/src/snippets/elixir.js new file mode 100644 index 00000000000..8ddaf1c4495 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/elixir.js @@ -0,0 +1,14 @@ +define("ace/snippets/elixir",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/elixir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/elm.js b/htdocs/includes/ace/src/snippets/elm.js new file mode 100644 index 00000000000..71d7a7e15b0 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/elm.js @@ -0,0 +1,14 @@ +define("ace/snippets/elm",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "elm"; + +}); (function() { + window.require(["ace/snippets/elm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/erlang.js b/htdocs/includes/ace/src/snippets/erlang.js similarity index 89% rename from htdocs/includes/ace/snippets/erlang.js rename to htdocs/includes/ace/src/snippets/erlang.js index d04ee117e34..6bcc1793d0f 100644 --- a/htdocs/includes/ace/snippets/erlang.js +++ b/htdocs/includes/ace/src/snippets/erlang.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/erlang",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# module and export all\n\ @@ -164,4 +164,11 @@ snippet gen_server\n\ "; exports.scope = "erlang"; -}); +}); (function() { + window.require(["ace/snippets/erlang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/forth.js b/htdocs/includes/ace/src/snippets/forth.js new file mode 100644 index 00000000000..0861c05f3e9 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/forth.js @@ -0,0 +1,14 @@ +define("ace/snippets/forth",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "forth"; + +}); (function() { + window.require(["ace/snippets/forth"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/fortran.js b/htdocs/includes/ace/src/snippets/fortran.js new file mode 100644 index 00000000000..69bffe8f2aa --- /dev/null +++ b/htdocs/includes/ace/src/snippets/fortran.js @@ -0,0 +1,14 @@ +define("ace/snippets/fortran",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "fortran"; + +}); (function() { + window.require(["ace/snippets/fortran"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/fsharp.js b/htdocs/includes/ace/src/snippets/fsharp.js new file mode 100644 index 00000000000..bbc8eb65b5e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/fsharp.js @@ -0,0 +1,14 @@ +define("ace/snippets/fsharp",["require","exports","module"], function(require, exports, module) { + "use strict"; + + exports.snippetText =undefined; + exports.scope = "fsharp"; + +}); (function() { + window.require(["ace/snippets/fsharp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/fsl.js b/htdocs/includes/ace/src/snippets/fsl.js new file mode 100644 index 00000000000..f55a69b43c4 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/fsl.js @@ -0,0 +1,14 @@ +define("ace/snippets/fsl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/fsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/ftl.js b/htdocs/includes/ace/src/snippets/ftl.js new file mode 100644 index 00000000000..7b7cb67948e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/ftl.js @@ -0,0 +1,14 @@ +define("ace/snippets/ftl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ftl"; + +}); (function() { + window.require(["ace/snippets/ftl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/gcode.js b/htdocs/includes/ace/src/snippets/gcode.js new file mode 100644 index 00000000000..b44f1656ce3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/gcode.js @@ -0,0 +1,14 @@ +define("ace/snippets/gcode",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "gcode"; + +}); (function() { + window.require(["ace/snippets/gcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/gherkin.js b/htdocs/includes/ace/src/snippets/gherkin.js new file mode 100644 index 00000000000..8986e377a7d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/gherkin.js @@ -0,0 +1,14 @@ +define("ace/snippets/gherkin",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "gherkin"; + +}); (function() { + window.require(["ace/snippets/gherkin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/gitignore.js b/htdocs/includes/ace/src/snippets/gitignore.js new file mode 100644 index 00000000000..aea0fb0df9a --- /dev/null +++ b/htdocs/includes/ace/src/snippets/gitignore.js @@ -0,0 +1,14 @@ +define("ace/snippets/gitignore",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "gitignore"; + +}); (function() { + window.require(["ace/snippets/gitignore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/glsl.js b/htdocs/includes/ace/src/snippets/glsl.js new file mode 100644 index 00000000000..f638fbc6eac --- /dev/null +++ b/htdocs/includes/ace/src/snippets/glsl.js @@ -0,0 +1,14 @@ +define("ace/snippets/glsl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "glsl"; + +}); (function() { + window.require(["ace/snippets/glsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/gobstones.js b/htdocs/includes/ace/src/snippets/gobstones.js new file mode 100644 index 00000000000..77b02daab22 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/gobstones.js @@ -0,0 +1,1718 @@ +define("ace/snippets/gobstones",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# scope: gobstones\n\ +\n\ +# program\n\ +snippet program\n\ + program {\n\ + ${1:// cuerpo...}\n\ + }\n\ +\n\ +# interactive program\n\ +snippet interactive program\n\ + interactive program {\n\ + ${1:INIT} -> { ${2:// cuerpo...} }\n\ + ${3:TIMEOUT(${4:5000}) -> { ${5:// cuerpo...} }\n\ + ${6:K_ENTER} -> { ${7:// cuerpo...} }\n\ + _ -> {}\n\ + }\n\ +\n\ +# procedure\n\ +snippet procedure\n\ + procedure ${1:Nombre}(${2:parametros}) {\n\ + ${3:// cuerpo...}\n\ + }\n\ +\n\ +# function\n\ +snippet function\n\ + function ${1:nombre}(${2:parametros}) {\n\ + return (${3:expresión..})\n\ + }\n\ +\n\ +# return\n\ +snippet return\n\ + return (${1:expresión...})\n\ +\n\ +# type\n\ +snippet type\n\ + type ${1:Nombre}\n\ +\n\ +# is variant\n\ +snippet is variant\n\ + is variant {\n\ + case ${1:NombreDelValor1} {}\n\ + case ${2:NombreDelValor2} {}\n\ + case ${3:NombreDelValor3} {}\n\ + case ${4:NombreDelValor4} {}\n\ + }\n\ +\n\ +# is record\n\ +snippet is record\n\ + is record {\n\ + field ${1:campo1} // ${2:Tipo}\n\ + field ${3:campo2} // ${4:Tipo}\n\ + field ${5:campo3} // ${6:Tipo}\n\ + field ${7:campo4} // ${8:Tipo}\n\ + }\n\ +\n\ +# type _ is variant\n\ +snippet type _ is variant\n\ + type ${1:Nombre} is variant {\n\ + case ${2:NombreDelValor1} {}\n\ + case ${3:NombreDelValor2} {}\n\ + case ${4:NombreDelValor3} {}\n\ + case ${5:NombreDelValor4} {}\n\ + }\n\ +\n\ +# type _ is record\n\ +snippet type _ is record\n\ + type ${1:Nombre} is record {\n\ + field ${2:campo1} // ${3:Tipo}\n\ + field ${4:campo2} // ${5:Tipo}\n\ + field ${6:campo3} // ${7:Tipo}\n\ + field ${8:campo4} // ${9:Tipo}\n\ + }\n\ +\n\ +# repeat\n\ +snippet repeat\n\ + repeat ${1:cantidad} {\n\ + ${2:// cuerpo...}\n\ + }\n\ +\n\ +# foreach\n\ +snippet foreach\n\ + foreach ${1:índice} in ${2:lista} {\n\ + ${3:// cuerpo...}\n\ + }\n\ +\n\ +# while\n\ +snippet while\n\ + while (${1?:condición}) {\n\ + ${2:// cuerpo...}\n\ + }\n\ +\n\ +# if\n\ +snippet if\n\ + if (${1?:condición}) {\n\ + ${2:// cuerpo...}\n\ + }\n\ +\n\ +# elseif\n\ +snippet elseif\n\ + elseif (${1?:condición}) {\n\ + ${2:// cuerpo...}\n\ + }\n\ +\n\ +# else\n\ +snippet else\n\ + else {\n\ + ${1:// cuerpo...}\n\ + }\n\ +\n\ +# if (con else)\n\ +snippet if (con else)\n\ + if (${1:condición}) {\n\ + ${2:// cuerpo...}\n\ + } else {\n\ + ${3:// cuerpo....}\n\ + }\n\ +\n\ +# if (con elseif)\n\ +snippet if (con elseif)\n\ + if (${1:condición}) {\n\ + ${2:// cuerpo...}\n\ + } elseif (${3:condición}) {\n\ + ${4:// cuerpo...}\n\ + }\n\ +\n\ +# if (con elseif y else)\n\ +snippet if (con elseif y else)\n\ + if (${1:condición}) {\n\ + ${2:// cuerpo...}\n\ + } elseif (${3:condición}) {\n\ + ${4:// cuerpo...}\n\ + } else {\n\ + ${5:// cuerpo....}\n\ + }\n\ +\n\ +# if (con 3 elseif)\n\ +snippet if (con 3 elseif)\n\ + if (${1:condición}) {\n\ + ${2:// cuerpo...}\n\ + } elseif (${3:condición}) {\n\ + ${4:// cuerpo...}\n\ + } elseif (${5:condición}) {\n\ + ${6:// cuerpo...}\n\ + } elseif (${7:condición}) {\n\ + ${8:// cuerpo...}\n\ + }\n\ +\n\ +# choose (2 valores)\n\ +snippet choose (2 valores)\n\ + choose\n\ + ${1:Valor1} when (${2:condición})\n\ + ${3:Valor2} otherwise\n\ +\n\ +# choose (2 valores y boom)\n\ +snippet choose (2 valores y boom)\n\ + choose\n\ + ${1:Valor1} when (${2:condición})\n\ + ${3:Valor2} when (${4:condición})\n\ + ${5:Valor3} when (${6:condición})\n\ + ${7:Valor4} when (${8:condición})\n\ + boom(\"${9:No es un valor válido}\") otherwise\n\ +\n\ +# matching (4 valores)\n\ +snippet matching (4 valores)\n\ + matching (${1:variable}) select\n\ + ${2:Valor1} on ${3:opción1}\n\ + ${4:Valor2} on ${5:opción2}\n\ + ${6:Valor3} on ${7:opción3}\n\ + ${8:Valor4} on ${9:opción4}\n\ + boom(\"${10:No es un valor válido}\") otherwise\n\ +\n\ +# select (4 casos)\n\ +snippet select (4 casos)\n\ + select\n\ + ${1:Valor1} on (${2:opción1})\n\ + ${3:Valor2} on (${4:opción2})\n\ + ${5:Valor3} on (${6:opción3})\n\ + ${7:Valor4} on (${8:opción4})\n\ + boom(\"${9:No es un valor válido}\") otherwise\n\ +\n\ +# switch\n\ +snippet switch\n\ + switch (${1:variable}) {\n\ + ${2:Valor1} -> {${3:// cuerpo...}}\n\ + ${4:Valor2} -> {${5:// cuerpo...}}\n\ + ${6:Valor3} -> {${7:// cuerpo...}}\n\ + ${8:Valor4} -> {${9:// cuerpo...}}\n\ + _ -> {${10:// cuerpo...}}\n\ + }\n\ +\n\ +# Poner\n\ +snippet Poner\n\ + Poner(${1:color})\n\ +\n\ +# Sacar\n\ +snippet Sacar\n\ + Sacar(${1:color})\n\ +\n\ +# Mover\n\ +snippet Mover\n\ + Mover(${1:dirección})\n\ +\n\ +# IrAlBorde\n\ +snippet IrAlBorde\n\ + IrAlBorde(${1:dirección})\n\ +\n\ +# VaciarTablero\n\ +snippet VaciarTablero\n\ + VaciarTablero()\n\ +\n\ +# BOOM\n\ +snippet BOOM\n\ + BOOM(\"${1:Mensaje de error}\")\n\ +\n\ +# hayBolitas\n\ +snippet hayBolitas\n\ + hayBolitas(${1:color})\n\ +\n\ +# nroBolitas\n\ +snippet nroBolitas\n\ + nroBolitas(${1:color})\n\ +\n\ +# puedeMover\n\ +snippet puedeMover\n\ + puedeMover(${1:dirección})\n\ +\n\ +# siguiente\n\ +snippet siguiente\n\ + siguiente(${1:color|dirección})\n\ +\n\ +# previo\n\ +snippet previo\n\ + previo(${1:color|dirección})\n\ +\n\ +# opuesto\n\ +snippet opuesto\n\ + opuesto(${1:dirección})\n\ +\n\ +# minDir\n\ +snippet minDir\n\ + minDir()\n\ +\n\ +# maxDir\n\ +snippet maxDir\n\ + maxDir()\n\ +\n\ +# minColor\n\ +snippet minColor\n\ + minDir()\n\ +\n\ +# maxColor\n\ +snippet maxColor\n\ + maxDir()\n\ +\n\ +# minBool\n\ +snippet minBool\n\ + minBool()\n\ +\n\ +# maxBool\n\ +snippet maxBool\n\ + maxBool()\n\ +\n\ +# primero\n\ +snippet primero\n\ + primero(${1:lista})\n\ +\n\ +# sinElPrimero\n\ +snippet sinElPrimero\n\ + sinElPrimero(${1:lista})\n\ +\n\ +# esVacía\n\ +snippet esVacía\n\ + esVacía(${1:lista})\n\ +\n\ +# boom\n\ +snippet boom\n\ + boom(\"${1:Mensaje de error}\")\n\ +\n\ +# Azul\n\ +snippet Azul\n\ + Azul\n\ +\n\ +# Negro\n\ +snippet Negro\n\ + Negro\n\ +\n\ +# Rojo\n\ +snippet Rojo\n\ + Rojo\n\ +\n\ +# Verde\n\ +snippet Verde\n\ + Verde\n\ +\n\ +# Norte\n\ +snippet Norte\n\ + Norte\n\ +\n\ +# Este\n\ +snippet Este\n\ + Este\n\ +\n\ +# Sur\n\ +snippet Sur\n\ + Sur\n\ +\n\ +# Oeste\n\ +snippet Oeste\n\ + Oeste\n\ +\n\ +# True\n\ +snippet True\n\ + True\n\ +\n\ +# False\n\ +snippet False\n\ + False\n\ +\n\ +# INIT\n\ +snippet INIT\n\ + INIT -> {$1:// cuerpo...}\n\ +\n\ +# TIMEOUT\n\ +snippet TIMEOUT\n\ + TIMEOUT(${1:5000}) -> {$2:// cuerpo...}\n\ +\n\ +# K_A\n\ +snippet K_A\n\ + K_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_A\n\ +snippet K_CTRL_A\n\ + K_CTRL_A -> { ${1://cuerpo...} }\n\ +# K_ALT_A\n\ +snippet K_ALT_A\n\ + K_ALT_A -> { ${1://cuerpo...} }\n\ +# K_SHIFT_A\n\ +snippet K_SHIFT_A\n\ + K_SHIFT_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_A\n\ +snippet K_CTRL_ALT_A\n\ + K_CTRL_ALT_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_A\n\ +snippet K_CTRL_SHIFT_A\n\ + K_CTRL_SHIFT_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_A\n\ +snippet K_CTRL_ALT_SHIFT_A\n\ + K_CTRL_ALT_SHIFT_A -> { ${1://cuerpo...} }\n\ +\n\ +# K_B\n\ +snippet K_B\n\ + K_B -> { ${1://cuerpo...} }\n\ +# K_CTRL_B\n\ +snippet K_CTRL_B\n\ + K_CTRL_B -> { ${1://cuerpo...} }\n\ +# K_ALT_B\n\ +snippet K_ALT_B\n\ + K_ALT_B -> { ${1://cuerpo...} }\n\ +# K_SHIFT_B\n\ +snippet K_SHIFT_B\n\ + K_SHIFT_B -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_B\n\ +snippet K_CTRL_ALT_B\n\ + K_CTRL_ALT_B -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_B\n\ +snippet K_CTRL_SHIFT_B\n\ + K_CTRL_SHIFT_B -> { ${1://cuerpo...} }\n\ +# K_ALT_SHIFT_C\n\ +snippet K_ALT_SHIFT_C\n\ + K_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\ +# K_CTRL_BLT_SHIFT_B\n\ +snippet K_CTRL_BLT_SHIFT_B\n\ + K_CTRL_ALT_SHIFT_B -> { ${1://cuerpo...} }\n\ +\n\ +# K_C\n\ +snippet K_C\n\ + K_C -> { ${1://cuerpo...} }\n\ +# K_CTRL_C\n\ +snippet K_CTRL_C\n\ + K_CTRL_C -> { ${1://cuerpo...} }\n\ +# K_ALT_C\n\ +snippet K_ALT_C\n\ + K_ALT_C -> { ${1://cuerpo...} }\n\ +# K_SHIFT_C\n\ +snippet K_SHIFT_C\n\ + K_SHIFT_C -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_C\n\ +snippet K_CTRL_ALT_C\n\ + K_CTRL_ALT_C -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_C\n\ +snippet K_CTRL_SHIFT_C\n\ + K_CTRL_SHIFT_C -> { ${1://cuerpo...} }\n\ +# K_ALT_SHIFT_C\n\ +snippet K_ALT_SHIFT_C\n\ + K_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_C\n\ +snippet K_CTRL_ALT_SHIFT_C\n\ + K_CTRL_ALT_SHIFT_C -> { ${1://cuerpo...} }\n\ +\n\ +# K_D\n\ +snippet K_D\n\ + K_D -> { ${1://cuerpo...} }\n\ +# K_CTRL_D\n\ +snippet K_CTRL_D\n\ + K_CTRL_D -> { ${1://cuerpo...} }\n\ +# K_ALT_D\n\ +snippet K_ALT_D\n\ + K_DLT_D -> { ${1://cuerpo...} }\n\ +# K_SHIFT_D\n\ +snippet K_SHIFT_D\n\ + K_SHIFT_D -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_D\n\ +snippet K_CTRL_ALT_D\n\ + K_CTRL_DLT_D -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_D\n\ +snippet K_CTRL_SHIFT_D\n\ + K_CTRL_SHIFT_D -> { ${1://cuerpo...} }\n\ +# K_ALT_SHIFT_D\n\ +snippet K_ALT_SHIFT_D\n\ + K_ALT_SHIFT_D -> { ${1://cuerpo...} }\n\ +# K_CTRL_DLT_SHIFT_D\n\ +snippet K_CTRL_DLT_SHIFT_D\n\ + K_CTRL_ALT_SHIFT_D -> { ${1://cuerpo...} }\n\ +\n\ +# K_E\n\ +snippet K_E\n\ + K_E -> { ${1://cuerpo...} }\n\ +# K_CTRL_E\n\ +snippet K_CTRL_E\n\ + K_CTRL_E -> { ${1://cuerpo...} }\n\ +# K_ALT_E\n\ +snippet K_ALT_E\n\ + K_ALT_E -> { ${1://cuerpo...} }\n\ +# K_SHIFT_E\n\ +snippet K_SHIFT_E\n\ + K_SHIFT_E -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_E\n\ +snippet K_CTRL_ALT_E\n\ + K_CTRL_ALT_E -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_E\n\ +snippet K_CTRL_SHIFT_E\n\ + K_CTRL_SHIFT_E -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_E\n\ +snippet K_CTRL_ALT_SHIFT_E\n\ + K_CTRL_ALT_SHIFT_E -> { ${1://cuerpo...} }\n\ +\n\ +# K_F\n\ +snippet K_F\n\ + K_F -> { ${1://cuerpo...} }\n\ +# K_CTRL_F\n\ +snippet K_CTRL_F\n\ + K_CTRL_F -> { ${1://cuerpo...} }\n\ +# K_ALT_F\n\ +snippet K_ALT_F\n\ + K_ALT_F -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F\n\ +snippet K_SHIFT_F\n\ + K_SHIFT_F -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F\n\ +snippet K_CTRL_ALT_F\n\ + K_CTRL_ALT_F -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F\n\ +snippet K_CTRL_SHIFT_F\n\ + K_CTRL_SHIFT_F -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F\n\ +snippet K_CTRL_ALT_SHIFT_F\n\ + K_CTRL_ALT_SHIFT_F -> { ${1://cuerpo...} }\n\ +\n\ +# K_G\n\ +snippet K_G\n\ + K_G -> { ${1://cuerpo...} }\n\ +# K_CTRL_G\n\ +snippet K_CTRL_G\n\ + K_CTRL_G -> { ${1://cuerpo...} }\n\ +# K_ALT_G\n\ +snippet K_ALT_G\n\ + K_ALT_G -> { ${1://cuerpo...} }\n\ +# K_SHIFT_G\n\ +snippet K_SHIFT_G\n\ + K_SHIFT_G -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_G\n\ +snippet K_CTRL_ALT_G\n\ + K_CTRL_ALT_G -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_G\n\ +snippet K_CTRL_SHIFT_G\n\ + K_CTRL_SHIFT_G -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_G\n\ +snippet K_CTRL_ALT_SHIFT_G\n\ + K_CTRL_ALT_SHIFT_G -> { ${1://cuerpo...} }\n\ +\n\ +# K_H\n\ +snippet K_H\n\ + K_H -> { ${1://cuerpo...} }\n\ +# K_CTRL_H\n\ +snippet K_CTRL_H\n\ + K_CTRL_H -> { ${1://cuerpo...} }\n\ +# K_ALT_H\n\ +snippet K_ALT_H\n\ + K_ALT_H -> { ${1://cuerpo...} }\n\ +# K_SHIFT_H\n\ +snippet K_SHIFT_H\n\ + K_SHIFT_H -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_H\n\ +snippet K_CTRL_ALT_H\n\ + K_CTRL_ALT_H -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_H\n\ +snippet K_CTRL_SHIFT_H\n\ + K_CTRL_SHIFT_H -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_H\n\ +snippet K_CTRL_ALT_SHIFT_H\n\ + K_CTRL_ALT_SHIFT_H -> { ${1://cuerpo...} }\n\ +\n\ +# K_I\n\ +snippet K_I\n\ + K_I -> { ${1://cuerpo...} }\n\ +# K_CTRL_I\n\ +snippet K_CTRL_I\n\ + K_CTRL_I -> { ${1://cuerpo...} }\n\ +# K_ALT_I\n\ +snippet K_ALT_I\n\ + K_ALT_I -> { ${1://cuerpo...} }\n\ +# K_SHIFT_I\n\ +snippet K_SHIFT_I\n\ + K_SHIFT_I -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_I\n\ +snippet K_CTRL_ALT_I\n\ + K_CTRL_ALT_I -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_I\n\ +snippet K_CTRL_SHIFT_I\n\ + K_CTRL_SHIFT_I -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_I\n\ +snippet K_CTRL_ALT_SHIFT_I\n\ + K_CTRL_ALT_SHIFT_I -> { ${1://cuerpo...} }\n\ +\n\ +# K_J\n\ +snippet K_J\n\ + K_J -> { ${1://cuerpo...} }\n\ +# K_CTRL_J\n\ +snippet K_CTRL_J\n\ + K_CTRL_J -> { ${1://cuerpo...} }\n\ +# K_ALT_J\n\ +snippet K_ALT_J\n\ + K_ALT_J -> { ${1://cuerpo...} }\n\ +# K_SHIFT_J\n\ +snippet K_SHIFT_J\n\ + K_SHIFT_J -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_J\n\ +snippet K_CTRL_ALT_J\n\ + K_CTRL_ALT_J -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_J\n\ +snippet K_CTRL_SHIFT_J\n\ + K_CTRL_SHIFT_J -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_J\n\ +snippet K_CTRL_ALT_SHIFT_J\n\ + K_CTRL_ALT_SHIFT_J -> { ${1://cuerpo...} }\n\ +\n\ +# K_K\n\ +snippet K_K\n\ + K_K -> { ${1://cuerpo...} }\n\ +# K_CTRL_K\n\ +snippet K_CTRL_K\n\ + K_CTRL_K -> { ${1://cuerpo...} }\n\ +# K_ALT_K\n\ +snippet K_ALT_K\n\ + K_ALT_K -> { ${1://cuerpo...} }\n\ +# K_SHIFT_K\n\ +snippet K_SHIFT_K\n\ + K_SHIFT_K -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_K\n\ +snippet K_CTRL_ALT_K\n\ + K_CTRL_ALT_K -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_K\n\ +snippet K_CTRL_SHIFT_K\n\ + K_CTRL_SHIFT_K -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_K\n\ +snippet K_CTRL_ALT_SHIFT_K\n\ + K_CTRL_ALT_SHIFT_K -> { ${1://cuerpo...} }\n\ +\n\ +# K_L\n\ +snippet K_L\n\ + K_L -> { ${1://cuerpo...} }\n\ +# K_CTRL_L\n\ +snippet K_CTRL_L\n\ + K_CTRL_L -> { ${1://cuerpo...} }\n\ +# K_ALT_L\n\ +snippet K_ALT_L\n\ + K_ALT_L -> { ${1://cuerpo...} }\n\ +# K_SHIFT_L\n\ +snippet K_SHIFT_L\n\ + K_SHIFT_L -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_L\n\ +snippet K_CTRL_ALT_L\n\ + K_CTRL_ALT_L -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_L\n\ +snippet K_CTRL_SHIFT_L\n\ + K_CTRL_SHIFT_L -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_L\n\ +snippet K_CTRL_ALT_SHIFT_L\n\ + K_CTRL_ALT_SHIFT_L -> { ${1://cuerpo...} }\n\ +\n\ +# K_M\n\ +snippet K_M\n\ + K_M -> { ${1://cuerpo...} }\n\ +# K_CTRL_M\n\ +snippet K_CTRL_M\n\ + K_CTRL_M -> { ${1://cuerpo...} }\n\ +# K_ALT_M\n\ +snippet K_ALT_M\n\ + K_ALT_M -> { ${1://cuerpo...} }\n\ +# K_SHIFT_M\n\ +snippet K_SHIFT_M\n\ + K_SHIFT_M -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_M\n\ +snippet K_CTRL_ALT_M\n\ + K_CTRL_ALT_M -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_M\n\ +snippet K_CTRL_SHIFT_M\n\ + K_CTRL_SHIFT_M -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_M\n\ +snippet K_CTRL_ALT_SHIFT_M\n\ + K_CTRL_ALT_SHIFT_M -> { ${1://cuerpo...} }\n\ +\n\ +# K_N\n\ +snippet K_N\n\ + K_N -> { ${1://cuerpo...} }\n\ +# K_CTRL_N\n\ +snippet K_CTRL_N\n\ + K_CTRL_N -> { ${1://cuerpo...} }\n\ +# K_ALT_N\n\ +snippet K_ALT_N\n\ + K_ALT_N -> { ${1://cuerpo...} }\n\ +# K_SHIFT_N\n\ +snippet K_SHIFT_N\n\ + K_SHIFT_N -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_N\n\ +snippet K_CTRL_ALT_N\n\ + K_CTRL_ALT_N -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_N\n\ +snippet K_CTRL_SHIFT_N\n\ + K_CTRL_SHIFT_N -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_N\n\ +snippet K_CTRL_ALT_SHIFT_N\n\ + K_CTRL_ALT_SHIFT_N -> { ${1://cuerpo...} }\n\ +\n\ +# K_Ñ\n\ +snippet K_Ñ\n\ + K_Ñ -> { ${1://cuerpo...} }\n\ +# K_CTRL_Ñ\n\ +snippet K_CTRL_Ñ\n\ + K_CTRL_Ñ -> { ${1://cuerpo...} }\n\ +# K_ALT_Ñ\n\ +snippet K_ALT_Ñ\n\ + K_ALT_Ñ -> { ${1://cuerpo...} }\n\ +# K_SHIFT_Ñ\n\ +snippet K_SHIFT_Ñ\n\ + K_SHIFT_Ñ -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_Ñ\n\ +snippet K_CTRL_ALT_Ñ\n\ + K_CTRL_ALT_Ñ -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_Ñ\n\ +snippet K_CTRL_SHIFT_Ñ\n\ + K_CTRL_SHIFT_Ñ -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_Ñ\n\ +snippet K_CTRL_ALT_SHIFT_Ñ\n\ + K_CTRL_ALT_SHIFT_Ñ -> { ${1://cuerpo...} }\n\ +\n\ +# K_O\n\ +snippet K_O\n\ + K_O -> { ${1://cuerpo...} }\n\ +# K_CTRL_O\n\ +snippet K_CTRL_O\n\ + K_CTRL_O -> { ${1://cuerpo...} }\n\ +# K_ALT_O\n\ +snippet K_ALT_O\n\ + K_ALT_O -> { ${1://cuerpo...} }\n\ +# K_SHIFT_O\n\ +snippet K_SHIFT_O\n\ + K_SHIFT_O -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_O\n\ +snippet K_CTRL_ALT_O\n\ + K_CTRL_ALT_O -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_O\n\ +snippet K_CTRL_SHIFT_O\n\ + K_CTRL_SHIFT_O -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_O\n\ +snippet K_CTRL_ALT_SHIFT_O\n\ + K_CTRL_ALT_SHIFT_O -> { ${1://cuerpo...} }\n\ +\n\ +# K_P\n\ +snippet K_P\n\ + K_P -> { ${1://cuerpo...} }\n\ +# K_CTRL_P\n\ +snippet K_CTRL_P\n\ + K_CTRL_P -> { ${1://cuerpo...} }\n\ +# K_ALT_P\n\ +snippet K_ALT_P\n\ + K_ALT_P -> { ${1://cuerpo...} }\n\ +# K_SHIFT_P\n\ +snippet K_SHIFT_P\n\ + K_SHIFT_P -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_P\n\ +snippet K_CTRL_ALT_P\n\ + K_CTRL_ALT_P -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_P\n\ +snippet K_CTRL_SHIFT_P\n\ + K_CTRL_SHIFT_P -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_P\n\ +snippet K_CTRL_ALT_SHIFT_P\n\ + K_CTRL_ALT_SHIFT_P -> { ${1://cuerpo...} }\n\ +\n\ +# K_Q\n\ +snippet K_Q\n\ + K_Q -> { ${1://cuerpo...} }\n\ +# K_CTRL_Q\n\ +snippet K_CTRL_Q\n\ + K_CTRL_Q -> { ${1://cuerpo...} }\n\ +# K_ALT_Q\n\ +snippet K_ALT_Q\n\ + K_ALT_Q -> { ${1://cuerpo...} }\n\ +# K_SHIFT_Q\n\ +snippet K_SHIFT_Q\n\ + K_SHIFT_Q -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_Q\n\ +snippet K_CTRL_ALT_Q\n\ + K_CTRL_ALT_Q -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_Q\n\ +snippet K_CTRL_SHIFT_Q\n\ + K_CTRL_SHIFT_Q -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_Q\n\ +snippet K_CTRL_ALT_SHIFT_Q\n\ + K_CTRL_ALT_SHIFT_Q -> { ${1://cuerpo...} }\n\ +\n\ +# K_R\n\ +snippet K_R\n\ + K_R -> { ${1://cuerpo...} }\n\ +# K_CTRL_R\n\ +snippet K_CTRL_R\n\ + K_CTRL_R -> { ${1://cuerpo...} }\n\ +# K_ALT_R\n\ +snippet K_ALT_R\n\ + K_ALT_R -> { ${1://cuerpo...} }\n\ +# K_SHIFT_R\n\ +snippet K_SHIFT_R\n\ + K_SHIFT_R -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_R\n\ +snippet K_CTRL_ALT_R\n\ + K_CTRL_ALT_R -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_R\n\ +snippet K_CTRL_SHIFT_R\n\ + K_CTRL_SHIFT_R -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_R\n\ +snippet K_CTRL_ALT_SHIFT_R\n\ + K_CTRL_ALT_SHIFT_R -> { ${1://cuerpo...} }\n\ +\n\ +# K_S\n\ +snippet K_S\n\ + K_S -> { ${1://cuerpo...} }\n\ +# K_CTRL_S\n\ +snippet K_CTRL_S\n\ + K_CTRL_S -> { ${1://cuerpo...} }\n\ +# K_ALT_S\n\ +snippet K_ALT_S\n\ + K_ALT_S -> { ${1://cuerpo...} }\n\ +# K_SHIFT_S\n\ +snippet K_SHIFT_S\n\ + K_SHIFT_S -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_S\n\ +snippet K_CTRL_ALT_S\n\ + K_CTRL_ALT_S -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_S\n\ +snippet K_CTRL_SHIFT_S\n\ + K_CTRL_SHIFT_S -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_S\n\ +snippet K_CTRL_ALT_SHIFT_S\n\ + K_CTRL_ALT_SHIFT_S -> { ${1://cuerpo...} }\n\ +\n\ +# K_T\n\ +snippet K_T\n\ + K_T -> { ${1://cuerpo...} }\n\ +# K_CTRL_T\n\ +snippet K_CTRL_T\n\ + K_CTRL_T -> { ${1://cuerpo...} }\n\ +# K_ALT_T\n\ +snippet K_ALT_T\n\ + K_ALT_T -> { ${1://cuerpo...} }\n\ +# K_SHIFT_T\n\ +snippet K_SHIFT_T\n\ + K_SHIFT_T -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_T\n\ +snippet K_CTRL_ALT_T\n\ + K_CTRL_ALT_T -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_T\n\ +snippet K_CTRL_SHIFT_T\n\ + K_CTRL_SHIFT_T -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_T\n\ +snippet K_CTRL_ALT_SHIFT_T\n\ + K_CTRL_ALT_SHIFT_T -> { ${1://cuerpo...} }\n\ +\n\ +# K_U\n\ +snippet K_U\n\ + K_U -> { ${1://cuerpo...} }\n\ +# K_CTRL_U\n\ +snippet K_CTRL_U\n\ + K_CTRL_U -> { ${1://cuerpo...} }\n\ +# K_ALT_U\n\ +snippet K_ALT_U\n\ + K_ALT_U -> { ${1://cuerpo...} }\n\ +# K_SHIFT_U\n\ +snippet K_SHIFT_U\n\ + K_SHIFT_U -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_U\n\ +snippet K_CTRL_ALT_U\n\ + K_CTRL_ALT_U -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_U\n\ +snippet K_CTRL_SHIFT_U\n\ + K_CTRL_SHIFT_U -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_U\n\ +snippet K_CTRL_ALT_SHIFT_U\n\ + K_CTRL_ALT_SHIFT_U -> { ${1://cuerpo...} }\n\ +\n\ +# K_V\n\ +snippet K_V\n\ + K_V -> { ${1://cuerpo...} }\n\ +# K_CTRL_V\n\ +snippet K_CTRL_V\n\ + K_CTRL_V -> { ${1://cuerpo...} }\n\ +# K_ALT_V\n\ +snippet K_ALT_V\n\ + K_ALT_V -> { ${1://cuerpo...} }\n\ +# K_SHIFT_V\n\ +snippet K_SHIFT_V\n\ + K_SHIFT_V -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_V\n\ +snippet K_CTRL_ALT_V\n\ + K_CTRL_ALT_V -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_V\n\ +snippet K_CTRL_SHIFT_V\n\ + K_CTRL_SHIFT_V -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_V\n\ +snippet K_CTRL_ALT_SHIFT_V\n\ + K_CTRL_ALT_SHIFT_V -> { ${1://cuerpo...} }\n\ +\n\ +# K_W\n\ +snippet K_W\n\ + K_W -> { ${1://cuerpo...} }\n\ +# K_CTRL_W\n\ +snippet K_CTRL_W\n\ + K_CTRL_W -> { ${1://cuerpo...} }\n\ +# K_ALT_W\n\ +snippet K_ALT_W\n\ + K_ALT_W -> { ${1://cuerpo...} }\n\ +# K_SHIFT_W\n\ +snippet K_SHIFT_W\n\ + K_SHIFT_W -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_W\n\ +snippet K_CTRL_ALT_W\n\ + K_CTRL_ALT_W -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_W\n\ +snippet K_CTRL_SHIFT_W\n\ + K_CTRL_SHIFT_W -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_W\n\ +snippet K_CTRL_ALT_SHIFT_W\n\ + K_CTRL_ALT_SHIFT_W -> { ${1://cuerpo...} }\n\ +\n\ +# K_X\n\ +snippet K_X\n\ + K_X -> { ${1://cuerpo...} }\n\ +# K_CTRL_X\n\ +snippet K_CTRL_X\n\ + K_CTRL_X -> { ${1://cuerpo...} }\n\ +# K_ALT_X\n\ +snippet K_ALT_X\n\ + K_ALT_X -> { ${1://cuerpo...} }\n\ +# K_SHIFT_X\n\ +snippet K_SHIFT_X\n\ + K_SHIFT_X -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_X\n\ +snippet K_CTRL_ALT_X\n\ + K_CTRL_ALT_X -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_X\n\ +snippet K_CTRL_SHIFT_X\n\ + K_CTRL_SHIFT_X -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_X\n\ +snippet K_CTRL_ALT_SHIFT_X\n\ + K_CTRL_ALT_SHIFT_X -> { ${1://cuerpo...} }\n\ +\n\ +# K_Y\n\ +snippet K_Y\n\ + K_Y -> { ${1://cuerpo...} }\n\ +# K_CTRL_Y\n\ +snippet K_CTRL_Y\n\ + K_CTRL_Y -> { ${1://cuerpo...} }\n\ +# K_ALT_Y\n\ +snippet K_ALT_Y\n\ + K_ALT_Y -> { ${1://cuerpo...} }\n\ +# K_SHIFT_Y\n\ +snippet K_SHIFT_Y\n\ + K_SHIFT_Y -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_Y\n\ +snippet K_CTRL_ALT_Y\n\ + K_CTRL_ALT_Y -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_Y\n\ +snippet K_CTRL_SHIFT_Y\n\ + K_CTRL_SHIFT_Y -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_Y\n\ +snippet K_CTRL_ALT_SHIFT_Y\n\ + K_CTRL_ALT_SHIFT_Y -> { ${1://cuerpo...} }\n\ +\n\ +# K_Z\n\ +snippet K_Z\n\ + K_Z -> { ${1://cuerpo...} }\n\ +# K_CTRL_Z\n\ +snippet K_CTRL_Z\n\ + K_CTRL_Z -> { ${1://cuerpo...} }\n\ +# K_ALT_Z\n\ +snippet K_ALT_Z\n\ + K_ALT_Z -> { ${1://cuerpo...} }\n\ +# K_SHIFT_Z\n\ +snippet K_SHIFT_Z\n\ + K_SHIFT_Z -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_Z\n\ +snippet K_CTRL_ALT_Z\n\ + K_CTRL_ALT_Z -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_Z\n\ +snippet K_CTRL_SHIFT_Z\n\ + K_CTRL_SHIFT_Z -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_Z\n\ +snippet K_CTRL_ALT_SHIFT_Z\n\ + K_CTRL_ALT_SHIFT_Z -> { ${1://cuerpo...} }\n\ +\n\ +# K_0\n\ +snippet K_0\n\ + K_0 -> { ${1://cuerpo...} }\n\ +# K_CTRL_0\n\ +snippet K_CTRL_0\n\ + K_CTRL_0 -> { ${1://cuerpo...} }\n\ +# K_ALT_0\n\ +snippet K_ALT_0\n\ + K_ALT_0 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_0\n\ +snippet K_SHIFT_0\n\ + K_SHIFT_0 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_0\n\ +snippet K_CTRL_ALT_0\n\ + K_CTRL_ALT_0 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_0\n\ +snippet K_CTRL_SHIFT_0\n\ + K_CTRL_SHIFT_0 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_0\n\ +snippet K_CTRL_ALT_SHIFT_0\n\ + K_CTRL_ALT_SHIFT_0 -> { ${1://cuerpo...} }\n\ +\n\ +# K_1\n\ +snippet K_1\n\ + K_1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_1\n\ +snippet K_CTRL_1\n\ + K_CTRL_1 -> { ${1://cuerpo...} }\n\ +# K_ALT_1\n\ +snippet K_ALT_1\n\ + K_ALT_1 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_1\n\ +snippet K_SHIFT_1\n\ + K_SHIFT_1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_1\n\ +snippet K_CTRL_ALT_1\n\ + K_CTRL_ALT_1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_1\n\ +snippet K_CTRL_SHIFT_1\n\ + K_CTRL_SHIFT_1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_1\n\ +snippet K_CTRL_ALT_SHIFT_1\n\ + K_CTRL_ALT_SHIFT_1 -> { ${1://cuerpo...} }\n\ +\n\ +# K_2\n\ +snippet K_2\n\ + K_2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_2\n\ +snippet K_CTRL_2\n\ + K_CTRL_2 -> { ${1://cuerpo...} }\n\ +# K_ALT_2\n\ +snippet K_ALT_2\n\ + K_ALT_2 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_2\n\ +snippet K_SHIFT_2\n\ + K_SHIFT_2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_2\n\ +snippet K_CTRL_ALT_2\n\ + K_CTRL_ALT_2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_2\n\ +snippet K_CTRL_SHIFT_2\n\ + K_CTRL_SHIFT_2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_2\n\ +snippet K_CTRL_ALT_SHIFT_2\n\ + K_CTRL_ALT_SHIFT_2 -> { ${1://cuerpo...} }\n\ +\n\ +# K_3\n\ +snippet K_3\n\ + K_3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_3\n\ +snippet K_CTRL_3\n\ + K_CTRL_3 -> { ${1://cuerpo...} }\n\ +# K_ALT_3\n\ +snippet K_ALT_3\n\ + K_ALT_3 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_3\n\ +snippet K_SHIFT_3\n\ + K_SHIFT_3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_3\n\ +snippet K_CTRL_ALT_3\n\ + K_CTRL_ALT_3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_3\n\ +snippet K_CTRL_SHIFT_3\n\ + K_CTRL_SHIFT_3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_3\n\ +snippet K_CTRL_ALT_SHIFT_3\n\ + K_CTRL_ALT_SHIFT_3 -> { ${1://cuerpo...} }\n\ +\n\ +# K_4\n\ +snippet K_4\n\ + K_4 -> { ${1://cuerpo...} }\n\ +# K_CTRL_4\n\ +snippet K_CTRL_4\n\ + K_CTRL_4 -> { ${1://cuerpo...} }\n\ +# K_ALT_4\n\ +snippet K_ALT_4\n\ + K_ALT_4 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_4\n\ +snippet K_SHIFT_4\n\ + K_SHIFT_4 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_4\n\ +snippet K_CTRL_ALT_4\n\ + K_CTRL_ALT_4 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_4\n\ +snippet K_CTRL_SHIFT_4\n\ + K_CTRL_SHIFT_4 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_4\n\ +snippet K_CTRL_ALT_SHIFT_4\n\ + K_CTRL_ALT_SHIFT_4 -> { ${1://cuerpo...} }\n\ +\n\ +# K_5\n\ +snippet K_5\n\ + K_5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_5\n\ +snippet K_CTRL_5\n\ + K_CTRL_5 -> { ${1://cuerpo...} }\n\ +# K_ALT_5\n\ +snippet K_ALT_5\n\ + K_ALT_5 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_5\n\ +snippet K_SHIFT_5\n\ + K_SHIFT_5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_5\n\ +snippet K_CTRL_ALT_5\n\ + K_CTRL_ALT_5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_5\n\ +snippet K_CTRL_SHIFT_5\n\ + K_CTRL_SHIFT_5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_5\n\ +snippet K_CTRL_ALT_SHIFT_5\n\ + K_CTRL_ALT_SHIFT_5 -> { ${1://cuerpo...} }\n\ +\n\ +# K_6\n\ +snippet K_6\n\ + K_6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_6\n\ +snippet K_CTRL_6\n\ + K_CTRL_6 -> { ${1://cuerpo...} }\n\ +# K_ALT_6\n\ +snippet K_ALT_6\n\ + K_ALT_6 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_6\n\ +snippet K_SHIFT_6\n\ + K_SHIFT_6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_6\n\ +snippet K_CTRL_ALT_6\n\ + K_CTRL_ALT_6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_6\n\ +snippet K_CTRL_SHIFT_6\n\ + K_CTRL_SHIFT_6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_6\n\ +snippet K_CTRL_ALT_SHIFT_6\n\ + K_CTRL_ALT_SHIFT_6 -> { ${1://cuerpo...} }\n\ +\n\ +# K_7\n\ +snippet K_7\n\ + K_7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_7\n\ +snippet K_CTRL_7\n\ + K_CTRL_7 -> { ${1://cuerpo...} }\n\ +# K_ALT_7\n\ +snippet K_ALT_7\n\ + K_ALT_7 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_7\n\ +snippet K_SHIFT_7\n\ + K_SHIFT_7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_7\n\ +snippet K_CTRL_ALT_7\n\ + K_CTRL_ALT_7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_7\n\ +snippet K_CTRL_SHIFT_7\n\ + K_CTRL_SHIFT_7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_7\n\ +snippet K_CTRL_ALT_SHIFT_7\n\ + K_CTRL_ALT_SHIFT_7 -> { ${1://cuerpo...} }\n\ +\n\ +# K_8\n\ +snippet K_8\n\ + K_8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_8\n\ +snippet K_CTRL_8\n\ + K_CTRL_8 -> { ${1://cuerpo...} }\n\ +# K_ALT_8\n\ +snippet K_ALT_8\n\ + K_ALT_8 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_8\n\ +snippet K_SHIFT_8\n\ + K_SHIFT_8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_8\n\ +snippet K_CTRL_ALT_8\n\ + K_CTRL_ALT_8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_8\n\ +snippet K_CTRL_SHIFT_8\n\ + K_CTRL_SHIFT_8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_8\n\ +snippet K_CTRL_ALT_SHIFT_8\n\ + K_CTRL_ALT_SHIFT_8 -> { ${1://cuerpo...} }\n\ +\n\ +# K_9\n\ +snippet K_9\n\ + K_9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_9\n\ +snippet K_CTRL_9\n\ + K_CTRL_9 -> { ${1://cuerpo...} }\n\ +# K_ALT_9\n\ +snippet K_ALT_9\n\ + K_ALT_9 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_9\n\ +snippet K_SHIFT_9\n\ + K_SHIFT_9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_9\n\ +snippet K_CTRL_ALT_9\n\ + K_CTRL_ALT_9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_9\n\ +snippet K_CTRL_SHIFT_9\n\ + K_CTRL_SHIFT_9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_9\n\ +snippet K_CTRL_ALT_SHIFT_9\n\ + K_CTRL_ALT_SHIFT_9 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F1\n\ +snippet K_F1\n\ + K_F1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F1\n\ +snippet K_CTRL_F1\n\ + K_CTRL_F1 -> { ${1://cuerpo...} }\n\ +# K_ALT_F1\n\ +snippet K_ALT_F1\n\ + K_ALT_F1 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F1\n\ +snippet K_SHIFT_F1\n\ + K_SHIFT_F1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F1\n\ +snippet K_CTRL_ALT_F1\n\ + K_CTRL_ALT_F1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F1\n\ +snippet K_CTRL_SHIFT_F1\n\ + K_CTRL_SHIFT_F1 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F1\n\ +snippet K_CTRL_ALT_SHIFT_F1\n\ + K_CTRL_ALT_SHIFT_F1 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F2\n\ +snippet K_F2\n\ + K_F2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F2\n\ +snippet K_CTRL_F2\n\ + K_CTRL_F2 -> { ${1://cuerpo...} }\n\ +# K_ALT_F2\n\ +snippet K_ALT_F2\n\ + K_ALT_F2 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F2\n\ +snippet K_SHIFT_F2\n\ + K_SHIFT_F2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F2\n\ +snippet K_CTRL_ALT_F2\n\ + K_CTRL_ALT_F2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F2\n\ +snippet K_CTRL_SHIFT_F2\n\ + K_CTRL_SHIFT_F2 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F2\n\ +snippet K_CTRL_ALT_SHIFT_F2\n\ + K_CTRL_ALT_SHIFT_F2 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F3\n\ +snippet K_F3\n\ + K_F3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F3\n\ +snippet K_CTRL_F3\n\ + K_CTRL_F3 -> { ${1://cuerpo...} }\n\ +# K_ALT_F3\n\ +snippet K_ALT_F3\n\ + K_ALT_F3 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F3\n\ +snippet K_SHIFT_F3\n\ + K_SHIFT_F3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F3\n\ +snippet K_CTRL_ALT_F3\n\ + K_CTRL_ALT_F3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F3\n\ +snippet K_CTRL_SHIFT_F3\n\ + K_CTRL_SHIFT_F3 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F3\n\ +snippet K_CTRL_ALT_SHIFT_F3\n\ + K_CTRL_ALT_SHIFT_F3 -> { ${1://cuerpo...} }\n\ +\n\ +# K_A\n\ +snippet K_A\n\ + K_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_A\n\ +snippet K_CTRL_A\n\ + K_CTRL_A -> { ${1://cuerpo...} }\n\ +# K_ALT_A\n\ +snippet K_ALT_A\n\ + K_ALT_A -> { ${1://cuerpo...} }\n\ +# K_SHIFT_A\n\ +snippet K_SHIFT_A\n\ + K_SHIFT_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_A\n\ +snippet K_CTRL_ALT_A\n\ + K_CTRL_ALT_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_A\n\ +snippet K_CTRL_SHIFT_A\n\ + K_CTRL_SHIFT_A -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_A\n\ +snippet K_CTRL_ALT_SHIFT_A\n\ + K_CTRL_ALT_SHIFT_A -> { ${1://cuerpo...} }\n\ +\n\ +# K_F5\n\ +snippet K_F5\n\ + K_F5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F5\n\ +snippet K_CTRL_F5\n\ + K_CTRL_F5 -> { ${1://cuerpo...} }\n\ +# K_ALT_F5\n\ +snippet K_ALT_F5\n\ + K_ALT_F5 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F5\n\ +snippet K_SHIFT_F5\n\ + K_SHIFT_F5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F5\n\ +snippet K_CTRL_ALT_F5\n\ + K_CTRL_ALT_F5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F5\n\ +snippet K_CTRL_SHIFT_F5\n\ + K_CTRL_SHIFT_F5 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F5\n\ +snippet K_CTRL_ALT_SHIFT_F5\n\ + K_CTRL_ALT_SHIFT_F5 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F6\n\ +snippet K_F6\n\ + K_F6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F6\n\ +snippet K_CTRL_F6\n\ + K_CTRL_F6 -> { ${1://cuerpo...} }\n\ +# K_ALT_F6\n\ +snippet K_ALT_F6\n\ + K_ALT_F6 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F6\n\ +snippet K_SHIFT_F6\n\ + K_SHIFT_F6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F6\n\ +snippet K_CTRL_ALT_F6\n\ + K_CTRL_ALT_F6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F6\n\ +snippet K_CTRL_SHIFT_F6\n\ + K_CTRL_SHIFT_F6 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F6\n\ +snippet K_CTRL_ALT_SHIFT_F6\n\ + K_CTRL_ALT_SHIFT_F6 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F7\n\ +snippet K_F7\n\ + K_F7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F7\n\ +snippet K_CTRL_F7\n\ + K_CTRL_F7 -> { ${1://cuerpo...} }\n\ +# K_ALT_F7\n\ +snippet K_ALT_F7\n\ + K_ALT_F7 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F7\n\ +snippet K_SHIFT_F7\n\ + K_SHIFT_F7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F7\n\ +snippet K_CTRL_ALT_F7\n\ + K_CTRL_ALT_F7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F7\n\ +snippet K_CTRL_SHIFT_F7\n\ + K_CTRL_SHIFT_F7 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F7\n\ +snippet K_CTRL_ALT_SHIFT_F7\n\ + K_CTRL_ALT_SHIFT_F7 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F8\n\ +snippet K_F8\n\ + K_F8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F8\n\ +snippet K_CTRL_F8\n\ + K_CTRL_F8 -> { ${1://cuerpo...} }\n\ +# K_ALT_F8\n\ +snippet K_ALT_F8\n\ + K_ALT_F8 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F8\n\ +snippet K_SHIFT_F8\n\ + K_SHIFT_F8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F8\n\ +snippet K_CTRL_ALT_F8\n\ + K_CTRL_ALT_F8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F8\n\ +snippet K_CTRL_SHIFT_F8\n\ + K_CTRL_SHIFT_F8 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F8\n\ +snippet K_CTRL_ALT_SHIFT_F8\n\ + K_CTRL_ALT_SHIFT_F8 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F9\n\ +snippet K_F9\n\ + K_F9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F9\n\ +snippet K_CTRL_F9\n\ + K_CTRL_F9 -> { ${1://cuerpo...} }\n\ +# K_ALT_F9\n\ +snippet K_ALT_F9\n\ + K_ALT_F9 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F9\n\ +snippet K_SHIFT_F9\n\ + K_SHIFT_F9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F9\n\ +snippet K_CTRL_ALT_F9\n\ + K_CTRL_ALT_F9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F9\n\ +snippet K_CTRL_SHIFT_F9\n\ + K_CTRL_SHIFT_F9 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F9\n\ +snippet K_CTRL_ALT_SHIFT_F9\n\ + K_CTRL_ALT_SHIFT_F9 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F10\n\ +snippet K_F10\n\ + K_F10 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F10\n\ +snippet K_CTRL_F10\n\ + K_CTRL_F10 -> { ${1://cuerpo...} }\n\ +# K_ALT_F10\n\ +snippet K_ALT_F10\n\ + K_ALT_F10 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F10\n\ +snippet K_SHIFT_F10\n\ + K_SHIFT_F10 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F10\n\ +snippet K_CTRL_ALT_F10\n\ + K_CTRL_ALT_F10 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F10\n\ +snippet K_CTRL_SHIFT_F10\n\ + K_CTRL_SHIFT_F10 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F10\n\ +snippet K_CTRL_ALT_SHIFT_F10\n\ + K_CTRL_ALT_SHIFT_F10 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F11\n\ +snippet K_F11\n\ + K_F11 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F11\n\ +snippet K_CTRL_F11\n\ + K_CTRL_F11 -> { ${1://cuerpo...} }\n\ +# K_ALT_F11\n\ +snippet K_ALT_F11\n\ + K_ALT_F11 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F11\n\ +snippet K_SHIFT_F11\n\ + K_SHIFT_F11 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F11\n\ +snippet K_CTRL_ALT_F11\n\ + K_CTRL_ALT_F11 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F11\n\ +snippet K_CTRL_SHIFT_F11\n\ + K_CTRL_SHIFT_F11 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F11\n\ +snippet K_CTRL_ALT_SHIFT_F11\n\ + K_CTRL_ALT_SHIFT_F11 -> { ${1://cuerpo...} }\n\ +\n\ +# K_F12\n\ +snippet K_F12\n\ + K_F12 -> { ${1://cuerpo...} }\n\ +# K_CTRL_F12\n\ +snippet K_CTRL_F12\n\ + K_CTRL_F12 -> { ${1://cuerpo...} }\n\ +# K_ALT_F12\n\ +snippet K_ALT_F12\n\ + K_ALT_F12 -> { ${1://cuerpo...} }\n\ +# K_SHIFT_F12\n\ +snippet K_SHIFT_F12\n\ + K_SHIFT_F12 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_F12\n\ +snippet K_CTRL_ALT_F12\n\ + K_CTRL_ALT_F12 -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_F12\n\ +snippet K_CTRL_SHIFT_F12\n\ + K_CTRL_SHIFT_F12 -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_F12\n\ +snippet K_CTRL_ALT_SHIFT_F12\n\ + K_CTRL_ALT_SHIFT_F12 -> { ${1://cuerpo...} }\n\ +\n\ +# K_RETURN\n\ +snippet K_RETURN\n\ + K_RETURN -> { ${1://cuerpo...} }\n\ +# K_CTRL_RETURN\n\ +snippet K_CTRL_RETURN\n\ + K_CTRL_RETURN -> { ${1://cuerpo...} }\n\ +# K_ALT_RETURN\n\ +snippet K_ALT_RETURN\n\ + K_ALT_RETURN -> { ${1://cuerpo...} }\n\ +# K_SHIFT_RETURN\n\ +snippet K_SHIFT_RETURN\n\ + K_SHIFT_RETURN -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_RETURN\n\ +snippet K_CTRL_ALT_RETURN\n\ + K_CTRL_ALT_RETURN -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_RETURN\n\ +snippet K_CTRL_SHIFT_RETURN\n\ + K_CTRL_SHIFT_RETURN -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_RETURN\n\ +snippet K_CTRL_ALT_SHIFT_RETURN\n\ + K_CTRL_ALT_SHIFT_RETURN -> { ${1://cuerpo...} }\n\ +\n\ +# K_SPACE\n\ +snippet K_SPACE\n\ + K_SPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_SPACE\n\ +snippet K_CTRL_SPACE\n\ + K_CTRL_SPACE -> { ${1://cuerpo...} }\n\ +# K_ALT_SPACE\n\ +snippet K_ALT_SPACE\n\ + K_ALT_SPACE -> { ${1://cuerpo...} }\n\ +# K_SHIFT_SPACE\n\ +snippet K_SHIFT_SPACE\n\ + K_SHIFT_SPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SPACE\n\ +snippet K_CTRL_ALT_SPACE\n\ + K_CTRL_ALT_SPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_SPACE\n\ +snippet K_CTRL_SHIFT_SPACE\n\ + K_CTRL_SHIFT_SPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_SPACE\n\ +snippet K_CTRL_ALT_SHIFT_SPACE\n\ + K_CTRL_ALT_SHIFT_SPACE -> { ${1://cuerpo...} }\n\ +\n\ +# K_ESCAPE\n\ +snippet K_ESCAPE\n\ + K_ESCAPE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ESCAPE\n\ +snippet K_CTRL_ESCAPE\n\ + K_CTRL_ESCAPE -> { ${1://cuerpo...} }\n\ +# K_ALT_ESCAPE\n\ +snippet K_ALT_ESCAPE\n\ + K_ALT_ESCAPE -> { ${1://cuerpo...} }\n\ +# K_SHIFT_ESCAPE\n\ +snippet K_SHIFT_ESCAPE\n\ + K_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_ESCAPE\n\ +snippet K_CTRL_ALT_ESCAPE\n\ + K_CTRL_ALT_ESCAPE -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_ESCAPE\n\ +snippet K_CTRL_SHIFT_ESCAPE\n\ + K_CTRL_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_ESCAPE\n\ +snippet K_CTRL_ALT_SHIFT_ESCAPE\n\ + K_CTRL_ALT_SHIFT_ESCAPE -> { ${1://cuerpo...} }\n\ +\n\ +# K_BACKSPACE\n\ +snippet K_BACKSPACE\n\ + K_BACKSPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_BACKSPACE\n\ +snippet K_CTRL_BACKSPACE\n\ + K_CTRL_BACKSPACE -> { ${1://cuerpo...} }\n\ +# K_ALT_BACKSPACE\n\ +snippet K_ALT_BACKSPACE\n\ + K_ALT_BACKSPACE -> { ${1://cuerpo...} }\n\ +# K_SHIFT_BACKSPACE\n\ +snippet K_SHIFT_BACKSPACE\n\ + K_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_BACKSPACE\n\ +snippet K_CTRL_ALT_BACKSPACE\n\ + K_CTRL_ALT_BACKSPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_BACKSPACE\n\ +snippet K_CTRL_SHIFT_BACKSPACE\n\ + K_CTRL_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_BACKSPACE\n\ +snippet K_CTRL_ALT_SHIFT_BACKSPACE\n\ + K_CTRL_ALT_SHIFT_BACKSPACE -> { ${1://cuerpo...} }\n\ +\n\ +# K_TAB\n\ +snippet K_TAB\n\ + K_TAB -> { ${1://cuerpo...} }\n\ +# K_CTRL_TAB\n\ +snippet K_CTRL_TAB\n\ + K_CTRL_TAB -> { ${1://cuerpo...} }\n\ +# K_ALT_TAB\n\ +snippet K_ALT_TAB\n\ + K_ALT_TAB -> { ${1://cuerpo...} }\n\ +# K_SHIFT_TAB\n\ +snippet K_SHIFT_TAB\n\ + K_SHIFT_TAB -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_TAB\n\ +snippet K_CTRL_ALT_TAB\n\ + K_CTRL_ALT_TAB -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_TAB\n\ +snippet K_CTRL_SHIFT_TAB\n\ + K_CTRL_SHIFT_TAB -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_TAB\n\ +snippet K_CTRL_ALT_SHIFT_TAB\n\ + K_CTRL_ALT_SHIFT_TAB -> { ${1://cuerpo...} }\n\ +\n\ +# K_UP\n\ +snippet K_UP\n\ + K_UP -> { ${1://cuerpo...} }\n\ +# K_CTRL_UP\n\ +snippet K_CTRL_UP\n\ + K_CTRL_UP -> { ${1://cuerpo...} }\n\ +# K_ALT_UP\n\ +snippet K_ALT_UP\n\ + K_ALT_UP -> { ${1://cuerpo...} }\n\ +# K_SHIFT_UP\n\ +snippet K_SHIFT_UP\n\ + K_SHIFT_UP -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_UP\n\ +snippet K_CTRL_ALT_UP\n\ + K_CTRL_ALT_UP -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_UP\n\ +snippet K_CTRL_SHIFT_UP\n\ + K_CTRL_SHIFT_UP -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_UP\n\ +snippet K_CTRL_ALT_SHIFT_UP\n\ + K_CTRL_ALT_SHIFT_UP -> { ${1://cuerpo...} }\n\ +\n\ +# K_DOWN\n\ +snippet K_DOWN\n\ + K_DOWN -> { ${1://cuerpo...} }\n\ +# K_CTRL_DOWN\n\ +snippet K_CTRL_DOWN\n\ + K_CTRL_DOWN -> { ${1://cuerpo...} }\n\ +# K_ALT_DOWN\n\ +snippet K_ALT_DOWN\n\ + K_ALT_DOWN -> { ${1://cuerpo...} }\n\ +# K_SHIFT_DOWN\n\ +snippet K_SHIFT_DOWN\n\ + K_SHIFT_DOWN -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_DOWN\n\ +snippet K_CTRL_ALT_DOWN\n\ + K_CTRL_ALT_DOWN -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_DOWN\n\ +snippet K_CTRL_SHIFT_DOWN\n\ + K_CTRL_SHIFT_DOWN -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_DOWN\n\ +snippet K_CTRL_ALT_SHIFT_DOWN\n\ + K_CTRL_ALT_SHIFT_DOWN -> { ${1://cuerpo...} }\n\ +\n\ +# K_LEFT\n\ +snippet K_LEFT\n\ + K_LEFT -> { ${1://cuerpo...} }\n\ +# K_CTRL_LEFT\n\ +snippet K_CTRL_LEFT\n\ + K_CTRL_LEFT -> { ${1://cuerpo...} }\n\ +# K_ALT_LEFT\n\ +snippet K_ALT_LEFT\n\ + K_ALT_LEFT -> { ${1://cuerpo...} }\n\ +# K_SHIFT_LEFT\n\ +snippet K_SHIFT_LEFT\n\ + K_SHIFT_LEFT -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_LEFT\n\ +snippet K_CTRL_ALT_LEFT\n\ + K_CTRL_ALT_LEFT -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_LEFT\n\ +snippet K_CTRL_SHIFT_LEFT\n\ + K_CTRL_SHIFT_LEFT -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_LEFT\n\ +snippet K_CTRL_ALT_SHIFT_LEFT\n\ + K_CTRL_ALT_SHIFT_LEFT -> { ${1://cuerpo...} }\n\ +\n\ +# K_RIGHT\n\ +snippet K_RIGHT\n\ + K_RIGHT -> { ${1://cuerpo...} }\n\ +# K_CTRL_RIGHT\n\ +snippet K_CTRL_RIGHT\n\ + K_CTRL_RIGHT -> { ${1://cuerpo...} }\n\ +# K_ALT_RIGHT\n\ +snippet K_ALT_RIGHT\n\ + K_ALT_RIGHT -> { ${1://cuerpo...} }\n\ +# K_SHIFT_RIGHT\n\ +snippet K_SHIFT_RIGHT\n\ + K_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_RIGHT\n\ +snippet K_CTRL_ALT_RIGHT\n\ + K_CTRL_ALT_RIGHT -> { ${1://cuerpo...} }\n\ +# K_CTRL_SHIFT_RIGHT\n\ +snippet K_CTRL_SHIFT_RIGHT\n\ + K_CTRL_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\ +# K_CTRL_ALT_SHIFT_RIGHT\n\ +snippet K_CTRL_ALT_SHIFT_RIGHT\n\ + K_CTRL_ALT_SHIFT_RIGHT -> { ${1://cuerpo...} }\n\ +\n\ +# recorrido (simple)\n\ +snippet recorrido (simple)\n\ + ${1:// Ir al inicio}\n\ + while (not ${2:// es último elemento}) {\n\ + ${3:// Procesar el elemento}\n\ + ${4:// Ir al próximo elemento}\n\ + }\n\ + ${5:// Finalizar}\n\ +\n\ +# recorrido (de acumulación)\n\ +snippet recorrido (de acumulación)\n\ + ${1:// Ir al inicio}\n\ + ${2:cantidadVistos} := ${3:// contar elementos en lugar actual}\n\ + while (not ${4:// es último elemento}) {\n\ + ${4:// Ir al próximo elemento}\n\ + ${2:cantidadVistos} := ${2:cantidadVistos} + ${3:// contar elementos en lugar actual}\n\ + }\n\ + return (${2:cantidadVistos})\n\ +\n\ +# recorrido (de búsqueda)\n\ +snippet recorrido (de búsqueda)\n\ + ${1:// Ir al inicio}\n\ + while (not ${2:// encontré lo que buscaba}) {\n\ + ${3:// Ir al próximo elemento}\n\ + }\n\ + return (${2:// encontré lo que buscaba })\n\ +\n\ +# recorrido (de búsqueda con borde)\n\ +snippet recorrido (de búsqueda con borde)\n\ + ${1:// Ir al inicio}\n\ + while (not ${2:// encontré lo que buscaba} && not ${3:// es último elemento}) {\n\ + ${4:// Ir al próximo elemento}\n\ + }\n\ + return (${2:// encontré lo que buscaba })\n\ +\n\ +# recorrido (de tipos enumerativos)\n\ +snippet recorrido (de tipos enumerativos)\n\ + ${1:elementoActual} := ${2:minElemento()}\n\ + while (${1:elementoActual} /= ${3:maxElemento()}) {\n\ + ${4:// Procesar con elemento actual}\n\ + ${1:elementoActual} := siguiente(${1:elementoActual})\n\ + }\n\ + ${4:// Procesar con elemento actual}\n\ +\n\ +# recorrido (de búsqueda sobre lista)\n\ +snippet recorrido (de búsqueda sobre lista)\n\ + ${1:listaRecorrida} := ${2:lista}\n\ + while (primero(${1:listaRecorrida}) /= ${3://elemento buscado}) {\n\ + ${1:elementoActual} := sinElPrimero(${1:elementoActual})\n\ + }\n\ + return (primero(${1:listaRecorrida}))\n\ +\n\ +# recorrido (de búsqueda sobre lista con borde)\n\ +snippet recorrido (de búsqueda sobre lista con borde)\n\ + ${1:listaRecorrida} := ${2:lista}\n\ + while (not esVacía(${1:listaRecorrida}) && primero(${1:listaRecorrida}) /= ${3://elemento buscado}) {\n\ + ${1:elementoActual} := sinElPrimero(${1:elementoActual})\n\ + }\n\ + return (not esVacía(${1:listaRecorrida}))\n\ +\n\ +# docs (procedimiento)\n\ +snippet docs (procedimiento)\n\ + /*\n\ + @PROPÓSITO: ${1:...}\n\ + @PRECONDICIÓN: ${2:...}\n\ + */\n\ +\n\ +# docs (procedimiento con parámetros)\n\ +snippet docs (procedimiento con parámetros)\n\ + /*\n\ + @PROPÓSITO: ${1:...}\n\ + @PRECONDICIÓN: ${2:...}\n\ + @PARÁMETROS:\n\ + * ${3:nombreDelParámetro} : ${4:Tipo} - ${5:descripción}\n\ + */\n\ +\n\ +# docs (función)\n\ +snippet docs (función)\n\ + /*\n\ + @PROPÓSITO: ${1:...}\n\ + @PRECONDICIÓN: ${2:...}\n\ + @TIPO: ${3:...}\n\ + */\n\ +\n\ +# docs (función con parámetros)\n\ +snippet docs (función con parámetros)\n\ + /*\n\ + @PROPÓSITO: ${1:...}\n\ + @PRECONDICIÓN: ${2:...}\n\ + @PARÁMETROS:\n\ + * ${3:nombreDelParámetro} : ${4:Tipo} - ${5:descripción}\n\ + @TIPO: ${6:...}\n\ + */\n\ +"; +exports.scope = "gobstones"; + +}); (function() { + window.require(["ace/snippets/gobstones"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/golang.js b/htdocs/includes/ace/src/snippets/golang.js new file mode 100644 index 00000000000..b16e805474f --- /dev/null +++ b/htdocs/includes/ace/src/snippets/golang.js @@ -0,0 +1,14 @@ +define("ace/snippets/golang",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "golang"; + +}); (function() { + window.require(["ace/snippets/golang"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/graphqlschema.js b/htdocs/includes/ace/src/snippets/graphqlschema.js similarity index 59% rename from htdocs/includes/ace/snippets/graphqlschema.js rename to htdocs/includes/ace/src/snippets/graphqlschema.js index 6b1e49f9421..a4da17b7833 100644 --- a/htdocs/includes/ace/snippets/graphqlschema.js +++ b/htdocs/includes/ace/src/snippets/graphqlschema.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/graphqlschema",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/graphqlschema",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Type Snippet\n\ @@ -36,4 +36,11 @@ snippet enum\n\ "; exports.scope = "graphqlschema"; -}); +}); (function() { + window.require(["ace/snippets/graphqlschema"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/groovy.js b/htdocs/includes/ace/src/snippets/groovy.js new file mode 100644 index 00000000000..56091acbccd --- /dev/null +++ b/htdocs/includes/ace/src/snippets/groovy.js @@ -0,0 +1,14 @@ +define("ace/snippets/groovy",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "groovy"; + +}); (function() { + window.require(["ace/snippets/groovy"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/haml.js b/htdocs/includes/ace/src/snippets/haml.js similarity index 50% rename from htdocs/includes/ace/snippets/haml.js rename to htdocs/includes/ace/src/snippets/haml.js index 2d1c68aa217..174f6adab9e 100644 --- a/htdocs/includes/ace/snippets/haml.js +++ b/htdocs/includes/ace/src/snippets/haml.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/haml",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/haml",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet t\n\ @@ -24,4 +24,11 @@ snippet =rpc\n\ "; exports.scope = "haml"; -}); +}); (function() { + window.require(["ace/snippets/haml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/handlebars.js b/htdocs/includes/ace/src/snippets/handlebars.js new file mode 100644 index 00000000000..ca8b6354867 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/handlebars.js @@ -0,0 +1,14 @@ +define("ace/snippets/handlebars",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "handlebars"; + +}); (function() { + window.require(["ace/snippets/handlebars"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/haskell.js b/htdocs/includes/ace/src/snippets/haskell.js similarity index 82% rename from htdocs/includes/ace/snippets/haskell.js rename to htdocs/includes/ace/src/snippets/haskell.js index 2bd8b5afd91..054187b857c 100644 --- a/htdocs/includes/ace/snippets/haskell.js +++ b/htdocs/includes/ace/src/snippets/haskell.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/haskell",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet lang\n\ @@ -86,4 +86,11 @@ snippet where\n\ "; exports.scope = "haskell"; -}); +}); (function() { + window.require(["ace/snippets/haskell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/haskell_cabal.js b/htdocs/includes/ace/src/snippets/haskell_cabal.js new file mode 100644 index 00000000000..471feb12baa --- /dev/null +++ b/htdocs/includes/ace/src/snippets/haskell_cabal.js @@ -0,0 +1,14 @@ +define("ace/snippets/haskell_cabal",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "haskell_cabal"; + +}); (function() { + window.require(["ace/snippets/haskell_cabal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/haxe.js b/htdocs/includes/ace/src/snippets/haxe.js new file mode 100644 index 00000000000..8feed8d150c --- /dev/null +++ b/htdocs/includes/ace/src/snippets/haxe.js @@ -0,0 +1,14 @@ +define("ace/snippets/haxe",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "haxe"; + +}); (function() { + window.require(["ace/snippets/haxe"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/hjson.js b/htdocs/includes/ace/src/snippets/hjson.js new file mode 100644 index 00000000000..79be57d0cf3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/hjson.js @@ -0,0 +1,14 @@ +define("ace/snippets/hjson",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/hjson"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/html.js b/htdocs/includes/ace/src/snippets/html.js similarity index 93% rename from htdocs/includes/ace/snippets/html.js rename to htdocs/includes/ace/src/snippets/html.js index 5b29fd50b5f..975496c1b49 100644 --- a/htdocs/includes/ace/snippets/html.js +++ b/htdocs/includes/ace/src/snippets/html.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/html",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/html",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Some useful Unicode entities\n\ @@ -81,7 +81,7 @@ snippet doct\n\ \"http://www.w3.org/TR/html4/loose.dtd\">\n\ # HTML Doctype 5\n\ snippet doct5\n\ - \n\ + \n\ # XHTML Doctype 1.0 Frameset\n\ snippet docxf\n\ \n\ +# html5shiv\n\ +snippet html5shiv\n\ + \n\ +snippet html5printshiv\n\ + \n\ # Attributes\n\ snippet attr\n\ ${1:attribute}=\"${2:property}\"\n\ @@ -460,6 +469,18 @@ snippet html5\n\ ${3:body}\n\ \n\ \n\ +snippet xhtml5\n\ + \n\ + \n\ + \n\ + \n\ + ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ + ${2:meta}\n\ + \n\ + \n\ + ${3:body}\n\ + \n\ + \n\ snippet i\n\ ${1}\n\ snippet iframe\n\ @@ -702,6 +723,12 @@ snippet script\n\ \n\ snippet scriptsrc\n\ \n\ +snippet newscript\n\ + \n\ +snippet newscriptsrc\n\ + \n\ snippet section\n\
    \n\ ${1}\n\ @@ -832,4 +859,11 @@ snippet wbr\n\ "; exports.scope = "html"; -}); +}); (function() { + window.require(["ace/snippets/html"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/html_elixir.js b/htdocs/includes/ace/src/snippets/html_elixir.js new file mode 100644 index 00000000000..c8521b55ca8 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/html_elixir.js @@ -0,0 +1,14 @@ +define("ace/snippets/html_elixir",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "html_elixir"; + +}); (function() { + window.require(["ace/snippets/html_elixir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/html_ruby.js b/htdocs/includes/ace/src/snippets/html_ruby.js new file mode 100644 index 00000000000..ba20e65e72d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/html_ruby.js @@ -0,0 +1,14 @@ +define("ace/snippets/html_ruby",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "html_ruby"; + +}); (function() { + window.require(["ace/snippets/html_ruby"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/ini.js b/htdocs/includes/ace/src/snippets/ini.js new file mode 100644 index 00000000000..07200fda5b7 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/ini.js @@ -0,0 +1,14 @@ +define("ace/snippets/ini",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ini"; + +}); (function() { + window.require(["ace/snippets/ini"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/io.js b/htdocs/includes/ace/src/snippets/io.js similarity index 80% rename from htdocs/includes/ace/snippets/io.js rename to htdocs/includes/ace/src/snippets/io.js index 431002b41ab..47b33590efa 100644 --- a/htdocs/includes/ace/snippets/io.js +++ b/htdocs/includes/ace/src/snippets/io.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/io",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/io",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippets = [ @@ -66,4 +66,11 @@ exports.snippets = [ ]; exports.scope = "io"; -}); +}); (function() { + window.require(["ace/snippets/io"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/jack.js b/htdocs/includes/ace/src/snippets/jack.js new file mode 100644 index 00000000000..2688a3a1011 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/jack.js @@ -0,0 +1,14 @@ +define("ace/snippets/jack",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "jack"; + +}); (function() { + window.require(["ace/snippets/jack"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/jade.js b/htdocs/includes/ace/src/snippets/jade.js new file mode 100644 index 00000000000..6a4676b883d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/jade.js @@ -0,0 +1,14 @@ +define("ace/snippets/jade",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "jade"; + +}); (function() { + window.require(["ace/snippets/jade"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/java.js b/htdocs/includes/ace/src/snippets/java.js similarity index 91% rename from htdocs/includes/ace/snippets/java.js rename to htdocs/includes/ace/src/snippets/java.js index 1bc92acad0e..1ae4f8642cf 100644 --- a/htdocs/includes/ace/snippets/java.js +++ b/htdocs/includes/ace/src/snippets/java.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/java",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/java",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "## Access Modifiers\n\ @@ -244,4 +244,11 @@ snippet unless\n\ "; exports.scope = "java"; -}); +}); (function() { + window.require(["ace/snippets/java"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/javascript.js b/htdocs/includes/ace/src/snippets/javascript.js similarity index 90% rename from htdocs/includes/ace/snippets/javascript.js rename to htdocs/includes/ace/src/snippets/javascript.js index f3f998ad636..fbbf3c9aced 100644 --- a/htdocs/includes/ace/snippets/javascript.js +++ b/htdocs/includes/ace/src/snippets/javascript.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/javascript",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Prototype\n\ @@ -199,4 +199,11 @@ guard ^\\s*\n\ "; exports.scope = "javascript"; -}); +}); (function() { + window.require(["ace/snippets/javascript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/json.js b/htdocs/includes/ace/src/snippets/json.js new file mode 100644 index 00000000000..7c9c2eaf295 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/json.js @@ -0,0 +1,14 @@ +define("ace/snippets/json",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "json"; + +}); (function() { + window.require(["ace/snippets/json"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/jsoniq.js b/htdocs/includes/ace/src/snippets/jsoniq.js similarity index 80% rename from htdocs/includes/ace/snippets/jsoniq.js rename to htdocs/includes/ace/src/snippets/jsoniq.js index 9c5eaf61379..256068d3958 100644 --- a/htdocs/includes/ace/snippets/jsoniq.js +++ b/htdocs/includes/ace/src/snippets/jsoniq.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/jsoniq",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet for\n\ @@ -65,4 +65,11 @@ snippet module\n\ "; exports.scope = "jsoniq"; -}); +}); (function() { + window.require(["ace/snippets/jsoniq"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/jsp.js b/htdocs/includes/ace/src/snippets/jsp.js similarity index 87% rename from htdocs/includes/ace/snippets/jsp.js rename to htdocs/includes/ace/src/snippets/jsp.js index 6428e5be570..741d5aa868a 100644 --- a/htdocs/includes/ace/snippets/jsp.js +++ b/htdocs/includes/ace/src/snippets/jsp.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/jsp",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet @page\n\ @@ -103,4 +103,11 @@ snippet trim\n\ "; exports.scope = "jsp"; -}); +}); (function() { + window.require(["ace/snippets/jsp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/jssm.js b/htdocs/includes/ace/src/snippets/jssm.js new file mode 100644 index 00000000000..fceb11ddfe9 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/jssm.js @@ -0,0 +1,14 @@ +define("ace/snippets/jssm",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/jssm"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/jsx.js b/htdocs/includes/ace/src/snippets/jsx.js new file mode 100644 index 00000000000..38f276f80a2 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/jsx.js @@ -0,0 +1,14 @@ +define("ace/snippets/jsx",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "jsx"; + +}); (function() { + window.require(["ace/snippets/jsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/julia.js b/htdocs/includes/ace/src/snippets/julia.js new file mode 100644 index 00000000000..360f7c3d200 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/julia.js @@ -0,0 +1,14 @@ +define("ace/snippets/julia",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "julia"; + +}); (function() { + window.require(["ace/snippets/julia"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/kotlin.js b/htdocs/includes/ace/src/snippets/kotlin.js new file mode 100644 index 00000000000..b2e3d3cbb52 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/kotlin.js @@ -0,0 +1,14 @@ +define("ace/snippets/kotlin",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/kotlin"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/latex.js b/htdocs/includes/ace/src/snippets/latex.js new file mode 100644 index 00000000000..6afc3775b98 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/latex.js @@ -0,0 +1,14 @@ +define("ace/snippets/latex",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "latex"; + +}); (function() { + window.require(["ace/snippets/latex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/less.js b/htdocs/includes/ace/src/snippets/less.js new file mode 100644 index 00000000000..a87b47b185c --- /dev/null +++ b/htdocs/includes/ace/src/snippets/less.js @@ -0,0 +1,14 @@ +define("ace/snippets/less",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "less"; + +}); (function() { + window.require(["ace/snippets/less"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/liquid.js b/htdocs/includes/ace/src/snippets/liquid.js new file mode 100644 index 00000000000..751d4625b89 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/liquid.js @@ -0,0 +1,895 @@ +define("ace/snippets/liquid",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "\n\ +# liquid specific snippets\n\ +snippet ife\n\ + {% if ${1:condition} %}\n\ +\n\ + {% else %}\n\ +\n\ + {% endif %}\n\ +snippet if\n\ + {% if ${1:condition} %}\n\ + \n\ + {% endif %}\n\ +snippet for\n\ + {% for in ${1:iterator} %}\n\ +\n\ + {% endfor %}\n\ +snippet capture\n\ + {% capture ${1} %}\n\ +\n\ + {% endcapture %}\n\ +snippet comment\n\ + {% comment %}\n\ + ${1:comment}\n\ + {% endcomment %}\n\ +\n\ +# Include html.snippets\n\ +# Some useful Unicode entities\n\ +# Non-Breaking Space\n\ +snippet nbs\n\ +  \n\ +# ←\n\ +snippet left\n\ + ←\n\ +# →\n\ +snippet right\n\ + →\n\ +# ↑\n\ +snippet up\n\ + ↑\n\ +# ↓\n\ +snippet down\n\ + ↓\n\ +# ↩\n\ +snippet return\n\ + ↩\n\ +# ⇤\n\ +snippet backtab\n\ + ⇤\n\ +# ⇥\n\ +snippet tab\n\ + ⇥\n\ +# ⇧\n\ +snippet shift\n\ + ⇧\n\ +# ⌃\n\ +snippet ctrl\n\ + ⌃\n\ +# ⌅\n\ +snippet enter\n\ + ⌅\n\ +# ⌘\n\ +snippet cmd\n\ + ⌘\n\ +# ⌥\n\ +snippet option\n\ + ⌥\n\ +# ⌦\n\ +snippet delete\n\ + ⌦\n\ +# ⌫\n\ +snippet backspace\n\ + ⌫\n\ +# ⎋\n\ +snippet esc\n\ + ⎋\n\ +# Generic Doctype\n\ +snippet doctype HTML 4.01 Strict\n\ + \n\ +snippet doctype HTML 4.01 Transitional\n\ + \n\ +snippet doctype HTML 5\n\ + \n\ +snippet doctype XHTML 1.0 Frameset\n\ + \n\ +snippet doctype XHTML 1.0 Strict\n\ + \n\ +snippet doctype XHTML 1.0 Transitional\n\ + \n\ +snippet doctype XHTML 1.1\n\ + \n\ +# HTML Doctype 4.01 Strict\n\ +snippet docts\n\ + \n\ +# HTML Doctype 4.01 Transitional\n\ +snippet doct\n\ + \n\ +# HTML Doctype 5\n\ +snippet doct5\n\ + \n\ +# XHTML Doctype 1.0 Frameset\n\ +snippet docxf\n\ + \n\ +# XHTML Doctype 1.0 Strict\n\ +snippet docxs\n\ + \n\ +# XHTML Doctype 1.0 Transitional\n\ +snippet docxt\n\ + \n\ +# XHTML Doctype 1.1\n\ +snippet docx\n\ + \n\ +# html5shiv\n\ +snippet html5shiv\n\ + \n\ +snippet html5printshiv\n\ + \n\ +# Attributes\n\ +snippet attr\n\ + ${1:attribute}=\"${2:property}\"\n\ +snippet attr+\n\ + ${1:attribute}=\"${2:property}\" attr+${3}\n\ +snippet .\n\ + class=\"${1}\"${2}\n\ +snippet #\n\ + id=\"${1}\"${2}\n\ +snippet alt\n\ + alt=\"${1}\"${2}\n\ +snippet charset\n\ + charset=\"${1:utf-8}\"${2}\n\ +snippet data\n\ + data-${1}=\"${2:$1}\"${3}\n\ +snippet for\n\ + for=\"${1}\"${2}\n\ +snippet height\n\ + height=\"${1}\"${2}\n\ +snippet href\n\ + href=\"${1:#}\"${2}\n\ +snippet lang\n\ + lang=\"${1:en}\"${2}\n\ +snippet media\n\ + media=\"${1}\"${2}\n\ +snippet name\n\ + name=\"${1}\"${2}\n\ +snippet rel\n\ + rel=\"${1}\"${2}\n\ +snippet scope\n\ + scope=\"${1:row}\"${2}\n\ +snippet src\n\ + src=\"${1}\"${2}\n\ +snippet title=\n\ + title=\"${1}\"${2}\n\ +snippet type\n\ + type=\"${1}\"${2}\n\ +snippet value\n\ + value=\"${1}\"${2}\n\ +snippet width\n\ + width=\"${1}\"${2}\n\ +# Elements\n\ +snippet a\n\ + ${2:$1}\n\ +snippet a.\n\ + ${3:$1}\n\ +snippet a#\n\ + ${3:$1}\n\ +snippet a:ext\n\ + ${2:$1}\n\ +snippet a:mail\n\ + ${3:email me}\n\ +snippet abbr\n\ + ${2}\n\ +snippet address\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet area\n\ + \"${4}\"\n\ +snippet area+\n\ + \"${4}\"\n\ + area+${5}\n\ +snippet area:c\n\ + \"${3}\"\n\ +snippet area:d\n\ + \"${3}\"\n\ +snippet area:p\n\ + \"${3}\"\n\ +snippet area:r\n\ + \"${3}\"\n\ +snippet article\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet article.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet article#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet aside\n\ + \n\ +snippet aside.\n\ + \n\ +snippet aside#\n\ + \n\ +snippet audio\n\ + \n\ +snippet b\n\ + ${1}\n\ +snippet base\n\ + \n\ +snippet bdi\n\ + ${1}\n\ +snippet bdo\n\ + ${2}\n\ +snippet bdo:l\n\ + ${1}\n\ +snippet bdo:r\n\ + ${1}\n\ +snippet blockquote\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet body\n\ + \n\ + ${1}\n\ + \n\ +snippet br\n\ +
    ${1}\n\ +snippet button\n\ + \n\ +snippet button.\n\ + \n\ +snippet button#\n\ + \n\ +snippet button:s\n\ + \n\ +snippet button:r\n\ + \n\ +snippet canvas\n\ + \n\ + ${1}\n\ + \n\ +snippet caption\n\ +
    \n\ +snippet cite\n\ + ${1}\n\ +snippet code\n\ + ${1}\n\ +snippet col\n\ + ${1}\n\ +snippet col+\n\ + \n\ + col+${1}\n\ +snippet colgroup\n\ + \n\ + ${1}\n\ + \n\ +snippet colgroup+\n\ + \n\ + \n\ + col+${1}\n\ + \n\ +snippet command\n\ + \n\ +snippet command:c\n\ + \n\ +snippet command:r\n\ + \n\ +snippet datagrid\n\ + \n\ + ${1}\n\ + \n\ +snippet datalist\n\ + \n\ + ${1}\n\ + \n\ +snippet datatemplate\n\ + \n\ + ${1}\n\ + \n\ +snippet dd\n\ +
    ${1}
    \n\ +snippet dd.\n\ +
    ${2}
    \n\ +snippet dd#\n\ +
    ${2}
    \n\ +snippet del\n\ + ${1}\n\ +snippet details\n\ +
    ${1}
    \n\ +snippet dfn\n\ + ${1}\n\ +snippet dialog\n\ + \n\ + ${1}\n\ + \n\ +snippet div\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet div.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet div#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet dl\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet dl.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet dl#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet dl+\n\ +
    \n\ +
    ${1}
    \n\ +
    ${2}
    \n\ + dt+${3}\n\ +
    \n\ +snippet dt\n\ +
    ${1}
    \n\ +snippet dt.\n\ +
    ${2}
    \n\ +snippet dt#\n\ +
    ${2}
    \n\ +snippet dt+\n\ +
    ${1}
    \n\ +
    ${2}
    \n\ + dt+${3}\n\ +snippet em\n\ + ${1}\n\ +snippet embed\n\ + \n\ +snippet fieldset\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet fieldset.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet fieldset#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet fieldset+\n\ +
    \n\ + ${1}\n\ + ${2}\n\ +
    \n\ + fieldset+${3}\n\ +snippet figcaption\n\ +
    ${1}
    \n\ +snippet figure\n\ +
    ${1}
    \n\ +snippet footer\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet footer.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet footer#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet form\n\ + \n\ + ${3}\n\ + \n\ +snippet form.\n\ +
    \n\ + ${4}\n\ + \n\ +snippet form#\n\ +
    \n\ + ${4}\n\ + \n\ +snippet h1\n\ +

    ${1}

    \n\ +snippet h1.\n\ +

    ${2}

    \n\ +snippet h1#\n\ +

    ${2}

    \n\ +snippet h2\n\ +

    ${1}

    \n\ +snippet h2.\n\ +

    ${2}

    \n\ +snippet h2#\n\ +

    ${2}

    \n\ +snippet h3\n\ +

    ${1}

    \n\ +snippet h3.\n\ +

    ${2}

    \n\ +snippet h3#\n\ +

    ${2}

    \n\ +snippet h4\n\ +

    ${1}

    \n\ +snippet h4.\n\ +

    ${2}

    \n\ +snippet h4#\n\ +

    ${2}

    \n\ +snippet h5\n\ +
    ${1}
    \n\ +snippet h5.\n\ +
    ${2}
    \n\ +snippet h5#\n\ +
    ${2}
    \n\ +snippet h6\n\ +
    ${1}
    \n\ +snippet h6.\n\ +
    ${2}
    \n\ +snippet h6#\n\ +
    ${2}
    \n\ +snippet head\n\ + \n\ + \n\ +\n\ + ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ + ${2}\n\ + \n\ +snippet header\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet header.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet header#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet hgroup\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet hgroup.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet hr\n\ +
    ${1}\n\ +snippet html\n\ + \n\ + ${1}\n\ + \n\ +snippet xhtml\n\ + \n\ + ${1}\n\ + \n\ +snippet html5\n\ + \n\ + \n\ + \n\ + \n\ + ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ + ${2:meta}\n\ + \n\ + \n\ + ${3:body}\n\ + \n\ + \n\ +snippet xhtml5\n\ + \n\ + \n\ + \n\ + \n\ + ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ + ${2:meta}\n\ + \n\ + \n\ + ${3:body}\n\ + \n\ + \n\ +snippet i\n\ + ${1}\n\ +snippet iframe\n\ + ${2}\n\ +snippet iframe.\n\ + ${3}\n\ +snippet iframe#\n\ + ${3}\n\ +snippet img\n\ + \"${2}\"${3}\n\ +snippet img.\n\ + \"${3}\"${4}\n\ +snippet img#\n\ + \"${3}\"${4}\n\ +snippet input\n\ + ${5}\n\ +snippet input.\n\ + ${6}\n\ +snippet input:text\n\ + ${4}\n\ +snippet input:submit\n\ + ${4}\n\ +snippet input:hidden\n\ + ${4}\n\ +snippet input:button\n\ + ${4}\n\ +snippet input:image\n\ + ${5}\n\ +snippet input:checkbox\n\ + ${3}\n\ +snippet input:radio\n\ + ${3}\n\ +snippet input:color\n\ + ${4}\n\ +snippet input:date\n\ + ${4}\n\ +snippet input:datetime\n\ + ${4}\n\ +snippet input:datetime-local\n\ + ${4}\n\ +snippet input:email\n\ + ${4}\n\ +snippet input:file\n\ + ${4}\n\ +snippet input:month\n\ + ${4}\n\ +snippet input:number\n\ + ${4}\n\ +snippet input:password\n\ + ${4}\n\ +snippet input:range\n\ + ${4}\n\ +snippet input:reset\n\ + ${4}\n\ +snippet input:search\n\ + ${4}\n\ +snippet input:time\n\ + ${4}\n\ +snippet input:url\n\ + ${4}\n\ +snippet input:week\n\ + ${4}\n\ +snippet ins\n\ + ${1}\n\ +snippet kbd\n\ + ${1}\n\ +snippet keygen\n\ + ${1}\n\ +snippet label\n\ + \n\ +snippet label:i\n\ + \n\ + ${7}\n\ +snippet label:s\n\ + \n\ + \n\ +snippet legend\n\ + ${1}\n\ +snippet legend+\n\ + ${1}\n\ +snippet li\n\ +
  • ${1}
  • \n\ +snippet li.\n\ +
  • ${2}
  • \n\ +snippet li+\n\ +
  • ${1}
  • \n\ + li+${2}\n\ +snippet lia\n\ +
  • ${1}
  • \n\ +snippet lia+\n\ +
  • ${1}
  • \n\ + lia+${3}\n\ +snippet link\n\ + ${5}\n\ +snippet link:atom\n\ + ${2}\n\ +snippet link:css\n\ + ${4}\n\ +snippet link:favicon\n\ + ${2}\n\ +snippet link:rss\n\ + ${2}\n\ +snippet link:touch\n\ + ${2}\n\ +snippet map\n\ + \n\ + ${2}\n\ + \n\ +snippet map.\n\ + \n\ + ${3}\n\ + \n\ +snippet map#\n\ + \n\ + ${3}\n\ + \n\ +snippet map+\n\ + \n\ + \"${5}\"${6}\n\ + ${7}\n\ +snippet mark\n\ + ${1}\n\ +snippet menu\n\ + \n\ + ${1}\n\ + \n\ +snippet menu:c\n\ + \n\ + ${1}\n\ + \n\ +snippet menu:t\n\ + \n\ + ${1}\n\ + \n\ +snippet meta\n\ + ${3}\n\ +snippet meta:compat\n\ + ${3}\n\ +snippet meta:refresh\n\ + ${3}\n\ +snippet meta:utf\n\ + ${3}\n\ +snippet meter\n\ + ${1}\n\ +snippet nav\n\ + \n\ +snippet nav.\n\ + \n\ +snippet nav#\n\ + \n\ +snippet noscript\n\ + \n\ +snippet object\n\ + \n\ + ${3}\n\ + ${4}\n\ +# Embed QT Movie\n\ +snippet movie\n\ + \n\ + \n\ + \n\ + \n\ + \n\ + ${6}\n\ +snippet ol\n\ +
      \n\ + ${1}\n\ +
    \n\ +snippet ol.\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ol#\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ol+\n\ +
      \n\ +
    1. ${1}
    2. \n\ + li+${2}\n\ +
    \n\ +snippet opt\n\ + \n\ +snippet opt+\n\ + \n\ + opt+${3}\n\ +snippet optt\n\ + \n\ +snippet optgroup\n\ + \n\ + \n\ + opt+${3}\n\ + \n\ +snippet output\n\ + ${1}\n\ +snippet p\n\ +

    ${1}

    \n\ +snippet param\n\ + ${3}\n\ +snippet pre\n\ +
    \n\
    +		${1}\n\
    +	
    \n\ +snippet progress\n\ + ${1}\n\ +snippet q\n\ + ${1}\n\ +snippet rp\n\ + ${1}\n\ +snippet rt\n\ + ${1}\n\ +snippet ruby\n\ + \n\ + ${1}\n\ + \n\ +snippet s\n\ + ${1}\n\ +snippet samp\n\ + \n\ + ${1}\n\ + \n\ +snippet script\n\ + \n\ +snippet scriptsrc\n\ + \n\ +snippet newscript\n\ + \n\ +snippet newscriptsrc\n\ + \n\ +snippet section\n\ +
    \n\ + ${1}\n\ +
    \n\ +snippet section.\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet section#\n\ +
    \n\ + ${2}\n\ +
    \n\ +snippet select\n\ + \n\ +snippet select.\n\ + \n\ +snippet select+\n\ + \n\ +snippet small\n\ + ${1}\n\ +snippet source\n\ + \n\ +snippet span\n\ + ${1}\n\ +snippet strong\n\ + ${1}\n\ +snippet style\n\ + \n\ +snippet sub\n\ + ${1}\n\ +snippet summary\n\ + \n\ + ${1}\n\ + \n\ +snippet sup\n\ + ${1}\n\ +snippet table\n\ +
    '.$langs->trans("BoxTitleLastModifiedExpenses", min($max, $num)).''.$langs->trans("TotalTTC").'
    ${1}
    \n\ + ${2}\n\ +
    \n\ +snippet table.\n\ + \n\ + ${3}\n\ +
    \n\ +snippet table#\n\ + \n\ + ${3}\n\ +
    \n\ +snippet tbody\n\ + \n\ + ${1}\n\ + \n\ +snippet td\n\ + ${1}\n\ +snippet td.\n\ + ${2}\n\ +snippet td#\n\ + ${2}\n\ +snippet td+\n\ + ${1}\n\ + td+${2}\n\ +snippet textarea\n\ + ${6}\n\ +snippet tfoot\n\ + \n\ + ${1}\n\ + \n\ +snippet th\n\ + ${1}\n\ +snippet th.\n\ + ${2}\n\ +snippet th#\n\ + ${2}\n\ +snippet th+\n\ + ${1}\n\ + th+${2}\n\ +snippet thead\n\ + \n\ + ${1}\n\ + \n\ +snippet time\n\ + \n\ +snippet title\n\ + ${1:`substitute(Filename('', 'Page Title'), '^.', '\\u&', '')`}\n\ +snippet tr\n\ + \n\ + ${1}\n\ + \n\ +snippet tr+\n\ + \n\ + ${1}\n\ + td+${2}\n\ + \n\ +snippet track\n\ + ${5}${6}\n\ +snippet ul\n\ +
      \n\ + ${1}\n\ +
    \n\ +snippet ul.\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ul#\n\ +
      \n\ + ${2}\n\ +
    \n\ +snippet ul+\n\ +
      \n\ +
    • ${1}
    • \n\ + li+${2}\n\ +
    \n\ +snippet var\n\ + ${1}\n\ +snippet video\n\ + ${8}\n\ +snippet wbr\n\ + ${1}\n\ +"; +exports.scope = "liquid"; + +}); (function() { + window.require(["ace/snippets/liquid"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/lisp.js b/htdocs/includes/ace/src/snippets/lisp.js new file mode 100644 index 00000000000..f6c13860ec9 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/lisp.js @@ -0,0 +1,14 @@ +define("ace/snippets/lisp",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "lisp"; + +}); (function() { + window.require(["ace/snippets/lisp"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/livescript.js b/htdocs/includes/ace/src/snippets/livescript.js new file mode 100644 index 00000000000..08b6cb107d6 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/livescript.js @@ -0,0 +1,14 @@ +define("ace/snippets/livescript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "livescript"; + +}); (function() { + window.require(["ace/snippets/livescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/logiql.js b/htdocs/includes/ace/src/snippets/logiql.js new file mode 100644 index 00000000000..073da94b692 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/logiql.js @@ -0,0 +1,14 @@ +define("ace/snippets/logiql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "logiql"; + +}); (function() { + window.require(["ace/snippets/logiql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/logtalk.js b/htdocs/includes/ace/src/snippets/logtalk.js new file mode 100644 index 00000000000..4ab4f1f9e8c --- /dev/null +++ b/htdocs/includes/ace/src/snippets/logtalk.js @@ -0,0 +1,14 @@ +define("ace/snippets/logtalk",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "logtalk"; + +}); (function() { + window.require(["ace/snippets/logtalk"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/lsl.js b/htdocs/includes/ace/src/snippets/lsl.js similarity index 98% rename from htdocs/includes/ace/snippets/lsl.js rename to htdocs/includes/ace/src/snippets/lsl.js index 717a5cf32c8..ee79cd67c3f 100644 --- a/htdocs/includes/ace/snippets/lsl.js +++ b/htdocs/includes/ace/src/snippets/lsl.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/lsl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet @\n\ @@ -1236,4 +1236,11 @@ snippet while\n\ "; exports.scope = "lsl"; -}); +}); (function() { + window.require(["ace/snippets/lsl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/lua.js b/htdocs/includes/ace/src/snippets/lua.js similarity index 53% rename from htdocs/includes/ace/snippets/lua.js rename to htdocs/includes/ace/src/snippets/lua.js index c369b648ff8..acf24bf8160 100644 --- a/htdocs/includes/ace/snippets/lua.js +++ b/htdocs/includes/ace/src/snippets/lua.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/lua",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet #!\n\ @@ -25,4 +25,11 @@ snippet fori\n\ "; exports.scope = "lua"; -}); +}); (function() { + window.require(["ace/snippets/lua"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/luapage.js b/htdocs/includes/ace/src/snippets/luapage.js new file mode 100644 index 00000000000..8f52b58fc01 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/luapage.js @@ -0,0 +1,14 @@ +define("ace/snippets/luapage",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "luapage"; + +}); (function() { + window.require(["ace/snippets/luapage"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/lucene.js b/htdocs/includes/ace/src/snippets/lucene.js new file mode 100644 index 00000000000..c61509bea79 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/lucene.js @@ -0,0 +1,14 @@ +define("ace/snippets/lucene",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "lucene"; + +}); (function() { + window.require(["ace/snippets/lucene"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/makefile.js b/htdocs/includes/ace/src/snippets/makefile.js new file mode 100644 index 00000000000..138f8bbd886 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/makefile.js @@ -0,0 +1,18 @@ +define("ace/snippets/makefile",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet ifeq\n\ + ifeq (${1:cond0},${2:cond1})\n\ + ${3:code}\n\ + endif\n\ +"; +exports.scope = "makefile"; + +}); (function() { + window.require(["ace/snippets/makefile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/markdown.js b/htdocs/includes/ace/src/snippets/markdown.js similarity index 82% rename from htdocs/includes/ace/snippets/markdown.js rename to htdocs/includes/ace/src/snippets/markdown.js index d05f16b9693..8f55e6ffa22 100644 --- a/htdocs/includes/ace/snippets/markdown.js +++ b/htdocs/includes/ace/src/snippets/markdown.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/markdown",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Markdown\n\ @@ -92,4 +92,11 @@ snippet pullquote\n\ "; exports.scope = "markdown"; -}); +}); (function() { + window.require(["ace/snippets/markdown"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/mask.js b/htdocs/includes/ace/src/snippets/mask.js new file mode 100644 index 00000000000..1b9c0c56dc2 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/mask.js @@ -0,0 +1,14 @@ +define("ace/snippets/mask",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mask"; + +}); (function() { + window.require(["ace/snippets/mask"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/matlab.js b/htdocs/includes/ace/src/snippets/matlab.js new file mode 100644 index 00000000000..d8fcd2bd071 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/matlab.js @@ -0,0 +1,14 @@ +define("ace/snippets/matlab",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "matlab"; + +}); (function() { + window.require(["ace/snippets/matlab"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/maze.js b/htdocs/includes/ace/src/snippets/maze.js new file mode 100644 index 00000000000..573285a4fe5 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/maze.js @@ -0,0 +1,23 @@ +define("ace/snippets/maze",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet >\n\ +description assignment\n\ +scope maze\n\ + -> ${1}= ${2}\n\ +\n\ +snippet >\n\ +description if\n\ +scope maze\n\ + -> IF ${2:**} THEN %${3:L} ELSE %${4:R}\n\ +"; +exports.scope = "maze"; + +}); (function() { + window.require(["ace/snippets/maze"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/mel.js b/htdocs/includes/ace/src/snippets/mel.js new file mode 100644 index 00000000000..4e43ab1be3f --- /dev/null +++ b/htdocs/includes/ace/src/snippets/mel.js @@ -0,0 +1,14 @@ +define("ace/snippets/mel",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mel"; + +}); (function() { + window.require(["ace/snippets/mel"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/mixal.js b/htdocs/includes/ace/src/snippets/mixal.js new file mode 100644 index 00000000000..60b08ea8f52 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/mixal.js @@ -0,0 +1,14 @@ +define("ace/snippets/mixal",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mixal"; + +}); (function() { + window.require(["ace/snippets/mixal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/mushcode.js b/htdocs/includes/ace/src/snippets/mushcode.js new file mode 100644 index 00000000000..1ff99c4abae --- /dev/null +++ b/htdocs/includes/ace/src/snippets/mushcode.js @@ -0,0 +1,14 @@ +define("ace/snippets/mushcode",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mushcode"; + +}); (function() { + window.require(["ace/snippets/mushcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/mysql.js b/htdocs/includes/ace/src/snippets/mysql.js new file mode 100644 index 00000000000..2791c37f87a --- /dev/null +++ b/htdocs/includes/ace/src/snippets/mysql.js @@ -0,0 +1,14 @@ +define("ace/snippets/mysql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "mysql"; + +}); (function() { + window.require(["ace/snippets/mysql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/nginx.js b/htdocs/includes/ace/src/snippets/nginx.js new file mode 100644 index 00000000000..4305b2cae3e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/nginx.js @@ -0,0 +1,14 @@ +define("ace/snippets/nginx",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "nginx"; + +}); (function() { + window.require(["ace/snippets/nginx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/nim.js b/htdocs/includes/ace/src/snippets/nim.js new file mode 100644 index 00000000000..f73018ce124 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/nim.js @@ -0,0 +1,14 @@ +define("ace/snippets/nim",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "nim"; + +}); (function() { + window.require(["ace/snippets/nim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/nix.js b/htdocs/includes/ace/src/snippets/nix.js new file mode 100644 index 00000000000..c7d9035a6d3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/nix.js @@ -0,0 +1,14 @@ +define("ace/snippets/nix",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "nix"; + +}); (function() { + window.require(["ace/snippets/nix"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/nsis.js b/htdocs/includes/ace/src/snippets/nsis.js new file mode 100644 index 00000000000..423a1a8b336 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/nsis.js @@ -0,0 +1,14 @@ +define("ace/snippets/nsis",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/nsis"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/objectivec.js b/htdocs/includes/ace/src/snippets/objectivec.js new file mode 100644 index 00000000000..32816f0b2a1 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/objectivec.js @@ -0,0 +1,14 @@ +define("ace/snippets/objectivec",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "objectivec"; + +}); (function() { + window.require(["ace/snippets/objectivec"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/ocaml.js b/htdocs/includes/ace/src/snippets/ocaml.js new file mode 100644 index 00000000000..2d1f07a0043 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/ocaml.js @@ -0,0 +1,14 @@ +define("ace/snippets/ocaml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "ocaml"; + +}); (function() { + window.require(["ace/snippets/ocaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/pascal.js b/htdocs/includes/ace/src/snippets/pascal.js new file mode 100644 index 00000000000..296a7565525 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/pascal.js @@ -0,0 +1,14 @@ +define("ace/snippets/pascal",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "pascal"; + +}); (function() { + window.require(["ace/snippets/pascal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/perl.js b/htdocs/includes/ace/src/snippets/perl.js similarity index 93% rename from htdocs/includes/ace/snippets/perl.js rename to htdocs/includes/ace/src/snippets/perl.js index 9f818432cac..7b217b95d03 100644 --- a/htdocs/includes/ace/snippets/perl.js +++ b/htdocs/includes/ace/src/snippets/perl.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/perl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# #!/usr/bin/perl\n\ @@ -351,4 +351,11 @@ snippet debug_trace\n\ "; exports.scope = "perl"; -}); +}); (function() { + window.require(["ace/snippets/perl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/perl6.js b/htdocs/includes/ace/src/snippets/perl6.js new file mode 100644 index 00000000000..90ecfbe0c82 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/perl6.js @@ -0,0 +1,14 @@ +define("ace/snippets/perl6",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "perl6"; + +}); (function() { + window.require(["ace/snippets/perl6"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/pgsql.js b/htdocs/includes/ace/src/snippets/pgsql.js new file mode 100644 index 00000000000..b8b45fb8acb --- /dev/null +++ b/htdocs/includes/ace/src/snippets/pgsql.js @@ -0,0 +1,14 @@ +define("ace/snippets/pgsql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "pgsql"; + +}); (function() { + window.require(["ace/snippets/pgsql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/php.js b/htdocs/includes/ace/src/snippets/php.js similarity index 90% rename from htdocs/includes/ace/snippets/php.js rename to htdocs/includes/ace/src/snippets/php.js index a99ab6e09b2..dda20827bc8 100644 --- a/htdocs/includes/ace/snippets/php.js +++ b/htdocs/includes/ace/src/snippets/php.js @@ -1,17 +1,8 @@ -ace.define("ace/snippets/php",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/php",["require","exports","module"], function(require, exports, module) { "use strict"; -exports.snippetText = "snippet \n\ -# this one is for php5.4\n\ -snippet \n\ snippet ns\n\ namespace ${1:Foo\\Bar\\Baz};\n\ ${2}\n\ @@ -42,7 +33,7 @@ snippet m\n\ ${7}\n\ }\n\ # setter method\n\ -snippet sm \n\ +snippet sm\n\ /**\n\ * Sets the value of ${1:foo}\n\ *\n\ @@ -95,7 +86,7 @@ snippet S\n\ $_SERVER['${1:variable}']${2}\n\ snippet SS\n\ $_SESSION['${1:variable}']${2}\n\ - \n\ +\n\ # the following are old ones\n\ snippet inc\n\ include '${1:file}';${2}\n\ @@ -196,7 +187,7 @@ snippet doc_h\n\ * @copyright ${4:$2}, `strftime('%d %B, %Y')`\n\ * @package ${5:default}\n\ */\n\ - \n\ +\n\ # Interface\n\ snippet interface\n\ /**\n\ @@ -244,10 +235,6 @@ snippet if\n\ if (${1:/* condition */}) {\n\ ${2:// code...}\n\ }\n\ -snippet ifil\n\ - \n\ - ${2:}\n\ - \n\ snippet ife\n\ if (${1:/* condition */}) {\n\ ${2:// code...}\n\ @@ -255,13 +242,6 @@ snippet ife\n\ ${3:// code...}\n\ }\n\ ${4}\n\ -snippet ifeil\n\ - \n\ - ${2:}\n\ - \n\ - ${3:}\n\ - \n\ - ${4}\n\ snippet else\n\ else {\n\ ${1:// code...}\n\ @@ -292,18 +272,10 @@ snippet foreach\n\ foreach ($${1:variable} as $${2:value}) {\n\ ${3:// code...}\n\ }\n\ -snippet foreachil\n\ - \n\ - ${3:}\n\ - \n\ snippet foreachk\n\ foreach ($${1:variable} as $${2:key} => $${3:value}) {\n\ ${4:// code...}\n\ }\n\ -snippet foreachkil\n\ - $${3:value}): ?>\n\ - ${4:}\n\ - \n\ # $... = array (...)\n\ snippet array\n\ $${1:arrayName} = array('${2}' => ${3});${4}\n\ @@ -328,8 +300,8 @@ snippet vd\n\ snippet vdd\n\ var_dump(${1}); die(${2:});\n\ snippet http_redirect\n\ - header (\"HTTP/1.1 301 Moved Permanently\"); \n\ - header (\"Location: \".URL); \n\ + header (\"HTTP/1.1 301 Moved Permanently\");\n\ + header (\"Location: \".URL);\n\ exit();\n\ # Getters & Setters\n\ snippet gs\n\ @@ -359,7 +331,7 @@ snippet gs\n\ snippet ags\n\ /**\n\ * ${1:description}\n\ - * \n\ + *\n\ * @${7}\n\ */\n\ ${2:protected} $${3:foo};\n\ @@ -378,7 +350,48 @@ snippet rett\n\ return true;\n\ snippet retf\n\ return false;\n\ +scope html\n\ +snippet \n\ +# this one is for php5.4\n\ +snippet \n\ +snippet ifil\n\ + \n\ + ${2:}\n\ + \n\ +snippet ifeil\n\ + \n\ + ${2:}\n\ + \n\ + ${3:}\n\ + \n\ + ${4}\n\ +snippet foreachil\n\ + \n\ + ${3:}\n\ + \n\ +snippet foreachkil\n\ + $${3:value}): ?>\n\ + ${4:}\n\ + \n\ +scope html-tag\n\ +snippet ifil\\n\\\n\ + ${2:code}\n\ +snippet ifeil\\n\\\n\ + ${2:code}${3:code}${4}\n\ "; exports.scope = "php"; -}); +}); (function() { + window.require(["ace/snippets/php"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/php_laravel_blade.js b/htdocs/includes/ace/src/snippets/php_laravel_blade.js new file mode 100644 index 00000000000..9a722c9b371 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/php_laravel_blade.js @@ -0,0 +1,14 @@ +define("ace/snippets/php_laravel_blade",["require","exports","module"], function(require, exports, module) { + "use strict"; + + exports.snippetText =undefined; + exports.scope = "php"; + +}); (function() { + window.require(["ace/snippets/php_laravel_blade"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/pig.js b/htdocs/includes/ace/src/snippets/pig.js new file mode 100644 index 00000000000..94d46c7cc7f --- /dev/null +++ b/htdocs/includes/ace/src/snippets/pig.js @@ -0,0 +1,14 @@ +define("ace/snippets/pig",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "pig"; + +}); (function() { + window.require(["ace/snippets/pig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/plain_text.js b/htdocs/includes/ace/src/snippets/plain_text.js new file mode 100644 index 00000000000..988880c9c97 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/plain_text.js @@ -0,0 +1,14 @@ +define("ace/snippets/plain_text",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "plain_text"; + +}); (function() { + window.require(["ace/snippets/plain_text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/powershell.js b/htdocs/includes/ace/src/snippets/powershell.js new file mode 100644 index 00000000000..4d8388a81ea --- /dev/null +++ b/htdocs/includes/ace/src/snippets/powershell.js @@ -0,0 +1,14 @@ +define("ace/snippets/powershell",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "powershell"; + +}); (function() { + window.require(["ace/snippets/powershell"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/praat.js b/htdocs/includes/ace/src/snippets/praat.js new file mode 100644 index 00000000000..75fa2e423e5 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/praat.js @@ -0,0 +1,14 @@ +define("ace/snippets/praat",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "praat"; + +}); (function() { + window.require(["ace/snippets/praat"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/prolog.js b/htdocs/includes/ace/src/snippets/prolog.js new file mode 100644 index 00000000000..9147ec6dfaf --- /dev/null +++ b/htdocs/includes/ace/src/snippets/prolog.js @@ -0,0 +1,14 @@ +define("ace/snippets/prolog",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "prolog"; + +}); (function() { + window.require(["ace/snippets/prolog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/properties.js b/htdocs/includes/ace/src/snippets/properties.js new file mode 100644 index 00000000000..1ef5ff3e732 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/properties.js @@ -0,0 +1,14 @@ +define("ace/snippets/properties",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "properties"; + +}); (function() { + window.require(["ace/snippets/properties"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/protobuf.js b/htdocs/includes/ace/src/snippets/protobuf.js new file mode 100644 index 00000000000..98f00415c7e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/protobuf.js @@ -0,0 +1,14 @@ +define("ace/snippets/protobuf",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = ""; +exports.scope = "protobuf"; + +}); (function() { + window.require(["ace/snippets/protobuf"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/puppet.js b/htdocs/includes/ace/src/snippets/puppet.js new file mode 100644 index 00000000000..5c7b31650a3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/puppet.js @@ -0,0 +1,14 @@ +define("ace/snippets/puppet",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "puppet"; + +}); (function() { + window.require(["ace/snippets/puppet"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/python.js b/htdocs/includes/ace/src/snippets/python.js similarity index 90% rename from htdocs/includes/ace/snippets/python.js rename to htdocs/includes/ace/src/snippets/python.js index 182b34067e7..a06c0999504 100644 --- a/htdocs/includes/ace/snippets/python.js +++ b/htdocs/includes/ace/src/snippets/python.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/python",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/python",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet #!\n\ @@ -162,4 +162,11 @@ snippet getopt\n\ "; exports.scope = "python"; -}); +}); (function() { + window.require(["ace/snippets/python"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/r.js b/htdocs/includes/ace/src/snippets/r.js similarity index 86% rename from htdocs/includes/ace/snippets/r.js rename to htdocs/includes/ace/src/snippets/r.js index 24c02a0c6a7..dd26a5258e8 100644 --- a/htdocs/includes/ace/snippets/r.js +++ b/htdocs/includes/ace/src/snippets/r.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/r",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/r",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet #!\n\ @@ -125,4 +125,11 @@ snippet kvt \n\ "; exports.scope = "r"; -}); +}); (function() { + window.require(["ace/snippets/r"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/razor.js b/htdocs/includes/ace/src/snippets/razor.js new file mode 100644 index 00000000000..505528b531c --- /dev/null +++ b/htdocs/includes/ace/src/snippets/razor.js @@ -0,0 +1,17 @@ +define("ace/snippets/razor",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "snippet if\n\ +(${1} == ${2}) {\n\ + ${3}\n\ +}"; +exports.scope = "razor"; + +}); (function() { + window.require(["ace/snippets/razor"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/rdoc.js b/htdocs/includes/ace/src/snippets/rdoc.js new file mode 100644 index 00000000000..f4dc8927f84 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/rdoc.js @@ -0,0 +1,14 @@ +define("ace/snippets/rdoc",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "rdoc"; + +}); (function() { + window.require(["ace/snippets/rdoc"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/red.js b/htdocs/includes/ace/src/snippets/red.js new file mode 100644 index 00000000000..900634e691e --- /dev/null +++ b/htdocs/includes/ace/src/snippets/red.js @@ -0,0 +1,14 @@ +define("ace/snippets/red",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = " "; +exports.scope = "red"; + +}); (function() { + window.require(["ace/snippets/red"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/redshift.js b/htdocs/includes/ace/src/snippets/redshift.js new file mode 100644 index 00000000000..088f0febf03 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/redshift.js @@ -0,0 +1,14 @@ +define("ace/snippets/redshift",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "redshift"; + +}); (function() { + window.require(["ace/snippets/redshift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/rhtml.js b/htdocs/includes/ace/src/snippets/rhtml.js new file mode 100644 index 00000000000..e31ed6f8e92 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/rhtml.js @@ -0,0 +1,14 @@ +define("ace/snippets/rhtml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "rhtml"; + +}); (function() { + window.require(["ace/snippets/rhtml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/rst.js b/htdocs/includes/ace/src/snippets/rst.js similarity index 50% rename from htdocs/includes/ace/snippets/rst.js rename to htdocs/includes/ace/src/snippets/rst.js index db6c960f63d..2c89a897e84 100644 --- a/htdocs/includes/ace/snippets/rst.js +++ b/htdocs/includes/ace/src/snippets/rst.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/rst",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/rst",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# rst\n\ @@ -26,4 +26,11 @@ snippet cont:\n\ "; exports.scope = "rst"; -}); +}); (function() { + window.require(["ace/snippets/rst"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/ruby.js b/htdocs/includes/ace/src/snippets/ruby.js similarity index 98% rename from htdocs/includes/ace/snippets/ruby.js rename to htdocs/includes/ace/src/snippets/ruby.js index 18bc409f47d..c34cac47e7b 100644 --- a/htdocs/includes/ace/snippets/ruby.js +++ b/htdocs/includes/ace/src/snippets/ruby.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/ruby",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "########################################\n\ @@ -932,4 +932,11 @@ snippet aft\n\ "; exports.scope = "ruby"; -}); +}); (function() { + window.require(["ace/snippets/ruby"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/rust.js b/htdocs/includes/ace/src/snippets/rust.js new file mode 100644 index 00000000000..9ee8633e254 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/rust.js @@ -0,0 +1,14 @@ +define("ace/snippets/rust",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "rust"; + +}); (function() { + window.require(["ace/snippets/rust"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/sass.js b/htdocs/includes/ace/src/snippets/sass.js new file mode 100644 index 00000000000..684485dd0ee --- /dev/null +++ b/htdocs/includes/ace/src/snippets/sass.js @@ -0,0 +1,14 @@ +define("ace/snippets/sass",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "sass"; + +}); (function() { + window.require(["ace/snippets/sass"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/scad.js b/htdocs/includes/ace/src/snippets/scad.js new file mode 100644 index 00000000000..4d7eec20085 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/scad.js @@ -0,0 +1,14 @@ +define("ace/snippets/scad",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scad"; + +}); (function() { + window.require(["ace/snippets/scad"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/scala.js b/htdocs/includes/ace/src/snippets/scala.js new file mode 100644 index 00000000000..03eb329e7a4 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/scala.js @@ -0,0 +1,14 @@ +define("ace/snippets/scala",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scala"; + +}); (function() { + window.require(["ace/snippets/scala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/scheme.js b/htdocs/includes/ace/src/snippets/scheme.js new file mode 100644 index 00000000000..0f0906f147f --- /dev/null +++ b/htdocs/includes/ace/src/snippets/scheme.js @@ -0,0 +1,14 @@ +define("ace/snippets/scheme",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scheme"; + +}); (function() { + window.require(["ace/snippets/scheme"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/scss.js b/htdocs/includes/ace/src/snippets/scss.js new file mode 100644 index 00000000000..8e636cea79c --- /dev/null +++ b/htdocs/includes/ace/src/snippets/scss.js @@ -0,0 +1,14 @@ +define("ace/snippets/scss",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "scss"; + +}); (function() { + window.require(["ace/snippets/scss"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/sh.js b/htdocs/includes/ace/src/snippets/sh.js similarity index 83% rename from htdocs/includes/ace/snippets/sh.js rename to htdocs/includes/ace/src/snippets/sh.js index 0f1f6d8e124..6155075e65a 100644 --- a/htdocs/includes/ace/snippets/sh.js +++ b/htdocs/includes/ace/src/snippets/sh.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/sh",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/sh",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Shebang. Executing bash via /usr/bin/env makes scripts more portable.\n\ @@ -87,4 +87,11 @@ snippet getopt\n\ "; exports.scope = "sh"; -}); +}); (function() { + window.require(["ace/snippets/sh"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/sjs.js b/htdocs/includes/ace/src/snippets/sjs.js new file mode 100644 index 00000000000..a0756ae154d --- /dev/null +++ b/htdocs/includes/ace/src/snippets/sjs.js @@ -0,0 +1,14 @@ +define("ace/snippets/sjs",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "sjs"; + +}); (function() { + window.require(["ace/snippets/sjs"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/slim.js b/htdocs/includes/ace/src/snippets/slim.js new file mode 100644 index 00000000000..7b159a94d6a --- /dev/null +++ b/htdocs/includes/ace/src/snippets/slim.js @@ -0,0 +1,14 @@ +define("ace/snippets/slim",["require","exports","module"], function(require, exports, module) { + "use strict"; + + exports.snippetText =undefined; + exports.scope = "slim"; + +}); (function() { + window.require(["ace/snippets/slim"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/smarty.js b/htdocs/includes/ace/src/snippets/smarty.js new file mode 100644 index 00000000000..84c3d8eee1c --- /dev/null +++ b/htdocs/includes/ace/src/snippets/smarty.js @@ -0,0 +1,14 @@ +define("ace/snippets/smarty",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "smarty"; + +}); (function() { + window.require(["ace/snippets/smarty"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/snippets.js b/htdocs/includes/ace/src/snippets/snippets.js new file mode 100644 index 00000000000..137aa82a845 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/snippets.js @@ -0,0 +1,23 @@ +define("ace/snippets/snippets",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText = "# snippets for making snippets :)\n\ +snippet snip\n\ + snippet ${1:trigger}\n\ + ${2}\n\ +snippet msnip\n\ + snippet ${1:trigger} ${2:description}\n\ + ${3}\n\ +snippet v\n\ + {VISUAL}\n\ +"; +exports.scope = "snippets"; + +}); (function() { + window.require(["ace/snippets/snippets"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/soy_template.js b/htdocs/includes/ace/src/snippets/soy_template.js new file mode 100644 index 00000000000..d087ef1d21a --- /dev/null +++ b/htdocs/includes/ace/src/snippets/soy_template.js @@ -0,0 +1,14 @@ +define("ace/snippets/soy_template",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "soy_template"; + +}); (function() { + window.require(["ace/snippets/soy_template"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/space.js b/htdocs/includes/ace/src/snippets/space.js new file mode 100644 index 00000000000..ae87ec48d82 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/space.js @@ -0,0 +1,14 @@ +define("ace/snippets/space",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "space"; + +}); (function() { + window.require(["ace/snippets/space"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/sparql.js b/htdocs/includes/ace/src/snippets/sparql.js new file mode 100644 index 00000000000..e021a74fb94 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/sparql.js @@ -0,0 +1,14 @@ +define("ace/snippets/sparql",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/sparql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/sql.js b/htdocs/includes/ace/src/snippets/sql.js similarity index 68% rename from htdocs/includes/ace/snippets/sql.js rename to htdocs/includes/ace/src/snippets/sql.js index 1822126ba78..944b0391bec 100644 --- a/htdocs/includes/ace/snippets/sql.js +++ b/htdocs/includes/ace/src/snippets/sql.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/sql",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/sql",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet tbl\n\ @@ -30,4 +30,11 @@ snippet s*\n\ "; exports.scope = "sql"; -}); +}); (function() { + window.require(["ace/snippets/sql"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/sqlserver.js b/htdocs/includes/ace/src/snippets/sqlserver.js similarity index 83% rename from htdocs/includes/ace/snippets/sqlserver.js rename to htdocs/includes/ace/src/snippets/sqlserver.js index 7dfa2d0493b..ba3db1f4067 100644 --- a/htdocs/includes/ace/snippets/sqlserver.js +++ b/htdocs/includes/ace/src/snippets/sqlserver.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/sqlserver",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/sqlserver",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# ISNULL\n\ @@ -73,4 +73,11 @@ snippet createfn\n\ GO"; exports.scope = "sqlserver"; -}); +}); (function() { + window.require(["ace/snippets/sqlserver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/stylus.js b/htdocs/includes/ace/src/snippets/stylus.js new file mode 100644 index 00000000000..0172b391622 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/stylus.js @@ -0,0 +1,14 @@ +define("ace/snippets/stylus",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "stylus"; + +}); (function() { + window.require(["ace/snippets/stylus"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/svg.js b/htdocs/includes/ace/src/snippets/svg.js new file mode 100644 index 00000000000..9f63d38fa3b --- /dev/null +++ b/htdocs/includes/ace/src/snippets/svg.js @@ -0,0 +1,14 @@ +define("ace/snippets/svg",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "svg"; + +}); (function() { + window.require(["ace/snippets/svg"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/swift.js b/htdocs/includes/ace/src/snippets/swift.js new file mode 100644 index 00000000000..8b510938dd3 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/swift.js @@ -0,0 +1,14 @@ +define("ace/snippets/swift",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "swift"; + +}); (function() { + window.require(["ace/snippets/swift"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/tcl.js b/htdocs/includes/ace/src/snippets/tcl.js similarity index 80% rename from htdocs/includes/ace/snippets/tcl.js rename to htdocs/includes/ace/src/snippets/tcl.js index 4d116da8296..c1824205871 100644 --- a/htdocs/includes/ace/snippets/tcl.js +++ b/htdocs/includes/ace/src/snippets/tcl.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/tcl",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# #!/usr/bin/env tclsh\n\ @@ -96,4 +96,11 @@ snippet nsc\n\ "; exports.scope = "tcl"; -}); +}); (function() { + window.require(["ace/snippets/tcl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/terraform.js b/htdocs/includes/ace/src/snippets/terraform.js new file mode 100644 index 00000000000..7e0593733b5 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/terraform.js @@ -0,0 +1,14 @@ +define("ace/snippets/terraform",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "terraform"; + +}); (function() { + window.require(["ace/snippets/terraform"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/tex.js b/htdocs/includes/ace/src/snippets/tex.js similarity index 90% rename from htdocs/includes/ace/snippets/tex.js rename to htdocs/includes/ace/src/snippets/tex.js index 2bd3f1034c9..a76dfe732f3 100644 --- a/htdocs/includes/ace/snippets/tex.js +++ b/htdocs/includes/ace/src/snippets/tex.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/tex",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/tex",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "#PREAMBLE\n\ @@ -194,4 +194,11 @@ snippet sum\n\ \\sum^{${1:n}}_{${2:i=1}}{${3}}"; exports.scope = "tex"; -}); +}); (function() { + window.require(["ace/snippets/tex"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/text.js b/htdocs/includes/ace/src/snippets/text.js new file mode 100644 index 00000000000..949bb2a72dd --- /dev/null +++ b/htdocs/includes/ace/src/snippets/text.js @@ -0,0 +1,14 @@ +define("ace/snippets/text",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "text"; + +}); (function() { + window.require(["ace/snippets/text"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/textile.js b/htdocs/includes/ace/src/snippets/textile.js similarity index 55% rename from htdocs/includes/ace/snippets/textile.js rename to htdocs/includes/ace/src/snippets/textile.js index a6fd711efa5..56088f291e9 100644 --- a/htdocs/includes/ace/snippets/textile.js +++ b/htdocs/includes/ace/src/snippets/textile.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/textile",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/textile",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# Jekyll post header\n\ @@ -34,4 +34,11 @@ snippet fn\n\ "; exports.scope = "textile"; -}); +}); (function() { + window.require(["ace/snippets/textile"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/toml.js b/htdocs/includes/ace/src/snippets/toml.js new file mode 100644 index 00000000000..4f0c1fa463f --- /dev/null +++ b/htdocs/includes/ace/src/snippets/toml.js @@ -0,0 +1,14 @@ +define("ace/snippets/toml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "toml"; + +}); (function() { + window.require(["ace/snippets/toml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/tsx.js b/htdocs/includes/ace/src/snippets/tsx.js new file mode 100644 index 00000000000..fd1bba27203 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/tsx.js @@ -0,0 +1,14 @@ +define("ace/snippets/tsx",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "tsx"; + +}); (function() { + window.require(["ace/snippets/tsx"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/turtle.js b/htdocs/includes/ace/src/snippets/turtle.js new file mode 100644 index 00000000000..c6bc21bfa50 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/turtle.js @@ -0,0 +1,14 @@ +define("ace/snippets/turtle",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/turtle"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/twig.js b/htdocs/includes/ace/src/snippets/twig.js new file mode 100644 index 00000000000..fe757895eb6 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/twig.js @@ -0,0 +1,14 @@ +define("ace/snippets/twig",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "twig"; + +}); (function() { + window.require(["ace/snippets/twig"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/typescript.js b/htdocs/includes/ace/src/snippets/typescript.js new file mode 100644 index 00000000000..2da2fb807fa --- /dev/null +++ b/htdocs/includes/ace/src/snippets/typescript.js @@ -0,0 +1,14 @@ +define("ace/snippets/typescript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "typescript"; + +}); (function() { + window.require(["ace/snippets/typescript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/vala.js b/htdocs/includes/ace/src/snippets/vala.js similarity index 91% rename from htdocs/includes/ace/snippets/vala.js rename to htdocs/includes/ace/src/snippets/vala.js index 3b493422e7d..d99c0af102f 100644 --- a/htdocs/includes/ace/snippets/vala.js +++ b/htdocs/includes/ace/src/snippets/vala.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/vala",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/vala",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippets = [ { @@ -190,4 +190,11 @@ exports.snippets = [ ]; exports.scope = ""; -}); +}); (function() { + window.require(["ace/snippets/vala"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/vbscript.js b/htdocs/includes/ace/src/snippets/vbscript.js new file mode 100644 index 00000000000..0989a0810c9 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/vbscript.js @@ -0,0 +1,14 @@ +define("ace/snippets/vbscript",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "vbscript"; + +}); (function() { + window.require(["ace/snippets/vbscript"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/velocity.js b/htdocs/includes/ace/src/snippets/velocity.js similarity index 60% rename from htdocs/includes/ace/snippets/velocity.js rename to htdocs/includes/ace/src/snippets/velocity.js index e2b12a45e36..bda0443ca9b 100644 --- a/htdocs/includes/ace/snippets/velocity.js +++ b/htdocs/includes/ace/src/snippets/velocity.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/velocity",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "# macro\n\ @@ -33,4 +33,11 @@ snippet #set\n\ exports.scope = "velocity"; exports.includeScopes = ["html", "javascript", "css"]; -}); +}); (function() { + window.require(["ace/snippets/velocity"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/verilog.js b/htdocs/includes/ace/src/snippets/verilog.js new file mode 100644 index 00000000000..2ed2eef0e45 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/verilog.js @@ -0,0 +1,14 @@ +define("ace/snippets/verilog",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "verilog"; + +}); (function() { + window.require(["ace/snippets/verilog"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/vhdl.js b/htdocs/includes/ace/src/snippets/vhdl.js new file mode 100644 index 00000000000..d9b716461be --- /dev/null +++ b/htdocs/includes/ace/src/snippets/vhdl.js @@ -0,0 +1,14 @@ +define("ace/snippets/vhdl",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "vhdl"; + +}); (function() { + window.require(["ace/snippets/vhdl"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/visualforce.js b/htdocs/includes/ace/src/snippets/visualforce.js new file mode 100644 index 00000000000..11c0781cef2 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/visualforce.js @@ -0,0 +1,14 @@ +define("ace/snippets/visualforce",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "visualforce"; + +}); (function() { + window.require(["ace/snippets/visualforce"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/wollok.js b/htdocs/includes/ace/src/snippets/wollok.js similarity index 76% rename from htdocs/includes/ace/snippets/wollok.js rename to htdocs/includes/ace/src/snippets/wollok.js index 31e62118d29..c01674ccd49 100644 --- a/htdocs/includes/ace/snippets/wollok.js +++ b/htdocs/includes/ace/src/snippets/wollok.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/wollok",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/wollok",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "##\n\ @@ -88,4 +88,11 @@ snippet re\n\ return"; exports.scope = "wollok"; -}); +}); (function() { + window.require(["ace/snippets/wollok"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/xml.js b/htdocs/includes/ace/src/snippets/xml.js new file mode 100644 index 00000000000..9bbe62ad7b6 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/xml.js @@ -0,0 +1,14 @@ +define("ace/snippets/xml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "xml"; + +}); (function() { + window.require(["ace/snippets/xml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/snippets/xquery.js b/htdocs/includes/ace/src/snippets/xquery.js similarity index 80% rename from htdocs/includes/ace/snippets/xquery.js rename to htdocs/includes/ace/src/snippets/xquery.js index c880abcf17c..969b6a426f4 100644 --- a/htdocs/includes/ace/snippets/xquery.js +++ b/htdocs/includes/ace/src/snippets/xquery.js @@ -1,4 +1,4 @@ -ace.define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) { +define("ace/snippets/xquery",["require","exports","module"], function(require, exports, module) { "use strict"; exports.snippetText = "snippet for\n\ @@ -65,4 +65,11 @@ snippet module\n\ "; exports.scope = "xquery"; -}); +}); (function() { + window.require(["ace/snippets/xquery"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/yaml.js b/htdocs/includes/ace/src/snippets/yaml.js new file mode 100644 index 00000000000..bbfecbc21da --- /dev/null +++ b/htdocs/includes/ace/src/snippets/yaml.js @@ -0,0 +1,14 @@ +define("ace/snippets/yaml",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = "yaml"; + +}); (function() { + window.require(["ace/snippets/yaml"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/snippets/zeek.js b/htdocs/includes/ace/src/snippets/zeek.js new file mode 100644 index 00000000000..e432c22e116 --- /dev/null +++ b/htdocs/includes/ace/src/snippets/zeek.js @@ -0,0 +1,14 @@ +define("ace/snippets/zeek",["require","exports","module"], function(require, exports, module) { +"use strict"; + +exports.snippetText =undefined; +exports.scope = ""; + +}); (function() { + window.require(["ace/snippets/zeek"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-ambiance.js b/htdocs/includes/ace/src/theme-ambiance.js similarity index 98% rename from htdocs/includes/ace/theme-ambiance.js rename to htdocs/includes/ace/src/theme-ambiance.js index 1e53ecd9695..bac9b4d6339 100644 --- a/htdocs/includes/ace/theme-ambiance.js +++ b/htdocs/includes/ace/src/theme-ambiance.js @@ -1,14 +1,9 @@ -ace.define("ace/theme/ambiance",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/ambiance",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-ambiance"; exports.cssText = ".ace-ambiance .ace_gutter {\ background-color: #3d3d3d;\ -background-image: -moz-linear-gradient(left, #3D3D3D, #333);\ -background-image: -ms-linear-gradient(left, #3D3D3D, #333);\ -background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#3D3D3D), to(#333));\ -background-image: -webkit-linear-gradient(left, #3D3D3D, #333);\ -background-image: -o-linear-gradient(left, #3D3D3D, #333);\ background-image: linear-gradient(left, #3D3D3D, #333);\ background-repeat: repeat-x;\ border-right: 1px solid #4d4d4d;\ @@ -179,4 +174,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/ambiance"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-chaos.js b/htdocs/includes/ace/src/theme-chaos.js similarity index 87% rename from htdocs/includes/ace/theme-chaos.js rename to htdocs/includes/ace/src/theme-chaos.js index 97ec7fbdc7c..1a46b5b1d02 100644 --- a/htdocs/includes/ace/theme-chaos.js +++ b/htdocs/includes/ace/src/theme-chaos.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/chaos",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/chaos",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-chaos"; @@ -153,4 +153,11 @@ color: #000;\ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/chaos"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-chrome.js b/htdocs/includes/ace/src/theme-chrome.js similarity index 86% rename from htdocs/includes/ace/theme-chrome.js rename to htdocs/includes/ace/src/theme-chrome.js index 83742aa4642..e55118cb13d 100644 --- a/htdocs/includes/ace/theme-chrome.js +++ b/htdocs/includes/ace/src/theme-chrome.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/chrome",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/chrome",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-chrome"; @@ -125,4 +125,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/chrome"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-clouds.js b/htdocs/includes/ace/src/theme-clouds.js similarity index 83% rename from htdocs/includes/ace/theme-clouds.js rename to htdocs/includes/ace/src/theme-clouds.js index 83d0d14d593..01e6cc0b172 100644 --- a/htdocs/includes/ace/theme-clouds.js +++ b/htdocs/includes/ace/src/theme-clouds.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/clouds",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/clouds",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-clouds"; @@ -92,4 +92,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/clouds"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-clouds_midnight.js b/htdocs/includes/ace/src/theme-clouds_midnight.js similarity index 84% rename from htdocs/includes/ace/theme-clouds_midnight.js rename to htdocs/includes/ace/src/theme-clouds_midnight.js index 275e9f296a1..60f0f654365 100644 --- a/htdocs/includes/ace/theme-clouds_midnight.js +++ b/htdocs/includes/ace/src/theme-clouds_midnight.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/clouds_midnight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-clouds-midnight"; @@ -93,4 +93,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/clouds_midnight"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-cobalt.js b/htdocs/includes/ace/src/theme-cobalt.js similarity index 85% rename from htdocs/includes/ace/theme-cobalt.js rename to htdocs/includes/ace/src/theme-cobalt.js index c5b6f267c26..74f20385609 100644 --- a/htdocs/includes/ace/theme-cobalt.js +++ b/htdocs/includes/ace/src/theme-cobalt.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/cobalt",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-cobalt"; @@ -110,4 +110,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/cobalt"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-crimson_editor.js b/htdocs/includes/ace/src/theme-crimson_editor.js similarity index 86% rename from htdocs/includes/ace/theme-crimson_editor.js rename to htdocs/includes/ace/src/theme-crimson_editor.js index a18855252b3..88d70538c49 100644 --- a/htdocs/includes/ace/theme-crimson_editor.js +++ b/htdocs/includes/ace/src/theme-crimson_editor.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/crimson_editor",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssText = ".ace-crimson-editor .ace_gutter {\ background: #ebebeb;\ @@ -115,4 +115,11 @@ exports.cssClass = "ace-crimson-editor"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/crimson_editor"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-dawn.js b/htdocs/includes/ace/src/theme-dawn.js similarity index 84% rename from htdocs/includes/ace/theme-dawn.js rename to htdocs/includes/ace/src/theme-dawn.js index f3c15c92ecb..8a635b3ddff 100644 --- a/htdocs/includes/ace/theme-dawn.js +++ b/htdocs/includes/ace/src/theme-dawn.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/dawn",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-dawn"; @@ -105,4 +105,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/dawn"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/theme-dracula.js b/htdocs/includes/ace/src/theme-dracula.js new file mode 100644 index 00000000000..78942e2867b --- /dev/null +++ b/htdocs/includes/ace/src/theme-dracula.js @@ -0,0 +1,135 @@ +define("ace/theme/dracula",["require","exports","module","ace/lib/dom"], function(require, exports, module) { + +exports.isDark = true; +exports.cssClass = "ace-dracula"; +exports.cssText = "\ +.ace-dracula .ace_gutter {\ +background: #282a36;\ +color: rgb(144,145,148)\ +}\ +.ace-dracula .ace_print-margin {\ +width: 1px;\ +background: #44475a\ +}\ +.ace-dracula {\ +background-color: #282a36;\ +color: #f8f8f2\ +}\ +.ace-dracula .ace_cursor {\ +color: #f8f8f0\ +}\ +.ace-dracula .ace_marker-layer .ace_selection {\ +background: #44475a\ +}\ +.ace-dracula.ace_multiselect .ace_selection.ace_start {\ +box-shadow: 0 0 3px 0px #282a36;\ +border-radius: 2px\ +}\ +.ace-dracula .ace_marker-layer .ace_step {\ +background: rgb(198, 219, 174)\ +}\ +.ace-dracula .ace_marker-layer .ace_bracket {\ +margin: -1px 0 0 -1px;\ +border: 1px solid #a29709\ +}\ +.ace-dracula .ace_marker-layer .ace_active-line {\ +background: #44475a\ +}\ +.ace-dracula .ace_gutter-active-line {\ +background-color: #44475a\ +}\ +.ace-dracula .ace_marker-layer .ace_selected-word {\ +box-shadow: 0px 0px 0px 1px #a29709;\ +border-radius: 3px;\ +}\ +.ace-dracula .ace_fold {\ +background-color: #50fa7b;\ +border-color: #f8f8f2\ +}\ +.ace-dracula .ace_keyword {\ +color: #ff79c6\ +}\ +.ace-dracula .ace_constant.ace_language {\ +color: #bd93f9\ +}\ +.ace-dracula .ace_constant.ace_numeric {\ +color: #bd93f9\ +}\ +.ace-dracula .ace_constant.ace_character {\ +color: #bd93f9\ +}\ +.ace-dracula .ace_constant.ace_character.ace_escape {\ +color: #ff79c6\ +}\ +.ace-dracula .ace_constant.ace_other {\ +color: #bd93f9\ +}\ +.ace-dracula .ace_support.ace_function {\ +color: #8be9fd\ +}\ +.ace-dracula .ace_support.ace_constant {\ +color: #6be5fd\ +}\ +.ace-dracula .ace_support.ace_class {\ +font-style: italic;\ +color: #66d9ef\ +}\ +.ace-dracula .ace_support.ace_type {\ +font-style: italic;\ +color: #66d9ef\ +}\ +.ace-dracula .ace_storage {\ +color: #ff79c6\ +}\ +.ace-dracula .ace_storage.ace_type {\ +font-style: italic;\ +color: #8be9fd\ +}\ +.ace-dracula .ace_invalid {\ +color: #F8F8F0;\ +background-color: #ff79c6\ +}\ +.ace-dracula .ace_invalid.ace_deprecated {\ +color: #F8F8F0;\ +background-color: #bd93f9\ +}\ +.ace-dracula .ace_string {\ +color: #f1fa8c\ +}\ +.ace-dracula .ace_comment {\ +color: #6272a4\ +}\ +.ace-dracula .ace_variable {\ +color: #50fa7b\ +}\ +.ace-dracula .ace_variable.ace_parameter {\ +font-style: italic;\ +color: #ffb86c\ +}\ +.ace-dracula .ace_entity.ace_other.ace_attribute-name {\ +color: #50fa7b\ +}\ +.ace-dracula .ace_entity.ace_name.ace_function {\ +color: #50fa7b\ +}\ +.ace-dracula .ace_entity.ace_name.ace_tag {\ +color: #ff79c6\ +}\ +.ace-dracula .ace_invisible {\ +color: #626680;\ +}\ +.ace-dracula .ace_indent-guide {\ +background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAEklEQVQImWNgYGBgYHB3d/8PAAOIAdULw8qMAAAAAElFTkSuQmCC) right repeat-y\ +}"; +exports.$selectionColorConflict = true; + +var dom = require("../lib/dom"); +dom.importCssString(exports.cssText, exports.cssClass); +}); (function() { + window.require(["ace/theme/dracula"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-dreamweaver.js b/htdocs/includes/ace/src/theme-dreamweaver.js similarity index 88% rename from htdocs/includes/ace/theme-dreamweaver.js rename to htdocs/includes/ace/src/theme-dreamweaver.js index 632b1ea9b00..26abc55bf93 100644 --- a/htdocs/includes/ace/theme-dreamweaver.js +++ b/htdocs/includes/ace/src/theme-dreamweaver.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/dreamweaver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/dreamweaver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-dreamweaver"; exports.cssText = ".ace-dreamweaver .ace_gutter {\ @@ -138,4 +138,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/dreamweaver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-eclipse.js b/htdocs/includes/ace/src/theme-eclipse.js similarity index 83% rename from htdocs/includes/ace/theme-eclipse.js rename to htdocs/includes/ace/src/theme-eclipse.js index 63aa334cf3b..31057e66f0f 100644 --- a/htdocs/includes/ace/theme-eclipse.js +++ b/htdocs/includes/ace/src/theme-eclipse.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/eclipse",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; @@ -95,4 +95,11 @@ exports.cssClass = "ace-eclipse"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/eclipse"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-github.js b/htdocs/includes/ace/src/theme-github.js similarity index 84% rename from htdocs/includes/ace/theme-github.js rename to htdocs/includes/ace/src/theme-github.js index d19512c6ed7..7f6baf4acd2 100644 --- a/htdocs/includes/ace/theme-github.js +++ b/htdocs/includes/ace/src/theme-github.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/github",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-github"; @@ -100,4 +100,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/github"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-gob.js b/htdocs/includes/ace/src/theme-gob.js similarity index 85% rename from htdocs/includes/ace/theme-gob.js rename to htdocs/includes/ace/src/theme-gob.js index 9023fba6863..9c03e7bd055 100644 --- a/htdocs/includes/ace/theme-gob.js +++ b/htdocs/includes/ace/src/theme-gob.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/gob",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/gob",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-gob"; @@ -109,4 +109,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/gob"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-gruvbox.js b/htdocs/includes/ace/src/theme-gruvbox.js similarity index 80% rename from htdocs/includes/ace/theme-gruvbox.js rename to htdocs/includes/ace/src/theme-gruvbox.js index 133ca6410a4..d2e6ded6b27 100644 --- a/htdocs/includes/ace/theme-gruvbox.js +++ b/htdocs/includes/ace/src/theme-gruvbox.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/gruvbox",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-gruvbox"; @@ -79,4 +79,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/gruvbox"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-idle_fingers.js b/htdocs/includes/ace/src/theme-idle_fingers.js similarity index 83% rename from htdocs/includes/ace/theme-idle_fingers.js rename to htdocs/includes/ace/src/theme-idle_fingers.js index 7fcf1cbdb47..877b884dc3c 100644 --- a/htdocs/includes/ace/theme-idle_fingers.js +++ b/htdocs/includes/ace/src/theme-idle_fingers.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/idle_fingers",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-idle-fingers"; @@ -93,4 +93,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/idle_fingers"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-iplastic.js b/htdocs/includes/ace/src/theme-iplastic.js similarity index 93% rename from htdocs/includes/ace/theme-iplastic.js rename to htdocs/includes/ace/src/theme-iplastic.js index 593aa00edb8..d09b09f2b42 100644 --- a/htdocs/includes/ace/theme-iplastic.js +++ b/htdocs/includes/ace/src/theme-iplastic.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/iplastic",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/iplastic",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-iplastic"; @@ -118,4 +118,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/iplastic"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-katzenmilch.js b/htdocs/includes/ace/src/theme-katzenmilch.js similarity index 87% rename from htdocs/includes/ace/theme-katzenmilch.js rename to htdocs/includes/ace/src/theme-katzenmilch.js index f65ce4a81cd..45dd629a12b 100644 --- a/htdocs/includes/ace/theme-katzenmilch.js +++ b/htdocs/includes/ace/src/theme-katzenmilch.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/katzenmilch",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/katzenmilch",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-katzenmilch"; @@ -118,4 +118,11 @@ rbackground-color: rgba(73, 166, 210, 0.039)\ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/katzenmilch"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-kr_theme.js b/htdocs/includes/ace/src/theme-kr_theme.js similarity index 84% rename from htdocs/includes/ace/theme-kr_theme.js rename to htdocs/includes/ace/src/theme-kr_theme.js index 8818b33e76f..bb32770a2a4 100644 --- a/htdocs/includes/ace/theme-kr_theme.js +++ b/htdocs/includes/ace/src/theme-kr_theme.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/kr_theme",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-kr-theme"; @@ -101,4 +101,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/kr_theme"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-kuroir.js b/htdocs/includes/ace/src/theme-kuroir.js similarity index 82% rename from htdocs/includes/ace/theme-kuroir.js rename to htdocs/includes/ace/src/theme-kuroir.js index 30e0a8bb386..6d12d2c71c0 100644 --- a/htdocs/includes/ace/theme-kuroir.js +++ b/htdocs/includes/ace/src/theme-kuroir.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/kuroir",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-kuroir"; @@ -58,4 +58,11 @@ background-color:rgba(191, 97, 51, 0.051);}.ace-kuroir .ace_markup.ace_list{colo var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/kuroir"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-merbivore.js b/htdocs/includes/ace/src/theme-merbivore.js similarity index 84% rename from htdocs/includes/ace/theme-merbivore.js rename to htdocs/includes/ace/src/theme-merbivore.js index fc0a72f1ccd..636fbe44d43 100644 --- a/htdocs/includes/ace/theme-merbivore.js +++ b/htdocs/includes/ace/src/theme-merbivore.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/merbivore",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-merbivore"; @@ -92,4 +92,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/merbivore"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-merbivore_soft.js b/htdocs/includes/ace/src/theme-merbivore_soft.js similarity index 84% rename from htdocs/includes/ace/theme-merbivore_soft.js rename to htdocs/includes/ace/src/theme-merbivore_soft.js index eff24646514..4ce881ae5a7 100644 --- a/htdocs/includes/ace/theme-merbivore_soft.js +++ b/htdocs/includes/ace/src/theme-merbivore_soft.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/merbivore_soft",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-merbivore-soft"; @@ -93,4 +93,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/merbivore_soft"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-mono_industrial.js b/htdocs/includes/ace/src/theme-mono_industrial.js similarity index 86% rename from htdocs/includes/ace/theme-mono_industrial.js rename to htdocs/includes/ace/src/theme-mono_industrial.js index 0ece0309cb4..6a00097b0d2 100644 --- a/htdocs/includes/ace/theme-mono_industrial.js +++ b/htdocs/includes/ace/src/theme-mono_industrial.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/mono_industrial",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-mono-industrial"; @@ -104,4 +104,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/mono_industrial"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-monokai.js b/htdocs/includes/ace/src/theme-monokai.js similarity index 85% rename from htdocs/includes/ace/theme-monokai.js rename to htdocs/includes/ace/src/theme-monokai.js index 322c2fa88d8..ce64226bda5 100644 --- a/htdocs/includes/ace/theme-monokai.js +++ b/htdocs/includes/ace/src/theme-monokai.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/monokai",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-monokai"; @@ -102,4 +102,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/monokai"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-pastel_on_dark.js b/htdocs/includes/ace/src/theme-pastel_on_dark.js similarity index 85% rename from htdocs/includes/ace/theme-pastel_on_dark.js rename to htdocs/includes/ace/src/theme-pastel_on_dark.js index 2631ae00353..e02957c99b8 100644 --- a/htdocs/includes/ace/theme-pastel_on_dark.js +++ b/htdocs/includes/ace/src/theme-pastel_on_dark.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/pastel_on_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-pastel-on-dark"; @@ -105,4 +105,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/pastel_on_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-solarized_dark.js b/htdocs/includes/ace/src/theme-solarized_dark.js similarity index 84% rename from htdocs/includes/ace/theme-solarized_dark.js rename to htdocs/includes/ace/src/theme-solarized_dark.js index d1acdb46add..dad8d3896b9 100644 --- a/htdocs/includes/ace/theme-solarized_dark.js +++ b/htdocs/includes/ace/src/theme-solarized_dark.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/solarized_dark",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-solarized-dark"; @@ -85,4 +85,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/solarized_dark"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-solarized_light.js b/htdocs/includes/ace/src/theme-solarized_light.js similarity index 83% rename from htdocs/includes/ace/theme-solarized_light.js rename to htdocs/includes/ace/src/theme-solarized_light.js index f0c078ae5d7..70f9383041c 100644 --- a/htdocs/includes/ace/theme-solarized_light.js +++ b/htdocs/includes/ace/src/theme-solarized_light.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/solarized_light",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-solarized-light"; @@ -37,7 +37,7 @@ background: #EEE8D5\ background-color : #EDE5C1\ }\ .ace-solarized-light .ace_marker-layer .ace_selected-word {\ -border: 1px solid #073642\ +border: 1px solid #7f9390\ }\ .ace-solarized-light .ace_invisible {\ color: rgba(147, 161, 161, 0.50)\ @@ -88,4 +88,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/solarized_light"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-sqlserver.js b/htdocs/includes/ace/src/theme-sqlserver.js similarity index 87% rename from htdocs/includes/ace/theme-sqlserver.js rename to htdocs/includes/ace/src/theme-sqlserver.js index 91f34f6c40a..91724014b01 100644 --- a/htdocs/includes/ace/theme-sqlserver.js +++ b/htdocs/includes/ace/src/theme-sqlserver.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/sqlserver",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-sqlserver"; @@ -135,4 +135,11 @@ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZ var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/sqlserver"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-terminal.js b/htdocs/includes/ace/src/theme-terminal.js similarity index 87% rename from htdocs/includes/ace/theme-terminal.js rename to htdocs/includes/ace/src/theme-terminal.js index def9e69b77f..8f87077cae7 100644 --- a/htdocs/includes/ace/theme-terminal.js +++ b/htdocs/includes/ace/src/theme-terminal.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/terminal",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-terminal-theme"; @@ -111,4 +111,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/terminal"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-textmate.js b/htdocs/includes/ace/src/theme-textmate.js similarity index 85% rename from htdocs/includes/ace/theme-textmate.js rename to htdocs/includes/ace/src/theme-textmate.js index 0033edae2c6..6ad09556895 100644 --- a/htdocs/includes/ace/theme-textmate.js +++ b/htdocs/includes/ace/src/theme-textmate.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/textmate",["require","exports","module","ace/lib/dom"], function(require, exports, module) { "use strict"; exports.isDark = false; @@ -123,7 +123,15 @@ border: 1px solid rgb(200, 200, 250);\ background: url(\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgbYnAAAAE0lEQVQImWP4////f4bLly//BwAmVgd1/w11/gAAAABJRU5ErkJggg==\") right repeat-y;\ }\ "; +exports.$id = "ace/theme/textmate"; var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/textmate"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-tomorrow.js b/htdocs/includes/ace/src/theme-tomorrow.js similarity index 85% rename from htdocs/includes/ace/theme-tomorrow.js rename to htdocs/includes/ace/src/theme-tomorrow.js index 4661be11221..5a2e3b5a4f2 100644 --- a/htdocs/includes/ace/theme-tomorrow.js +++ b/htdocs/includes/ace/src/theme-tomorrow.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/tomorrow",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-tomorrow"; @@ -105,4 +105,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/tomorrow"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-tomorrow_night.js b/htdocs/includes/ace/src/theme-tomorrow_night.js similarity index 86% rename from htdocs/includes/ace/theme-tomorrow_night.js rename to htdocs/includes/ace/src/theme-tomorrow_night.js index 53e1f39a414..9cdeedce37b 100644 --- a/htdocs/includes/ace/theme-tomorrow_night.js +++ b/htdocs/includes/ace/src/theme-tomorrow_night.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/tomorrow_night",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night"; @@ -105,4 +105,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/tomorrow_night"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-tomorrow_night_blue.js b/htdocs/includes/ace/src/theme-tomorrow_night_blue.js similarity index 87% rename from htdocs/includes/ace/theme-tomorrow_night_blue.js rename to htdocs/includes/ace/src/theme-tomorrow_night_blue.js index 956e221ec9b..52afc918d78 100644 --- a/htdocs/includes/ace/theme-tomorrow_night_blue.js +++ b/htdocs/includes/ace/src/theme-tomorrow_night_blue.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/tomorrow_night_blue",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night-blue"; @@ -103,4 +103,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/tomorrow_night_blue"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-tomorrow_night_bright.js b/htdocs/includes/ace/src/theme-tomorrow_night_bright.js similarity index 88% rename from htdocs/includes/ace/theme-tomorrow_night_bright.js rename to htdocs/includes/ace/src/theme-tomorrow_night_bright.js index 8514a0d6997..b90c17921a4 100644 --- a/htdocs/includes/ace/theme-tomorrow_night_bright.js +++ b/htdocs/includes/ace/src/theme-tomorrow_night_bright.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/tomorrow_night_bright",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/tomorrow_night_bright",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night-bright"; @@ -118,4 +118,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/tomorrow_night_bright"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-tomorrow_night_eighties.js b/htdocs/includes/ace/src/theme-tomorrow_night_eighties.js similarity index 87% rename from htdocs/includes/ace/theme-tomorrow_night_eighties.js rename to htdocs/includes/ace/src/theme-tomorrow_night_eighties.js index 3665e3f7dc7..5759eadbc3d 100644 --- a/htdocs/includes/ace/theme-tomorrow_night_eighties.js +++ b/htdocs/includes/ace/src/theme-tomorrow_night_eighties.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/tomorrow_night_eighties",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-tomorrow-night-eighties"; @@ -105,4 +105,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/tomorrow_night_eighties"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-twilight.js b/htdocs/includes/ace/src/theme-twilight.js similarity index 85% rename from htdocs/includes/ace/theme-twilight.js rename to htdocs/includes/ace/src/theme-twilight.js index 48ec030981e..34857c311a4 100644 --- a/htdocs/includes/ace/theme-twilight.js +++ b/htdocs/includes/ace/src/theme-twilight.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/twilight",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-twilight"; @@ -106,4 +106,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/twilight"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-vibrant_ink.js b/htdocs/includes/ace/src/theme-vibrant_ink.js similarity index 83% rename from htdocs/includes/ace/theme-vibrant_ink.js rename to htdocs/includes/ace/src/theme-vibrant_ink.js index db926c70524..6fbc5094c93 100644 --- a/htdocs/includes/ace/theme-vibrant_ink.js +++ b/htdocs/includes/ace/src/theme-vibrant_ink.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/vibrant_ink",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = true; exports.cssClass = "ace-vibrant-ink"; @@ -91,4 +91,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/vibrant_ink"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/theme-xcode.js b/htdocs/includes/ace/src/theme-xcode.js similarity index 82% rename from htdocs/includes/ace/theme-xcode.js rename to htdocs/includes/ace/src/theme-xcode.js index 3604a170295..99a5b75ef9a 100644 --- a/htdocs/includes/ace/theme-xcode.js +++ b/htdocs/includes/ace/src/theme-xcode.js @@ -1,4 +1,4 @@ -ace.define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) { +define("ace/theme/xcode",["require","exports","module","ace/lib/dom"], function(require, exports, module) { exports.isDark = false; exports.cssClass = "ace-xcode"; @@ -85,4 +85,11 @@ background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAACCAYAAACZgb var dom = require("../lib/dom"); dom.importCssString(exports.cssText, exports.cssClass); -}); +}); (function() { + window.require(["ace/theme/xcode"], function(m) { + if (typeof module == "object" && typeof exports == "object" && module) { + module.exports = m; + } + }); + })(); + \ No newline at end of file diff --git a/htdocs/includes/ace/src/worker-coffee.js b/htdocs/includes/ace/src/worker-coffee.js new file mode 100644 index 00000000000..38a3b4a12c6 --- /dev/null +++ b/htdocs/includes/ace/src/worker-coffee.js @@ -0,0 +1,2156 @@ +"no use strict"; +!(function(window) { +if (typeof window.window != "undefined" && window.document) + return; +if (window.require && window.define) + return; + +if (!window.console) { + window.console = function() { + var msgs = Array.prototype.slice.call(arguments, 0); + postMessage({type: "log", data: msgs}); + }; + window.console.error = + window.console.warn = + window.console.log = + window.console.trace = window.console; +} +window.window = window; +window.ace = window; + +window.onerror = function(message, file, line, col, err) { + postMessage({type: "error", data: { + message: message, + data: err.data, + file: file, + line: line, + col: col, + stack: err.stack + }}); +}; + +window.normalizeModule = function(parentId, moduleName) { + // normalize plugin requires + if (moduleName.indexOf("!") !== -1) { + var chunks = moduleName.split("!"); + return window.normalizeModule(parentId, chunks[0]) + "!" + window.normalizeModule(parentId, chunks[1]); + } + // normalize relative requires + if (moduleName.charAt(0) == ".") { + var base = parentId.split("/").slice(0, -1).join("/"); + moduleName = (base ? base + "/" : "") + moduleName; + + while (moduleName.indexOf(".") !== -1 && previous != moduleName) { + var previous = moduleName; + moduleName = moduleName.replace(/^\.\//, "").replace(/\/\.\//, "/").replace(/[^\/]+\/\.\.\//, ""); + } + } + + return moduleName; +}; + +window.require = function require(parentId, id) { + if (!id) { + id = parentId; + parentId = null; + } + if (!id.charAt) + throw new Error("worker.js require() accepts only (parentId, id) as arguments"); + + id = window.normalizeModule(parentId, id); + + var module = window.require.modules[id]; + if (module) { + if (!module.initialized) { + module.initialized = true; + module.exports = module.factory().exports; + } + return module.exports; + } + + if (!window.require.tlns) + return console.log("unable to load " + id); + + var path = resolveModuleId(id, window.require.tlns); + if (path.slice(-3) != ".js") path += ".js"; + + window.require.id = id; + window.require.modules[id] = {}; // prevent infinite loop on broken modules + importScripts(path); + return window.require(parentId, id); +}; +function resolveModuleId(id, paths) { + var testPath = id, tail = ""; + while (testPath) { + var alias = paths[testPath]; + if (typeof alias == "string") { + return alias + tail; + } else if (alias) { + return alias.location.replace(/\/*$/, "/") + (tail || alias.main || alias.name); + } else if (alias === false) { + return ""; + } + var i = testPath.lastIndexOf("/"); + if (i === -1) break; + tail = testPath.substr(i) + tail; + testPath = testPath.slice(0, i); + } + return id; +} +window.require.modules = {}; +window.require.tlns = {}; + +window.define = function(id, deps, factory) { + if (arguments.length == 2) { + factory = deps; + if (typeof id != "string") { + deps = id; + id = window.require.id; + } + } else if (arguments.length == 1) { + factory = id; + deps = []; + id = window.require.id; + } + + if (typeof factory != "function") { + window.require.modules[id] = { + exports: factory, + initialized: true + }; + return; + } + + if (!deps.length) + // If there is no dependencies, we inject "require", "exports" and + // "module" as dependencies, to provide CommonJS compatibility. + deps = ["require", "exports", "module"]; + + var req = function(childId) { + return window.require(id, childId); + }; + + window.require.modules[id] = { + exports: {}, + factory: function() { + var module = this; + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { + switch (dep) { + // Because "require", "exports" and "module" aren't actual + // dependencies, we must handle them seperately. + case "require": return req; + case "exports": return module.exports; + case "module": return module; + // But for all other dependencies, we can just go ahead and + // require them. + default: return req(dep); + } + })); + if (returnExports) + module.exports = returnExports; + return module; + } + }; +}; +window.define.amd = {}; +require.tlns = {}; +window.initBaseUrls = function initBaseUrls(topLevelNamespaces) { + for (var i in topLevelNamespaces) + require.tlns[i] = topLevelNamespaces[i]; +}; + +window.initSender = function initSender() { + + var EventEmitter = window.require("ace/lib/event_emitter").EventEmitter; + var oop = window.require("ace/lib/oop"); + + var Sender = function() {}; + + (function() { + + oop.implement(this, EventEmitter); + + this.callback = function(data, callbackId) { + postMessage({ + type: "call", + id: callbackId, + data: data + }); + }; + + this.emit = function(name, data) { + postMessage({ + type: "event", + name: name, + data: data + }); + }; + + }).call(Sender.prototype); + + return new Sender(); +}; + +var main = window.main = null; +var sender = window.sender = null; + +window.onmessage = function(e) { + var msg = e.data; + if (msg.event && sender) { + sender._signal(msg.event, msg.data); + } + else if (msg.command) { + if (main[msg.command]) + main[msg.command].apply(main, msg.args); + else if (window[msg.command]) + window[msg.command].apply(window, msg.args); + else + throw new Error("Unknown command:" + msg.command); + } + else if (msg.init) { + window.initBaseUrls(msg.tlns); + require("ace/lib/es5-shim"); + sender = window.sender = window.initSender(); + var clazz = require(msg.module)[msg.classname]; + main = window.main = new clazz(sender); + } +}; +})(this); + +define("ace/lib/oop",[], function(require, exports, module) { +"use strict"; + +exports.inherits = function(ctor, superCtor) { + ctor.super_ = superCtor; + ctor.prototype = Object.create(superCtor.prototype, { + constructor: { + value: ctor, + enumerable: false, + writable: true, + configurable: true + } + }); +}; + +exports.mixin = function(obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } + return obj; +}; + +exports.implement = function(proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); + +define("ace/range",[], function(require, exports, module) { +"use strict"; +var comparePoints = function(p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; +var Range = function(startRow, startColumn, endRow, endColumn) { + this.start = { + row: startRow, + column: startColumn + }; + + this.end = { + row: endRow, + column: endColumn + }; +}; + +(function() { + this.isEqual = function(range) { + return this.start.row === range.start.row && + this.end.row === range.end.row && + this.start.column === range.start.column && + this.end.column === range.end.column; + }; + this.toString = function() { + return ("Range: [" + this.start.row + "/" + this.start.column + + "] -> [" + this.end.row + "/" + this.end.column + "]"); + }; + + this.contains = function(row, column) { + return this.compare(row, column) == 0; + }; + this.compareRange = function(range) { + var cmp, + end = range.end, + start = range.start; + + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } else if (cmp == 0) { + return 1; + } else { + return 0; + } + } else if (cmp == -1) { + return -2; + } else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } else if (cmp == 1) { + return 42; + } else { + return 0; + } + } + }; + this.comparePoint = function(p) { + return this.compare(p.row, p.column); + }; + this.containsRange = function(range) { + return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; + }; + this.intersects = function(range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + }; + this.isEnd = function(row, column) { + return this.end.row == row && this.end.column == column; + }; + this.isStart = function(row, column) { + return this.start.row == row && this.start.column == column; + }; + this.setStart = function(row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } else { + this.start.row = row; + this.start.column = column; + } + }; + this.setEnd = function(row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } else { + this.end.row = row; + this.end.column = column; + } + }; + this.inside = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideStart = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.insideEnd = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + }; + this.compare = function(row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + } + } + + if (row < this.start.row) + return -1; + + if (row > this.end.row) + return 1; + + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + + return 0; + }; + this.compareStart = function(row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.compareEnd = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else { + return this.compare(row, column); + } + }; + this.compareInside = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + }; + this.clipRows = function(firstRow, lastRow) { + if (this.end.row > lastRow) + var end = {row: lastRow + 1, column: 0}; + else if (this.end.row < firstRow) + var end = {row: firstRow, column: 0}; + + if (this.start.row > lastRow) + var start = {row: lastRow + 1, column: 0}; + else if (this.start.row < firstRow) + var start = {row: firstRow, column: 0}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + this.extend = function(row, column) { + var cmp = this.compare(row, column); + + if (cmp == 0) + return this; + else if (cmp == -1) + var start = {row: row, column: column}; + else + var end = {row: row, column: column}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + + this.isEmpty = function() { + return (this.start.row === this.end.row && this.start.column === this.end.column); + }; + this.isMultiLine = function() { + return (this.start.row !== this.end.row); + }; + this.clone = function() { + return Range.fromPoints(this.start, this.end); + }; + this.collapseRows = function() { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0); + else + return new Range(this.start.row, 0, this.end.row, 0); + }; + this.toScreenRange = function(session) { + var screenPosStart = session.documentToScreenPosition(this.start); + var screenPosEnd = session.documentToScreenPosition(this.end); + + return new Range( + screenPosStart.row, screenPosStart.column, + screenPosEnd.row, screenPosEnd.column + ); + }; + this.moveBy = function(row, column) { + this.start.row += row; + this.start.column += column; + this.end.row += row; + this.end.column += column; + }; + +}).call(Range.prototype); +Range.fromPoints = function(start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; +Range.comparePoints = comparePoints; + +Range.comparePoints = function(p1, p2) { + return p1.row - p2.row || p1.column - p2.column; +}; + + +exports.Range = Range; +}); + +define("ace/apply_delta",[], function(require, exports, module) { +"use strict"; + +function throwDeltaError(delta, errorText){ + console.log("Invalid Delta:", delta); + throw "Invalid Delta: " + errorText; +} + +function positionInDocument(docLines, position) { + return position.row >= 0 && position.row < docLines.length && + position.column >= 0 && position.column <= docLines[position.row].length; +} + +function validateDelta(docLines, delta) { + if (delta.action != "insert" && delta.action != "remove") + throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); + if (!(delta.lines instanceof Array)) + throwDeltaError(delta, "delta.lines must be an Array"); + if (!delta.start || !delta.end) + throwDeltaError(delta, "delta.start/end must be an present"); + var start = delta.start; + if (!positionInDocument(docLines, delta.start)) + throwDeltaError(delta, "delta.start must be contained in document"); + var end = delta.end; + if (delta.action == "remove" && !positionInDocument(docLines, end)) + throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); + var numRangeRows = end.row - start.row; + var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); + if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) + throwDeltaError(delta, "delta.range must match delta lines"); +} + +exports.applyDelta = function(docLines, delta, doNotValidate) { + + var row = delta.start.row; + var startColumn = delta.start.column; + var line = docLines[row] || ""; + switch (delta.action) { + case "insert": + var lines = delta.lines; + if (lines.length === 1) { + docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); + } else { + var args = [row, 1].concat(delta.lines); + docLines.splice.apply(docLines, args); + docLines[row] = line.substring(0, startColumn) + docLines[row]; + docLines[row + delta.lines.length - 1] += line.substring(startColumn); + } + break; + case "remove": + var endColumn = delta.end.column; + var endRow = delta.end.row; + if (row === endRow) { + docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); + } else { + docLines.splice( + row, endRow - row + 1, + line.substring(0, startColumn) + docLines[endRow].substring(endColumn) + ); + } + break; + } +}; +}); + +define("ace/lib/event_emitter",[], function(require, exports, module) { +"use strict"; + +var EventEmitter = {}; +var stopPropagation = function() { this.propagationStopped = true; }; +var preventDefault = function() { this.defaultPrevented = true; }; + +EventEmitter._emit = +EventEmitter._dispatchEvent = function(eventName, e) { + this._eventRegistry || (this._eventRegistry = {}); + this._defaultHandlers || (this._defaultHandlers = {}); + + var listeners = this._eventRegistry[eventName] || []; + var defaultHandler = this._defaultHandlers[eventName]; + if (!listeners.length && !defaultHandler) + return; + + if (typeof e != "object" || !e) + e = {}; + + if (!e.type) + e.type = eventName; + if (!e.stopPropagation) + e.stopPropagation = stopPropagation; + if (!e.preventDefault) + e.preventDefault = preventDefault; + + listeners = listeners.slice(); + for (var i=0; i this.row) + return; + + var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); + this.setPosition(point.row, point.column, true); + }; + + function $pointsInOrder(point1, point2, equalPointsInOrder) { + var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; + return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); + } + + function $getTransformedPoint(delta, point, moveIfEqual) { + var deltaIsInsert = delta.action == "insert"; + var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); + var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); + var deltaStart = delta.start; + var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. + if ($pointsInOrder(point, deltaStart, moveIfEqual)) { + return { + row: point.row, + column: point.column + }; + } + if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { + return { + row: point.row + deltaRowShift, + column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) + }; + } + + return { + row: deltaStart.row, + column: deltaStart.column + }; + } + this.setPosition = function(row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } else { + pos = this.$clipPositionToDocument(row, column); + } + + if (this.row == pos.row && this.column == pos.column) + return; + + var old = { + row: this.row, + column: this.column + }; + + this.row = pos.row; + this.column = pos.column; + this._signal("change", { + old: old, + value: pos + }); + }; + this.detach = function() { + this.document.removeEventListener("change", this.$onChange); + }; + this.attach = function(doc) { + this.document = doc || this.document; + this.document.on("change", this.$onChange); + }; + this.$clipPositionToDocument = function(row, column) { + var pos = {}; + + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + + if (column < 0) + pos.column = 0; + + return pos; + }; + +}).call(Anchor.prototype); + +}); + +define("ace/document",[], function(require, exports, module) { +"use strict"; + +var oop = require("./lib/oop"); +var applyDelta = require("./apply_delta").applyDelta; +var EventEmitter = require("./lib/event_emitter").EventEmitter; +var Range = require("./range").Range; +var Anchor = require("./anchor").Anchor; + +var Document = function(textOrLines) { + this.$lines = [""]; + if (textOrLines.length === 0) { + this.$lines = [""]; + } else if (Array.isArray(textOrLines)) { + this.insertMergedLines({row: 0, column: 0}, textOrLines); + } else { + this.insert({row: 0, column:0}, textOrLines); + } +}; + +(function() { + + oop.implement(this, EventEmitter); + this.setValue = function(text) { + var len = this.getLength() - 1; + this.remove(new Range(0, 0, len, this.getLine(len).length)); + this.insert({row: 0, column: 0}, text); + }; + this.getValue = function() { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + this.createAnchor = function(row, column) { + return new Anchor(this, row, column); + }; + if ("aaa".split(/a/).length === 0) { + this.$split = function(text) { + return text.replace(/\r\n|\r/g, "\n").split("\n"); + }; + } else { + this.$split = function(text) { + return text.split(/\r\n|\r|\n/); + }; + } + + + this.$detectNewLine = function(text) { + var match = text.match(/^.*?(\r\n|\r|\n)/m); + this.$autoNewLine = match ? match[1] : "\n"; + this._signal("changeNewLineMode"); + }; + this.getNewLineCharacter = function() { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + case "unix": + return "\n"; + default: + return this.$autoNewLine || "\n"; + } + }; + + this.$autoNewLine = ""; + this.$newLineMode = "auto"; + this.setNewLineMode = function(newLineMode) { + if (this.$newLineMode === newLineMode) + return; + + this.$newLineMode = newLineMode; + this._signal("changeNewLineMode"); + }; + this.getNewLineMode = function() { + return this.$newLineMode; + }; + this.isNewLine = function(text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + this.getLine = function(row) { + return this.$lines[row] || ""; + }; + this.getLines = function(firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + this.getAllLines = function() { + return this.getLines(0, this.getLength()); + }; + this.getLength = function() { + return this.$lines.length; + }; + this.getTextRange = function(range) { + return this.getLinesForRange(range).join(this.getNewLineCharacter()); + }; + this.getLinesForRange = function(range) { + var lines; + if (range.start.row === range.end.row) { + lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; + } else { + lines = this.getLines(range.start.row, range.end.row); + lines[0] = (lines[0] || "").substring(range.start.column); + var l = lines.length - 1; + if (range.end.row - range.start.row == l) + lines[l] = lines[l].substring(0, range.end.column); + } + return lines; + }; + this.insertLines = function(row, lines) { + console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); + return this.insertFullLines(row, lines); + }; + this.removeLines = function(firstRow, lastRow) { + console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); + return this.removeFullLines(firstRow, lastRow); + }; + this.insertNewLine = function(position) { + console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); + return this.insertMergedLines(position, ["", ""]); + }; + this.insert = function(position, text) { + if (this.getLength() <= 1) + this.$detectNewLine(text); + + return this.insertMergedLines(position, this.$split(text)); + }; + this.insertInLine = function(position, text) { + var start = this.clippedPos(position.row, position.column); + var end = this.pos(position.row, position.column + text.length); + + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: [text] + }, true); + + return this.clonePos(end); + }; + + this.clippedPos = function(row, column) { + var length = this.getLength(); + if (row === undefined) { + row = length; + } else if (row < 0) { + row = 0; + } else if (row >= length) { + row = length - 1; + column = undefined; + } + var line = this.getLine(row); + if (column == undefined) + column = line.length; + column = Math.min(Math.max(column, 0), line.length); + return {row: row, column: column}; + }; + + this.clonePos = function(pos) { + return {row: pos.row, column: pos.column}; + }; + + this.pos = function(row, column) { + return {row: row, column: column}; + }; + + this.$clipPosition = function(position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length - 1).length; + } else { + position.row = Math.max(0, position.row); + position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); + } + return position; + }; + this.insertFullLines = function(row, lines) { + row = Math.min(Math.max(row, 0), this.getLength()); + var column = 0; + if (row < this.getLength()) { + lines = lines.concat([""]); + column = 0; + } else { + lines = [""].concat(lines); + row--; + column = this.$lines[row].length; + } + this.insertMergedLines({row: row, column: column}, lines); + }; + this.insertMergedLines = function(position, lines) { + var start = this.clippedPos(position.row, position.column); + var end = { + row: start.row + lines.length - 1, + column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length + }; + + this.applyDelta({ + start: start, + end: end, + action: "insert", + lines: lines + }); + + return this.clonePos(end); + }; + this.remove = function(range) { + var start = this.clippedPos(range.start.row, range.start.column); + var end = this.clippedPos(range.end.row, range.end.column); + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({start: start, end: end}) + }); + return this.clonePos(start); + }; + this.removeInLine = function(row, startColumn, endColumn) { + var start = this.clippedPos(row, startColumn); + var end = this.clippedPos(row, endColumn); + + this.applyDelta({ + start: start, + end: end, + action: "remove", + lines: this.getLinesForRange({start: start, end: end}) + }, true); + + return this.clonePos(start); + }; + this.removeFullLines = function(firstRow, lastRow) { + firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); + lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1); + var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; + var deleteLastNewLine = lastRow < this.getLength() - 1; + var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow ); + var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 ); + var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow ); + var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); + var range = new Range(startRow, startCol, endRow, endCol); + var deletedLines = this.$lines.slice(firstRow, lastRow + 1); + + this.applyDelta({ + start: range.start, + end: range.end, + action: "remove", + lines: this.getLinesForRange(range) + }); + return deletedLines; + }; + this.removeNewLine = function(row) { + if (row < this.getLength() - 1 && row >= 0) { + this.applyDelta({ + start: this.pos(row, this.getLine(row).length), + end: this.pos(row + 1, 0), + action: "remove", + lines: ["", ""] + }); + } + }; + this.replace = function(range, text) { + if (!(range instanceof Range)) + range = Range.fromPoints(range.start, range.end); + if (text.length === 0 && range.isEmpty()) + return range.start; + if (text == this.getTextRange(range)) + return range.end; + + this.remove(range); + var end; + if (text) { + end = this.insert(range.start, text); + } + else { + end = range.start; + } + + return end; + }; + this.applyDeltas = function(deltas) { + for (var i=0; i=0; i--) { + this.revertDelta(deltas[i]); + } + }; + this.applyDelta = function(delta, doNotValidate) { + var isInsert = delta.action == "insert"; + if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] + : !Range.comparePoints(delta.start, delta.end)) { + return; + } + + if (isInsert && delta.lines.length > 20000) { + this.$splitAndapplyLargeDelta(delta, 20000); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } + }; + + this.$splitAndapplyLargeDelta = function(delta, MAX) { + var lines = delta.lines; + var l = lines.length - MAX + 1; + var row = delta.start.row; + var column = delta.start.column; + for (var from = 0, to = 0; from < l; from = to) { + to += MAX - 1; + var chunk = lines.slice(from, to); + chunk.push(""); + this.applyDelta({ + start: this.pos(row + from, column), + end: this.pos(row + to, column = 0), + action: delta.action, + lines: chunk + }, true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); + }; + this.revertDelta = function(delta) { + this.applyDelta({ + start: this.clonePos(delta.start), + end: this.clonePos(delta.end), + action: (delta.action == "insert" ? "remove" : "insert"), + lines: delta.lines.slice() + }); + }; + this.indexToPosition = function(index, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + for (var i = startRow || 0, l = lines.length; i < l; i++) { + index -= lines[i].length + newlineLength; + if (index < 0) + return {row: i, column: index + lines[i].length + newlineLength}; + } + return {row: l-1, column: index + lines[l-1].length + newlineLength}; + }; + this.positionToIndex = function(pos, startRow) { + var lines = this.$lines || this.getAllLines(); + var newlineLength = this.getNewLineCharacter().length; + var index = 0; + var row = Math.min(pos.row, lines.length); + for (var i = startRow || 0; i < row; ++i) + index += lines[i].length + newlineLength; + + return index + pos.column; + }; + +}).call(Document.prototype); + +exports.Document = Document; +}); + +define("ace/lib/lang",[], function(require, exports, module) { +"use strict"; + +exports.last = function(a) { + return a[a.length - 1]; +}; + +exports.stringReverse = function(string) { + return string.split("").reverse().join(""); +}; + +exports.stringRepeat = function (string, count) { + var result = ''; + while (count > 0) { + if (count & 1) + result += string; + + if (count >>= 1) + string += string; + } + return result; +}; + +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; + +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, ''); +}; + +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; + +exports.copyObject = function(obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; + +exports.copyArray = function(array){ + var copy = []; + for (var i=0, l=array.length; i=6"},directories:{lib:"./lib/coffeescript"},main:"./lib/coffeescript/index",browser:"./lib/coffeescript/browser",bin:{coffee:"./bin/coffee",cake:"./bin/cake"},files:["bin","lib","register.js","repl.js"],scripts:{test:"node ./bin/cake test","test-harmony":"node --harmony ./bin/cake test"},homepage:"http://coffeescript.org",bugs:"https://github.com/jashkenas/coffeescript/issues",repository:{type:"git",url:"git://github.com/jashkenas/coffeescript.git"},devDependencies:{"babel-core":"~6.26.0","babel-preset-babili":"~0.1.4","babel-preset-env":"~1.6.1","babel-preset-minify":"^0.3.0",codemirror:"^5.32.0",docco:"~0.8.0","highlight.js":"~9.12.0",jison:">=0.4.18","markdown-it":"~8.4.0",underscore:"~1.8.3",webpack:"~3.10.0"},dependencies:{}}}(),require["./helpers"]=function(){var e={};return function(){var a,t,o,n,r,l,s,i;e.starts=function(e,a,t){return a===e.substr(t,a.length)},e.ends=function(e,a,t){var o;return o=a.length,a===e.substr(e.length-o-(t||0),o)},e.repeat=s=function(e,a){var t;for(t="";0>>=1,e+=e;return t},e.compact=function(e){var a,t,o,n;for(n=[],a=0,o=e.length;ar)return n.returnOnNegativeLevel?void 0:o.call(this,i,e);e+=1}return e-1}},{key:"removeLeadingNewlines",value:function removeLeadingNewlines(){var e,a,t,o,n,r,l,s,i;for(l=this.tokens,e=a=0,n=l.length;a=n&&n>r;o=0<=r?++n:--n)if(null!=i[o]&&("string"==typeof i[o]&&(i[o]=[i[o]]),l=this.tag(e+o+t),0>a.call(i[o],l)))return-1;return e+o+t-1}},{key:"looksObjectish",value:function looksObjectish(e){var t,o;return-1!==this.indexOfTag(e,"@",null,":")||-1!==this.indexOfTag(e,null,":")||(o=this.indexOfTag(e,c),!!(-1!==o&&(t=null,this.detectEnd(o+1,function(e){var t;return t=e[0],0<=a.call(d,t)},function(e,a){return t=a}),":"===this.tag(t+1))))}},{key:"findTagsBackwards",value:function findTagsBackwards(e,t){var o,n,r,l,s,i,p;for(o=[];0<=e&&(o.length||(l=this.tag(e),0>a.call(t,l))&&((s=this.tag(e),0>a.call(c,s))||this.tokens[e].generated)&&(i=this.tag(e),0>a.call(g,i)));)(n=this.tag(e),0<=a.call(d,n))&&o.push(this.tag(e)),(r=this.tag(e),0<=a.call(c,r))&&o.length&&o.pop(),e-=1;return p=this.tag(e),0<=a.call(t,p)}},{key:"addImplicitBracesAndParens",value:function addImplicitBracesAndParens(){var e,t;return e=[],t=null,this.scanTokens(function(o,l,f){var i=this,y=_slicedToArray(o,1),T,v,b,$,_,C,D,E,x,I,S,A,R,k,O,L,F,w,P,j,M,U,V,s,B,G,H,W,X,Y,q,z,J;J=y[0];var K=P=0"!==w&&"->"!==w&&"["!==w&&"("!==w&&","!==w&&"{"!==w&&"ELSE"!==w&&"="!==w)for(;D()||x()&&":"!==w;)D()?T():v();return E()&&e.pop(),e.push([J,l]),b(1)}if(0<=a.call(c,J))return e.push([J,l]),b(1);if(0<=a.call(d,J)){for(;C();)D()?T():x()?v():e.pop();t=e.pop()}if(_=function(){var e,t,n,r;return(n=i.findTagsBackwards(l,["FOR"])&&i.findTagsBackwards(l,["FORIN","FOROF","FORFROM"]),e=n||i.findTagsBackwards(l,["WHILE","UNTIL","LOOP","LEADING_WHEN"]),!!e)&&(t=!1,r=o[2].first_line,i.detectEnd(l,function(e){var t;return t=e[0],0<=a.call(g,t)},function(e,a){var o=f[a-1]||[],n=_slicedToArray(o,3),l;return w=n[0],l=n[2].first_line,t=r===l&&("->"===w||"=>"===w)},{returnOnNegativeLevel:!0}),t)},(0<=a.call(m,J)&&o.spaced||"?"===J&&0a.call(d,e):return t[1];case"@"!==this.tag(l-2):return l-2;default:return l-1}}.call(this),z=0>=V||(M=this.tag(V-1),0<=a.call(g,M))||f[V-1].newLine,W()){var ae=W(),te=_slicedToArray(ae,2);if(H=te[0],B=te[1],("{"===H||"INDENT"===H&&"{"===this.tag(B-1))&&(z||","===this.tag(V-1)||"{"===this.tag(V-1)))return b(1)}return q(V,!!z),b(2)}if(0<=a.call(g,J))for(R=e.length-1;0<=R&&(G=e[R],!!I(G));R+=-1)A(G)&&(G[2].sameLine=!1);if(k="OUTDENT"===w||P.newLine,0<=a.call(u,J)||0<=a.call(n,J)&&k||(".."===J||"..."===J)&&this.findTagsBackwards(l,["INDEX_START"]))for(;C();){var oe=W(),ne=_slicedToArray(oe,3);H=ne[0],B=ne[1];var re=ne[2];if(s=re.sameLine,z=re.startsLine,D()&&","!==w||","===w&&"TERMINATOR"===J&&null==O)T();else if(x()&&s&&"TERMINATOR"!==J&&":"!==w&&!(("POST_IF"===J||"FOR"===J||"WHILE"===J||"UNTIL"===J)&&z&&$(l+1)))v();else if(x()&&"TERMINATOR"===J&&","!==w&&!(z&&this.looksObjectish(l+1)))v();else break}if(","===J&&!this.looksObjectish(l+1)&&x()&&"FOROF"!==(U=this.tag(l+2))&&"FORIN"!==U&&("TERMINATOR"!==O||!this.looksObjectish(l+2)))for(F="OUTDENT"===O?1:0;x();)v(l+F);return b(1)})}},{key:"enforceValidCSXAttributes",value:function enforceValidCSXAttributes(){return this.scanTokens(function(e,a,t){var o,n;return e.csxColon&&(o=t[a+1],"STRING_START"!==(n=o[0])&&"STRING"!==n&&"("!==n&&C("expected wrapped or quoted JSX attribute",o[2])),1})}},{key:"rescueStowawayComments",value:function rescueStowawayComments(){var e,t,o;return e=function(e,a,t,o){return"TERMINATOR"!==t[a][0]&&t[o](N("TERMINATOR","\n",t[a])),t[o](N("JS","",t[a],e))},o=function(t,o,n){var r,s,i,d,c,p,u;for(s=o;s!==n.length&&(c=n[s][0],0<=a.call(l,c));)s++;if(!(s===n.length||(p=n[s][0],0<=a.call(l,p)))){for(u=t.comments,i=0,d=u.length;ia.call(n,r)))return this.tokens.splice(o,0,N("(","(",this.tokens[o])),this.tokens.splice(t+1,0,N(")",")",this.tokens[t]))},o=null,this.scanTokens(function(a,n){var r,l;return"do"===a[1]?(o=n,r=n+1,"PARAM_START"===this.tag(n+1)&&(r=null,this.detectEnd(n+1,function(e,a){return"PARAM_END"===this.tag(a-1)},function(e,a){return r=a})),null==r||"->"!==(l=this.tag(r))&&"=>"!==l||"INDENT"!==this.tag(r+1))?1:(this.detectEnd(r+1,t,e),2):1})}},{key:"normalizeLines",value:function normalizeLines(){var e=this,t,o,r,l,d,c,p,u,m;return m=d=u=null,p=null,c=null,l=[],r=function(e,t){var o,r,l,i;return";"!==e[1]&&(o=e[0],0<=a.call(y,o))&&!("TERMINATOR"===e[0]&&(r=this.tag(t+1),0<=a.call(s,r)))&&!("ELSE"===e[0]&&("THEN"!==m||c||p))&&("CATCH"!==(l=e[0])&&"FINALLY"!==l||"->"!==m&&"=>"!==m)||(i=e[0],0<=a.call(n,i))&&(this.tokens[t-1].newLine||"OUTDENT"===this.tokens[t-1][0])},t=function(e,a){return"ELSE"===e[0]&&"THEN"===m&&l.pop(),this.tokens.splice(","===this.tag(a-1)?a-1:a,0,u)},o=function(a,t){var o,n,r;if(r=l.length,!(0"===v||"=>"===v)&&this.findTagsBackwards(n,["IF","WHILE","FOR","UNTIL","SWITCH","WHEN","LEADING_WHEN","[","INDEX_START"])&&!this.findTagsBackwards(n,["THEN","..","..."]),"TERMINATOR"===v){if("ELSE"===this.tag(n+1)&&"OUTDENT"!==this.tag(n-1))return i.splice.apply(i,[n,1].concat(_toConsumableArray(this.indentation()))),1;if(k=this.tag(n+1),0<=a.call(s,k))return i.splice(n,1),0}if("CATCH"===v)for(f=y=1;2>=y;f=++y)if("OUTDENT"===(N=this.tag(n+f))||"TERMINATOR"===N||"FINALLY"===N)return i.splice.apply(i,[n+f,0].concat(_toConsumableArray(this.indentation()))),2+f;if(("->"===v||"=>"===v)&&(","===this.tag(n+1)||"."===this.tag(n+1)&&e.newLine)){var b=this.indentation(i[n]),$=_slicedToArray(b,2);return d=$[0],u=$[1],i.splice(n+1,0,d,u),1}if(0<=a.call(T,v)&&"INDENT"!==this.tag(n+1)&&("ELSE"!==v||"IF"!==this.tag(n+1))&&!g){m=v;var _=this.indentation(i[n]),C=_slicedToArray(_,2);return d=C[0],u=C[1],"THEN"===m&&(d.fromThen=!0),"THEN"===v&&(p=this.findTagsBackwards(n,["LEADING_WHEN"])&&"IF"===this.tag(n+1),c=this.findTagsBackwards(n,["IF"])&&"IF"===this.tag(n+1)),"THEN"===v&&this.findTagsBackwards(n,["IF"])&&l.push(n),"ELSE"===v&&"OUTDENT"!==this.tag(n-1)&&(n=o(i,n)),i.splice(n+1,0,d),this.detectEnd(n+2,r,t),"THEN"===v&&i.splice(n,1),1}return 1})}},{key:"tagPostfixConditionals",value:function tagPostfixConditionals(){var e,t,o;return o=null,t=function(e,t){var o=_slicedToArray(e,1),n,r;r=o[0];var l=_slicedToArray(this.tokens[t-1],1);return n=l[0],"TERMINATOR"===r||"INDENT"===r&&0>a.call(T,n)},e=function(e){if("INDENT"!==e[0]||e.generated&&!e.fromThen)return o[0]="POST_"+o[0]},this.scanTokens(function(a,n){return"IF"===a[0]?(o=a,this.detectEnd(n+1,t,e),1):1})}},{key:"indentation",value:function indentation(e){var a,t;return a=["INDENT",2],t=["OUTDENT",2],e?(a.generated=t.generated=!0,a.origin=t.origin=e):a.explicit=t.explicit=!0,[a,t]}},{key:"tag",value:function tag(e){var a;return null==(a=this.tokens[e])?void 0:a[0]}}]),e}();return e.prototype.generate=N,e}.call(this),o=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]],e.INVERSES=i={},c=[],d=[],v=0,b=o.length;v","=>","[","(","{","--","++"],h=["+","-"],u=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],T=["ELSE","->","=>","TRY","FINALLY","THEN"],y=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],g=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"],r=["IF","TRY","FINALLY","CATCH","CLASS","SWITCH"],l=["(",")","[","]","{","}",".","..","...",",","=","++","--","?","AS","AWAIT","CALL_START","CALL_END","DEFAULT","ELSE","EXTENDS","EXPORT","FORIN","FOROF","FORFROM","IMPORT","INDENT","INDEX_SOAK","LEADING_WHEN","OUTDENT","PARAM_END","REGEX_START","REGEX_END","RETURN","STRING_END","THROW","UNARY","YIELD"].concat(h.concat(u.concat(n.concat(r))))}.call(this),{exports:e}.exports}(),require["./lexer"]=function(){var e={};return function(){var a=[].indexOf,t=[].slice,o=require("./rewriter"),n,r,l,s,i,d,c,p,u,m,h,g,f,y,k,T,N,v,b,$,_,C,D,E,x,I,S,A,R,O,L,F,w,P,j,M,U,V,B,G,H,W,X,Y,q,z,J,K,Z,Q,ee,ae,te,oe,ne,re,le,se,ie,de,ce,pe,ue,me,he,ge,fe,ye,ke,Te,Ne,ve,be,$e;z=o.Rewriter,S=o.INVERSES;var _e=require("./helpers");he=_e.count,be=_e.starts,me=_e.compact,ve=_e.repeat,ge=_e.invertLiterate,Ne=_e.merge,ue=_e.attachCommentsToNode,Te=_e.locationDataToString,$e=_e.throwSyntaxError,e.Lexer=w=function(){function e(){_classCallCheck(this,e)}return _createClass(e,[{key:"tokenize",value:function tokenize(e){var a=1this.indent){if(s)return this.indebt=d-this.indent,this.suppressNewlines(),o.length;if(!this.tokens.length)return this.baseIndent=this.indent=d,this.indentLiteral=l,o.length;t=d-this.indent+this.outdebt,this.token("INDENT",t,o.length-d,d),this.indents.push(t),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=d,this.indentLiteral=l}else da.call(u,h)))))return 0;var N=d,v=_slicedToArray(N,3);return i=v[0],s=v[1],o=v[2],c=this.token("CSX_TAG",s,1,s.length),this.token("CALL_START","("),this.token("[","["),this.ends.push({tag:"/>",origin:c,name:s}),this.csxDepth++,s.length+1}if(n=this.atCSXTag()){if("/>"===this.chunk.slice(0,2))return this.pair("/>"),this.token("]","]",0,2),this.token("CALL_END",")",0,2),this.csxDepth--,2;if("{"===l)return":"===m?(g=this.token("(","("),this.csxObjAttribute[this.csxDepth]=!1):(g=this.token("{","{"),this.csxObjAttribute[this.csxDepth]=!0),this.ends.push({tag:"}",origin:g}),1;if(">"===l){this.pair("/>"),c=this.token("]","]"),this.token(",",",");var b=this.matchWithInterpolations(I,">",""})}),d=y.exec(this.chunk.slice(r))||f.exec(this.chunk.slice(r)),d&&d[1]===n.name||this.error("expected corresponding CSX closing tag for "+n.name,n.origin[2]),t=r+n.name.length,">"!==this.chunk[t]&&this.error("missing closing > after tag name",{offset:t,length:1}),this.token("CALL_END",")",r,n.name.length+1),this.csxDepth--,t+1}return 0}return this.atCSXTag(1)?"}"===l?(this.pair(l),this.csxObjAttribute[this.csxDepth]?(this.token("}","}"),this.csxObjAttribute[this.csxDepth]=!1):this.token(")",")"),this.token(",",","),1):0:0}},{key:"atCSXTag",value:function atCSXTag(){var e=0"===(null==t?void 0:t.tag)&&t}},{key:"literalToken",value:function literalToken(){var e,t,o,n,r,i,d,c,p,u,g,f,y;if(e=V.exec(this.chunk)){var k=e,T=_slicedToArray(k,1);y=T[0],s.test(y)&&this.tagParameters()}else y=this.chunk.charAt(0);if(g=y,n=this.prev(),n&&0<=a.call(["="].concat(_toConsumableArray(h)),y)&&(u=!1,"="!==y||"||"!==(r=n[1])&&"&&"!==r||n.spaced||(n[0]="COMPOUND_ASSIGN",n[1]+="=",n=this.tokens[this.tokens.length-2],u=!0),n&&"PROPERTY"!==n[0]&&(o=null==(i=n.origin)?n:i,t=ye(n[1],o[1]),t&&this.error(t,o[2])),u))return y.length;if("{"===y&&this.seenImport?this.importSpecifierList=!0:this.importSpecifierList&&"}"===y?this.importSpecifierList=!1:"{"===y&&"EXPORT"===(null==n?void 0:n[0])?this.exportSpecifierList=!0:this.exportSpecifierList&&"}"===y&&(this.exportSpecifierList=!1),";"===y)(d=null==n?void 0:n[0],0<=a.call(["="].concat(_toConsumableArray(ie)),d))&&this.error("unexpected ;"),this.seenFor=this.seenImport=this.seenExport=!1,g="TERMINATOR";else if("*"===y&&"EXPORT"===(null==n?void 0:n[0]))g="EXPORT_ALL";else if(0<=a.call(P,y))g="MATH";else if(0<=a.call(m,y))g="COMPARE";else if(0<=a.call(h,y))g="COMPOUND_ASSIGN";else if(0<=a.call(le,y))g="UNARY";else if(0<=a.call(se,y))g="UNARY_MATH";else if(0<=a.call(J,y))g="SHIFT";else if("?"===y&&(null==n?void 0:n.spaced))g="BIN?";else if(n)if("("===y&&!n.spaced&&(c=n[0],0<=a.call(l,c)))"?"===n[0]&&(n[0]="FUNC_EXIST"),g="CALL_START";else if("["===y&&((p=n[0],0<=a.call(x,p))&&!n.spaced||"::"===n[0]))switch(g="INDEX_START",n[0]){case"?":n[0]="INDEX_SOAK"}return f=this.makeToken(g,y),"("===y||"{"===y||"["===y?this.ends.push({tag:S[y],origin:f}):")"===y||"}"===y||"]"===y?this.pair(y):void 0,this.tokens.push(this.makeToken(g,y)),y.length}},{key:"tagParameters",value:function tagParameters(){var e,a,t,o,n;if(")"!==this.tag())return this;for(t=[],n=this.tokens,e=n.length,a=n[--e],a[0]="PARAM_END";o=n[--e];)switch(o[0]){case")":t.push(o);break;case"(":case"CALL_START":if(t.length)t.pop();else return"("===o[0]?(o[0]="PARAM_START",this):(a[0]="CALL_END",this)}return this}},{key:"closeIndentation",value:function closeIndentation(){return this.outdentToken(this.indent)}},{key:"matchWithInterpolations",value:function matchWithInterpolations(a,o,n,r){var l,s,i,d,c,p,u,m,h,g,f,y,k,T,N,v,b,$,_,C,D,E;if(null==n&&(n=o),null==r&&(r=/^#\{/),E=[],v=o.length,this.chunk.slice(0,v)!==o)return null;for(C=this.chunk.slice(v);;){var x=a.exec(C),I=_slicedToArray(x,1);if(D=I[0],this.validateEscapes(D,{isRegex:"/"===o.charAt(0),offsetInChunk:v}),E.push(this.makeToken("NEOSTRING",D,v)),C=C.slice(D.length),v+=D.length,!(T=r.exec(C)))break;var S=T,A=_slicedToArray(S,1);f=A[0],g=f.length-1;var R=this.getLineAndColumnFromChunk(v+g),O=_slicedToArray(R,2);k=O[0],u=O[1],_=C.slice(g);var L=(new e).tokenize(_,{line:k,column:u,untilBalanced:!0});if(N=L.tokens,h=L.index,h+=g,c="}"===C[h-1],c){var F,w,P,j;F=N,w=_slicedToArray(F,1),b=w[0],F,P=t.call(N,-1),j=_slicedToArray(P,1),p=j[0],P,b[0]=b[1]="(",p[0]=p[1]=")",p.origin=["","end of interpolation",p[2]]}"TERMINATOR"===(null==($=N[1])?void 0:$[0])&&N.splice(1,1),c||(b=this.makeToken("(","(",v,0),p=this.makeToken(")",")",v+h,0),N=[b].concat(_toConsumableArray(N),[p])),E.push(["TOKENS",N]),C=C.slice(h),v+=h}return C.slice(0,n.length)!==n&&this.error("missing "+n,{length:o.length}),l=E,s=_slicedToArray(l,1),m=s[0],l,i=t.call(E,-1),d=_slicedToArray(i,1),y=d[0],i,m[2].first_column-=o.length,"\n"===y[1].substr(-1)?(y[2].last_line+=1,y[2].last_column=n.length-1):y[2].last_column+=n.length,0===y[1].length&&(y[2].last_column-=1),{tokens:E,index:v+n.length}}},{key:"mergeInterpolationTokens",value:function mergeInterpolationTokens(e,a,o){var n,r,l,s,i,d,c,p,u,m,h,g,f,y,k,T,N,v,b;for(1l&&(f=this.token("+","+"),f[2]={first_line:m[2].first_line,first_column:m[2].first_column,last_line:m[2].first_line,last_column:m[2].first_column}),($=this.tokens).push.apply($,_toConsumableArray(N))}if(h){var E=t.call(e,-1),x=_slicedToArray(E,1);return c=x[0],h.origin=["STRING",null,{first_line:h[2].first_line,first_column:h[2].first_column,last_line:c[2].last_line,last_column:c[2].last_column}],h[2]=h.origin[2],y=this.token("STRING_END",")"),y[2]={first_line:c[2].last_line,first_column:c[2].last_column,last_line:c[2].last_line,last_column:c[2].last_column}}}},{key:"pair",value:function pair(e){var a,o,n,r,l,s,i;if(l=this.ends,a=t.call(l,-1),o=_slicedToArray(a,1),r=o[0],a,e!==(i=null==r?void 0:r.tag)){var d,c;return"OUTDENT"!==i&&this.error("unmatched "+e),s=this.indents,d=t.call(s,-1),c=_slicedToArray(d,1),n=c[0],d,this.outdentToken(n,!0),this.pair(e)}return this.ends.pop()}},{key:"getLineAndColumnFromChunk",value:function getLineAndColumnFromChunk(e){var a,o,n,r,l;if(0===e)return[this.chunkLine,this.chunkColumn];if(l=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),n=he(l,"\n"),a=this.chunkColumn,0e)?o(e):(a=_Mathfloor((e-65536)/1024)+55296,t=(e-65536)%1024+56320,""+o(a)+o(t))}},{key:"replaceUnicodeCodePointEscapes",value:function replaceUnicodeCodePointEscapes(e,t){var o=this,n;return n=null!=t.flags&&0>a.call(t.flags,"u"),e.replace(de,function(e,a,r,l){var s;return a?a:(s=parseInt(r,16),1114111a.call([].concat(_toConsumableArray(R),_toConsumableArray(c)),e):return"keyword '"+t+"' can't be assigned";case 0>a.call(Z,e):return"'"+t+"' can't be assigned";case 0>a.call(q,e):return"reserved word '"+t+"' can't be assigned";default:return!1}},e.isUnassignable=ye,fe=function(e){var a;return"IDENTIFIER"===e[0]?("from"===e[1]&&(e[1][0]="IDENTIFIER",!0),!0):"FOR"!==e[0]&&"{"!==(a=e[1])&&"["!==a&&","!==a&&":"!==a},R=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","await","if","else","switch","for","while","do","try","catch","finally","class","extends","super","import","export","default"],c=["undefined","Infinity","NaN","then","unless","until","loop","of","by","when"],d={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},i=function(){var e;for(ke in e=[],d)e.push(ke);return e}(),c=c.concat(i),q=["case","function","var","void","with","const","let","enum","native","implements","interface","package","private","protected","public","static"],Z=["arguments","eval"],e.JS_FORBIDDEN=R.concat(q).concat(Z),n=65279,D=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,y=/^(?![\d<])((?:(?!\s)[\.\-$\w\x7f-\uffff])+)/,f=/^()>/,g=/^(?!\d)((?:(?!\s)[\-$\w\x7f-\uffff])+)([^\S]*=(?!=))?/,U=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,V=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,pe=/^[^\n\S]+/,p=/^\s*###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,s=/^[-=]>/,j=/^(?:\n[^\n\S]*)+/,A=/^`(?!``)((?:[^`\\]|\\[\s\S])*)`/,C=/^```((?:[^`\\]|\\[\s\S]|`(?!``))*)```/,oe=/^(?:'''|"""|'|")/,te=/^(?:[^\\']|\\[\s\S])*/,Q=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,b=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,N=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,I=/^(?:[^\{<])*/,k=/^(?:\{|<(?!\/))/,ae=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g,K=/\s*\n\s*/g,v=/\n+([^\n\S]*)(?=\S)/g,G=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/,H=/^\w*/,ce=/^(?!.*(.).*\1)[imguy]*$/,$=/^(?:[^\\\/#\s]|\\[\s\S]|\/(?!\/\/)|\#(?!\{)|\s+(?:#(?!\{).*)?)*/,_=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g,W=/^(\/|\/{3}\s*)(\*)/,B=/^\/=?\s/,T=/\*\//,F=/^\s*(?:,|\??\.(?![.\d])|::)/,ee=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/,X=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7])|(x(?![\da-fA-F]{2}).{0,2})|(u\{(?![\da-fA-F]{1,}\})[^}]*\}?)|(u(?!\{|[\da-fA-F]{4}).{0,4}))/,de=/(\\\\)|\\u\{([\da-fA-F]+)\}/g,O=/^[^\n\S]*\n/,ne=/\n[^\n\S]*$/,re=/\s+$/,h=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],le=["NEW","TYPEOF","DELETE","DO"],se=["!","~"],J=["<<",">>",">>>"],m=["==","!=","<",">","<=",">="],P=["*","/","%","//","%%"],Y=["IN","OF","INSTANCEOF"],r=["TRUE","FALSE"],l=["IDENTIFIER","PROPERTY",")","]","?","@","THIS","SUPER"],x=l.concat(["NUMBER","INFINITY","NAN","STRING","STRING_END","REGEX","REGEX_END","BOOL","NULL","UNDEFINED","}","::"]),u=["IDENTIFIER",")","]","NUMBER"],M=x.concat(["++","--"]),L=["INDENT","OUTDENT","TERMINATOR"],E=[")","}","]"],ie=["\\",".","?.","?::","UNARY","MATH","UNARY_MATH","+","-","**","SHIFT","RELATION","COMPARE","&","^","|","&&","||","BIN?","EXTENDS"]}.call(this),{exports:e}.exports}(),require["./parser"]=function(){var e={},a={exports:e},t=function(){function e(){this.yy={}}var a=function(e,a,t,o){for(t=t||{},o=e.length;o--;t[e[o]]=a);return t},t=[1,24],o=[1,56],n=[1,91],r=[1,92],l=[1,87],s=[1,93],i=[1,94],d=[1,89],c=[1,90],p=[1,64],u=[1,66],m=[1,67],h=[1,68],g=[1,69],f=[1,70],y=[1,72],k=[1,73],T=[1,58],N=[1,42],v=[1,36],b=[1,76],$=[1,77],_=[1,86],C=[1,54],D=[1,59],E=[1,60],x=[1,74],I=[1,75],S=[1,47],A=[1,55],R=[1,71],O=[1,81],L=[1,82],F=[1,83],w=[1,84],P=[1,53],j=[1,80],M=[1,38],U=[1,39],V=[1,40],B=[1,41],G=[1,43],H=[1,44],W=[1,95],X=[1,6,36,47,146],Y=[1,6,35,36,47,69,70,93,127,135,146,149,157],q=[1,113],z=[1,114],J=[1,115],K=[1,110],Z=[1,98],Q=[1,97],ee=[1,96],ae=[1,99],te=[1,100],oe=[1,101],ne=[1,102],re=[1,103],le=[1,104],se=[1,105],ie=[1,106],de=[1,107],ce=[1,108],pe=[1,109],ue=[1,117],me=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],he=[2,196],ge=[1,123],fe=[1,128],ye=[1,124],ke=[1,125],Te=[1,126],Ne=[1,129],ve=[1,122],be=[1,6,35,36,47,69,70,93,127,135,146,148,149,150,156,157,174],$e=[1,6,35,36,45,46,47,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],_e=[2,122],Ce=[2,126],De=[6,35,88,93],Ee=[2,99],xe=[1,141],Ie=[1,135],Se=[1,140],Ae=[1,144],Re=[1,149],Oe=[1,147],Le=[1,151],Fe=[1,155],we=[1,153],Pe=[1,6,35,36,45,46,47,61,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],je=[2,119],Me=[1,6,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Ue=[2,31],Ve=[1,183],Be=[2,86],Ge=[1,187],He=[1,193],We=[1,208],Xe=[1,203],Ye=[1,212],qe=[1,209],ze=[1,214],Je=[1,215],Ke=[1,217],Ze=[14,32,35,38,39,43,45,46,49,50,54,55,56,57,58,59,68,77,84,85,86,90,91,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],Qe=[1,6,35,36,45,46,47,61,69,70,80,81,83,88,93,101,102,103,105,109,111,125,126,127,135,146,148,149,150,156,157,174,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],ea=[1,228],aa=[2,142],ta=[1,250],oa=[1,245],na=[1,256],ra=[1,6,35,36,45,46,47,65,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],la=[1,6,33,35,36,45,46,47,61,65,69,70,80,81,83,88,93,101,102,103,105,109,111,117,125,126,127,135,146,148,149,150,156,157,164,165,166,174,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],sa=[1,6,35,36,45,46,47,52,65,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],ia=[1,286],da=[45,46,126],ca=[1,297],pa=[1,296],ua=[6,35],ma=[2,97],ha=[1,303],ga=[6,35,36,88,93],fa=[6,35,36,61,70,88,93],ya=[1,6,35,36,47,69,70,80,81,83,88,93,101,102,103,105,109,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],ka=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,183,184,185,186,187,188,189,190,191,192,193],Ta=[2,347],Na=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,183,185,186,187,188,189,190,191,192,193],va=[45,46,80,81,101,102,103,105,125,126],ba=[1,330],$a=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174],_a=[2,84],Ca=[1,346],Da=[1,348],Ea=[1,353],xa=[1,355],Ia=[6,35,69,93],Sa=[2,221],Aa=[2,222],Ra=[1,6,35,36,45,46,47,61,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,164,165,166,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Oa=[1,369],La=[6,14,32,35,36,38,39,43,45,46,49,50,54,55,56,57,58,59,68,69,70,77,84,85,86,90,91,93,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],Fa=[6,35,36,69,93],wa=[6,35,36,69,93,127],Pa=[1,6,35,36,45,46,47,61,65,69,70,80,81,83,88,93,101,102,103,105,109,111,125,126,127,135,146,148,149,150,156,157,164,165,166,174,178,179,180,181,182,183,184,185,186,187,188,189,190,191,192,193,194],ja=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,157,174],Ma=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,149,157,174],Ua=[2,273],Va=[164,165,166],Ba=[93,164,165,166],Ga=[6,35,109],Ha=[1,393],Wa=[6,35,36,93,109],Xa=[6,35,36,65,93,109],Ya=[1,399],qa=[1,400],za=[6,35,36,61,65,70,80,81,93,109,126],Ja=[6,35,36,70,80,81,93,109,126],Ka=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,178,179,185,186,187,188,189,190,191,192,193],Za=[2,339],Qa=[2,338],et=[1,6,35,36,45,46,47,52,69,70,80,81,83,88,93,101,102,103,105,109,125,126,127,135,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],at=[1,422],tt=[14,32,38,39,43,45,46,49,50,54,55,56,57,58,59,68,77,83,84,85,86,90,91,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],ot=[2,207],nt=[6,35,36],rt=[2,98],lt=[1,431],st=[1,432],it=[1,6,35,36,47,69,70,80,81,83,88,93,101,102,103,105,109,127,135,142,143,146,148,149,150,156,157,169,171,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],dt=[1,312],ct=[36,169,171],pt=[1,6,36,47,69,70,83,88,93,109,127,135,146,149,157,174],ut=[1,467],mt=[1,473],ht=[1,6,35,36,47,69,70,93,127,135,146,149,157,174],gt=[2,113],ft=[1,486],yt=[1,487],kt=[6,35,36,69],Tt=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,169,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Nt=[1,6,35,36,47,69,70,93,127,135,146,149,157,169],vt=[2,286],bt=[2,287],$t=[2,302],_t=[1,510],Ct=[1,511],Dt=[6,35,36,109],Et=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,150,156,157,174],xt=[1,532],It=[6,35,36,93,127],St=[6,35,36,93],At=[1,6,35,36,47,69,70,83,88,93,109,127,135,142,146,148,149,150,156,157,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Rt=[35,93],Ot=[1,560],Lt=[1,561],Ft=[1,567],wt=[1,568],Pt=[2,258],jt=[2,261],Mt=[2,274],Ut=[1,617],Vt=[1,618],Bt=[2,288],Gt=[2,292],Ht=[2,289],Wt=[2,293],Xt=[2,290],Yt=[2,291],qt=[2,303],zt=[2,304],Jt=[1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,174],Kt=[2,294],Zt=[2,296],Qt=[2,298],eo=[2,300],ao=[2,295],to=[2,297],oo=[2,299],no=[2,301],ro={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,ExpressionLine:8,Statement:9,FuncDirective:10,YieldReturn:11,AwaitReturn:12,Return:13,STATEMENT:14,Import:15,Export:16,Value:17,Code:18,Operation:19,Assign:20,If:21,Try:22,While:23,For:24,Switch:25,Class:26,Throw:27,Yield:28,CodeLine:29,IfLine:30,OperationLine:31,YIELD:32,FROM:33,Block:34,INDENT:35,OUTDENT:36,Identifier:37,IDENTIFIER:38,CSX_TAG:39,Property:40,PROPERTY:41,AlphaNumeric:42,NUMBER:43,String:44,STRING:45,STRING_START:46,STRING_END:47,Regex:48,REGEX:49,REGEX_START:50,Invocation:51,REGEX_END:52,Literal:53,JS:54,UNDEFINED:55,NULL:56,BOOL:57,INFINITY:58,NAN:59,Assignable:60,"=":61,AssignObj:62,ObjAssignable:63,ObjRestValue:64,":":65,SimpleObjAssignable:66,ThisProperty:67,"[":68,"]":69,"...":70,ObjSpreadExpr:71,ObjSpreadIdentifier:72,Object:73,Parenthetical:74,Super:75,This:76,SUPER:77,Arguments:78,ObjSpreadAccessor:79,".":80,INDEX_START:81,IndexValue:82,INDEX_END:83,RETURN:84,AWAIT:85,PARAM_START:86,ParamList:87,PARAM_END:88,FuncGlyph:89,"->":90,"=>":91,OptComma:92,",":93,Param:94,ParamVar:95,Array:96,Splat:97,SimpleAssignable:98,Accessor:99,Range:100,"?.":101,"::":102,"?::":103,Index:104,INDEX_SOAK:105,Slice:106,"{":107,AssignList:108,"}":109,CLASS:110,EXTENDS:111,IMPORT:112,ImportDefaultSpecifier:113,ImportNamespaceSpecifier:114,ImportSpecifierList:115,ImportSpecifier:116,AS:117,DEFAULT:118,IMPORT_ALL:119,EXPORT:120,ExportSpecifierList:121,EXPORT_ALL:122,ExportSpecifier:123,OptFuncExist:124,FUNC_EXIST:125,CALL_START:126,CALL_END:127,ArgList:128,THIS:129,"@":130,Elisions:131,ArgElisionList:132,OptElisions:133,RangeDots:134,"..":135,Arg:136,ArgElision:137,Elision:138,SimpleArgs:139,TRY:140,Catch:141,FINALLY:142,CATCH:143,THROW:144,"(":145,")":146,WhileLineSource:147,WHILE:148,WHEN:149,UNTIL:150,WhileSource:151,Loop:152,LOOP:153,ForBody:154,ForLineBody:155,FOR:156,BY:157,ForStart:158,ForSource:159,ForLineSource:160,ForVariables:161,OWN:162,ForValue:163,FORIN:164,FOROF:165,FORFROM:166,SWITCH:167,Whens:168,ELSE:169,When:170,LEADING_WHEN:171,IfBlock:172,IF:173,POST_IF:174,IfBlockLine:175,UNARY:176,UNARY_MATH:177,"-":178,"+":179,"--":180,"++":181,"?":182,MATH:183,"**":184,SHIFT:185,COMPARE:186,"&":187,"^":188,"|":189,"&&":190,"||":191,"BIN?":192,RELATION:193,COMPOUND_ASSIGN:194,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",14:"STATEMENT",32:"YIELD",33:"FROM",35:"INDENT",36:"OUTDENT",38:"IDENTIFIER",39:"CSX_TAG",41:"PROPERTY",43:"NUMBER",45:"STRING",46:"STRING_START",47:"STRING_END",49:"REGEX",50:"REGEX_START",52:"REGEX_END",54:"JS",55:"UNDEFINED",56:"NULL",57:"BOOL",58:"INFINITY",59:"NAN",61:"=",65:":",68:"[",69:"]",70:"...",77:"SUPER",80:".",81:"INDEX_START",83:"INDEX_END",84:"RETURN",85:"AWAIT",86:"PARAM_START",88:"PARAM_END",90:"->",91:"=>",93:",",101:"?.",102:"::",103:"?::",105:"INDEX_SOAK",107:"{",109:"}",110:"CLASS",111:"EXTENDS",112:"IMPORT",117:"AS",118:"DEFAULT",119:"IMPORT_ALL",120:"EXPORT",122:"EXPORT_ALL",125:"FUNC_EXIST",126:"CALL_START",127:"CALL_END",129:"THIS",130:"@",135:"..",140:"TRY",142:"FINALLY",143:"CATCH",144:"THROW",145:"(",146:")",148:"WHILE",149:"WHEN",150:"UNTIL",153:"LOOP",156:"FOR",157:"BY",162:"OWN",164:"FORIN",165:"FOROF",166:"FORFROM",167:"SWITCH",169:"ELSE",171:"LEADING_WHEN",173:"IF",174:"POST_IF",176:"UNARY",177:"UNARY_MATH",178:"-",179:"+",180:"--",181:"++",182:"?",183:"MATH",184:"**",185:"SHIFT",186:"COMPARE",187:"&",188:"^",189:"|",190:"&&",191:"||",192:"BIN?",193:"RELATION",194:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[5,1],[5,1],[10,1],[10,1],[9,1],[9,1],[9,1],[9,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[8,1],[8,1],[8,1],[28,1],[28,2],[28,3],[34,2],[34,3],[37,1],[37,1],[40,1],[42,1],[42,1],[44,1],[44,3],[48,1],[48,3],[53,1],[53,1],[53,1],[53,1],[53,1],[53,1],[53,1],[53,1],[20,3],[20,4],[20,5],[62,1],[62,1],[62,3],[62,5],[62,3],[62,5],[66,1],[66,1],[66,1],[66,3],[63,1],[63,1],[64,2],[64,2],[64,2],[64,2],[71,1],[71,1],[71,1],[71,1],[71,1],[71,2],[71,2],[71,2],[72,2],[72,2],[79,2],[79,3],[13,2],[13,4],[13,1],[11,3],[11,2],[12,3],[12,2],[18,5],[18,2],[29,5],[29,2],[89,1],[89,1],[92,0],[92,1],[87,0],[87,1],[87,3],[87,4],[87,6],[94,1],[94,2],[94,2],[94,3],[94,1],[95,1],[95,1],[95,1],[95,1],[97,2],[97,2],[98,1],[98,2],[98,2],[98,1],[60,1],[60,1],[60,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[17,1],[75,3],[75,4],[99,2],[99,2],[99,2],[99,2],[99,1],[99,1],[104,3],[104,2],[82,1],[82,1],[73,4],[108,0],[108,1],[108,3],[108,4],[108,6],[26,1],[26,2],[26,3],[26,4],[26,2],[26,3],[26,4],[26,5],[15,2],[15,4],[15,4],[15,5],[15,7],[15,6],[15,9],[115,1],[115,3],[115,4],[115,4],[115,6],[116,1],[116,3],[116,1],[116,3],[113,1],[114,3],[16,3],[16,5],[16,2],[16,4],[16,5],[16,6],[16,3],[16,5],[16,4],[16,7],[121,1],[121,3],[121,4],[121,4],[121,6],[123,1],[123,3],[123,3],[123,1],[123,3],[51,3],[51,3],[51,3],[124,0],[124,1],[78,2],[78,4],[76,1],[76,1],[67,2],[96,2],[96,3],[96,4],[134,1],[134,1],[100,5],[100,5],[106,3],[106,2],[106,3],[106,2],[106,2],[106,1],[128,1],[128,3],[128,4],[128,4],[128,6],[136,1],[136,1],[136,1],[136,1],[132,1],[132,3],[132,4],[132,4],[132,6],[137,1],[137,2],[133,1],[133,2],[131,1],[131,2],[138,1],[139,1],[139,1],[139,3],[139,3],[22,2],[22,3],[22,4],[22,5],[141,3],[141,3],[141,2],[27,2],[27,4],[74,3],[74,5],[147,2],[147,4],[147,2],[147,4],[151,2],[151,4],[151,4],[151,2],[151,4],[151,4],[23,2],[23,2],[23,2],[23,2],[23,1],[152,2],[152,2],[24,2],[24,2],[24,2],[24,2],[154,2],[154,4],[154,2],[155,4],[155,2],[158,2],[158,3],[163,1],[163,1],[163,1],[163,1],[161,1],[161,3],[159,2],[159,2],[159,4],[159,4],[159,4],[159,4],[159,4],[159,4],[159,6],[159,6],[159,6],[159,6],[159,6],[159,6],[159,6],[159,6],[159,2],[159,4],[159,4],[160,2],[160,2],[160,4],[160,4],[160,4],[160,4],[160,4],[160,4],[160,6],[160,6],[160,6],[160,6],[160,6],[160,6],[160,6],[160,6],[160,2],[160,4],[160,4],[25,5],[25,5],[25,7],[25,7],[25,4],[25,6],[168,1],[168,2],[170,3],[170,4],[172,3],[172,5],[21,1],[21,3],[21,3],[21,3],[175,3],[175,5],[30,1],[30,3],[30,3],[30,3],[31,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,3],[19,5],[19,4]],performAction:function(e,a,t,o,n,r,l){var s=r.length-1;switch(n){case 1:return this.$=o.addDataToNode(o,l[s],l[s])(new o.Block);break;case 2:return this.$=r[s];break;case 3:this.$=o.addDataToNode(o,l[s],l[s])(o.Block.wrap([r[s]]));break;case 4:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-2].push(r[s]));break;case 5:this.$=r[s-1];break;case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 23:case 24:case 25:case 26:case 27:case 28:case 29:case 30:case 40:case 45:case 47:case 57:case 62:case 63:case 64:case 66:case 67:case 72:case 73:case 74:case 75:case 76:case 97:case 98:case 109:case 110:case 111:case 112:case 118:case 119:case 122:case 127:case 136:case 221:case 222:case 223:case 225:case 237:case 238:case 280:case 281:case 330:case 336:case 342:this.$=r[s];break;case 13:this.$=o.addDataToNode(o,l[s],l[s])(new o.StatementLiteral(r[s]));break;case 31:this.$=o.addDataToNode(o,l[s],l[s])(new o.Op(r[s],new o.Value(new o.Literal(""))));break;case 32:case 346:case 347:case 348:case 351:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op(r[s-1],r[s]));break;case 33:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op(r[s-2].concat(r[s-1]),r[s]));break;case 34:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Block);break;case 35:case 83:case 137:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-1]);break;case 36:this.$=o.addDataToNode(o,l[s],l[s])(new o.IdentifierLiteral(r[s]));break;case 37:this.$=o.addDataToNode(o,l[s],l[s])(new o.CSXTag(r[s]));break;case 38:this.$=o.addDataToNode(o,l[s],l[s])(new o.PropertyName(r[s]));break;case 39:this.$=o.addDataToNode(o,l[s],l[s])(new o.NumberLiteral(r[s]));break;case 41:this.$=o.addDataToNode(o,l[s],l[s])(new o.StringLiteral(r[s]));break;case 42:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.StringWithInterpolations(r[s-1]));break;case 43:this.$=o.addDataToNode(o,l[s],l[s])(new o.RegexLiteral(r[s]));break;case 44:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.RegexWithInterpolations(r[s-1].args));break;case 46:this.$=o.addDataToNode(o,l[s],l[s])(new o.PassthroughLiteral(r[s]));break;case 48:this.$=o.addDataToNode(o,l[s],l[s])(new o.UndefinedLiteral(r[s]));break;case 49:this.$=o.addDataToNode(o,l[s],l[s])(new o.NullLiteral(r[s]));break;case 50:this.$=o.addDataToNode(o,l[s],l[s])(new o.BooleanLiteral(r[s]));break;case 51:this.$=o.addDataToNode(o,l[s],l[s])(new o.InfinityLiteral(r[s]));break;case 52:this.$=o.addDataToNode(o,l[s],l[s])(new o.NaNLiteral(r[s]));break;case 53:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(r[s-2],r[s]));break;case 54:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Assign(r[s-3],r[s]));break;case 55:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(r[s-4],r[s-1]));break;case 56:case 115:case 120:case 121:case 123:case 124:case 125:case 126:case 128:case 282:case 283:this.$=o.addDataToNode(o,l[s],l[s])(new o.Value(r[s]));break;case 58:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(o.addDataToNode(o,l[s-2])(new o.Value(r[s-2])),r[s],"object",{operatorToken:o.addDataToNode(o,l[s-1])(new o.Literal(r[s-1]))}));break;case 59:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(o.addDataToNode(o,l[s-4])(new o.Value(r[s-4])),r[s-1],"object",{operatorToken:o.addDataToNode(o,l[s-3])(new o.Literal(r[s-3]))}));break;case 60:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(o.addDataToNode(o,l[s-2])(new o.Value(r[s-2])),r[s],null,{operatorToken:o.addDataToNode(o,l[s-1])(new o.Literal(r[s-1]))}));break;case 61:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(o.addDataToNode(o,l[s-4])(new o.Value(r[s-4])),r[s-1],null,{operatorToken:o.addDataToNode(o,l[s-3])(new o.Literal(r[s-3]))}));break;case 65:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Value(new o.ComputedPropertyName(r[s-1])));break;case 68:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(new o.Value(r[s-1])));break;case 69:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(new o.Value(r[s])));break;case 70:case 113:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(r[s-1]));break;case 71:case 114:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Splat(r[s]));break;case 77:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.SuperCall(o.addDataToNode(o,l[s-1])(new o.Super),r[s],!1,r[s-1]));break;case 78:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Call(new o.Value(r[s-1]),r[s]));break;case 79:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Call(r[s-1],r[s]));break;case 80:case 81:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Value(r[s-1]).add(r[s]));break;case 82:case 131:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Access(r[s]));break;case 84:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Return(r[s]));break;case 85:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Return(new o.Value(r[s-1])));break;case 86:this.$=o.addDataToNode(o,l[s],l[s])(new o.Return);break;case 87:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.YieldReturn(r[s]));break;case 88:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.YieldReturn);break;case 89:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.AwaitReturn(r[s]));break;case 90:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.AwaitReturn);break;case 91:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Code(r[s-3],r[s],r[s-1],o.addDataToNode(o,l[s-4])(new o.Literal(r[s-4]))));break;case 92:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Code([],r[s],r[s-1]));break;case 93:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Code(r[s-3],o.addDataToNode(o,l[s])(o.Block.wrap([r[s]])),r[s-1],o.addDataToNode(o,l[s-4])(new o.Literal(r[s-4]))));break;case 94:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Code([],o.addDataToNode(o,l[s])(o.Block.wrap([r[s]])),r[s-1]));break;case 95:case 96:this.$=o.addDataToNode(o,l[s],l[s])(new o.FuncGlyph(r[s]));break;case 99:case 142:case 232:this.$=o.addDataToNode(o,l[s],l[s])([]);break;case 100:case 143:case 162:case 183:case 216:case 230:case 234:case 284:this.$=o.addDataToNode(o,l[s],l[s])([r[s]]);break;case 101:case 144:case 163:case 184:case 217:case 226:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-2].concat(r[s]));break;case 102:case 145:case 164:case 185:case 218:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-3].concat(r[s]));break;case 103:case 146:case 166:case 187:case 220:this.$=o.addDataToNode(o,l[s-5],l[s])(r[s-5].concat(r[s-2]));break;case 104:this.$=o.addDataToNode(o,l[s],l[s])(new o.Param(r[s]));break;case 105:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Param(r[s-1],null,!0));break;case 106:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Param(r[s],null,!0));break;case 107:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Param(r[s-2],r[s]));break;case 108:case 224:this.$=o.addDataToNode(o,l[s],l[s])(new o.Expansion);break;case 116:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s-1].add(r[s]));break;case 117:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Value(r[s-1]).add(r[s]));break;case 129:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Super(o.addDataToNode(o,l[s])(new o.Access(r[s])),[],!1,r[s-2]));break;case 130:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Super(o.addDataToNode(o,l[s-1])(new o.Index(r[s-1])),[],!1,r[s-3]));break;case 132:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Access(r[s],"soak"));break;case 133:this.$=o.addDataToNode(o,l[s-1],l[s])([o.addDataToNode(o,l[s-1])(new o.Access(new o.PropertyName("prototype"))),o.addDataToNode(o,l[s])(new o.Access(r[s]))]);break;case 134:this.$=o.addDataToNode(o,l[s-1],l[s])([o.addDataToNode(o,l[s-1])(new o.Access(new o.PropertyName("prototype"),"soak")),o.addDataToNode(o,l[s])(new o.Access(r[s]))]);break;case 135:this.$=o.addDataToNode(o,l[s],l[s])(new o.Access(new o.PropertyName("prototype")));break;case 138:this.$=o.addDataToNode(o,l[s-1],l[s])(o.extend(r[s],{soak:!0}));break;case 139:this.$=o.addDataToNode(o,l[s],l[s])(new o.Index(r[s]));break;case 140:this.$=o.addDataToNode(o,l[s],l[s])(new o.Slice(r[s]));break;case 141:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Obj(r[s-2],r[s-3].generated));break;case 147:this.$=o.addDataToNode(o,l[s],l[s])(new o.Class);break;case 148:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Class(null,null,r[s]));break;case 149:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Class(null,r[s]));break;case 150:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Class(null,r[s-1],r[s]));break;case 151:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Class(r[s]));break;case 152:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Class(r[s-1],null,r[s]));break;case 153:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Class(r[s-2],r[s]));break;case 154:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Class(r[s-3],r[s-1],r[s]));break;case 155:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.ImportDeclaration(null,r[s]));break;case 156:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ImportDeclaration(new o.ImportClause(r[s-2],null),r[s]));break;case 157:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ImportDeclaration(new o.ImportClause(null,r[s-2]),r[s]));break;case 158:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ImportDeclaration(new o.ImportClause(null,new o.ImportSpecifierList([])),r[s]));break;case 159:this.$=o.addDataToNode(o,l[s-6],l[s])(new o.ImportDeclaration(new o.ImportClause(null,new o.ImportSpecifierList(r[s-4])),r[s]));break;case 160:this.$=o.addDataToNode(o,l[s-5],l[s])(new o.ImportDeclaration(new o.ImportClause(r[s-4],r[s-2]),r[s]));break;case 161:this.$=o.addDataToNode(o,l[s-8],l[s])(new o.ImportDeclaration(new o.ImportClause(r[s-7],new o.ImportSpecifierList(r[s-4])),r[s]));break;case 165:case 186:case 199:case 219:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-2]);break;case 167:this.$=o.addDataToNode(o,l[s],l[s])(new o.ImportSpecifier(r[s]));break;case 168:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ImportSpecifier(r[s-2],r[s]));break;case 169:this.$=o.addDataToNode(o,l[s],l[s])(new o.ImportSpecifier(new o.Literal(r[s])));break;case 170:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ImportSpecifier(new o.Literal(r[s-2]),r[s]));break;case 171:this.$=o.addDataToNode(o,l[s],l[s])(new o.ImportDefaultSpecifier(r[s]));break;case 172:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ImportNamespaceSpecifier(new o.Literal(r[s-2]),r[s]));break;case 173:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportNamedDeclaration(new o.ExportSpecifierList([])));break;case 174:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ExportNamedDeclaration(new o.ExportSpecifierList(r[s-2])));break;case 175:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.ExportNamedDeclaration(r[s]));break;case 176:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ExportNamedDeclaration(new o.Assign(r[s-2],r[s],null,{moduleDeclaration:"export"})));break;case 177:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ExportNamedDeclaration(new o.Assign(r[s-3],r[s],null,{moduleDeclaration:"export"})));break;case 178:this.$=o.addDataToNode(o,l[s-5],l[s])(new o.ExportNamedDeclaration(new o.Assign(r[s-4],r[s-1],null,{moduleDeclaration:"export"})));break;case 179:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportDefaultDeclaration(r[s]));break;case 180:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.ExportDefaultDeclaration(new o.Value(r[s-1])));break;case 181:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.ExportAllDeclaration(new o.Literal(r[s-2]),r[s]));break;case 182:this.$=o.addDataToNode(o,l[s-6],l[s])(new o.ExportNamedDeclaration(new o.ExportSpecifierList(r[s-4]),r[s]));break;case 188:this.$=o.addDataToNode(o,l[s],l[s])(new o.ExportSpecifier(r[s]));break;case 189:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportSpecifier(r[s-2],r[s]));break;case 190:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportSpecifier(r[s-2],new o.Literal(r[s])));break;case 191:this.$=o.addDataToNode(o,l[s],l[s])(new o.ExportSpecifier(new o.Literal(r[s])));break;case 192:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.ExportSpecifier(new o.Literal(r[s-2]),r[s]));break;case 193:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.TaggedTemplateCall(r[s-2],r[s],r[s-1]));break;case 194:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Call(r[s-2],r[s],r[s-1]));break;case 195:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.SuperCall(o.addDataToNode(o,l[s-2])(new o.Super),r[s],r[s-1],r[s-2]));break;case 196:this.$=o.addDataToNode(o,l[s],l[s])(!1);break;case 197:this.$=o.addDataToNode(o,l[s],l[s])(!0);break;case 198:this.$=o.addDataToNode(o,l[s-1],l[s])([]);break;case 200:case 201:this.$=o.addDataToNode(o,l[s],l[s])(new o.Value(new o.ThisLiteral(r[s])));break;case 202:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Value(o.addDataToNode(o,l[s-1])(new o.ThisLiteral(r[s-1])),[o.addDataToNode(o,l[s])(new o.Access(r[s]))],"this"));break;case 203:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Arr([]));break;case 204:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Arr(r[s-1]));break;case 205:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Arr([].concat(r[s-2],r[s-1])));break;case 206:this.$=o.addDataToNode(o,l[s],l[s])("inclusive");break;case 207:this.$=o.addDataToNode(o,l[s],l[s])("exclusive");break;case 208:case 209:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Range(r[s-3],r[s-1],r[s-2]));break;case 210:case 212:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Range(r[s-2],r[s],r[s-1]));break;case 211:case 213:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Range(r[s-1],null,r[s]));break;case 214:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Range(null,r[s],r[s-1]));break;case 215:this.$=o.addDataToNode(o,l[s],l[s])(new o.Range(null,null,r[s]));break;case 227:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-3].concat(r[s-2],r[s]));break;case 228:this.$=o.addDataToNode(o,l[s-3],l[s])(r[s-2].concat(r[s-1]));break;case 229:this.$=o.addDataToNode(o,l[s-5],l[s])(r[s-5].concat(r[s-4],r[s-2],r[s-1]));break;case 231:case 235:case 331:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s-1].concat(r[s]));break;case 233:this.$=o.addDataToNode(o,l[s-1],l[s])([].concat(r[s]));break;case 236:this.$=o.addDataToNode(o,l[s],l[s])(new o.Elision);break;case 239:case 240:this.$=o.addDataToNode(o,l[s-2],l[s])([].concat(r[s-2],r[s]));break;case 241:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Try(r[s]));break;case 242:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Try(r[s-1],r[s][0],r[s][1]));break;case 243:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Try(r[s-2],null,null,r[s]));break;case 244:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Try(r[s-3],r[s-2][0],r[s-2][1],r[s]));break;case 245:this.$=o.addDataToNode(o,l[s-2],l[s])([r[s-1],r[s]]);break;case 246:this.$=o.addDataToNode(o,l[s-2],l[s])([o.addDataToNode(o,l[s-1])(new o.Value(r[s-1])),r[s]]);break;case 247:this.$=o.addDataToNode(o,l[s-1],l[s])([null,r[s]]);break;case 248:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Throw(r[s]));break;case 249:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Throw(new o.Value(r[s-1])));break;case 250:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Parens(r[s-1]));break;case 251:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Parens(r[s-2]));break;case 252:case 256:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(r[s]));break;case 253:case 257:case 258:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.While(r[s-2],{guard:r[s]}));break;case 254:case 259:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(r[s],{invert:!0}));break;case 255:case 260:case 261:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.While(r[s-2],{invert:!0,guard:r[s]}));break;case 262:case 263:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s-1].addBody(r[s]));break;case 264:case 265:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s].addBody(o.addDataToNode(o,l[s-1])(o.Block.wrap([r[s-1]]))));break;case 266:this.$=o.addDataToNode(o,l[s],l[s])(r[s]);break;case 267:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(o.addDataToNode(o,l[s-1])(new o.BooleanLiteral("true"))).addBody(r[s]));break;case 268:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.While(o.addDataToNode(o,l[s-1])(new o.BooleanLiteral("true"))).addBody(o.addDataToNode(o,l[s])(o.Block.wrap([r[s]]))));break;case 269:case 270:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.For(r[s-1],r[s]));break;case 271:case 272:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.For(r[s],r[s-1]));break;case 273:this.$=o.addDataToNode(o,l[s-1],l[s])({source:o.addDataToNode(o,l[s])(new o.Value(r[s]))});break;case 274:case 276:this.$=o.addDataToNode(o,l[s-3],l[s])({source:o.addDataToNode(o,l[s-2])(new o.Value(r[s-2])),step:r[s]});break;case 275:case 277:this.$=o.addDataToNode(o,l[s-1],l[s])(function(){return r[s].own=r[s-1].own,r[s].ownTag=r[s-1].ownTag,r[s].name=r[s-1][0],r[s].index=r[s-1][1],r[s]}());break;case 278:this.$=o.addDataToNode(o,l[s-1],l[s])(r[s]);break;case 279:this.$=o.addDataToNode(o,l[s-2],l[s])(function(){return r[s].own=!0,r[s].ownTag=o.addDataToNode(o,l[s-1])(new o.Literal(r[s-1])),r[s]}());break;case 285:this.$=o.addDataToNode(o,l[s-2],l[s])([r[s-2],r[s]]);break;case 286:case 305:this.$=o.addDataToNode(o,l[s-1],l[s])({source:r[s]});break;case 287:case 306:this.$=o.addDataToNode(o,l[s-1],l[s])({source:r[s],object:!0});break;case 288:case 289:case 307:case 308:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],guard:r[s]});break;case 290:case 291:case 309:case 310:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],guard:r[s],object:!0});break;case 292:case 293:case 311:case 312:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],step:r[s]});break;case 294:case 295:case 296:case 297:case 313:case 314:case 315:case 316:this.$=o.addDataToNode(o,l[s-5],l[s])({source:r[s-4],guard:r[s-2],step:r[s]});break;case 298:case 299:case 300:case 301:case 317:case 318:case 319:case 320:this.$=o.addDataToNode(o,l[s-5],l[s])({source:r[s-4],step:r[s-2],guard:r[s]});break;case 302:case 321:this.$=o.addDataToNode(o,l[s-1],l[s])({source:r[s],from:!0});break;case 303:case 304:case 322:case 323:this.$=o.addDataToNode(o,l[s-3],l[s])({source:r[s-2],guard:r[s],from:!0});break;case 324:case 325:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Switch(r[s-3],r[s-1]));break;case 326:case 327:this.$=o.addDataToNode(o,l[s-6],l[s])(new o.Switch(r[s-5],r[s-3],r[s-1]));break;case 328:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Switch(null,r[s-1]));break;case 329:this.$=o.addDataToNode(o,l[s-5],l[s])(new o.Switch(null,r[s-3],r[s-1]));break;case 332:this.$=o.addDataToNode(o,l[s-2],l[s])([[r[s-1],r[s]]]);break;case 333:this.$=o.addDataToNode(o,l[s-3],l[s])([[r[s-2],r[s-1]]]);break;case 334:case 340:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.If(r[s-1],r[s],{type:r[s-2]}));break;case 335:case 341:this.$=o.addDataToNode(o,l[s-4],l[s])(r[s-4].addElse(o.addDataToNode(o,l[s-2],l[s])(new o.If(r[s-1],r[s],{type:r[s-2]}))));break;case 337:case 343:this.$=o.addDataToNode(o,l[s-2],l[s])(r[s-2].addElse(r[s]));break;case 338:case 339:case 344:case 345:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.If(r[s],o.addDataToNode(o,l[s-2])(o.Block.wrap([r[s-2]])),{type:r[s-1],statement:!0}));break;case 349:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("-",r[s]));break;case 350:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("+",r[s]));break;case 352:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("--",r[s]));break;case 353:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("++",r[s]));break;case 354:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("--",r[s-1],null,!0));break;case 355:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Op("++",r[s-1],null,!0));break;case 356:this.$=o.addDataToNode(o,l[s-1],l[s])(new o.Existence(r[s-1]));break;case 357:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op("+",r[s-2],r[s]));break;case 358:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op("-",r[s-2],r[s]));break;case 359:case 360:case 361:case 362:case 363:case 364:case 365:case 366:case 367:case 368:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Op(r[s-1],r[s-2],r[s]));break;case 369:this.$=o.addDataToNode(o,l[s-2],l[s])(function(){return"!"===r[s-1].charAt(0)?new o.Op(r[s-1].slice(1),r[s-2],r[s]).invert():new o.Op(r[s-1],r[s-2],r[s])}());break;case 370:this.$=o.addDataToNode(o,l[s-2],l[s])(new o.Assign(r[s-2],r[s],r[s-1]));break;case 371:this.$=o.addDataToNode(o,l[s-4],l[s])(new o.Assign(r[s-4],r[s-1],r[s-3]));break;case 372:this.$=o.addDataToNode(o,l[s-3],l[s])(new o.Assign(r[s-3],r[s],r[s-2]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{1:[3]},{1:[2,2],6:W},a(X,[2,3]),a(Y,[2,6],{151:111,154:112,158:116,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,7]),a(Y,[2,8],{158:116,151:118,154:119,148:q,150:z,156:J,174:ue}),a(Y,[2,9]),a(me,[2,16],{124:120,99:121,104:127,45:he,46:he,126:he,80:ge,81:fe,101:ye,102:ke,103:Te,105:Ne,125:ve}),a(me,[2,17],{104:127,99:130,80:ge,81:fe,101:ye,102:ke,103:Te,105:Ne}),a(me,[2,18]),a(me,[2,19]),a(me,[2,20]),a(me,[2,21]),a(me,[2,22]),a(me,[2,23]),a(me,[2,24]),a(me,[2,25]),a(me,[2,26]),a(me,[2,27]),a(Y,[2,28]),a(Y,[2,29]),a(Y,[2,30]),a(be,[2,12]),a(be,[2,13]),a(be,[2,14]),a(be,[2,15]),a(Y,[2,10]),a(Y,[2,11]),a($e,_e,{61:[1,131]}),a($e,[2,123]),a($e,[2,124]),a($e,[2,125]),a($e,Ce),a($e,[2,127]),a($e,[2,128]),a(De,Ee,{87:132,94:133,95:134,37:136,67:137,96:138,73:139,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),{5:143,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,34:142,35:Ae,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:145,8:146,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:150,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:156,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:157,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:158,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:[1,159],85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{17:161,18:162,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:163,67:79,68:y,73:62,74:31,75:35,76:34,77:k,86:Le,89:152,90:b,91:$,96:61,98:160,100:32,107:_,129:x,130:I,145:R},{17:161,18:162,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:163,67:79,68:y,73:62,74:31,75:35,76:34,77:k,86:Le,89:152,90:b,91:$,96:61,98:164,100:32,107:_,129:x,130:I,145:R},a(Pe,je,{180:[1,165],181:[1,166],194:[1,167]}),a(me,[2,336],{169:[1,168]}),{34:169,35:Ae},{34:170,35:Ae},{34:171,35:Ae},a(me,[2,266]),{34:172,35:Ae},{34:173,35:Ae},{7:174,8:175,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:[1,176],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Me,[2,147],{53:30,74:31,100:32,51:33,76:34,75:35,96:61,73:62,42:63,48:65,37:78,67:79,44:88,89:152,17:161,18:162,60:163,34:177,98:179,35:Ae,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,86:Le,90:b,91:$,107:_,111:[1,178],129:x,130:I,145:R}),{7:180,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,181],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([1,6,35,36,47,69,70,93,127,135,146,148,149,150,156,157,174,182,183,184,185,186,187,188,189,190,191,192,193],Ue,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:182,14:t,32:Re,33:Ve,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:[1,184],85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),a(Y,[2,342],{169:[1,185]}),a([1,6,36,47,69,70,93,127,135,146,148,149,150,156,157,174],Be,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:186,14:t,32:Re,35:Ge,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),{37:192,38:n,39:r,44:188,45:s,46:i,107:[1,191],113:189,114:190,119:He},{26:195,37:196,38:n,39:r,107:[1,194],110:C,118:[1,197],122:[1,198]},a(Pe,[2,120]),a(Pe,[2,121]),a($e,[2,45]),a($e,[2,46]),a($e,[2,47]),a($e,[2,48]),a($e,[2,49]),a($e,[2,50]),a($e,[2,51]),a($e,[2,52]),{4:199,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,35:[1,200],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:201,8:202,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,69:Xe,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:204,132:205,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{80:ze,81:Je,124:213,125:ve,126:he},a($e,[2,200]),a($e,[2,201],{40:216,41:Ke}),a(Ze,[2,95]),a(Ze,[2,96]),a(Qe,[2,115]),a(Qe,[2,118]),{7:218,8:219,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:220,8:221,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:222,8:223,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:225,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,34:224,35:Ae,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{37:230,38:n,39:r,67:231,68:y,73:233,96:232,100:226,107:_,130:Se,161:227,162:ea,163:229},{159:234,160:235,164:[1,236],165:[1,237],166:[1,238]},a([6,35,93,109],aa,{44:88,108:239,62:240,63:241,64:242,66:243,42:244,71:246,37:247,40:248,67:249,72:251,73:252,74:253,75:254,76:255,38:n,39:r,41:Ke,43:l,45:s,46:i,68:ta,70:oa,77:na,107:_,129:x,130:I,145:R}),a(ra,[2,39]),a(ra,[2,40]),a($e,[2,43]),{17:161,18:162,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:257,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:163,67:79,68:y,73:62,74:31,75:35,76:34,77:k,86:Le,89:152,90:b,91:$,96:61,98:258,100:32,107:_,129:x,130:I,145:R},a(la,[2,36]),a(la,[2,37]),a(sa,[2,41]),{4:259,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(X,[2,5],{7:4,8:5,9:6,10:7,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,11:27,12:28,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,5:260,14:t,32:o,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:N,86:v,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),a(me,[2,356]),{7:261,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:262,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:263,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:264,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:265,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:266,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:267,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:268,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:269,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:270,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:271,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:272,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:273,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:274,8:275,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(me,[2,265]),a(me,[2,270]),{7:220,8:276,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:222,8:277,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{37:230,38:n,39:r,67:231,68:y,73:233,96:232,100:278,107:_,130:Se,161:227,162:ea,163:229},{159:234,164:[1,279],165:[1,280],166:[1,281]},{7:282,8:283,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(me,[2,264]),a(me,[2,269]),{44:284,45:s,46:i,78:285,126:ia},a(Qe,[2,116]),a(da,[2,197]),{40:287,41:Ke},{40:288,41:Ke},a(Qe,[2,135],{40:289,41:Ke}),{40:290,41:Ke},a(Qe,[2,136]),{7:292,8:294,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:ca,73:62,74:31,75:35,76:34,77:k,82:291,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,106:293,107:_,110:C,112:D,120:E,129:x,130:I,134:295,135:pa,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{81:fe,104:298,105:Ne},a(Qe,[2,117]),{6:[1,300],7:299,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,301],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ua,ma,{92:304,88:[1,302],93:ha}),a(ga,[2,100]),a(ga,[2,104],{61:[1,306],70:[1,305]}),a(ga,[2,108],{37:136,67:137,96:138,73:139,95:307,38:n,39:r,68:xe,107:_,130:Se}),a(fa,[2,109]),a(fa,[2,110]),a(fa,[2,111]),a(fa,[2,112]),{40:216,41:Ke},{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,69:Xe,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:204,132:205,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(ya,[2,92]),a(Y,[2,94]),{4:311,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,36:[1,310],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(ka,Ta,{151:111,154:112,158:116,182:ee}),a(Y,[2,346]),{7:158,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{148:q,150:z,151:118,154:119,156:J,158:116,174:ue},a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,182,183,184,185,186,187,188,189,190,191,192,193],Ue,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:182,14:t,32:Re,33:Ve,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),a(Na,[2,348],{151:111,154:112,158:116,182:ee,184:te}),a(De,Ee,{94:133,95:134,37:136,67:137,96:138,73:139,87:313,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),{34:142,35:Ae},{7:314,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{148:q,150:z,151:118,154:119,156:J,158:116,174:[1,315]},{7:316,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Na,[2,349],{151:111,154:112,158:116,182:ee,184:te}),a(Na,[2,350],{151:111,154:112,158:116,182:ee,184:te}),a(ka,[2,351],{151:111,154:112,158:116,182:ee}),a(Y,[2,90],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:317,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:Be,150:Be,156:Be,174:Be,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),a(me,[2,352],{45:je,46:je,80:je,81:je,101:je,102:je,103:je,105:je,125:je,126:je}),a(da,he,{124:120,99:121,104:127,80:ge,81:fe,101:ye,102:ke,103:Te,105:Ne,125:ve}),{80:ge,81:fe,99:130,101:ye,102:ke,103:Te,104:127,105:Ne},a(va,_e),a(me,[2,353],{45:je,46:je,80:je,81:je,101:je,102:je,103:je,105:je,125:je,126:je}),a(me,[2,354]),a(me,[2,355]),{6:[1,320],7:318,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,319],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{34:321,35:Ae,173:[1,322]},a(me,[2,241],{141:323,142:[1,324],143:[1,325]}),a(me,[2,262]),a(me,[2,263]),a(me,[2,271]),a(me,[2,272]),{35:[1,326],148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[1,327]},{168:328,170:329,171:ba},a(me,[2,148]),{7:331,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Me,[2,151],{34:332,35:Ae,45:je,46:je,80:je,81:je,101:je,102:je,103:je,105:je,125:je,126:je,111:[1,333]}),a($a,[2,248],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{73:334,107:_},a($a,[2,32],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:335,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([1,6,36,47,69,70,93,127,135,146,149,157],[2,88],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:336,14:t,32:Re,35:Ge,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:Be,150:Be,156:Be,174:Be,153:F,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),{34:337,35:Ae,173:[1,338]},a(be,_a,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{73:339,107:_},a(be,[2,155]),{33:[1,340],93:[1,341]},{33:[1,342]},{35:Ca,37:347,38:n,39:r,109:[1,343],115:344,116:345,118:Da},a([33,93],[2,171]),{117:[1,349]},{35:Ea,37:354,38:n,39:r,109:[1,350],118:xa,121:351,123:352},a(be,[2,175]),{61:[1,356]},{7:357,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,358],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{33:[1,359]},{6:W,146:[1,360]},{4:361,5:3,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ia,Sa,{151:111,154:112,158:116,134:362,70:[1,363],135:pa,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Ia,Aa,{134:364,70:ca,135:pa}),a(Ra,[2,203]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,69:[1,365],70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,136:367,138:366,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a([6,35,69],ma,{133:368,92:370,93:Oa}),a(La,[2,234]),a(Fa,[2,225]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:372,132:371,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(La,[2,236]),a(Fa,[2,230]),a(wa,[2,223]),a(wa,[2,224],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,98:45,172:46,151:48,147:49,152:50,154:51,155:52,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,89:152,9:154,7:373,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,77:k,84:T,85:Oe,86:Le,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H}),{78:374,126:ia},{40:375,41:Ke},{7:376,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Pa,[2,202]),a(Pa,[2,38]),{34:377,35:Ae,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{34:378,35:Ae},a(ja,[2,256],{151:111,154:112,158:116,148:q,149:[1,379],150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:[2,252],149:[1,380]},a(ja,[2,259],{151:111,154:112,158:116,148:q,149:[1,381],150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:[2,254],149:[1,382]},a(me,[2,267]),a(Ma,[2,268],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:Ua,157:[1,383]},a(Va,[2,278]),{37:230,38:n,39:r,67:231,68:xe,73:233,96:232,107:_,130:Se,161:384,163:229},a(Va,[2,284],{93:[1,385]}),a(Ba,[2,280]),a(Ba,[2,281]),a(Ba,[2,282]),a(Ba,[2,283]),a(me,[2,275]),{35:[2,277]},{7:386,8:387,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:388,8:389,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:390,8:391,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ga,ma,{92:392,93:Ha}),a(Wa,[2,143]),a(Wa,[2,56],{65:[1,394]}),a(Wa,[2,57]),a(Xa,[2,66],{78:397,79:398,61:[1,395],70:[1,396],80:Ya,81:qa,126:ia}),a(Xa,[2,67]),{37:247,38:n,39:r,40:248,41:Ke,66:401,67:249,68:ta,71:402,72:251,73:252,74:253,75:254,76:255,77:na,107:_,129:x,130:I,145:R},{70:[1,403],78:404,79:405,80:Ya,81:qa,126:ia},a(za,[2,62]),a(za,[2,63]),a(za,[2,64]),{7:406,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Ja,[2,72]),a(Ja,[2,73]),a(Ja,[2,74]),a(Ja,[2,75]),a(Ja,[2,76]),{78:407,80:ze,81:Je,126:ia},a(va,Ce,{52:[1,408]}),a(va,je),{6:W,47:[1,409]},a(X,[2,4]),a(Ka,[2,357],{151:111,154:112,158:116,182:ee,183:ae,184:te}),a(Ka,[2,358],{151:111,154:112,158:116,182:ee,183:ae,184:te}),a(Na,[2,359],{151:111,154:112,158:116,182:ee,184:te}),a(Na,[2,360],{151:111,154:112,158:116,182:ee,184:te}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,185,186,187,188,189,190,191,192,193],[2,361],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,186,187,188,189,190,191,192],[2,362],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,187,188,189,190,191,192],[2,363],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,188,189,190,191,192],[2,364],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,189,190,191,192],[2,365],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,190,191,192],[2,366],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,191,192],[2,367],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,192],[2,368],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,193:pe}),a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,157,174,186,187,188,189,190,191,192,193],[2,369],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe}),a(Ma,Za,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,345]),{149:[1,410]},{149:[1,411]},a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,149,150,156,174,178,179,182,183,184,185,186,187,188,189,190,191,192,193],Ua,{157:[1,412]}),{7:413,8:414,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:415,8:416,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:417,8:418,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ma,Qa,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,344]),a(et,[2,193]),a(et,[2,194]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:at,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,127:[1,419],128:420,129:x,130:I,136:421,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Qe,[2,131]),a(Qe,[2,132]),a(Qe,[2,133]),a(Qe,[2,134]),{83:[1,423]},{70:ca,83:[2,139],134:424,135:pa,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{83:[2,140]},{70:ca,134:425,135:pa},{7:426,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,83:[2,215],84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(tt,[2,206]),a(tt,ot),a(Qe,[2,138]),a($a,[2,53],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:427,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:428,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{89:429,90:b,91:$},a(nt,rt,{95:134,37:136,67:137,96:138,73:139,94:430,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),{6:lt,35:st},a(ga,[2,105]),{7:433,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ga,[2,106]),a(wa,Sa,{151:111,154:112,158:116,70:[1,434],148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(wa,Aa),a(it,[2,34]),{6:W,36:[1,435]},{7:436,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ua,ma,{92:304,88:[1,437],93:ha}),a(ka,Ta,{151:111,154:112,158:116,182:ee}),{7:438,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{34:377,35:Ae,148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Y,[2,89],{151:111,154:112,158:116,148:_a,150:_a,156:_a,174:_a,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,[2,370],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:439,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:440,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(me,[2,337]),{7:441,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(me,[2,242],{142:[1,442]}),{34:443,35:Ae},{34:446,35:Ae,37:444,38:n,39:r,73:445,107:_},{168:447,170:329,171:ba},{168:448,170:329,171:ba},{36:[1,449],169:[1,450],170:451,171:ba},a(ct,[2,330]),{7:453,8:454,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,139:452,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(pt,[2,149],{151:111,154:112,158:116,34:455,35:Ae,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(me,[2,152]),{7:456,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{36:[1,457]},a($a,[2,33],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,87],{151:111,154:112,158:116,148:_a,150:_a,156:_a,174:_a,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Y,[2,343]),{7:459,8:458,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{36:[1,460]},{44:461,45:s,46:i},{107:[1,463],114:462,119:He},{44:464,45:s,46:i},{33:[1,465]},a(Ga,ma,{92:466,93:ut}),a(Wa,[2,162]),{35:Ca,37:347,38:n,39:r,115:468,116:345,118:Da},a(Wa,[2,167],{117:[1,469]}),a(Wa,[2,169],{117:[1,470]}),{37:471,38:n,39:r},a(be,[2,173]),a(Ga,ma,{92:472,93:mt}),a(Wa,[2,183]),{35:Ea,37:354,38:n,39:r,118:xa,121:474,123:352},a(Wa,[2,188],{117:[1,475]}),a(Wa,[2,191],{117:[1,476]}),{6:[1,478],7:477,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,479],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(ht,[2,179],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{73:480,107:_},{44:481,45:s,46:i},a($e,[2,250]),{6:W,36:[1,482]},{7:483,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([14,32,38,39,43,45,46,49,50,54,55,56,57,58,59,68,77,84,85,86,90,91,107,110,112,120,129,130,140,144,145,148,150,153,156,167,173,176,177,178,179,180,181],ot,{6:gt,35:gt,69:gt,93:gt}),{7:484,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Ra,[2,204]),a(La,[2,235]),a(Fa,[2,231]),{6:ft,35:yt,69:[1,485]},a(kt,rt,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,9:148,138:206,136:210,97:211,7:308,8:309,137:488,131:489,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,70:Ye,77:k,84:T,85:Oe,86:v,90:b,91:$,93:qe,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),a(kt,[2,232]),a(nt,ma,{92:370,133:490,93:Oa}),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,136:367,138:366,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(wa,[2,114],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(et,[2,195]),a($e,[2,129]),{83:[1,491],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Tt,[2,334]),a(Nt,[2,340]),{7:492,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:493,8:494,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:495,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:496,8:497,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:498,8:499,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Va,[2,279]),{37:230,38:n,39:r,67:231,68:xe,73:233,96:232,107:_,130:Se,163:500},{35:vt,148:q,149:[1,501],150:z,151:111,154:112,156:J,157:[1,502],158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,305],149:[1,503],157:[1,504]},{35:bt,148:q,149:[1,505],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,306],149:[1,506]},{35:$t,148:q,149:[1,507],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,321],149:[1,508]},{6:_t,35:Ct,109:[1,509]},a(Dt,rt,{44:88,63:241,64:242,66:243,42:244,71:246,37:247,40:248,67:249,72:251,73:252,74:253,75:254,76:255,62:512,38:n,39:r,41:Ke,43:l,45:s,46:i,68:ta,70:oa,77:na,107:_,129:x,130:I,145:R}),{7:513,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,514],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:515,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,35:[1,516],37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Wa,[2,68]),a(Ja,[2,78]),a(Ja,[2,80]),{40:517,41:Ke},{7:292,8:294,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:ca,73:62,74:31,75:35,76:34,77:k,82:518,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,106:293,107:_,110:C,112:D,120:E,129:x,130:I,134:295,135:pa,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Wa,[2,69],{78:397,79:398,80:Ya,81:qa,126:ia}),a(Wa,[2,71],{78:404,79:405,80:Ya,81:qa,126:ia}),a(Wa,[2,70]),a(Ja,[2,79]),a(Ja,[2,81]),{69:[1,519],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Ja,[2,77]),a($e,[2,44]),a(sa,[2,42]),{7:520,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:521,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:522,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a([1,6,35,36,47,69,70,83,88,93,109,127,135,146,148,150,156,174],vt,{151:111,154:112,158:116,149:[1,523],157:[1,524],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,525],157:[1,526]},a(Et,bt,{151:111,154:112,158:116,149:[1,527],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,528]},a(Et,$t,{151:111,154:112,158:116,149:[1,529],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,530]},a(et,[2,198]),a([6,35,127],ma,{92:531,93:xt}),a(It,[2,216]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:at,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,128:533,129:x,130:I,136:421,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Qe,[2,137]),{7:534,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,83:[2,211],84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:535,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,83:[2,213],84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{83:[2,214],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a($a,[2,54],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{36:[1,536],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{5:538,7:4,8:5,9:6,10:7,11:27,12:28,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:o,34:537,35:Ae,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:N,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(ga,[2,101]),{37:136,38:n,39:r,67:137,68:xe,70:Ie,73:139,94:539,95:134,96:138,107:_,130:Se},a(St,Ee,{94:133,95:134,37:136,67:137,96:138,73:139,87:540,38:n,39:r,68:xe,70:Ie,107:_,130:Se}),a(ga,[2,107],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(wa,gt),a(it,[2,35]),a(Ma,Za,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{89:541,90:b,91:$},a(Ma,Qa,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{36:[1,542],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a($a,[2,372],{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{34:543,35:Ae,148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{34:544,35:Ae},a(me,[2,243]),{34:545,35:Ae},{34:546,35:Ae},a(At,[2,247]),{36:[1,547],169:[1,548],170:451,171:ba},{36:[1,549],169:[1,550],170:451,171:ba},a(me,[2,328]),{34:551,35:Ae},a(ct,[2,331]),{34:552,35:Ae,93:[1,553]},a(Rt,[2,237],{151:111,154:112,158:116,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Rt,[2,238]),a(me,[2,150]),a(pt,[2,153],{151:111,154:112,158:116,34:554,35:Ae,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(me,[2,249]),{34:555,35:Ae},{148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(be,[2,85]),a(be,[2,156]),{33:[1,556]},{35:Ca,37:347,38:n,39:r,115:557,116:345,118:Da},a(be,[2,157]),{44:558,45:s,46:i},{6:Ot,35:Lt,109:[1,559]},a(Dt,rt,{37:347,116:562,38:n,39:r,118:Da}),a(nt,ma,{92:563,93:ut}),{37:564,38:n,39:r},{37:565,38:n,39:r},{33:[2,172]},{6:Ft,35:wt,109:[1,566]},a(Dt,rt,{37:354,123:569,38:n,39:r,118:xa}),a(nt,ma,{92:570,93:mt}),{37:571,38:n,39:r,118:[1,572]},{37:573,38:n,39:r},a(ht,[2,176],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:574,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:575,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{36:[1,576]},a(be,[2,181]),{146:[1,577]},{69:[1,578],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{69:[1,579],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Ra,[2,205]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:372,136:210,137:580,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:We,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,93:qe,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,131:372,132:581,136:210,137:207,138:206,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Fa,[2,226]),a(kt,[2,233],{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,9:148,97:211,7:308,8:309,138:366,136:367,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,70:Ye,77:k,84:T,85:Oe,86:v,90:b,91:$,93:qe,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),{6:ft,35:yt,36:[1,582]},a($e,[2,130]),a(Ma,[2,257],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:Pt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,253]},a(Ma,[2,260],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{35:jt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,255]},{35:Mt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,276]},a(Va,[2,285]),{7:583,8:584,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:585,8:586,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:587,8:588,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:589,8:590,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:591,8:592,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:593,8:594,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:595,8:596,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:597,8:598,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(Ra,[2,141]),{37:247,38:n,39:r,40:248,41:Ke,42:244,43:l,44:88,45:s,46:i,62:599,63:241,64:242,66:243,67:249,68:ta,70:oa,71:246,72:251,73:252,74:253,75:254,76:255,77:na,107:_,129:x,130:I,145:R},a(St,aa,{44:88,62:240,63:241,64:242,66:243,42:244,71:246,37:247,40:248,67:249,72:251,73:252,74:253,75:254,76:255,108:600,38:n,39:r,41:Ke,43:l,45:s,46:i,68:ta,70:oa,77:na,107:_,129:x,130:I,145:R}),a(Wa,[2,144]),a(Wa,[2,58],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:601,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Wa,[2,60],{151:111,154:112,158:116,148:q,150:z,156:J,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:602,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(Ja,[2,82]),{83:[1,603]},a(za,[2,65]),a(Ma,Pt,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Ma,jt,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Ma,Mt,{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{7:604,8:605,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:606,8:607,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:608,8:609,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:610,8:611,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:612,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:613,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:614,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:615,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{6:Ut,35:Vt,127:[1,616]},a([6,35,36,127],rt,{17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,13:23,15:25,16:26,60:29,53:30,74:31,100:32,51:33,76:34,75:35,89:37,98:45,172:46,151:48,147:49,152:50,154:51,155:52,175:57,96:61,73:62,42:63,48:65,37:78,67:79,158:85,44:88,9:148,97:211,7:308,8:309,136:619,14:t,32:Re,38:n,39:r,43:l,45:s,46:i,49:d,50:c,54:p,55:u,56:m,57:h,58:g,59:f,68:y,70:Ye,77:k,84:T,85:Oe,86:v,90:b,91:$,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,148:O,150:L,153:F,156:w,167:P,173:j,176:M,177:U,178:V,179:B,180:G,181:H}),a(nt,ma,{92:620,93:xt}),{83:[2,210],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{83:[2,212],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(me,[2,55]),a(ya,[2,91]),a(Y,[2,93]),a(ga,[2,102]),a(nt,ma,{92:621,93:ha}),{34:537,35:Ae},a(me,[2,371]),a(Tt,[2,335]),a(me,[2,244]),a(At,[2,245]),a(At,[2,246]),a(me,[2,324]),{34:622,35:Ae},a(me,[2,325]),{34:623,35:Ae},{36:[1,624]},a(ct,[2,332],{6:[1,625]}),{7:626,8:627,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(me,[2,154]),a(Nt,[2,341]),{44:628,45:s,46:i},a(Ga,ma,{92:629,93:ut}),a(be,[2,158]),{33:[1,630]},{37:347,38:n,39:r,116:631,118:Da},{35:Ca,37:347,38:n,39:r,115:632,116:345,118:Da},a(Wa,[2,163]),{6:Ot,35:Lt,36:[1,633]},a(Wa,[2,168]),a(Wa,[2,170]),a(be,[2,174],{33:[1,634]}),{37:354,38:n,39:r,118:xa,123:635},{35:Ea,37:354,38:n,39:r,118:xa,121:636,123:352},a(Wa,[2,184]),{6:Ft,35:wt,36:[1,637]},a(Wa,[2,189]),a(Wa,[2,190]),a(Wa,[2,192]),a(ht,[2,177],{151:111,154:112,158:116,148:q,150:z,156:J,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{36:[1,638],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(be,[2,180]),a($e,[2,251]),a($e,[2,208]),a($e,[2,209]),a(Fa,[2,227]),a(nt,ma,{92:370,133:639,93:Oa}),a(Fa,[2,228]),{35:Bt,148:q,150:z,151:111,154:112,156:J,157:[1,640],158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,307],157:[1,641]},{35:Gt,148:q,149:[1,642],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,311],149:[1,643]},{35:Ht,148:q,150:z,151:111,154:112,156:J,157:[1,644],158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,308],157:[1,645]},{35:Wt,148:q,149:[1,646],150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,312],149:[1,647]},{35:Xt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,309]},{35:Yt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,310]},{35:qt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,322]},{35:zt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,323]},a(Wa,[2,145]),a(nt,ma,{92:648,93:Ha}),{36:[1,649],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{36:[1,650],148:q,150:z,151:111,154:112,156:J,158:116,174:dt,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},a(Ja,[2,83]),a(Jt,Bt,{151:111,154:112,158:116,157:[1,651],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{157:[1,652]},a(Et,Gt,{151:111,154:112,158:116,149:[1,653],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,654]},a(Jt,Ht,{151:111,154:112,158:116,157:[1,655],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{157:[1,656]},a(Et,Wt,{151:111,154:112,158:116,149:[1,657],178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{149:[1,658]},a($a,Xt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,Yt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,qt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,zt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(et,[2,199]),{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,136:659,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:308,8:309,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,35:at,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,70:Ye,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,97:211,98:45,100:32,107:_,110:C,112:D,120:E,128:660,129:x,130:I,136:421,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},a(It,[2,217]),{6:Ut,35:Vt,36:[1,661]},{6:lt,35:st,36:[1,662]},{36:[1,663]},{36:[1,664]},a(me,[2,329]),a(ct,[2,333]),a(Rt,[2,239],{151:111,154:112,158:116,148:q,150:z,156:J,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a(Rt,[2,240]),a(be,[2,160]),{6:Ot,35:Lt,109:[1,665]},{44:666,45:s,46:i},a(Wa,[2,164]),a(nt,ma,{92:667,93:ut}),a(Wa,[2,165]),{44:668,45:s,46:i},a(Wa,[2,185]),a(nt,ma,{92:669,93:mt}),a(Wa,[2,186]),a(be,[2,178]),{6:ft,35:yt,36:[1,670]},{7:671,8:672,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:673,8:674,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:675,8:676,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:677,8:678,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:679,8:680,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:681,8:682,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:683,8:684,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{7:685,8:686,9:148,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,29:20,30:21,31:22,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:v,89:37,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:j,175:57,176:M,177:U,178:V,179:B,180:G,181:H},{6:_t,35:Ct,36:[1,687]},a(Wa,[2,59]),a(Wa,[2,61]),{7:688,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:689,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:690,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:691,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:692,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:693,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:694,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},{7:695,9:154,13:23,14:t,15:25,16:26,17:8,18:9,19:10,20:11,21:12,22:13,23:14,24:15,25:16,26:17,27:18,28:19,32:Re,37:78,38:n,39:r,42:63,43:l,44:88,45:s,46:i,48:65,49:d,50:c,51:33,53:30,54:p,55:u,56:m,57:h,58:g,59:f,60:29,67:79,68:y,73:62,74:31,75:35,76:34,77:k,84:T,85:Oe,86:Le,89:152,90:b,91:$,96:61,98:45,100:32,107:_,110:C,112:D,120:E,129:x,130:I,140:S,144:A,145:R,147:49,148:O,150:L,151:48,152:50,153:F,154:51,155:52,156:w,158:85,167:P,172:46,173:Fe,176:we,177:U,178:V,179:B,180:G,181:H},a(It,[2,218]),a(nt,ma,{92:696,93:xt}),a(It,[2,219]),a(ga,[2,103]),a(me,[2,326]),a(me,[2,327]),{33:[1,697]},a(be,[2,159]),{6:Ot,35:Lt,36:[1,698]},a(be,[2,182]),{6:Ft,35:wt,36:[1,699]},a(Fa,[2,229]),{35:Kt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,313]},{35:Zt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,315]},{35:Qt,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,317]},{35:eo,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,319]},{35:ao,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,314]},{35:to,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,316]},{35:oo,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,318]},{35:no,148:q,150:z,151:111,154:112,156:J,158:116,174:K,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe},{35:[2,320]},a(Wa,[2,146]),a($a,Kt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,Zt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,Qt,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,eo,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,ao,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,to,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,oo,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),a($a,no,{151:111,154:112,158:116,178:Z,179:Q,182:ee,183:ae,184:te,185:oe,186:ne,187:re,188:le,189:se,190:ie,191:de,192:ce,193:pe}),{6:Ut,35:Vt,36:[1,700]},{44:701,45:s,46:i},a(Wa,[2,166]),a(Wa,[2,187]),a(It,[2,220]),a(be,[2,161])],defaultActions:{235:[2,277],293:[2,140],471:[2,172],494:[2,253],497:[2,255],499:[2,276],592:[2,309],594:[2,310],596:[2,322],598:[2,323],672:[2,313],674:[2,315],676:[2,317],678:[2,319],680:[2,314],682:[2,316],684:[2,318],686:[2,320]},parseError:function(e,a){if(a.recoverable)this.trace(e);else{var t=new Error(e);throw t.hash=a,t}},parse:function(e){var a=this,t=[0],o=[null],n=[],l=this.table,s="",i=0,d=0,c=0,u=1,m=n.slice.call(arguments,1),h=Object.create(this.lexer),g={yy:{}};for(var f in this.yy)Object.prototype.hasOwnProperty.call(this.yy,f)&&(g.yy[f]=this.yy[f]);h.setInput(e,g.yy),g.yy.lexer=h,g.yy.parser=this,"undefined"==typeof h.yylloc&&(h.yylloc={});var y=h.yylloc;n.push(y);var k=h.options&&h.options.ranges;this.parseError="function"==typeof g.yy.parseError?g.yy.parseError:Object.getPrototypeOf(this).parseError;_token_stack:var T=function(){var e;return e=h.lex()||u,"number"!=typeof e&&(e=a.symbols_[e]||e),e};for(var N={},v,b,$,_,C,D,p,E,x;;){if($=t[t.length-1],this.defaultActions[$]?_=this.defaultActions[$]:((null===v||"undefined"==typeof v)&&(v=T()),_=l[$]&&l[$][v]),"undefined"==typeof _||!_.length||!_[0]){var I="";for(D in x=[],l[$])this.terminals_[D]&&D>2&&x.push("'"+this.terminals_[D]+"'");I=h.showPosition?"Parse error on line "+(i+1)+":\n"+h.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[v]||v)+"'":"Parse error on line "+(i+1)+": Unexpected "+(v==u?"end of input":"'"+(this.terminals_[v]||v)+"'"),this.parseError(I,{text:h.match,token:this.terminals_[v]||v,line:h.yylineno,loc:y,expected:x})}if(_[0]instanceof Array&&1<_.length)throw new Error("Parse Error: multiple actions possible at state: "+$+", token: "+v);switch(_[0]){case 1:t.push(v),o.push(h.yytext),n.push(h.yylloc),t.push(_[1]),v=null,b?(v=b,b=null):(d=h.yyleng,s=h.yytext,i=h.yylineno,y=h.yylloc,0a.call(this.compiledComments,l)))&&(this.compiledComments.push(l),s=l.here?new S(l).compileNode(e):new J(l).compileNode(e),s.isHereComment&&!s.newLine||t.includeCommentFragments()?p(s):(0===o.length&&o.push(this.makeCode("")),s.unshift?(null==(n=o[0]).precedingComments&&(n.precedingComments=[]),o[0].precedingComments.push(s)):(null==(r=o[o.length-1]).followingComments&&(r.followingComments=[]),o[o.length-1].followingComments.push(s))));return o}},{key:"cache",value:function cache(e,a,t){var o,n,r;return o=null==t?this.shouldCache():t(this),o?(n=new R(e.scope.freeVariable("ref")),r=new d(n,this),a?[r.compileToFragments(e,a),[this.makeCode(n.value)]]:[r,n]):(n=a?this.compileToFragments(e,a):this,[n,n])}},{key:"hoist",value:function hoist(){var e,a,t;return this.hoisted=!0,t=new A(this),e=this.compileNode,a=this.compileToFragments,this.compileNode=function(a){return t.update(e,a)},this.compileToFragments=function(e){return t.update(a,e)},t}},{key:"cacheToCodeFragments",value:function cacheToCodeFragments(e){return[We(e[0]),We(e[1])]}},{key:"makeReturn",value:function makeReturn(e){var a;return a=this.unwrapAll(),e?new u(new K(e+".push"),[a]):new ge(a)}},{key:"contains",value:function contains(e){var a;return a=void 0,this.traverseChildren(!1,function(t){if(e(t))return a=t,!1}),a}},{key:"lastNode",value:function lastNode(e){return 0===e.length?null:e[e.length-1]}},{key:"toString",value:function toString(){var e=0=X?this.wrapInParentheses(a):a)}},{key:"compileRoot",value:function compileRoot(e){var a,t,o,n,r,l;for(e.indent=e.bare?"":De,e.level=z,this.spaced=!0,e.scope=new ye(null,this,null,null==(r=e.referencedVars)?[]:r),l=e.locals||[],t=0,o=l.length;t=Y?this.wrapInParentheses(a):a}}]),a}(re),e.StringLiteral=ve=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(){var e;return e=this.csx?[this.makeCode(this.unquote(!0,!0))]:_get(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"compileNode",this).call(this)}},{key:"unquote",value:function unquote(){var e=!!(0=H?"(void 0)":"void 0")]}}]),a}(K),e.NullLiteral=ne=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this,"null"))}return _inherits(a,e),a}(K),e.BooleanLiteral=i=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return _inherits(a,e),a}(K),e.Return=ge=function(){var e=function(e){function t(e){_classCallCheck(this,t);var a=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return a.expression=e,a}return _inherits(t,e),_createClass(t,[{key:"compileToFragments",value:function compileToFragments(e,a){var o,n;return o=null==(n=this.expression)?void 0:n.makeReturn(),o&&!(o instanceof t)?o.compileToFragments(e,a):_get(t.prototype.__proto__||Object.getPrototypeOf(t.prototype),"compileToFragments",this).call(this,e,a)}},{key:"compileNode",value:function compileNode(e){var t,o,n,r;if(t=[],this.expression){for(t=this.expression.compileToFragments(e,q),la(t,this.makeCode(this.tab+"return ")),n=0,r=t.length;nthis.properties.length&&!this.base.shouldCache()&&(null==s||!s.shouldCache()))?[this,this]:(r=new a(this.base,this.properties.slice(0,-1)),r.shouldCache()&&(l=new R(e.scope.freeVariable("base")),r=new a(new de(new d(l,r)))),!s)?[r,l]:(s.shouldCache()&&(i=new R(e.scope.freeVariable("name")),s=new V(new d(i,s.index)),i=new V(i)),[r.add(s),new a(l||r.base,[i||s])])}},{key:"compileNode",value:function compileNode(e){var a,t,o,n,r;for(this.base.front=this.front,r=this.properties,a=r.length&&null!=this.base.cached?this.base.cached:this.base.compileToFragments(e,r.length?H:null),r.length&&fe.test(We(a))&&a.push(this.makeCode(".")),t=0,o=r.length;tn.length&&(n=r);this.content=this.content.replace(RegExp("^("+r+")","gm"),"")}return this.content="/*"+this.content+(t?" ":"")+"*/",e=this.makeCode(this.content),e.newLine=this.newLine,e.unshift=this.unshift,e.multiline=i,e.isComment=e.isHereComment=!0,e}}]),t}(l),e.LineComment=J=function(e){function a(e){var t=e.content,o=e.newLine,n=e.unshift;_classCallCheck(this,a);var r=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return r.content=t,r.newLine=o,r.unshift=n,r}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(){var e;return e=this.makeCode(/^\s*$/.test(this.content)?"":"//"+this.content),e.newLine=this.newLine,e.unshift=this.unshift,e.trail=!this.newLine&&!this.unshift,e.isComment=e.isLineComment=!0,e}}]),a}(l),e.Call=u=function(){var e=function(e){function a(e){var t=1")),(g=i).push.apply(g,_toConsumableArray(l.compileNode(e,X))),(f=i).push.apply(f,[this.makeCode("")]))}else i.push(this.makeCode(" />"));return i}}]),a}(l);return e.prototype.children=["variable","args"],e}.call(this),e.SuperCall=_e=function(){var e=function(e){function a(){return _classCallCheck(this,a),_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).apply(this,arguments))}return _inherits(a,e),_createClass(a,[{key:"isStatement",value:function isStatement(e){var a;return(null==(a=this.expressions)?void 0:a.length)&&e.level===z}},{key:"compileNode",value:function compileNode(e){var t,o,n,r;if(null==(o=this.expressions)||!o.length)return _get(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"compileNode",this).call(this,e);if(r=new K(We(_get(a.prototype.__proto__||Object.getPrototypeOf(a.prototype),"compileNode",this).call(this,e))),n=new c(this.expressions.slice()),e.level>z){var l=r.cache(e,null,we),s=_slicedToArray(l,2);r=s[0],t=s[1],n.push(t)}return n.unshift(r),n.compileToFragments(e,e.level===z?e.level:X)}}]),a}(u);return e.prototype.children=u.prototype.children.concat(["expressions"]),e}.call(this),e.Super=$e=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.accessor=e,t}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(e){var a,t,o,n,r,l,s,i;if(t=e.scope.namedMethod(),(null==t?void 0:t.isMethod)||this.error("cannot use super outside of an instance method"),null==t.ctor&&null==this.accessor){var c=t;o=c.name,i=c.variable,(o.shouldCache()||o instanceof V&&o.index.isAssignable())&&(n=new R(e.scope.parent.freeVariable("name")),o.index=new d(n,o.index)),this.accessor=null==n?o:new V(n)}return(null==(r=this.accessor)||null==(l=r.name)?void 0:l.comments)&&(s=this.accessor.name.comments,delete this.accessor.name.comments),a=new Le(new K("super"),this.accessor?[this.accessor]:[]).compileToFragments(e),s&&Me(s,this.accessor.name),a}}]),a}(l);return e.prototype.children=["accessor"],e}.call(this),e.RegexWithInterpolations=he=function(e){function a(){var e=0"+this.equals;var f=[this.fromNum,this.toNum];return o=f[0],m=f[1],p=this.stepNum?this.stepNum+" !== 0":this.stepVar+" !== 0",t=s?null==this.step?o<=m?d+" "+m:n+" "+m:(i=o+" <= "+r+" && "+d+" "+m,h=o+" >= "+r+" && "+n+" "+m,o<=m?p+" && "+i:p+" && "+h):(i=this.fromVar+" <= "+r+" && "+d+" "+this.toVar,h=this.fromVar+" >= "+r+" && "+n+" "+this.toVar,p+" && ("+this.fromVar+" <= "+this.toVar+" ? "+i+" : "+h+")"),a=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,u=this.stepVar?r+" += "+this.stepVar:s?c?o<=m?"++"+r:"--"+r:o<=m?r+"++":r+"--":c?a+" ? ++"+r+" : --"+r:a+" ? "+r+"++ : "+r+"--",c&&(g=l+" = "+g),c&&(u=l+" = "+u),[this.makeCode(g+"; "+t+"; "+u)]}},{key:"compileArray",value:function compileArray(e){var a,t,o,n,r,l,s,i,d,c,p,u,m;return(s=null!=this.fromNum&&null!=this.toNum,s&&20>=_Mathabs(this.fromNum-this.toNum))?(c=function(){for(var e=[],a=p=this.fromNum,t=this.toNum;p<=t?a<=t:a>=t;p<=t?a++:a--)e.push(a);return e}.apply(this),this.exclusive&&c.pop(),[this.makeCode("["+c.join(", ")+"]")]):(l=this.tab+De,r=e.scope.freeVariable("i",{single:!0,reserve:!1}),u=e.scope.freeVariable("results",{reserve:!1}),d="\n"+l+"var "+u+" = [];",s?(e.index=r,t=We(this.compileNode(e))):(m=r+" = "+this.fromC+(this.toC===this.toVar?"":", "+this.toC),o=this.fromVar+" <= "+this.toVar,t="var "+m+"; "+o+" ? "+r+" <"+this.equals+" "+this.toVar+" : "+r+" >"+this.equals+" "+this.toVar+"; "+o+" ? "+r+"++ : "+r+"--"),i="{ "+u+".push("+r+"); }\n"+l+"return "+u+";\n"+e.indent,n=function(e){return null==e?void 0:e.contains(qe)},(n(this.from)||n(this.to))&&(a=", arguments"),[this.makeCode("(function() {"+d+"\n"+l+"for ("+t+")"+i+"}).apply(this"+(null==a?"":a)+")")])}}]),a}(l);return e.prototype.children=["from","to"],e}.call(this),e.Slice=ke=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.range=e,t}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(e){var a=this.range,t,o,n,r,l,s;return l=a.to,n=a.from,(null==n?void 0:n.shouldCache())&&(n=new Le(new de(n))),(null==l?void 0:l.shouldCache())&&(l=new Le(new de(l))),r=(null==n?void 0:n.compileToFragments(e,q))||[this.makeCode("0")],l&&(t=l.compileToFragments(e,q),o=We(t),(this.range.exclusive||-1!=+o)&&(s=", "+(this.range.exclusive?o:l.isNumber()?""+(+o+1):(t=l.compileToFragments(e,H),"+"+We(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+We(r)+(s||"")+")")]}}]),a}(l);return e.prototype.children=["range"],e}.call(this),e.Obj=le=function(){var e=function(e){function a(e){var t=!!(1N)return l.push(new Le(new le(y.slice(N,a),!0)))};e=y[a];)(d=this.addInitializerExpression(e))&&(k(),l.push(d),i.push(d),N=a+1),a++;k(),t.apply(r,[s,s-s+1].concat(l)),l,s+=l.length}else(d=this.addInitializerExpression(n))&&(i.push(d),r[s]=d),s+=1;for(u=0,g=i.length;uX||l&&this.variable.base instanceof le&&!this.nestedLhs&&!0!==this.param?this.wrapInParentheses(o):o)}},{key:"compileObjectDestruct",value:function compileObjectDestruct(e){var a,t,o,l,i,d,p,m,h,g,f,y;if(t=function(a){var t;if(a instanceof n){var o=a.variable.cache(e),r=_slicedToArray(o,2);return a.variable=r[0],t=r[1],t}return a},o=function(a){var o,r;return r=t(a),o=a instanceof n&&a.variable!==r,o||!r.isAssignable()?r:new K("'"+r.compileWithoutComments(e)+"'")},h=function traverseRest(a,l){var i,d,c,u,m,g,f,y,p,k,T;for(k=[],T=void 0,null==l.properties&&(l=new Le(l)),d=c=0,u=a.length;c=Y?this.wrapInParentheses(d):d;var W=I,q=_slicedToArray(W,1);return E=q[0],1===S&&E instanceof N&&E.error("Destructuring assignment has no target"),j=function(){var e,a,t;for(t=[],v=e=0,a=I.length;ea.call(g,v):return new Le(E.base);default:return E}}(),k=function(){switch(!1){case!(E instanceof Te):return c(i,v);default:return new Le(new K(i),[new V(new re(v))])}}();h=Je(s.unwrap().value),h&&s.error(h),f.push(l.push(new n(s,k,null,{param:t.param,subpattern:!0}).compileToFragments(e,X)))}return f},o=function(a,o,r){var i;return o=new Le(new s(a,!0)),i=r instanceof Le?r:new Le(new K(r)),l.push(new n(o,i,null,{param:t.param,subpattern:!0}).compileToFragments(e,X))},A=function(e,a,t){return m(e)?D(e,a,t):o(e,a,t)},M.length?(h=M[0],C=I.slice(0,h+(_?1:0)),w=I.slice(h+1),0!==C.length&&A(C,G,H),0!==w.length&&(L=function(){switch(!1){case!_:return p(I[h].unwrapAll().value,-1*w.length);case!b:return c(H,-1*w.length)}}(),m(w)&&(F=L,L=e.scope.freeVariable("ref"),l.push([this.makeCode(L+" = ")].concat(_toConsumableArray(F.compileToFragments(e,X))))),A(w,G,L))):A(I,G,H),U||this.subpattern||l.push(G),f=this.joinFragmentArrays(l,", "),e.levelz?this.wrapInParentheses(o):o}},{key:"eachName",value:function eachName(e){return this.variable.unwrapAll().eachName(e)}}]),n}(l);return e.prototype.children=["variable","value"],e.prototype.isAssignable=we,e}.call(this),e.FuncGlyph=I=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.glyph=e,t}return _inherits(a,e),a}(l),e.Code=h=function(){var e=function(e){function t(e,a,n,r){_classCallCheck(this,t);var l=_possibleConstructorReturn(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),s;return l.funcGlyph=n,l.paramStart=r,l.params=e||[],l.body=a||new c,l.bound="=>"===(null==(s=l.funcGlyph)?void 0:s.glyph),l.isGenerator=!1,l.isAsync=!1,l.isMethod=!1,l.body.traverseChildren(!1,function(e){if((e instanceof se&&e.isYield()||e instanceof Pe)&&(l.isGenerator=!0),(e instanceof se&&e.isAwait()||e instanceof o)&&(l.isAsync=!0),l.isGenerator&&l.isAsync)return e.error("function can't contain both yield and await")}),l}return _inherits(t,e),_createClass(t,[{key:"isStatement",value:function isStatement(){return this.isMethod}},{key:"makeScope",value:function makeScope(e){return new ye(e,this.body,this)}},{key:"compileNode",value:function compileNode(e){var t,o,n,r,c,p,h,g,f,y,T,v,i,b,$,k,l,_,C,D,m,E,x,I,S,A,L,F,w,P,j,M,U,V,B,W,X,Y,q,z,J,Z,Q;for(this.ctor&&(this.isAsync&&this.name.error("Class constructor may not be async"),this.isGenerator&&this.name.error("Class constructor may not be a generator")),this.bound&&((null==(P=e.scope.method)?void 0:P.bound)&&(this.context=e.scope.method.context),!this.context&&(this.context="this")),e.scope=Ve(e,"classScope")||this.makeScope(e.scope),e.scope.shared=Ve(e,"sharedScope"),e.indent+=De,delete e.bare,delete e.isExistentialEquals,L=[],g=[],J=null==(j=null==(M=this.thisAssignments)?void 0:M.slice())?[]:j,F=[],T=!1,y=!1,S=[],this.eachParamName(function(t,o,n,r){var l,s;if(0<=a.call(S,t)&&o.error("multiple parameters named '"+t+"'"),S.push(t),o.this)return t=o.properties[0].name.value,0<=a.call(G,t)&&(t="_"+t),s=new R(e.scope.freeVariable(t,{reserve:!1})),l=n.name instanceof le&&r instanceof d&&"="===r.operatorToken.value?new d(new R(t),s,"object"):s,n.renameParam(o,l),J.push(new d(o,s))}),U=this.params,v=b=0,l=U.length;b")),n.push(this.makeCode(" {")),null==r?void 0:r.length){var re;(re=n).push.apply(re,[this.makeCode("\n")].concat(_toConsumableArray(r),[this.makeCode("\n"+this.tab)]))}return n.push(this.makeCode("}")),this.isMethod?Ye(n,this):this.front||e.level>=H?this.wrapInParentheses(n):n}},{key:"eachParamName",value:function eachParamName(e){var a,t,o,n,r;for(n=this.params,r=[],a=0,t=n.length;a"===e||">="===e||"<="===e||"==="===e||"!=="===e}},{key:"invert",value:function invert(){var e,a,t,r,l;if(this.isChainable()&&this.first.isChainable()){for(e=!0,a=this;a&&a.operator;)e&&(e=a.operator in o),a=a.first;if(!e)return new de(this).invert();for(a=this;a&&a.operator;)a.invert=!a.invert,a.operator=o[a.operator],a=a.first;return this}return(r=o[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new de(this).invert():"!"===this.operator&&(t=this.first.unwrap())instanceof n&&("!"===(l=t.operator)||"in"===l||"instanceof"===l)?t:new n("!",this)}},{key:"unfoldSoak",value:function unfoldSoak(e){var a;return("++"===(a=this.operator)||"--"===a||"delete"===a)&&ra(e,this,"first")}},{key:"generateDo",value:function generateDo(e){var a,t,o,n,r,l,s,i;for(l=[],t=e instanceof d&&(s=e.value.unwrap())instanceof h?s:e,i=t.params||[],o=0,n=i.length;o=H?new de(this).compileToFragments(e):(o="+"===a||"-"===a,("new"===a||"typeof"===a||"delete"===a||o&&this.first instanceof n&&this.first.operator===a)&&t.push([this.makeCode(" ")]),(o&&this.first instanceof n||"new"===a&&this.first.isStatement(e))&&(this.first=new de(this.first)),t.push(this.first.compileToFragments(e,Y)),this.flip&&t.reverse(),this.joinFragmentArrays(t,""))}},{key:"compileContinuation",value:function compileContinuation(e){var t,o,n,r;return o=[],t=this.operator,null==e.scope.parent&&this.error(this.operator+" can only occur inside functions"),(null==(n=e.scope.method)?void 0:n.bound)&&e.scope.method.isGenerator&&this.error("yield cannot occur inside bound (fat arrow) functions"),0<=a.call(Object.keys(this.first),"expression")&&!(this.first instanceof Se)?null!=this.first.expression&&o.push(this.first.expression.compileToFragments(e,Y)):(e.level>=q&&o.push([this.makeCode("(")]),o.push([this.makeCode(t)]),""!==(null==(r=this.first.base)?void 0:r.value)&&o.push([this.makeCode(" ")]),o.push(this.first.compileToFragments(e,Y)),e.level>=q&&o.push([this.makeCode(")")])),this.joinFragmentArrays(o,"")}},{key:"compilePower",value:function compilePower(e){var a;return a=new Le(new R("Math"),[new r(new pe("pow"))]),new u(a,[this.first,this.second]).compileToFragments(e)}},{key:"compileFloorDivision",value:function compileFloorDivision(e){var a,t,o;return t=new Le(new R("Math"),[new r(new pe("floor"))]),o=this.second.shouldCache()?new de(this.second):this.second,a=new n("/",this.first,o),new u(t,[a]).compileToFragments(e)}},{key:"compileModulo",value:function compileModulo(e){var a;return a=new Le(new K(sa("modulo",e))),new u(a,[this.first,this.second]).compileToFragments(e)}},{key:"toString",value:function toString(e){return _get(n.prototype.__proto__||Object.getPrototypeOf(n.prototype),"toString",this).call(this,e,this.constructor.name+" "+this.operator)}}]),n}(l),t,o;return t={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},o={"!==":"===","===":"!=="},e.prototype.children=["first","second"],e}.call(this),e.In=U=function(){var e=function(e){function a(e,t){_classCallCheck(this,a);var o=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return o.object=e,o.array=t,o}return _inherits(a,e),_createClass(a,[{key:"compileNode",value:function compileNode(e){var a,t,o,n,r;if(this.array instanceof Le&&this.array.isArray()&&this.array.base.objects.length){for(r=this.array.base.objects,t=0,o=r.length;t= 0"))),We(r)===We(n))?o:(o=r.concat(this.makeCode(", "),o),e.levela.call(r,t)&&r.push(t);return delete e.comments}}),Me(r,n),Qe(n.expression,n),n}return _inherits(t,e),_createClass(t,[{key:"compileNode",value:function compileNode(e){var a,t,o;if(this.expression.front=this.front,o=this.expression.compile(e,Y),this.expression.unwrap()instanceof R&&!e.scope.check(o)){var n=this.negated?["===","||"]:["!==","&&"],r=_slicedToArray(n,2);a=r[0],t=r[1],o="typeof "+o+" "+a+' "undefined"'+("undefined"===this.comparisonTarget?"":" "+t+" "+o+" "+a+" "+this.comparisonTarget)}else a="null"===this.comparisonTarget?this.negated?"==":"!=":this.negated?"===":"!==",o=o+" "+a+" "+this.comparisonTarget;return[this.makeCode(e.level<=W?o:"("+o+")")]}}]),t}(l);return e.prototype.children=["expression"],e.prototype.invert=ae,e}.call(this),e.Parens=de=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.body=e,t}return _inherits(a,e),_createClass(a,[{key:"unwrap",value:function unwrap(){return this.body}},{key:"shouldCache",value:function shouldCache(){return this.body.shouldCache()}},{key:"compileNode",value:function compileNode(e){var a,t,o,n,r;return(t=this.body.unwrap(),r=null==(n=t.comments)?void 0:n.some(function(e){return e.here&&!e.unshift&&!e.newLine}),t instanceof Le&&t.isAtomic()&&!this.csxAttribute&&!r)?(t.front=this.front,t.compileToFragments(e)):(o=t.compileToFragments(e,q),a=e.level=o.length),this.csxAttribute?this.wrapInBraces(o):a?o:this.wrapInParentheses(o))}}]),a}(l);return e.prototype.children=["body"],e}.call(this),e.StringWithInterpolations=be=function(){var e=function(e){function a(e){_classCallCheck(this,a);var t=_possibleConstructorReturn(this,(a.__proto__||Object.getPrototypeOf(a)).call(this));return t.body=e,t}return _inherits(a,e),_createClass(a,[{key:"unwrap",value:function unwrap(){return this}},{key:"shouldCache",value:function shouldCache(){return this.body.shouldCache()}},{key:"compileNode",value:function compileNode(e){var t,o,n,r,l,s,i,d,c;if(this.csxAttribute)return c=new de(new a(this.body)),c.csxAttribute=!0,c.compileNode(e);for(r=this.body.unwrap(),n=[],d=[],r.traverseChildren(!1,function(e){var a,t,o,r,l,s;if(e instanceof ve){if(e.comments){var i;(i=d).push.apply(i,_toConsumableArray(e.comments)),delete e.comments}return n.push(e),!0}if(e instanceof de){if(0!==d.length){for(t=0,r=d.length;tP,!(this.step&&null!=P&&m)&&(_=L.freeVariable("len")),i=""+b+N+" = 0, "+_+" = "+M+".length",p=""+b+N+" = "+M+".length - 1",l=N+" < "+_,s=N+" >= 0",this.step?(null==P?(l=j+" > 0 ? "+l+" : "+s,i="("+j+" > 0 ? ("+i+") : "+p+")"):m&&(l=s,i=p),k=N+" += "+j):k=""+(v===N?N+"++":"++"+N),h=[this.makeCode(i+"; "+l+"; "+b+k)])),this.returns&&(I=""+this.tab+A+" = [];\n",S="\n"+this.tab+"return "+A+";",o.makeReturn(A)),this.guard&&(1=W?this.wrapInParentheses(n):n}},{key:"unfoldSoak",value:function unfoldSoak(){return this.soak&&this}}]),a}(l);return e.prototype.children=["condition","body","elseBody"],e}.call(this),Re={modulo:function modulo(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},objectWithoutKeys:function objectWithoutKeys(){return"function(o, ks) { var res = {}; for (var k in o) ([].indexOf.call(ks, k) < 0 && {}.hasOwnProperty.call(o, k)) && (res[k] = o[k]); return res; }"},boundMethodCheck:function boundMethodCheck(){return"function(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new Error('Bound instance method accessed before binding'); } }"},_extends:function _extends(){return"Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }"},hasProp:function hasProp(){return"{}.hasOwnProperty"},indexOf:function(){return"[].indexOf"},slice:function slice(){return"[].slice"},splice:function(){return"[].splice"}},z=1,q=2,X=3,W=4,Y=5,H=6,De=" ",fe=/^[+-]?\d+$/,sa=function(e,a){var t,o;return o=a.scope.root,e in o.utilities?o.utilities[e]:(t=o.freeVariable(e),o.assign(t,Re[e](a)),o.utilities[e]=t)},ea=function(e,a){var t=!(2=e);)e--;return a&&[a.sourceLine,a.sourceColumn]}}]),e}(),t=function(){var e=function(){function e(){_classCallCheck(this,e),this.lines=[]}return _createClass(e,[{key:"add",value:function add(e,t){var o=2=t);)t--;return n&&n.sourceLocation(o)}},{key:"generate",value:function generate(){var e=0"],y={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:f,names:[],mappings:t},(e.sourceMap||e.inlineMap)&&(y.sourcesContent=[a]),y}},{key:"encodeVlq",value:function encodeVlq(e){var a,t,l,s;for(a="",l=0>e?1:0,s=(_Mathabs(e)<<1)+l;s||!a;)t=s&r,s>>=n,s&&(t|=o),a+=this.encodeBase64(t);return a}},{key:"encodeBase64",value:function encodeBase64(e){return t[e]||function(){throw new Error("Cannot Base64 encode value: "+e)}()}}]),e}(),t,o,n,r;return n=5,o=1<",s(d,e),null==f[d]&&(f[d]=[]),f[d].push(e),y&&($=new r),S=u.tokenize(e,a),a.referencedVars=function(){var e,a,t;for(t=[],e=0,a=S.length;e"),d=e.getLineNumber(),o=e.getColumnNumber(),p=a(r,d,o),n=p?r+":"+p[0]+":"+p[1]:r+":"+d+":"+o),l=e.getFunctionName(),s=e.isConstructor(),i=!(e.isToplevel()||s),i?(c=e.getMethodName(),m=e.getTypeName(),l?(u=t="",m&&l.indexOf(m)&&(u=m+"."),c&&l.indexOf("."+c)!==l.length-c.length-1&&(t=" [as "+c+"]"),""+u+l+t+" ("+n+")"):m+"."+(c||"")+" ("+n+")"):s?"new "+(l||"")+" ("+n+")":l?l+" ("+n+")":n},i=function(e,t,n){var r,l,s,i,c,u;if(!(""===e||(i=e.slice(e.lastIndexOf(".")),0<=a.call(o,i))))return null;if(""!==e&&null!=g[e])return g[e][g[e].length-1];if(null!=g[""])for(c=g[""],l=c.length-1;0<=l;l+=-1)if(s=c[l],u=s.sourceLocation([t-1,n-1]),null!=(null==u?void 0:u[0])&&null!=u[1])return s;return null==f[e]?null:(r=d(f[e][f[e].length-1],{filename:e,sourceMap:!0,literate:p.isLiterate(e)}),r.sourceMap)},Error.prepareStackTrace=function(a,t){var o,n,r;return r=function(e,a,t){var o,n;return n=i(e,a,t),null!=n&&(o=n.sourceLocation([a-1,t-1])),null==o?null:[o[0]+1,o[1]+1]},n=function(){var a,n,l;for(l=[],a=0,n=t.length;a 0) { + if (pos > length) + pos = length; + } else if (pos == void 0) { + pos = 0; + } else if (pos < 0) { + pos = Math.max(length + pos, 0); + } + + if (!(pos+removeCount < length)) + removeCount = length - pos; + + var removed = this.slice(pos, pos+removeCount); + var insert = slice.call(arguments, 2); + var add = insert.length; + if (pos === length) { + if (add) { + this.push.apply(this, insert); + } + } else { + var remove = Math.min(removeCount, length - pos); + var tailOldPos = pos + remove; + var tailNewPos = tailOldPos + add - remove; + var tailCount = length - tailOldPos; + var lengthAfterRemove = length - remove; + + if (tailNewPos < tailOldPos) { // case A + for (var i = 0; i < tailCount; ++i) { + this[tailNewPos+i] = this[tailOldPos+i]; + } + } else if (tailNewPos > tailOldPos) { // case B + for (i = tailCount; i--; ) { + this[tailNewPos+i] = this[tailOldPos+i]; + } + } // else, add == remove (nothing to do) + + if (add && pos === lengthAfterRemove) { + this.length = lengthAfterRemove; // truncate array + this.push.apply(this, insert); + } else { + this.length = lengthAfterRemove + add; // reserves space + for (i = 0; i < add; ++i) { + this[pos+i] = insert[i]; + } + } + } + return removed; + }; + } +} +if (!Array.isArray) { + Array.isArray = function isArray(obj) { + return _toString(obj) == "[object Array]"; + }; +} +var boxedString = Object("a"), + splitString = boxedString[0] != "a" || !(0 in boxedString); + +if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + thisp = arguments[1], + i = -1, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(); // TODO message + } + + while (++i < length) { + if (i in self) { + fun.call(thisp, self[i], i, object); + } + } + }; +} +if (!Array.prototype.map) { + Array.prototype.map = function map(fun /*, thisp*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = Array(length), + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) + result[i] = fun.call(thisp, self[i], i, object); + } + return result; + }; +} +if (!Array.prototype.filter) { + Array.prototype.filter = function filter(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + result = [], + value, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self) { + value = self[i]; + if (fun.call(thisp, value, i, object)) { + result.push(value); + } + } + } + return result; + }; +} +if (!Array.prototype.every) { + Array.prototype.every = function every(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && !fun.call(thisp, self[i], i, object)) { + return false; + } + } + return true; + }; +} +if (!Array.prototype.some) { + Array.prototype.some = function some(fun /*, thisp */) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0, + thisp = arguments[1]; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + + for (var i = 0; i < length; i++) { + if (i in self && fun.call(thisp, self[i], i, object)) { + return true; + } + } + return false; + }; +} +if (!Array.prototype.reduce) { + Array.prototype.reduce = function reduce(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + if (!length && arguments.length == 1) { + throw new TypeError("reduce of empty array with no initial value"); + } + + var i = 0; + var result; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i++]; + break; + } + if (++i >= length) { + throw new TypeError("reduce of empty array with no initial value"); + } + } while (true); + } + + for (; i < length; i++) { + if (i in self) { + result = fun.call(void 0, result, self[i], i, object); + } + } + + return result; + }; +} +if (!Array.prototype.reduceRight) { + Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { + var object = toObject(this), + self = splitString && _toString(this) == "[object String]" ? + this.split("") : + object, + length = self.length >>> 0; + if (_toString(fun) != "[object Function]") { + throw new TypeError(fun + " is not a function"); + } + if (!length && arguments.length == 1) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + + var result, i = length - 1; + if (arguments.length >= 2) { + result = arguments[1]; + } else { + do { + if (i in self) { + result = self[i--]; + break; + } + if (--i < 0) { + throw new TypeError("reduceRight of empty array with no initial value"); + } + } while (true); + } + + do { + if (i in this) { + result = fun.call(void 0, result, self[i], i, object); + } + } while (i--); + + return result; + }; +} +if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { + Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + + var i = 0; + if (arguments.length > 1) { + i = toInteger(arguments[1]); + } + i = i >= 0 ? i : Math.max(0, length + i); + for (; i < length; i++) { + if (i in self && self[i] === sought) { + return i; + } + } + return -1; + }; +} +if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { + Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { + var self = splitString && _toString(this) == "[object String]" ? + this.split("") : + toObject(this), + length = self.length >>> 0; + + if (!length) { + return -1; + } + var i = length - 1; + if (arguments.length > 1) { + i = Math.min(i, toInteger(arguments[1])); + } + i = i >= 0 ? i : length - Math.abs(i); + for (; i >= 0; i--) { + if (i in self && sought === self[i]) { + return i; + } + } + return -1; + }; +} +if (!Object.getPrototypeOf) { + Object.getPrototypeOf = function getPrototypeOf(object) { + return object.__proto__ || ( + object.constructor ? + object.constructor.prototype : + prototypeOfObject + ); + }; +} +if (!Object.getOwnPropertyDescriptor) { + var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + + "non-object: "; + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if ((typeof object != "object" && typeof object != "function") || object === null) + throw new TypeError(ERR_NON_OBJECT + object); + if (!owns(object, property)) + return; + + var descriptor, getter, setter; + descriptor = { enumerable: true, configurable: true }; + if (supportsAccessors) { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + object.__proto__ = prototype; + + if (getter || setter) { + if (getter) descriptor.get = getter; + if (setter) descriptor.set = setter; + return descriptor; + } + } + descriptor.value = object[property]; + return descriptor; + }; +} +if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object); + }; +} +if (!Object.create) { + var createEmpty; + if (Object.prototype.__proto__ === null) { + createEmpty = function () { + return { "__proto__": null }; + }; + } else { + createEmpty = function () { + var empty = {}; + for (var i in empty) + empty[i] = null; + empty.constructor = + empty.hasOwnProperty = + empty.propertyIsEnumerable = + empty.isPrototypeOf = + empty.toLocaleString = + empty.toString = + empty.valueOf = + empty.__proto__ = null; + return empty; + } + } + + Object.create = function create(prototype, properties) { + var object; + if (prototype === null) { + object = createEmpty(); + } else { + if (typeof prototype != "object") + throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); + var Type = function () {}; + Type.prototype = prototype; + object = new Type(); + object.__proto__ = prototype; + } + if (properties !== void 0) + Object.defineProperties(object, properties); + return object; + }; +} + +function doesDefinePropertyWork(object) { + try { + Object.defineProperty(object, "sentinel", {}); + return "sentinel" in object; + } catch (exception) { + } +} +if (Object.defineProperty) { + var definePropertyWorksOnObject = doesDefinePropertyWork({}); + var definePropertyWorksOnDom = typeof document == "undefined" || + doesDefinePropertyWork(document.createElement("div")); + if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { + var definePropertyFallback = Object.defineProperty; + } +} + +if (!Object.defineProperty || definePropertyFallback) { + var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; + var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + + "on this javascript engine"; + + Object.defineProperty = function defineProperty(object, property, descriptor) { + if ((typeof object != "object" && typeof object != "function") || object === null) + throw new TypeError(ERR_NON_OBJECT_TARGET + object); + if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); + if (definePropertyFallback) { + try { + return definePropertyFallback.call(Object, object, property, descriptor); + } catch (exception) { + } + } + if (owns(descriptor, "value")) { + + if (supportsAccessors && (lookupGetter(object, property) || + lookupSetter(object, property))) + { + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + delete object[property]; + object[property] = descriptor.value; + object.__proto__ = prototype; + } else { + object[property] = descriptor.value; + } + } else { + if (!supportsAccessors) + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + if (owns(descriptor, "get")) + defineGetter(object, property, descriptor.get); + if (owns(descriptor, "set")) + defineSetter(object, property, descriptor.set); + } + + return object; + }; +} +if (!Object.defineProperties) { + Object.defineProperties = function defineProperties(object, properties) { + for (var property in properties) { + if (owns(properties, property)) + Object.defineProperty(object, property, properties[property]); + } + return object; + }; +} +if (!Object.seal) { + Object.seal = function seal(object) { + return object; + }; +} +if (!Object.freeze) { + Object.freeze = function freeze(object) { + return object; + }; +} +try { + Object.freeze(function () {}); +} catch (exception) { + Object.freeze = (function freeze(freezeObject) { + return function freeze(object) { + if (typeof object == "function") { + return object; + } else { + return freezeObject(object); + } + }; + })(Object.freeze); +} +if (!Object.preventExtensions) { + Object.preventExtensions = function preventExtensions(object) { + return object; + }; +} +if (!Object.isSealed) { + Object.isSealed = function isSealed(object) { + return false; + }; +} +if (!Object.isFrozen) { + Object.isFrozen = function isFrozen(object) { + return false; + }; +} +if (!Object.isExtensible) { + Object.isExtensible = function isExtensible(object) { + if (Object(object) === object) { + throw new TypeError(); // TODO message + } + var name = ''; + while (owns(object, name)) { + name += '?'; + } + object[name] = true; + var returnValue = owns(object, name); + delete object[name]; + return returnValue; + }; +} +if (!Object.keys) { + var hasDontEnumBug = true, + dontEnums = [ + "toString", + "toLocaleString", + "valueOf", + "hasOwnProperty", + "isPrototypeOf", + "propertyIsEnumerable", + "constructor" + ], + dontEnumsLength = dontEnums.length; + + for (var key in {"toString": null}) { + hasDontEnumBug = false; + } + + Object.keys = function keys(object) { + + if ( + (typeof object != "object" && typeof object != "function") || + object === null + ) { + throw new TypeError("Object.keys called on a non-object"); + } + + var keys = []; + for (var name in object) { + if (owns(object, name)) { + keys.push(name); + } + } + + if (hasDontEnumBug) { + for (var i = 0, ii = dontEnumsLength; i < ii; i++) { + var dontEnum = dontEnums[i]; + if (owns(object, dontEnum)) { + keys.push(dontEnum); + } + } + } + return keys; + }; + +} +if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; +} +var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + + "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + + "\u2029\uFEFF"; +if (!String.prototype.trim || ws.trim()) { + ws = "[" + ws + "]"; + var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), + trimEndRegexp = new RegExp(ws + ws + "*$"); + String.prototype.trim = function trim() { + return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); + }; +} + +function toInteger(n) { + n = +n; + if (n !== n) { // isNaN + n = 0; + } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { + n = (n > 0 || -1) * Math.floor(Math.abs(n)); + } + return n; +} + +function isPrimitive(input) { + var type = typeof input; + return ( + input === null || + type === "undefined" || + type === "boolean" || + type === "number" || + type === "string" + ); +} + +function toPrimitive(input) { + var val, valueOf, toString; + if (isPrimitive(input)) { + return input; + } + valueOf = input.valueOf; + if (typeof valueOf === "function") { + val = valueOf.call(input); + if (isPrimitive(val)) { + return val; + } + } + toString = input.toString; + if (typeof toString === "function") { + val = toString.call(input); + if (isPrimitive(val)) { + return val; + } + } + throw new TypeError(); +} +var toObject = function (o) { + if (o == null) { // this matches both null and undefined + throw new TypeError("can't convert "+o+" to object"); + } + return Object(o); +}; + +}); diff --git a/htdocs/includes/ace/worker-css.js b/htdocs/includes/ace/src/worker-css.js similarity index 99% rename from htdocs/includes/ace/worker-css.js rename to htdocs/includes/ace/src/worker-css.js index 7bee71a188f..78d75c18028 100644 --- a/htdocs/includes/ace/worker-css.js +++ b/htdocs/includes/ace/src/worker-css.js @@ -1,5 +1,5 @@ "no use strict"; -;(function(window) { +!(function(window) { if (typeof window.window != "undefined" && window.document) return; if (window.require && window.define) @@ -134,7 +134,7 @@ window.define = function(id, deps, factory) { exports: {}, factory: function() { var module = this; - var returnExports = factory.apply(this, deps.map(function(dep) { + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { switch (dep) { // Because "require", "exports" and "module" aren't actual // dependencies, we must handle them seperately. @@ -217,7 +217,7 @@ window.onmessage = function(e) { }; })(this); -ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +define("ace/lib/oop",[], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { @@ -245,7 +245,7 @@ exports.implement = function(proto, mixin) { }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -347,7 +347,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1308,7 +1307,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1326,7 +1329,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1344,7 +1347,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) { +define("ace/worker/mirror",[], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1406,7 +1409,7 @@ var Mirror = exports.Mirror = function(sender) { }); -ace.define("ace/mode/css/csslint",["require","exports","module"], function(require, exports, module) { +define("ace/mode/css/csslint",[], function(require, exports, module) { var parserlib = {}; (function(){ function EventTarget(){ @@ -2390,6 +2393,7 @@ Parser.prototype = function(){ expression = null; tokenStream.mustMatch(Tokens.LPAREN); + this._readWhitespace(); feature = this._media_feature(); this._readWhitespace(); @@ -3915,8 +3919,13 @@ var Properties = { "grid-row" : 1, "grid-rows" : 1, "grid-row-align" : "start | end | center | stretch", + "grid-row-gap" : 1, "grid-row-span" : "", "grid-row-sizing" : 1, + "grid-template" : 1, + "grid-template-areas" : 1, + "grid-template-columns" : 1, + "grid-template-rows" : 1, "hanging-punctuation" : 1, "height" : " | | inherit", "hyphenate-after" : " | auto", @@ -3959,8 +3968,10 @@ var Properties = { "marquee-style" : 1, "max-height" : " | | | none | inherit", "max-width" : " | | | none | inherit", + "max-zoom" : " | | auto", "min-height" : " | | | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit", "min-width" : " | | | contain-floats | -moz-contain-floats | -webkit-contain-floats | inherit", + "min-zoom" : " | | auto", "move-to" : 1, "nav-down" : 1, "nav-index" : 1, @@ -4061,6 +4072,7 @@ var Properties = { "unicode-bidi" : "normal | embed | isolate | bidi-override | isolate-override | plaintext | inherit", "user-modify" : "read-only | read-write | write-only | inherit", "user-select" : "none | text | toggle | element | elements | all | inherit", + "user-zoom" : "zoom | fixed", "vertical-align" : "auto | use-script | baseline | sub | super | top | text-top | central | middle | bottom | text-bottom | | ", "visibility" : "visible | hidden | collapse | inherit", "voice-balance" : 1, @@ -4161,6 +4173,7 @@ function PropertyValuePart(text, line, col){ case "ch": case "vh": case "vw": + case "fr": case "vmax": case "vmin": this.type = "length"; @@ -4749,7 +4762,7 @@ TokenStream.prototype = mix(new TokenStreamBase(), { ident = this.readName(reader.read()); value += ident; - if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){ + if (/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^fr$|^vmax$|^vmin$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(ident)){ tt = Tokens.LENGTH; } else if (/^deg|^rad$|^grad$/i.test(ident)){ tt = Tokens.ANGLE; @@ -7991,7 +8004,7 @@ module.exports.CSSLint = CSSLint; }); -ace.define("ace/mode/css_worker",["require","exports","module","ace/lib/oop","ace/lib/lang","ace/worker/mirror","ace/mode/css/csslint"], function(require, exports, module) { +define("ace/mode/css_worker",[], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -8054,7 +8067,7 @@ oop.inherits(Worker, Mirror); text: msg.message, type: infoRules[msg.rule.id] ? "info" : msg.type, rule: msg.rule.name - } + }; })); }; @@ -8062,7 +8075,7 @@ oop.inherits(Worker, Mirror); }); -ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { +define("ace/lib/es5-shim",[], function(require, exports, module) { function Empty() {} diff --git a/htdocs/includes/ace/worker-html.js b/htdocs/includes/ace/src/worker-html.js similarity index 99% rename from htdocs/includes/ace/worker-html.js rename to htdocs/includes/ace/src/worker-html.js index ccb04e91fd5..6d60761b9a1 100644 --- a/htdocs/includes/ace/worker-html.js +++ b/htdocs/includes/ace/src/worker-html.js @@ -1,5 +1,5 @@ "no use strict"; -;(function(window) { +!(function(window) { if (typeof window.window != "undefined" && window.document) return; if (window.require && window.define) @@ -134,7 +134,7 @@ window.define = function(id, deps, factory) { exports: {}, factory: function() { var module = this; - var returnExports = factory.apply(this, deps.map(function(dep) { + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { switch (dep) { // Because "require", "exports" and "module" aren't actual // dependencies, we must handle them seperately. @@ -217,7 +217,7 @@ window.onmessage = function(e) { }; })(this); -ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +define("ace/lib/oop",[], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { @@ -245,7 +245,7 @@ exports.implement = function(proto, mixin) { }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -347,7 +347,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1308,7 +1307,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1326,7 +1329,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1344,7 +1347,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) { +define("ace/worker/mirror",[], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1406,7 +1409,7 @@ var Mirror = exports.Mirror = function(sender) { }); -ace.define("ace/mode/html/saxparser",["require","exports","module"], function(require, exports, module) { +define("ace/mode/html/saxparser",[], function(require, exports, module) { module.exports = (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1120,7 +1119,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1138,7 +1141,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1156,7 +1159,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -1258,7 +1261,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1120,7 +1119,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1138,7 +1141,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1156,7 +1159,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -1258,7 +1261,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1120,7 +1119,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1138,7 +1141,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1156,7 +1159,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -1258,7 +1261,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ + case 38: case 124: return 7; // & | } } else if (2 === length) { switch (charCode) { @@ -2896,7 +2900,7 @@ ace.define("ace/mode/lua/luaparse",["require","exports","module"], function(requ }); -ace.define("ace/mode/lua_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/lua/luaparse"], function(require, exports, module) { +define("ace/mode/lua_worker",[], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -2934,7 +2938,7 @@ oop.inherits(Worker, Mirror); }); -ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { +define("ace/lib/es5-shim",[], function(require, exports, module) { function Empty() {} diff --git a/htdocs/includes/ace/worker-php.js b/htdocs/includes/ace/src/worker-php.js similarity index 98% rename from htdocs/includes/ace/worker-php.js rename to htdocs/includes/ace/src/worker-php.js index 3752c8464ac..7d41f37cb50 100644 --- a/htdocs/includes/ace/worker-php.js +++ b/htdocs/includes/ace/src/worker-php.js @@ -1,5 +1,5 @@ "no use strict"; -;(function(window) { +!(function(window) { if (typeof window.window != "undefined" && window.document) return; if (window.require && window.define) @@ -134,7 +134,7 @@ window.define = function(id, deps, factory) { exports: {}, factory: function() { var module = this; - var returnExports = factory.apply(this, deps.map(function(dep) { + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { switch (dep) { // Because "require", "exports" and "module" aren't actual // dependencies, we must handle them seperately. @@ -217,7 +217,7 @@ window.onmessage = function(e) { }; })(this); -ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +define("ace/lib/oop",[], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { @@ -245,7 +245,7 @@ exports.implement = function(proto, mixin) { }); -ace.define("ace/range",["require","exports","module"], function(require, exports, module) { +define("ace/range",[], function(require, exports, module) { "use strict"; var comparePoints = function(p1, p2) { return p1.row - p2.row || p1.column - p2.column; @@ -450,9 +450,9 @@ var Range = function(startRow, startColumn, endRow, endColumn) { }; this.collapseRows = function() { if (this.end.column == 0) - return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0); else - return new Range(this.start.row, 0, this.end.row, 0) + return new Range(this.start.row, 0, this.end.row, 0); }; this.toScreenRange = function(session) { var screenPosStart = session.documentToScreenPosition(this.start); @@ -484,7 +484,7 @@ Range.comparePoints = function(p1, p2) { exports.Range = Range; }); -ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) { +define("ace/apply_delta",[], function(require, exports, module) { "use strict"; function throwDeltaError(delta, errorText){ @@ -546,10 +546,10 @@ exports.applyDelta = function(docLines, delta, doNotValidate) { } break; } -} +}; }); -ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { +define("ace/lib/event_emitter",[], function(require, exports, module) { "use strict"; var EventEmitter = {}; @@ -599,15 +599,20 @@ EventEmitter._signal = function(eventName, e) { EventEmitter.once = function(eventName, callback) { var _self = this; - callback && this.addEventListener(eventName, function newCallback() { + this.addEventListener(eventName, function newCallback() { _self.removeEventListener(eventName, newCallback); callback.apply(null, arguments); }); + if (!callback) { + return new Promise(function(resolve) { + callback = resolve; + }); + } }; EventEmitter.setDefaultHandler = function(eventName, callback) { - var handlers = this._defaultHandlers + var handlers = this._defaultHandlers; if (!handlers) handlers = this._defaultHandlers = {_disabled_: {}}; @@ -624,13 +629,12 @@ EventEmitter.setDefaultHandler = function(eventName, callback) { handlers[eventName] = callback; }; EventEmitter.removeDefaultHandler = function(eventName, callback) { - var handlers = this._defaultHandlers + var handlers = this._defaultHandlers; if (!handlers) return; var disabled = handlers._disabled_[eventName]; if (handlers[eventName] == callback) { - var old = handlers[eventName]; if (disabled) this.setDefaultHandler(eventName, disabled.pop()); } else if (disabled) { @@ -675,7 +679,7 @@ exports.EventEmitter = EventEmitter; }); -ace.define("ace/anchor",["require","exports","module","ace/lib/oop","ace/lib/event_emitter"], function(require, exports, module) { +define("ace/anchor",[], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -800,7 +804,7 @@ var Anchor = exports.Anchor = function(doc, row, column) { }); -ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { +define("ace/document",[], function(require, exports, module) { "use strict"; var oop = require("./lib/oop"); @@ -1091,28 +1095,23 @@ var Document = function(textOrLines) { return; } - if (isInsert && delta.lines.length > 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1120,7 +1119,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1138,7 +1141,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1156,7 +1159,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -1258,7 +1261,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/)/i, inlineHtml = shortOpenTag ? /[^<]*(?:<(?!\?|script language\=('|")?php('|")?\>)[^<]*)*/i - : /[^<]*(?:<(?!\?=|\?php[ \t\r\n]|script language\=('|")?php('|")?\>)[^<]*)*/i; + : /[^<]*(?:<(?!\?=|\?php[ \t\r\n]|script language\=('|")?php('|")?\>)[^<]*)*/i, labelRegexPart = '[a-zA-Z_\\x7f-\\uffff][a-zA-Z0-9_\\x7f-\\uffff]*', stringRegexPart = function(quote) { return '[^' + quote + '\\\\${]*(?:(?:\\\\[\\s\\S]|\\$(?!\\{|[a-zA-Z_\\x7f-\\uffff])|\\{(?!\\$))[^' + quote + '\\\\${]*)*'; @@ -3560,7 +3563,7 @@ PHP.Parser.prototype.yylen = [ exports.PHP = PHP; }); -ace.define("ace/mode/php_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/php/php"], function(require, exports, module) { +define("ace/mode/php_worker",[], function(require, exports, module) { "use strict"; var oop = require("../lib/oop"); @@ -3604,7 +3607,7 @@ oop.inherits(PhpWorker, Mirror); }); -ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { +define("ace/lib/es5-shim",[], function(require, exports, module) { function Empty() {} diff --git a/htdocs/includes/ace/worker-xml.js b/htdocs/includes/ace/src/worker-xml.js similarity index 96% rename from htdocs/includes/ace/worker-xml.js rename to htdocs/includes/ace/src/worker-xml.js index c53e518b9ed..f6ea2cbf148 100644 --- a/htdocs/includes/ace/worker-xml.js +++ b/htdocs/includes/ace/src/worker-xml.js @@ -1,5 +1,5 @@ "no use strict"; -;(function(window) { +!(function(window) { if (typeof window.window != "undefined" && window.document) return; if (window.require && window.define) @@ -134,7 +134,7 @@ window.define = function(id, deps, factory) { exports: {}, factory: function() { var module = this; - var returnExports = factory.apply(this, deps.map(function(dep) { + var returnExports = factory.apply(this, deps.slice(0, factory.length).map(function(dep) { switch (dep) { // Because "require", "exports" and "module" aren't actual // dependencies, we must handle them seperately. @@ -217,7 +217,7 @@ window.onmessage = function(e) { }; })(this); -ace.define("ace/lib/oop",["require","exports","module"], function(require, exports, module) { +define("ace/lib/oop",[], function(require, exports, module) { "use strict"; exports.inherits = function(ctor, superCtor) { @@ -245,7 +245,7 @@ exports.implement = function(proto, mixin) { }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -347,7 +347,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1308,7 +1307,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1326,7 +1329,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1344,7 +1347,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/worker/mirror",["require","exports","module","ace/range","ace/document","ace/lib/lang"], function(require, exports, module) { +define("ace/worker/mirror",[], function(require, exports, module) { "use strict"; var Range = require("../range").Range; @@ -1406,7 +1409,7 @@ var Mirror = exports.Mirror = function(sender) { }); -ace.define("ace/mode/xml/sax",["require","exports","module"], function(require, exports, module) { +define("ace/mode/xml/sax",[], function(require, exports, module) { var nameStartChar = /[A-Z_a-z\xC0-\xD6\xD8-\xF6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]///\u10000-\uEFFFF var nameChar = new RegExp("[\\-\\.0-9"+nameStartChar.source.slice(1,-1)+"\u00B7\u0300-\u036F\\ux203F-\u2040]"); var tagNamePattern = new RegExp('^'+nameStartChar.source+nameChar.source+'*(?:\:'+nameStartChar.source+nameChar.source+'*)?$'); @@ -1917,7 +1920,7 @@ function split(source,start){ return XMLReader; }); -ace.define("ace/mode/xml/dom",["require","exports","module"], function(require, exports, module) { +define("ace/mode/xml/dom",[], function(require, exports, module) { function copy(src,dest){ for(var p in src){ @@ -1925,13 +1928,13 @@ function copy(src,dest){ } } function _extends(Class,Super){ + var t = function(){}; var pt = Class.prototype; if(Object.create){ - var ppt = Object.create(Super.prototype) + var ppt = Object.create(Super.prototype); pt.__proto__ = ppt; } if(!(pt instanceof Super)){ - function t(){}; t.prototype = Super.prototype; t = new t(); copy(pt,t); @@ -1939,13 +1942,13 @@ function _extends(Class,Super){ } if(pt.constructor != Class){ if(typeof Class != 'function'){ - console.error("unknow Class:"+Class) + console.error("unknown Class:"+Class); } - pt.constructor = Class + pt.constructor = Class; } } var htmlns = 'http://www.w3.org/1999/xhtml' ; -var NodeType = {} +var NodeType = {}; var ELEMENT_NODE = NodeType.ELEMENT_NODE = 1; var ATTRIBUTE_NODE = NodeType.ATTRIBUTE_NODE = 2; var TEXT_NODE = NodeType.TEXT_NODE = 3; @@ -1958,7 +1961,7 @@ var DOCUMENT_NODE = NodeType.DOCUMENT_NODE = 9; var DOCUMENT_TYPE_NODE = NodeType.DOCUMENT_TYPE_NODE = 10; var DOCUMENT_FRAGMENT_NODE = NodeType.DOCUMENT_FRAGMENT_NODE = 11; var NOTATION_NODE = NodeType.NOTATION_NODE = 12; -var ExceptionCode = {} +var ExceptionCode = {}; var ExceptionMessage = {}; var INDEX_SIZE_ERR = ExceptionCode.INDEX_SIZE_ERR = ((ExceptionMessage[1]="Index size error"),1); var DOMSTRING_SIZE_ERR = ExceptionCode.DOMSTRING_SIZE_ERR = ((ExceptionMessage[2]="DOMString size error"),2); @@ -1995,14 +1998,14 @@ copy(ExceptionCode,DOMException) function NodeList() { }; NodeList.prototype = { - length:0, + length:0, item: function(index) { return this[index] || null; } }; function LiveNodeList(node,refresh){ this._node = node; - this._refresh = refresh + this._refresh = refresh; _updateLiveList(this); } function _updateLiveList(list){ @@ -2048,9 +2051,9 @@ function _addNamedNode(el,list,newAttr,oldAttr){ function _removeNamedNode(el,list,attr){ var i = _findNodeIndex(list,attr); if(i>=0){ - var lastIndex = list.length-1 + var lastIndex = list.length-1; while(i' && '>' || c == '&' && '&' || c == '"' && '"' || - '&#'+c.charCodeAt()+';' + '&#'+c.charCodeAt()+';'; } @@ -2287,7 +2290,7 @@ function _onRemoveAttribute(doc,el,newAttr,remove){ doc && doc._inc++; var ns = newAttr.namespaceURI ; if(ns == 'http://www.w3.org/2000/xmlns/'){ - delete el._nsMap[newAttr.prefix?newAttr.localName:''] + delete el._nsMap[newAttr.prefix?newAttr.localName:'']; } } function _onUpdateChild(doc,el,newChild){ @@ -2341,8 +2344,8 @@ function _insertBefore(parentNode,newChild,nextChild){ newFirst.previousSibling = pre; newLast.nextSibling = nextChild; - - + + if(pre){ pre.nextSibling = newFirst; }else{ @@ -2388,8 +2391,8 @@ Document.prototype = { doctype : null, documentElement : null, _inc : 1, - - insertBefore : function(newChild, refChild){//raises + + insertBefore : function(newChild, refChild){//raises if(newChild.nodeType == DOCUMENT_FRAGMENT_NODE){ var child = newChild.firstChild; while(child){ @@ -2402,7 +2405,7 @@ Document.prototype = { if(this.documentElement == null && newChild.nodeType == 1){ this.documentElement = newChild; } - + return _insertBefore(this,newChild,refChild),(newChild.ownerDocument = this),newChild; }, removeChild : function(oldChild){ @@ -2423,7 +2426,7 @@ Document.prototype = { return true; } } - }) + }); return rtv; }, createElement : function(tagName){ @@ -2445,19 +2448,19 @@ Document.prototype = { createTextNode : function(data){ var node = new Text(); node.ownerDocument = this; - node.appendData(data) + node.appendData(data); return node; }, createComment : function(data){ var node = new Comment(); node.ownerDocument = this; - node.appendData(data) + node.appendData(data); return node; }, createCDATASection : function(data){ var node = new CDATASection(); node.ownerDocument = this; - node.appendData(data) + node.appendData(data); return node; }, createProcessingInstruction : function(target,data){ @@ -2538,10 +2541,10 @@ Element.prototype = { setAttribute : function(name, value){ var attr = this.ownerDocument.createAttribute(name); attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) + this.setAttributeNode(attr); }, removeAttribute : function(name){ - var attr = this.getAttributeNode(name) + var attr = this.getAttributeNode(name); attr && this.removeAttributeNode(attr); }, appendChild:function(newChild){ @@ -2564,7 +2567,7 @@ Element.prototype = { var old = this.getAttributeNodeNS(namespaceURI, localName); old && this.removeAttributeNode(old); }, - + hasAttributeNS : function(namespaceURI, localName){ return this.getAttributeNodeNS(namespaceURI, localName)!=null; }, @@ -2575,12 +2578,12 @@ Element.prototype = { setAttributeNS : function(namespaceURI, qualifiedName, value){ var attr = this.ownerDocument.createAttributeNS(namespaceURI, qualifiedName); attr.value = attr.nodeValue = "" + value; - this.setAttributeNode(attr) + this.setAttributeNode(attr); }, getAttributeNodeNS : function(namespaceURI, localName){ return this.attributes.getNamedItemNS(namespaceURI, localName); }, - + getElementsByTagName : function(tagName){ return new LiveNodeList(this,function(base){ var ls = []; @@ -2629,11 +2632,10 @@ CharacterData.prototype = { }, insertData: function(offset,text) { this.replaceData(offset,0,text); - }, appendChild:function(newChild){ - throw new Error(ExceptionMessage[3]) - return Node.prototype.appendChild.apply(this,arguments) + throw new Error(ExceptionMessage[3]); + return Node.prototype.appendChild.apply(this,arguments); }, deleteData: function(offset, count) { this.replaceData(offset,count,""); @@ -2684,27 +2686,27 @@ _extends(CDATASection,CharacterData); function DocumentType() { -}; +} DocumentType.prototype.nodeType = DOCUMENT_TYPE_NODE; _extends(DocumentType,Node); function Notation() { -}; +} Notation.prototype.nodeType = NOTATION_NODE; _extends(Notation,Node); function Entity() { -}; +} Entity.prototype.nodeType = ENTITY_NODE; _extends(Entity,Node); function EntityReference() { -}; +} EntityReference.prototype.nodeType = ENTITY_REFERENCE_NODE; _extends(EntityReference,Node); function DocumentFragment() { -}; +} DocumentFragment.prototype.nodeName = "#document-fragment"; DocumentFragment.prototype.nodeType = DOCUMENT_FRAGMENT_NODE; _extends(DocumentFragment,Node); @@ -2730,10 +2732,10 @@ function serializeToString(node,buf){ var len = attrs.length; var child = node.firstChild; var nodeName = node.tagName; - var isHTML = htmlns === node.namespaceURI + var isHTML = htmlns === node.namespaceURI; buf.push('<',nodeName); for(var i=0;i'); @@ -2840,12 +2842,12 @@ function cloneNode(doc,node,deep){ case ELEMENT_NODE: var attrs = node.attributes; var attrs2 = node2.attributes = new NamedNodeMap(); - var len = attrs.length + var len = attrs.length; attrs2._ownerElement = node2; for(var i=0;i 20000) + if (isInsert && delta.lines.length > 20000) { this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); + } + else { + applyDelta(this.$lines, delta, doNotValidate); + this._signal("change", delta); + } }; this.$splitAndapplyLargeDelta = function(delta, MAX) { var lines = delta.lines; - var l = lines.length; + var l = lines.length - MAX + 1; var row = delta.start.row; var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; + for (var from = 0, to = 0; from < l; from = to) { to += MAX - 1; var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } chunk.push(""); this.applyDelta({ start: this.pos(row + from, column), @@ -1120,7 +1119,11 @@ var Document = function(textOrLines) { action: delta.action, lines: chunk }, true); - } while(true); + } + delta.lines = lines.slice(from); + delta.start.row = row + from; + delta.start.column = column; + this.applyDelta(delta, true); }; this.revertDelta = function(delta) { this.applyDelta({ @@ -1138,7 +1141,7 @@ var Document = function(textOrLines) { if (index < 0) return {row: i, column: index + lines[i].length + newlineLength}; } - return {row: l-1, column: lines[l-1].length}; + return {row: l-1, column: index + lines[l-1].length + newlineLength}; }; this.positionToIndex = function(pos, startRow) { var lines = this.$lines || this.getAllLines(); @@ -1156,7 +1159,7 @@ var Document = function(textOrLines) { exports.Document = Document; }); -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { +define("ace/lib/lang",[], function(require, exports, module) { "use strict"; exports.last = function(a) { @@ -1258,7 +1261,7 @@ exports.escapeRegExp = function(str) { }; exports.escapeHTML = function(str) { - return str.replace(/&/g, "&").replace(/"/g, """).replace(/'/g, "'").replace(/ [" + this.end.row + "/" + this.end.column + "]"); - }; - - this.contains = function(row, column) { - return this.compare(row, column) == 0; - }; - this.compareRange = function(range) { - var cmp, - end = range.end, - start = range.start; - - cmp = this.compare(end.row, end.column); - if (cmp == 1) { - cmp = this.compare(start.row, start.column); - if (cmp == 1) { - return 2; - } else if (cmp == 0) { - return 1; - } else { - return 0; - } - } else if (cmp == -1) { - return -2; - } else { - cmp = this.compare(start.row, start.column); - if (cmp == -1) { - return -1; - } else if (cmp == 1) { - return 42; - } else { - return 0; - } - } - }; - this.comparePoint = function(p) { - return this.compare(p.row, p.column); - }; - this.containsRange = function(range) { - return this.comparePoint(range.start) == 0 && this.comparePoint(range.end) == 0; - }; - this.intersects = function(range) { - var cmp = this.compareRange(range); - return (cmp == -1 || cmp == 0 || cmp == 1); - }; - this.isEnd = function(row, column) { - return this.end.row == row && this.end.column == column; - }; - this.isStart = function(row, column) { - return this.start.row == row && this.start.column == column; - }; - this.setStart = function(row, column) { - if (typeof row == "object") { - this.start.column = row.column; - this.start.row = row.row; - } else { - this.start.row = row; - this.start.column = column; - } - }; - this.setEnd = function(row, column) { - if (typeof row == "object") { - this.end.column = row.column; - this.end.row = row.row; - } else { - this.end.row = row; - this.end.column = column; - } - }; - this.inside = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column) || this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideStart = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isEnd(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.insideEnd = function(row, column) { - if (this.compare(row, column) == 0) { - if (this.isStart(row, column)) { - return false; - } else { - return true; - } - } - return false; - }; - this.compare = function(row, column) { - if (!this.isMultiLine()) { - if (row === this.start.row) { - return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); - } - } - - if (row < this.start.row) - return -1; - - if (row > this.end.row) - return 1; - - if (this.start.row === row) - return column >= this.start.column ? 0 : -1; - - if (this.end.row === row) - return column <= this.end.column ? 0 : 1; - - return 0; - }; - this.compareStart = function(row, column) { - if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.compareEnd = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else { - return this.compare(row, column); - } - }; - this.compareInside = function(row, column) { - if (this.end.row == row && this.end.column == column) { - return 1; - } else if (this.start.row == row && this.start.column == column) { - return -1; - } else { - return this.compare(row, column); - } - }; - this.clipRows = function(firstRow, lastRow) { - if (this.end.row > lastRow) - var end = {row: lastRow + 1, column: 0}; - else if (this.end.row < firstRow) - var end = {row: firstRow, column: 0}; - - if (this.start.row > lastRow) - var start = {row: lastRow + 1, column: 0}; - else if (this.start.row < firstRow) - var start = {row: firstRow, column: 0}; - - return Range.fromPoints(start || this.start, end || this.end); - }; - this.extend = function(row, column) { - var cmp = this.compare(row, column); - - if (cmp == 0) - return this; - else if (cmp == -1) - var start = {row: row, column: column}; - else - var end = {row: row, column: column}; - - return Range.fromPoints(start || this.start, end || this.end); - }; - - this.isEmpty = function() { - return (this.start.row === this.end.row && this.start.column === this.end.column); - }; - this.isMultiLine = function() { - return (this.start.row !== this.end.row); - }; - this.clone = function() { - return Range.fromPoints(this.start, this.end); - }; - this.collapseRows = function() { - if (this.end.column == 0) - return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) - else - return new Range(this.start.row, 0, this.end.row, 0) - }; - this.toScreenRange = function(session) { - var screenPosStart = session.documentToScreenPosition(this.start); - var screenPosEnd = session.documentToScreenPosition(this.end); - - return new Range( - screenPosStart.row, screenPosStart.column, - screenPosEnd.row, screenPosEnd.column - ); - }; - this.moveBy = function(row, column) { - this.start.row += row; - this.start.column += column; - this.end.row += row; - this.end.column += column; - }; - -}).call(Range.prototype); -Range.fromPoints = function(start, end) { - return new Range(start.row, start.column, end.row, end.column); -}; -Range.comparePoints = comparePoints; - -Range.comparePoints = function(p1, p2) { - return p1.row - p2.row || p1.column - p2.column; -}; - - -exports.Range = Range; -}); - -ace.define("ace/apply_delta",["require","exports","module"], function(require, exports, module) { -"use strict"; - -function throwDeltaError(delta, errorText){ - console.log("Invalid Delta:", delta); - throw "Invalid Delta: " + errorText; -} - -function positionInDocument(docLines, position) { - return position.row >= 0 && position.row < docLines.length && - position.column >= 0 && position.column <= docLines[position.row].length; -} - -function validateDelta(docLines, delta) { - if (delta.action != "insert" && delta.action != "remove") - throwDeltaError(delta, "delta.action must be 'insert' or 'remove'"); - if (!(delta.lines instanceof Array)) - throwDeltaError(delta, "delta.lines must be an Array"); - if (!delta.start || !delta.end) - throwDeltaError(delta, "delta.start/end must be an present"); - var start = delta.start; - if (!positionInDocument(docLines, delta.start)) - throwDeltaError(delta, "delta.start must be contained in document"); - var end = delta.end; - if (delta.action == "remove" && !positionInDocument(docLines, end)) - throwDeltaError(delta, "delta.end must contained in document for 'remove' actions"); - var numRangeRows = end.row - start.row; - var numRangeLastLineChars = (end.column - (numRangeRows == 0 ? start.column : 0)); - if (numRangeRows != delta.lines.length - 1 || delta.lines[numRangeRows].length != numRangeLastLineChars) - throwDeltaError(delta, "delta.range must match delta lines"); -} - -exports.applyDelta = function(docLines, delta, doNotValidate) { - - var row = delta.start.row; - var startColumn = delta.start.column; - var line = docLines[row] || ""; - switch (delta.action) { - case "insert": - var lines = delta.lines; - if (lines.length === 1) { - docLines[row] = line.substring(0, startColumn) + delta.lines[0] + line.substring(startColumn); - } else { - var args = [row, 1].concat(delta.lines); - docLines.splice.apply(docLines, args); - docLines[row] = line.substring(0, startColumn) + docLines[row]; - docLines[row + delta.lines.length - 1] += line.substring(startColumn); - } - break; - case "remove": - var endColumn = delta.end.column; - var endRow = delta.end.row; - if (row === endRow) { - docLines[row] = line.substring(0, startColumn) + line.substring(endColumn); - } else { - docLines.splice( - row, endRow - row + 1, - line.substring(0, startColumn) + docLines[endRow].substring(endColumn) - ); - } - break; - } -} -}); - -ace.define("ace/lib/event_emitter",["require","exports","module"], function(require, exports, module) { -"use strict"; - -var EventEmitter = {}; -var stopPropagation = function() { this.propagationStopped = true; }; -var preventDefault = function() { this.defaultPrevented = true; }; - -EventEmitter._emit = -EventEmitter._dispatchEvent = function(eventName, e) { - this._eventRegistry || (this._eventRegistry = {}); - this._defaultHandlers || (this._defaultHandlers = {}); - - var listeners = this._eventRegistry[eventName] || []; - var defaultHandler = this._defaultHandlers[eventName]; - if (!listeners.length && !defaultHandler) - return; - - if (typeof e != "object" || !e) - e = {}; - - if (!e.type) - e.type = eventName; - if (!e.stopPropagation) - e.stopPropagation = stopPropagation; - if (!e.preventDefault) - e.preventDefault = preventDefault; - - listeners = listeners.slice(); - for (var i=0; i this.row) - return; - - var point = $getTransformedPoint(delta, {row: this.row, column: this.column}, this.$insertRight); - this.setPosition(point.row, point.column, true); - }; - - function $pointsInOrder(point1, point2, equalPointsInOrder) { - var bColIsAfter = equalPointsInOrder ? point1.column <= point2.column : point1.column < point2.column; - return (point1.row < point2.row) || (point1.row == point2.row && bColIsAfter); - } - - function $getTransformedPoint(delta, point, moveIfEqual) { - var deltaIsInsert = delta.action == "insert"; - var deltaRowShift = (deltaIsInsert ? 1 : -1) * (delta.end.row - delta.start.row); - var deltaColShift = (deltaIsInsert ? 1 : -1) * (delta.end.column - delta.start.column); - var deltaStart = delta.start; - var deltaEnd = deltaIsInsert ? deltaStart : delta.end; // Collapse insert range. - if ($pointsInOrder(point, deltaStart, moveIfEqual)) { - return { - row: point.row, - column: point.column - }; - } - if ($pointsInOrder(deltaEnd, point, !moveIfEqual)) { - return { - row: point.row + deltaRowShift, - column: point.column + (point.row == deltaEnd.row ? deltaColShift : 0) - }; - } - - return { - row: deltaStart.row, - column: deltaStart.column - }; - } - this.setPosition = function(row, column, noClip) { - var pos; - if (noClip) { - pos = { - row: row, - column: column - }; - } else { - pos = this.$clipPositionToDocument(row, column); - } - - if (this.row == pos.row && this.column == pos.column) - return; - - var old = { - row: this.row, - column: this.column - }; - - this.row = pos.row; - this.column = pos.column; - this._signal("change", { - old: old, - value: pos - }); - }; - this.detach = function() { - this.document.removeEventListener("change", this.$onChange); - }; - this.attach = function(doc) { - this.document = doc || this.document; - this.document.on("change", this.$onChange); - }; - this.$clipPositionToDocument = function(row, column) { - var pos = {}; - - if (row >= this.document.getLength()) { - pos.row = Math.max(0, this.document.getLength() - 1); - pos.column = this.document.getLine(pos.row).length; - } - else if (row < 0) { - pos.row = 0; - pos.column = 0; - } - else { - pos.row = row; - pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); - } - - if (column < 0) - pos.column = 0; - - return pos; - }; - -}).call(Anchor.prototype); - -}); - -ace.define("ace/document",["require","exports","module","ace/lib/oop","ace/apply_delta","ace/lib/event_emitter","ace/range","ace/anchor"], function(require, exports, module) { -"use strict"; - -var oop = require("./lib/oop"); -var applyDelta = require("./apply_delta").applyDelta; -var EventEmitter = require("./lib/event_emitter").EventEmitter; -var Range = require("./range").Range; -var Anchor = require("./anchor").Anchor; - -var Document = function(textOrLines) { - this.$lines = [""]; - if (textOrLines.length === 0) { - this.$lines = [""]; - } else if (Array.isArray(textOrLines)) { - this.insertMergedLines({row: 0, column: 0}, textOrLines); - } else { - this.insert({row: 0, column:0}, textOrLines); - } -}; - -(function() { - - oop.implement(this, EventEmitter); - this.setValue = function(text) { - var len = this.getLength() - 1; - this.remove(new Range(0, 0, len, this.getLine(len).length)); - this.insert({row: 0, column: 0}, text); - }; - this.getValue = function() { - return this.getAllLines().join(this.getNewLineCharacter()); - }; - this.createAnchor = function(row, column) { - return new Anchor(this, row, column); - }; - if ("aaa".split(/a/).length === 0) { - this.$split = function(text) { - return text.replace(/\r\n|\r/g, "\n").split("\n"); - }; - } else { - this.$split = function(text) { - return text.split(/\r\n|\r|\n/); - }; - } - - - this.$detectNewLine = function(text) { - var match = text.match(/^.*?(\r\n|\r|\n)/m); - this.$autoNewLine = match ? match[1] : "\n"; - this._signal("changeNewLineMode"); - }; - this.getNewLineCharacter = function() { - switch (this.$newLineMode) { - case "windows": - return "\r\n"; - case "unix": - return "\n"; - default: - return this.$autoNewLine || "\n"; - } - }; - - this.$autoNewLine = ""; - this.$newLineMode = "auto"; - this.setNewLineMode = function(newLineMode) { - if (this.$newLineMode === newLineMode) - return; - - this.$newLineMode = newLineMode; - this._signal("changeNewLineMode"); - }; - this.getNewLineMode = function() { - return this.$newLineMode; - }; - this.isNewLine = function(text) { - return (text == "\r\n" || text == "\r" || text == "\n"); - }; - this.getLine = function(row) { - return this.$lines[row] || ""; - }; - this.getLines = function(firstRow, lastRow) { - return this.$lines.slice(firstRow, lastRow + 1); - }; - this.getAllLines = function() { - return this.getLines(0, this.getLength()); - }; - this.getLength = function() { - return this.$lines.length; - }; - this.getTextRange = function(range) { - return this.getLinesForRange(range).join(this.getNewLineCharacter()); - }; - this.getLinesForRange = function(range) { - var lines; - if (range.start.row === range.end.row) { - lines = [this.getLine(range.start.row).substring(range.start.column, range.end.column)]; - } else { - lines = this.getLines(range.start.row, range.end.row); - lines[0] = (lines[0] || "").substring(range.start.column); - var l = lines.length - 1; - if (range.end.row - range.start.row == l) - lines[l] = lines[l].substring(0, range.end.column); - } - return lines; - }; - this.insertLines = function(row, lines) { - console.warn("Use of document.insertLines is deprecated. Use the insertFullLines method instead."); - return this.insertFullLines(row, lines); - }; - this.removeLines = function(firstRow, lastRow) { - console.warn("Use of document.removeLines is deprecated. Use the removeFullLines method instead."); - return this.removeFullLines(firstRow, lastRow); - }; - this.insertNewLine = function(position) { - console.warn("Use of document.insertNewLine is deprecated. Use insertMergedLines(position, ['', '']) instead."); - return this.insertMergedLines(position, ["", ""]); - }; - this.insert = function(position, text) { - if (this.getLength() <= 1) - this.$detectNewLine(text); - - return this.insertMergedLines(position, this.$split(text)); - }; - this.insertInLine = function(position, text) { - var start = this.clippedPos(position.row, position.column); - var end = this.pos(position.row, position.column + text.length); - - this.applyDelta({ - start: start, - end: end, - action: "insert", - lines: [text] - }, true); - - return this.clonePos(end); - }; - - this.clippedPos = function(row, column) { - var length = this.getLength(); - if (row === undefined) { - row = length; - } else if (row < 0) { - row = 0; - } else if (row >= length) { - row = length - 1; - column = undefined; - } - var line = this.getLine(row); - if (column == undefined) - column = line.length; - column = Math.min(Math.max(column, 0), line.length); - return {row: row, column: column}; - }; - - this.clonePos = function(pos) { - return {row: pos.row, column: pos.column}; - }; - - this.pos = function(row, column) { - return {row: row, column: column}; - }; - - this.$clipPosition = function(position) { - var length = this.getLength(); - if (position.row >= length) { - position.row = Math.max(0, length - 1); - position.column = this.getLine(length - 1).length; - } else { - position.row = Math.max(0, position.row); - position.column = Math.min(Math.max(position.column, 0), this.getLine(position.row).length); - } - return position; - }; - this.insertFullLines = function(row, lines) { - row = Math.min(Math.max(row, 0), this.getLength()); - var column = 0; - if (row < this.getLength()) { - lines = lines.concat([""]); - column = 0; - } else { - lines = [""].concat(lines); - row--; - column = this.$lines[row].length; - } - this.insertMergedLines({row: row, column: column}, lines); - }; - this.insertMergedLines = function(position, lines) { - var start = this.clippedPos(position.row, position.column); - var end = { - row: start.row + lines.length - 1, - column: (lines.length == 1 ? start.column : 0) + lines[lines.length - 1].length - }; - - this.applyDelta({ - start: start, - end: end, - action: "insert", - lines: lines - }); - - return this.clonePos(end); - }; - this.remove = function(range) { - var start = this.clippedPos(range.start.row, range.start.column); - var end = this.clippedPos(range.end.row, range.end.column); - this.applyDelta({ - start: start, - end: end, - action: "remove", - lines: this.getLinesForRange({start: start, end: end}) - }); - return this.clonePos(start); - }; - this.removeInLine = function(row, startColumn, endColumn) { - var start = this.clippedPos(row, startColumn); - var end = this.clippedPos(row, endColumn); - - this.applyDelta({ - start: start, - end: end, - action: "remove", - lines: this.getLinesForRange({start: start, end: end}) - }, true); - - return this.clonePos(start); - }; - this.removeFullLines = function(firstRow, lastRow) { - firstRow = Math.min(Math.max(0, firstRow), this.getLength() - 1); - lastRow = Math.min(Math.max(0, lastRow ), this.getLength() - 1); - var deleteFirstNewLine = lastRow == this.getLength() - 1 && firstRow > 0; - var deleteLastNewLine = lastRow < this.getLength() - 1; - var startRow = ( deleteFirstNewLine ? firstRow - 1 : firstRow ); - var startCol = ( deleteFirstNewLine ? this.getLine(startRow).length : 0 ); - var endRow = ( deleteLastNewLine ? lastRow + 1 : lastRow ); - var endCol = ( deleteLastNewLine ? 0 : this.getLine(endRow).length ); - var range = new Range(startRow, startCol, endRow, endCol); - var deletedLines = this.$lines.slice(firstRow, lastRow + 1); - - this.applyDelta({ - start: range.start, - end: range.end, - action: "remove", - lines: this.getLinesForRange(range) - }); - return deletedLines; - }; - this.removeNewLine = function(row) { - if (row < this.getLength() - 1 && row >= 0) { - this.applyDelta({ - start: this.pos(row, this.getLine(row).length), - end: this.pos(row + 1, 0), - action: "remove", - lines: ["", ""] - }); - } - }; - this.replace = function(range, text) { - if (!(range instanceof Range)) - range = Range.fromPoints(range.start, range.end); - if (text.length === 0 && range.isEmpty()) - return range.start; - if (text == this.getTextRange(range)) - return range.end; - - this.remove(range); - var end; - if (text) { - end = this.insert(range.start, text); - } - else { - end = range.start; - } - - return end; - }; - this.applyDeltas = function(deltas) { - for (var i=0; i=0; i--) { - this.revertDelta(deltas[i]); - } - }; - this.applyDelta = function(delta, doNotValidate) { - var isInsert = delta.action == "insert"; - if (isInsert ? delta.lines.length <= 1 && !delta.lines[0] - : !Range.comparePoints(delta.start, delta.end)) { - return; - } - - if (isInsert && delta.lines.length > 20000) - this.$splitAndapplyLargeDelta(delta, 20000); - applyDelta(this.$lines, delta, doNotValidate); - this._signal("change", delta); - }; - - this.$splitAndapplyLargeDelta = function(delta, MAX) { - var lines = delta.lines; - var l = lines.length; - var row = delta.start.row; - var column = delta.start.column; - var from = 0, to = 0; - do { - from = to; - to += MAX - 1; - var chunk = lines.slice(from, to); - if (to > l) { - delta.lines = chunk; - delta.start.row = row + from; - delta.start.column = column; - break; - } - chunk.push(""); - this.applyDelta({ - start: this.pos(row + from, column), - end: this.pos(row + to, column = 0), - action: delta.action, - lines: chunk - }, true); - } while(true); - }; - this.revertDelta = function(delta) { - this.applyDelta({ - start: this.clonePos(delta.start), - end: this.clonePos(delta.end), - action: (delta.action == "insert" ? "remove" : "insert"), - lines: delta.lines.slice() - }); - }; - this.indexToPosition = function(index, startRow) { - var lines = this.$lines || this.getAllLines(); - var newlineLength = this.getNewLineCharacter().length; - for (var i = startRow || 0, l = lines.length; i < l; i++) { - index -= lines[i].length + newlineLength; - if (index < 0) - return {row: i, column: index + lines[i].length + newlineLength}; - } - return {row: l-1, column: lines[l-1].length}; - }; - this.positionToIndex = function(pos, startRow) { - var lines = this.$lines || this.getAllLines(); - var newlineLength = this.getNewLineCharacter().length; - var index = 0; - var row = Math.min(pos.row, lines.length); - for (var i = startRow || 0; i < row; ++i) - index += lines[i].length + newlineLength; - - return index + pos.column; - }; - -}).call(Document.prototype); - -exports.Document = Document; -}); - -ace.define("ace/lib/lang",["require","exports","module"], function(require, exports, module) { -"use strict"; - -exports.last = function(a) { - return a[a.length - 1]; -}; - -exports.stringReverse = function(string) { - return string.split("").reverse().join(""); -}; - -exports.stringRepeat = function (string, count) { - var result = ''; - while (count > 0) { - if (count & 1) - result += string; - - if (count >>= 1) - string += string; - } - return result; -}; - -var trimBeginRegexp = /^\s\s*/; -var trimEndRegexp = /\s\s*$/; - -exports.stringTrimLeft = function (string) { - return string.replace(trimBeginRegexp, ''); -}; - -exports.stringTrimRight = function (string) { - return string.replace(trimEndRegexp, ''); -}; - -exports.copyObject = function(obj) { - var copy = {}; - for (var key in obj) { - copy[key] = obj[key]; - } - return copy; -}; - -exports.copyArray = function(array){ - var copy = []; - for (var i=0, l=array.length; i0;)1&t&&(n+=e),t>>>=1,e+=e;return n},e.compact=function(e){var t,n,i,r;for(r=[],t=0,i=e.length;i>t;t++)n=e[t],n&&r.push(n);return r},e.count=function(e,t){var n,i;if(n=i=0,!t.length)return 1/0;for(;i=1+e.indexOf(t,i);)n++;return n},e.merge=function(e,t){return n(n({},e),t)},n=e.extend=function(e,t){var n,i;for(n in t)i=t[n],e[n]=i;return e},e.flatten=i=function(e){var t,n,r,s;for(n=[],r=0,s=e.length;s>r;r++)t=e[r],t instanceof Array?n=n.concat(i(t)):n.push(t);return n},e.del=function(e,t){var n;return n=e[t],delete e[t],n},e.some=null!=(r=Array.prototype.some)?r:function(e){var t,n,i;for(n=0,i=this.length;i>n;n++)if(t=this[n],e(t))return!0;return!1},e.invertLiterate=function(e){var t,n,i;return i=!0,n=function(){var n,r,s,o;for(s=e.split("\n"),o=[],n=0,r=s.length;r>n;n++)t=s[n],i&&/^([ ]{4}|[ ]{0,3}\t)/.test(t)?o.push(t):(i=/^\s*$/.test(t))?o.push(t):o.push("# "+t);return o}(),n.join("\n")},t=function(e,t){return t?{first_line:e.first_line,first_column:e.first_column,last_line:t.last_line,last_column:t.last_column}:e},e.addLocationDataFn=function(e,n){return function(i){return"object"==typeof i&&i.updateLocationDataIfMissing&&i.updateLocationDataIfMissing(t(e,n)),i}},e.locationDataToString=function(e){var t;return"2"in e&&"first_line"in e[2]?t=e[2]:"first_line"in e&&(t=e),t?t.first_line+1+":"+(t.first_column+1)+"-"+(t.last_line+1+":"+(t.last_column+1)):"No location data"},e.baseFileName=function(e,t,n){var i,r;return null==t&&(t=!1),null==n&&(n=!1),r=n?/\\|\//:/\//,i=e.split(r),e=i[i.length-1],t&&e.indexOf(".")>=0?(i=e.split("."),i.pop(),"coffee"===i[i.length-1]&&i.length>1&&i.pop(),i.join(".")):e},e.isCoffee=function(e){return/\.((lit)?coffee|coffee\.md)$/.test(e)},e.isLiterate=function(e){return/\.(litcoffee|coffee\.md)$/.test(e)},e.throwSyntaxError=function(e,t){var n;throw n=new SyntaxError(e),n.location=t,n.toString=o,n.stack=""+n,n},e.updateSyntaxError=function(e,t,n){return e.toString===o&&(e.code||(e.code=t),e.filename||(e.filename=n),e.stack=""+e),e},o=function(){var e,t,n,i,r,o,a,c,h,l,u,p,d,f,m;return this.code&&this.location?(u=this.location,a=u.first_line,o=u.first_column,h=u.last_line,c=u.last_column,null==h&&(h=a),null==c&&(c=o),r=this.filename||"[stdin]",e=this.code.split("\n")[a],m=o,i=a===h?c+1:e.length,l=e.slice(0,m).replace(/[^\s]/g," ")+s("^",i-m),"undefined"!=typeof process&&null!==process&&(n=(null!=(p=process.stdout)?p.isTTY:void 0)&&!(null!=(d=process.env)?d.NODE_DISABLE_COLORS:void 0)),(null!=(f=this.colorful)?f:n)&&(t=function(e){return""+e+""},e=e.slice(0,m)+t(e.slice(m,i))+e.slice(i),l=t(l)),r+":"+(a+1)+":"+(o+1)+": error: "+this.message+"\n"+e+"\n"+l):Error.prototype.toString.call(this)},e.nameWhitespaceCharacter=function(e){switch(e){case" ":return"space";case"\n":return"newline";case"\r":return"carriage return";case" ":return"tab";default:return e}}}.call(this),t.exports}(),_dereq_["./rewriter"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},w=[].slice;for(f=function(e,t,n){var i;return i=[e,t],i.generated=!0,n&&(i.origin=n),i},e.Rewriter=function(){function e(){}return e.prototype.rewrite=function(e){return this.tokens=e,this.removeLeadingNewlines(),this.closeOpenCalls(),this.closeOpenIndexes(),this.normalizeLines(),this.tagPostfixConditionals(),this.addImplicitBracesAndParens(),this.addLocationDataToGeneratedTokens(),this.tokens},e.prototype.scanTokens=function(e){var t,n,i;for(i=this.tokens,t=0;n=i[t];)t+=e.call(this,n,t,i);return!0},e.prototype.detectEnd=function(e,t,n){var i,o,a,c,h;for(h=this.tokens,i=0;c=h[e];){if(0===i&&t.call(this,c,e))return n.call(this,c,e);if(!c||0>i)return n.call(this,c,e-1);o=c[0],k.call(s,o)>=0?i+=1:(a=c[0],k.call(r,a)>=0&&(i-=1)),e+=1}return e-1},e.prototype.removeLeadingNewlines=function(){var e,t,n,i,r;for(i=this.tokens,e=t=0,n=i.length;n>t&&(r=i[e][0],"TERMINATOR"===r);e=++t);return e?this.tokens.splice(0,e):void 0},e.prototype.closeOpenCalls=function(){var e,t;return t=function(e,t){var n;return")"===(n=e[0])||"CALL_END"===n||"OUTDENT"===e[0]&&")"===this.tag(t-1)},e=function(e,t){return this.tokens["OUTDENT"===e[0]?t-1:t][0]="CALL_END"},this.scanTokens(function(n,i){return"CALL_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.closeOpenIndexes=function(){var e,t;return t=function(e){var t;return"]"===(t=e[0])||"INDEX_END"===t},e=function(e){return e[0]="INDEX_END"},this.scanTokens(function(n,i){return"INDEX_START"===n[0]&&this.detectEnd(i+1,t,e),1})},e.prototype.indexOfTag=function(){var e,t,n,i,r,s,o;for(t=arguments[0],r=arguments.length>=2?w.call(arguments,1):[],e=0,n=i=0,s=r.length;s>=0?s>i:i>s;n=s>=0?++i:--i){for(;"HERECOMMENT"===this.tag(t+n+e);)e+=2;if(null!=r[n]&&("string"==typeof r[n]&&(r[n]=[r[n]]),o=this.tag(t+n+e),0>k.call(r[n],o)))return-1}return t+n+e-1},e.prototype.looksObjectish=function(e){var t,n;return this.indexOfTag(e,"@",null,":")>-1||this.indexOfTag(e,null,":")>-1?!0:(n=this.indexOfTag(e,s),n>-1&&(t=null,this.detectEnd(n+1,function(e){var t;return t=e[0],k.call(r,t)>=0},function(e,n){return t=n}),":"===this.tag(t+1))?!0:!1)},e.prototype.findTagsBackwards=function(e,t){var n,i,o,a,c,h,l;for(n=[];e>=0&&(n.length||(a=this.tag(e),0>k.call(t,a)&&(c=this.tag(e),0>k.call(s,c)||this.tokens[e].generated)&&(h=this.tag(e),0>k.call(u,h))));)i=this.tag(e),k.call(r,i)>=0&&n.push(this.tag(e)),o=this.tag(e),k.call(s,o)>=0&&n.length&&n.pop(),e-=1;return l=this.tag(e),k.call(t,l)>=0},e.prototype.addImplicitBracesAndParens=function(){var e,t;return e=[],t=null,this.scanTokens(function(i,l,p){var d,m,g,v,y,b,w,T,C,E,F,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U;if(U=i[0],F=(N=l>0?p[l-1]:[])[0],C=(p.length-1>l?p[l+1]:[])[0],j=function(){return e[e.length-1]},M=l,g=function(e){return l-M+e},v=function(){var e,t;return null!=(e=j())?null!=(t=e[2])?t.ours:void 0:void 0},y=function(){var e;return v()&&"("===(null!=(e=j())?e[0]:void 0)},w=function(){var e;return v()&&"{"===(null!=(e=j())?e[0]:void 0)},b=function(){var e;return v&&"CONTROL"===(null!=(e=j())?e[0]:void 0)},B=function(t){var n;return n=null!=t?t:l,e.push(["(",n,{ours:!0}]),p.splice(n,0,f("CALL_START","(")),null==t?l+=1:void 0},d=function(){return e.pop(),p.splice(l,0,f("CALL_END",")",["","end of input",i[2]])),l+=1},V=function(t,n){var r,s;return null==n&&(n=!0),r=null!=t?t:l,e.push(["{",r,{sameLine:!0,startsLine:n,ours:!0}]),s=new String("{"),s.generated=!0,p.splice(r,0,f("{",s,i)),null==t?l+=1:void 0},m=function(t){return t=null!=t?t:l,e.pop(),p.splice(t,0,f("}","}",i)),l+=1},y()&&("IF"===U||"TRY"===U||"FINALLY"===U||"CATCH"===U||"CLASS"===U||"SWITCH"===U))return e.push(["CONTROL",l,{ours:!0}]),g(1);if("INDENT"===U&&v()){if("=>"!==F&&"->"!==F&&"["!==F&&"("!==F&&","!==F&&"{"!==F&&"TRY"!==F&&"ELSE"!==F&&"="!==F)for(;y();)d();return b()&&e.pop(),e.push([U,l]),g(1)}if(k.call(s,U)>=0)return e.push([U,l]),g(1);if(k.call(r,U)>=0){for(;v();)y()?d():w()?m():e.pop();t=e.pop()}if((k.call(c,U)>=0&&i.spaced||"?"===U&&l>0&&!p[l-1].spaced)&&(k.call(o,C)>=0||k.call(h,C)>=0&&!(null!=(L=p[l+1])?L.spaced:void 0)&&!(null!=(x=p[l+1])?x.newLine:void 0)))return"?"===U&&(U=i[0]="FUNC_EXIST"),B(l+1),g(2);if(k.call(c,U)>=0&&this.indexOfTag(l+1,"INDENT")>-1&&this.looksObjectish(l+2)&&!this.findTagsBackwards(l,["CLASS","EXTENDS","IF","CATCH","SWITCH","LEADING_WHEN","FOR","WHILE","UNTIL"]))return B(l+1),e.push(["INDENT",l+2]),g(3);if(":"===U){for(I=function(){var e;switch(!1){case e=this.tag(l-1),0>k.call(r,e):return t[1];case"@"!==this.tag(l-2):return l-2;default:return l-1}}.call(this);"HERECOMMENT"===this.tag(I-2);)I-=2;return this.insideForDeclaration="FOR"===C,P=0===I||(S=this.tag(I-1),k.call(u,S)>=0)||p[I-1].newLine,j()&&(D=j(),$=D[0],O=D[1],("{"===$||"INDENT"===$&&"{"===this.tag(O-1))&&(P||","===this.tag(I-1)||"{"===this.tag(I-1)))?g(1):(V(I,!!P),g(2))}if(w()&&k.call(u,U)>=0&&(j()[2].sameLine=!1),T="OUTDENT"===F||N.newLine,k.call(a,U)>=0||k.call(n,U)>=0&&T)for(;v();)if(R=j(),$=R[0],O=R[1],A=R[2],_=A.sameLine,P=A.startsLine,y()&&","!==F)d();else if(w()&&!this.insideForDeclaration&&_&&"TERMINATOR"!==U&&":"!==F)m();else{if(!w()||"TERMINATOR"!==U||","===F||P&&this.looksObjectish(l+1))break;if("HERECOMMENT"===C)return g(1);m()}if(!(","!==U||this.looksObjectish(l+1)||!w()||this.insideForDeclaration||"TERMINATOR"===C&&this.looksObjectish(l+2)))for(E="OUTDENT"===C?1:0;w();)m(l+E);return g(1)})},e.prototype.addLocationDataToGeneratedTokens=function(){return this.scanTokens(function(e,t,n){var i,r,s,o,a,c;return e[2]?1:e.generated||e.explicit?("{"===e[0]&&(s=null!=(a=n[t+1])?a[2]:void 0)?(r=s.first_line,i=s.first_column):(o=null!=(c=n[t-1])?c[2]:void 0)?(r=o.last_line,i=o.last_column):r=i=0,e[2]={first_line:r,first_column:i,last_line:r,last_column:i},1):1})},e.prototype.normalizeLines=function(){var e,t,r,s,o;return o=r=s=null,t=function(e,t){var r,s,a,c;return";"!==e[1]&&(r=e[0],k.call(p,r)>=0)&&!("TERMINATOR"===e[0]&&(s=this.tag(t+1),k.call(i,s)>=0))&&!("ELSE"===e[0]&&"THEN"!==o)&&!!("CATCH"!==(a=e[0])&&"FINALLY"!==a||"->"!==o&&"=>"!==o)||(c=e[0],k.call(n,c)>=0&&this.tokens[t-1].newLine)},e=function(e,t){return this.tokens.splice(","===this.tag(t-1)?t-1:t,0,s)},this.scanTokens(function(n,a,c){var h,l,u,p,f,m;if(m=n[0],"TERMINATOR"===m){if("ELSE"===this.tag(a+1)&&"OUTDENT"!==this.tag(a-1))return c.splice.apply(c,[a,1].concat(w.call(this.indentation()))),1;if(u=this.tag(a+1),k.call(i,u)>=0)return c.splice(a,1),0}if("CATCH"===m)for(h=l=1;2>=l;h=++l)if("OUTDENT"===(p=this.tag(a+h))||"TERMINATOR"===p||"FINALLY"===p)return c.splice.apply(c,[a+h,0].concat(w.call(this.indentation()))),2+h;return k.call(d,m)>=0&&"INDENT"!==this.tag(a+1)&&("ELSE"!==m||"IF"!==this.tag(a+1))?(o=m,f=this.indentation(c[a]),r=f[0],s=f[1],"THEN"===o&&(r.fromThen=!0),c.splice(a+1,0,r),this.detectEnd(a+2,t,e),"THEN"===m&&c.splice(a,1),1):1})},e.prototype.tagPostfixConditionals=function(){var e,t,n;return n=null,t=function(e,t){var n,i;return i=e[0],n=this.tokens[t-1][0],"TERMINATOR"===i||"INDENT"===i&&0>k.call(d,n)},e=function(e){return"INDENT"!==e[0]||e.generated&&!e.fromThen?n[0]="POST_"+n[0]:void 0},this.scanTokens(function(i,r){return"IF"!==i[0]?1:(n=i,this.detectEnd(r+1,t,e),1)})},e.prototype.indentation=function(e){var t,n;return t=["INDENT",2],n=["OUTDENT",2],e?(t.generated=n.generated=!0,t.origin=n.origin=e):t.explicit=n.explicit=!0,[t,n]},e.prototype.generate=f,e.prototype.tag=function(e){var t;return null!=(t=this.tokens[e])?t[0]:void 0},e}(),t=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"],["STRING_START","STRING_END"],["REGEX_START","REGEX_END"]],e.INVERSES=l={},s=[],r=[],m=0,v=t.length;v>m;m++)y=t[m],g=y[0],b=y[1],s.push(l[b]=g),r.push(l[g]=b);i=["CATCH","THEN","ELSE","FINALLY"].concat(r),c=["IDENTIFIER","SUPER",")","CALL_END","]","INDEX_END","@","THIS"],o=["IDENTIFIER","NUMBER","STRING","STRING_START","JS","REGEX","REGEX_START","NEW","PARAM_START","CLASS","IF","TRY","SWITCH","THIS","BOOL","NULL","UNDEFINED","UNARY","YIELD","UNARY_MATH","SUPER","THROW","@","->","=>","[","(","{","--","++"],h=["+","-"],a=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],d=["ELSE","->","=>","TRY","FINALLY","THEN"],p=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],u=["TERMINATOR","INDENT","OUTDENT"],n=[".","?.","::","?::"]}.call(this),t.exports}(),_dereq_["./lexer"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b,k,w,T,C,E,F,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U,G,H,q,X,W,Y,K,z,J,Q,Z,et,tt,nt,it,rt,st,ot,at,ct,ht,lt,ut=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};ot=_dereq_("./rewriter"),P=ot.Rewriter,w=ot.INVERSES,at=_dereq_("./helpers"),nt=at.count,ht=at.starts,tt=at.compact,ct=at.repeat,it=at.invertLiterate,st=at.locationDataToString,lt=at.throwSyntaxError,e.Lexer=S=function(){function e(){}return e.prototype.tokenize=function(e,t){var n,i,r,s;for(null==t&&(t={}),this.literate=t.literate,this.indent=0,this.baseIndent=0,this.indebt=0,this.outdebt=0,this.indents=[],this.ends=[],this.tokens=[],this.chunkLine=t.line||0,this.chunkColumn=t.column||0,e=this.clean(e),r=0;this.chunk=e.slice(r);)if(n=this.identifierToken()||this.commentToken()||this.whitespaceToken()||this.lineToken()||this.stringToken()||this.numberToken()||this.regexToken()||this.jsToken()||this.literalToken(),s=this.getLineAndColumnFromChunk(n),this.chunkLine=s[0],this.chunkColumn=s[1],r+=n,t.untilBalanced&&0===this.ends.length)return{tokens:this.tokens,index:r};return this.closeIndentation(),(i=this.ends.pop())&&this.error("missing "+i.tag,i.origin[2]),t.rewrite===!1?this.tokens:(new P).rewrite(this.tokens)},e.prototype.clean=function(e){return e.charCodeAt(0)===t&&(e=e.slice(1)),e=e.replace(/\r/g,"").replace(z,""),et.test(e)&&(e="\n"+e,this.chunkLine--),this.literate&&(e=it(e)),e},e.prototype.identifierToken=function(){var e,t,n,i,r,c,h,l,u,p,d,f,m,g,y,b;return(l=v.exec(this.chunk))?(h=l[0],r=l[1],t=l[2],c=r.length,u=void 0,"own"===r&&"FOR"===this.tag()?(this.token("OWN",r),r.length):"from"===r&&"YIELD"===this.tag()?(this.token("FROM",r),r.length):(d=this.tokens,p=d[d.length-1],i=t||null!=p&&("."===(f=p[0])||"?."===f||"::"===f||"?::"===f||!p.spaced&&"@"===p[0]),y="IDENTIFIER",!i&&(ut.call(E,r)>=0||ut.call(a,r)>=0)&&(y=r.toUpperCase(),"WHEN"===y&&(m=this.tag(),ut.call(N,m)>=0)?y="LEADING_WHEN":"FOR"===y?this.seenFor=!0:"UNLESS"===y?y="IF":ut.call(J,y)>=0?y="UNARY":ut.call(B,y)>=0&&("INSTANCEOF"!==y&&this.seenFor?(y="FOR"+y,this.seenFor=!1):(y="RELATION","!"===this.value()&&(u=this.tokens.pop(),r="!"+r)))),ut.call(C,r)>=0&&(i?(y="IDENTIFIER",r=new String(r),r.reserved=!0):ut.call(V,r)>=0&&this.error("reserved word '"+r+"'",{length:r.length})),i||(ut.call(s,r)>=0&&(e=r,r=o[r]),y=function(){switch(r){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":return"BOOL";case"break":case"continue":return"STATEMENT";default:return y}}()),b=this.token(y,r,0,c),e&&(b.origin=[y,e,b[2]]),b.variable=!i,u&&(g=[u[2].first_line,u[2].first_column],b[2].first_line=g[0],b[2].first_column=g[1]),t&&(n=h.lastIndexOf(":"),this.token(":",":",n,t.length)),h.length)):0},e.prototype.numberToken=function(){var e,t,n,i,r;return(n=I.exec(this.chunk))?(i=n[0],t=i.length,/^0[BOX]/.test(i)?this.error("radix prefix in '"+i+"' must be lowercase",{offset:1}):/E/.test(i)&&!/^0x/.test(i)?this.error("exponential notation in '"+i+"' must be indicated with a lowercase 'e'",{offset:i.indexOf("E")}):/^0\d*[89]/.test(i)?this.error("decimal literal '"+i+"' must not be prefixed with '0'",{length:t}):/^0\d+/.test(i)&&this.error("octal literal '"+i+"' must be prefixed with '0o'",{length:t}),(r=/^0o([0-7]+)/.exec(i))&&(i="0x"+parseInt(r[1],8).toString(16)),(e=/^0b([01]+)/.exec(i))&&(i="0x"+parseInt(e[1],2).toString(16)),this.token("NUMBER",i,0,t),t):0},e.prototype.stringToken=function(){var e,t,n,i,r,s,o,a,c,h,l,u,m,g,v,y;if(l=(Y.exec(this.chunk)||[])[0],!l)return 0;if(g=function(){switch(l){case"'":return W;case'"':return q;case"'''":return f;case'"""':return p}}(),s=3===l.length,u=this.matchWithInterpolations(g,l),y=u.tokens,r=u.index,e=y.length-1,n=l.charAt(0),s){for(a=null,i=function(){var e,t,n;for(n=[],o=e=0,t=y.length;t>e;o=++e)v=y[o],"NEOSTRING"===v[0]&&n.push(v[1]);return n}().join("#{}");h=d.exec(i);)t=h[1],(null===a||(m=t.length)>0&&a.length>m)&&(a=t);a&&(c=RegExp("^"+a,"gm")),this.mergeInterpolationTokens(y,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),0===i&&(n=n.replace(F,"")),i===e&&(n=n.replace(K,"")),c&&(n=n.replace(c,"")),n}}(this))}else this.mergeInterpolationTokens(y,{delimiter:n},function(t){return function(n,i){return n=t.formatString(n),n=n.replace(G,function(t,r){return 0===i&&0===r||i===e&&r+t.length===n.length?"":" "})}}(this));return r},e.prototype.commentToken=function(){var e,t,n;return(n=this.chunk.match(c))?(e=n[0],t=n[1],t&&((n=u.exec(e))&&this.error("block comments cannot contain "+n[0],{offset:n.index,length:n[0].length}),t.indexOf("\n")>=0&&(t=t.replace(RegExp("\\n"+ct(" ",this.indent),"g"),"\n")),this.token("HERECOMMENT",t,0,e.length)),e.length):0},e.prototype.jsToken=function(){var e,t;return"`"===this.chunk.charAt(0)&&(e=T.exec(this.chunk))?(this.token("JS",(t=e[0]).slice(1,-1),0,t.length),t.length):0},e.prototype.regexToken=function(){var e,t,n,r,s,o,a,c,h,l,u,p,d;switch(!1){case!(o=M.exec(this.chunk)):this.error("regular expressions cannot begin with "+o[2],{offset:o.index+o[1].length});break;case!(o=this.matchWithInterpolations(m,"///")):d=o.tokens,s=o.index;break;case!(o=$.exec(this.chunk)):if(p=o[0],e=o[1],t=o[2],this.validateEscapes(e,{isRegex:!0,offsetInChunk:1}),s=p.length,h=this.tokens,c=h[h.length-1],c)if(c.spaced&&(l=c[0],ut.call(i,l)>=0)){if(!t||O.test(p))return 0}else if(u=c[0],ut.call(A,u)>=0)return 0;t||this.error("missing / (unclosed regex)");break;default:return 0}switch(r=j.exec(this.chunk.slice(s))[0],n=s+r.length,a=this.makeToken("REGEX",null,0,n),!1){case!!Z.test(r):this.error("invalid regular expression flags "+r,{offset:s,length:r.length});break;case!(p||1===d.length):null==e&&(e=this.formatHeregex(d[0][1])),this.token("REGEX",""+this.makeDelimitedLiteral(e,{delimiter:"/"})+r,0,n,a);break;default:this.token("REGEX_START","(",0,0,a),this.token("IDENTIFIER","RegExp",0,0),this.token("CALL_START","(",0,0),this.mergeInterpolationTokens(d,{delimiter:'"',"double":!0},this.formatHeregex),r&&(this.token(",",",",s,0),this.token("STRING",'"'+r+'"',s,r.length)),this.token(")",")",n,0),this.token("REGEX_END",")",n,0)}return n},e.prototype.lineToken=function(){var e,t,n,i,r;if(!(n=R.exec(this.chunk)))return 0;if(t=n[0],this.seenFor=!1,r=t.length-1-t.lastIndexOf("\n"),i=this.unfinished(),r-this.indebt===this.indent)return i?this.suppressNewlines():this.newlineToken(0),t.length;if(r>this.indent){if(i)return this.indebt=r-this.indent,this.suppressNewlines(),t.length;if(!this.tokens.length)return this.baseIndent=this.indent=r,t.length;e=r-this.indent+this.outdebt,this.token("INDENT",e,t.length-r,r),this.indents.push(e),this.ends.push({tag:"OUTDENT"}),this.outdebt=this.indebt=0,this.indent=r}else this.baseIndent>r?this.error("missing indentation",{offset:t.length}):(this.indebt=0,this.outdentToken(this.indent-r,i,t.length));return t.length},e.prototype.outdentToken=function(e,t,n){var i,r,s,o;for(i=this.indent-e;e>0;)s=this.indents[this.indents.length-1],s?s===this.outdebt?(e-=this.outdebt,this.outdebt=0):this.outdebt>s?(this.outdebt-=s,e-=s):(r=this.indents.pop()+this.outdebt,n&&(o=this.chunk[n],ut.call(y,o)>=0)&&(i-=r-e,e=r),this.outdebt=0,this.pair("OUTDENT"),this.token("OUTDENT",e,0,n),e-=r):e=0;for(r&&(this.outdebt-=e);";"===this.value();)this.tokens.pop();return"TERMINATOR"===this.tag()||t||this.token("TERMINATOR","\n",n,0),this.indent=i,this},e.prototype.whitespaceToken=function(){var e,t,n,i;return(e=et.exec(this.chunk))||(t="\n"===this.chunk.charAt(0))?(i=this.tokens,n=i[i.length-1],n&&(n[e?"spaced":"newLine"]=!0),e?e[0].length:0):0},e.prototype.newlineToken=function(e){for(;";"===this.value();)this.tokens.pop();return"TERMINATOR"!==this.tag()&&this.token("TERMINATOR","\n",e,0),this},e.prototype.suppressNewlines=function(){return"\\"===this.value()&&this.tokens.pop(),this},e.prototype.literalToken=function(){var e,t,n,s,o,a,c,u,p,d;if((e=_.exec(this.chunk))?(d=e[0],r.test(d)&&this.tagParameters()):d=this.chunk.charAt(0),u=d,n=this.tokens,t=n[n.length-1],"="===d&&t&&(!t[1].reserved&&(s=t[1],ut.call(C,s)>=0)&&(t.origin&&(t=t.origin),this.error("reserved word '"+t[1]+"' can't be assigned",t[2])),"||"===(o=t[1])||"&&"===o))return t[0]="COMPOUND_ASSIGN",t[1]+="=",d.length;if(";"===d)this.seenFor=!1,u="TERMINATOR";else if(ut.call(D,d)>=0)u="MATH";else if(ut.call(h,d)>=0)u="COMPARE";else if(ut.call(l,d)>=0)u="COMPOUND_ASSIGN";else if(ut.call(J,d)>=0)u="UNARY";else if(ut.call(Q,d)>=0)u="UNARY_MATH";else if(ut.call(U,d)>=0)u="SHIFT";else if(ut.call(x,d)>=0||"?"===d&&(null!=t?t.spaced:void 0))u="LOGIC";else if(t&&!t.spaced)if("("===d&&(a=t[0],ut.call(i,a)>=0))"?"===t[0]&&(t[0]="FUNC_EXIST"),u="CALL_START";else if("["===d&&(c=t[0],ut.call(b,c)>=0))switch(u="INDEX_START",t[0]){case"?":t[0]="INDEX_SOAK"}switch(p=this.makeToken(u,d),d){case"(":case"{":case"[":this.ends.push({tag:w[d],origin:p});break;case")":case"}":case"]":this.pair(d)}return this.tokens.push(p),d.length},e.prototype.tagParameters=function(){var e,t,n,i;if(")"!==this.tag())return this;for(t=[],i=this.tokens,e=i.length,i[--e][0]="PARAM_END";n=i[--e];)switch(n[0]){case")":t.push(n);break;case"(":case"CALL_START":if(!t.length)return"("===n[0]?(n[0]="PARAM_START",this):this;t.pop()}return this},e.prototype.closeIndentation=function(){return this.outdentToken(this.indent)},e.prototype.matchWithInterpolations=function(t,n){var i,r,s,o,a,c,h,l,u,p,d,f,m,g,v;if(v=[],l=n.length,this.chunk.slice(0,l)!==n)return null;for(m=this.chunk.slice(l);;){if(g=t.exec(m)[0],this.validateEscapes(g,{isRegex:"/"===n.charAt(0),offsetInChunk:l}),v.push(this.makeToken("NEOSTRING",g,l)),m=m.slice(g.length),l+=g.length,"#{"!==m.slice(0,2))break;p=this.getLineAndColumnFromChunk(l+1),c=p[0],r=p[1],d=(new e).tokenize(m.slice(1),{line:c,column:r,untilBalanced:!0}),h=d.tokens,o=d.index,o+=1,u=h[0],i=h[h.length-1],u[0]=u[1]="(",i[0]=i[1]=")",i.origin=["","end of interpolation",i[2]],"TERMINATOR"===(null!=(f=h[1])?f[0]:void 0)&&h.splice(1,1),v.push(["TOKENS",h]),m=m.slice(o),l+=o}return m.slice(0,n.length)!==n&&this.error("missing "+n,{length:n.length}),s=v[0],a=v[v.length-1],s[2].first_column-=n.length,a[2].last_column+=n.length,0===a[1].length&&(a[2].last_column-=1),{tokens:v,index:l+n.length}},e.prototype.mergeInterpolationTokens=function(e,t,n){var i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y;for(e.length>1&&(u=this.token("STRING_START","(",0,0)),s=this.tokens.length,o=a=0,h=e.length;h>a;o=++a){switch(g=e[o],m=g[0],y=g[1],m){case"TOKENS":if(2===y.length)continue;l=y[0],v=y;break;case"NEOSTRING":if(i=n(g[1],o),0===i.length){if(0!==o)continue;r=this.tokens.length}2===o&&null!=r&&this.tokens.splice(r,2),g[0]="STRING",g[1]=this.makeDelimitedLiteral(i,t),l=g,v=[g]}this.tokens.length>s&&(p=this.token("+","+"),p[2]={first_line:l[2].first_line,first_column:l[2].first_column,last_line:l[2].first_line,last_column:l[2].first_column}),(d=this.tokens).push.apply(d,v)}return u?(c=e[e.length-1],u.origin=["STRING",null,{first_line:u[2].first_line,first_column:u[2].first_column,last_line:c[2].last_line,last_column:c[2].last_column}],f=this.token("STRING_END",")"),f[2]={first_line:c[2].last_line,first_column:c[2].last_column,last_line:c[2].last_line,last_column:c[2].last_column}):void 0},e.prototype.pair=function(e){var t,n,i,r,s;return i=this.ends,n=i[i.length-1],e!==(s=null!=n?n.tag:void 0)?("OUTDENT"!==s&&this.error("unmatched "+e),r=this.indents,t=r[r.length-1],this.outdentToken(t,!0),this.pair(e)):this.ends.pop()},e.prototype.getLineAndColumnFromChunk=function(e){var t,n,i,r,s;return 0===e?[this.chunkLine,this.chunkColumn]:(s=e>=this.chunk.length?this.chunk:this.chunk.slice(0,+(e-1)+1||9e9),i=nt(s,"\n"),t=this.chunkColumn,i>0?(r=s.split("\n"),n=r[r.length-1],t=n.length):t+=s.length,[this.chunkLine+i,t])},e.prototype.makeToken=function(e,t,n,i){var r,s,o,a,c;return null==n&&(n=0),null==i&&(i=t.length),s={},o=this.getLineAndColumnFromChunk(n),s.first_line=o[0],s.first_column=o[1],r=Math.max(0,i-1),a=this.getLineAndColumnFromChunk(n+r),s.last_line=a[0],s.last_column=a[1],c=[e,t,s]},e.prototype.token=function(e,t,n,i,r){var s;return s=this.makeToken(e,t,n,i),r&&(s.origin=r),this.tokens.push(s),s},e.prototype.tag=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[0]:void 0},e.prototype.value=function(){var e,t;return e=this.tokens,t=e[e.length-1],null!=t?t[1]:void 0},e.prototype.unfinished=function(){var e;return L.test(this.chunk)||"\\"===(e=this.tag())||"."===e||"?."===e||"?::"===e||"UNARY"===e||"MATH"===e||"UNARY_MATH"===e||"+"===e||"-"===e||"YIELD"===e||"**"===e||"SHIFT"===e||"RELATION"===e||"COMPARE"===e||"LOGIC"===e||"THROW"===e||"EXTENDS"===e},e.prototype.formatString=function(e){return e.replace(X,"$1")},e.prototype.formatHeregex=function(e){return e.replace(g,"$1$2")},e.prototype.validateEscapes=function(e,t){var n,i,r,s,o,a,c,h;return null==t&&(t={}),s=k.exec(e),!s||(s[0],n=s[1],a=s[2],i=s[3],h=s[4],t.isRegex&&a&&"0"!==a.charAt(0))?void 0:(o=a?"octal escape sequences are not allowed":"invalid escape sequence",r="\\"+(a||i||h),this.error(o+" "+r,{offset:(null!=(c=t.offsetInChunk)?c:0)+s.index+n.length,length:r.length}))},e.prototype.makeDelimitedLiteral=function(e,t){var n;return null==t&&(t={}),""===e&&"/"===t.delimiter&&(e="(?:)"),n=RegExp("(\\\\\\\\)|(\\\\0(?=[1-7]))|\\\\?("+t.delimiter+")|\\\\?(?:(\\n)|(\\r)|(\\u2028)|(\\u2029))|(\\\\.)","g"),e=e.replace(n,function(e,n,i,r,s,o,a,c,h){switch(!1){case!n:return t.double?n+n:n;case!i:return"\\x00";case!r:return"\\"+r;case!s:return"\\n";case!o:return"\\r";case!a:return"\\u2028";case!c:return"\\u2029";case!h:return t.double?"\\"+h:h}}),""+t.delimiter+e+t.delimiter},e.prototype.error=function(e,t){var n,i,r,s,o,a;return null==t&&(t={}),r="first_line"in t?t:(o=this.getLineAndColumnFromChunk(null!=(s=t.offset)?s:0),i=o[0],n=o[1],o,{first_line:i,first_column:n,last_column:n+(null!=(a=t.length)?a:1)-1}),lt(e,r)},e}(),E=["true","false","null","this","new","delete","typeof","in","instanceof","return","throw","break","continue","debugger","yield","if","else","switch","for","while","do","try","catch","finally","class","extends","super"],a=["undefined","then","unless","until","loop","of","by","when"],o={and:"&&",or:"||",is:"==",isnt:"!=",not:"!",yes:"true",no:"false",on:"true",off:"false"},s=function(){var e;e=[];for(rt in o)e.push(rt);return e}(),a=a.concat(s),V=["case","default","function","var","void","with","const","let","enum","export","import","native","implements","interface","package","private","protected","public","static"],H=["arguments","eval","yield*"],C=E.concat(V).concat(H),e.RESERVED=V.concat(E).concat(a).concat(H),e.STRICT_PROSCRIBED=H,t=65279,v=/^(?!\d)((?:(?!\s)[$\w\x7f-\uffff])+)([^\n\S]*:(?!:))?/,I=/^0b[01]+|^0o[0-7]+|^0x[\da-f]+|^\d*\.?\d+(?:e[+-]?\d+)?/i,_=/^(?:[-=]>|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>*\/%])\2=?|\?(\.|::)|\.{2,3})/,et=/^[^\n\S]+/,c=/^###([^#][\s\S]*?)(?:###[^\n\S]*|###$)|^(?:\s*#(?!##[^#]).*)+/,r=/^[-=]>/,R=/^(?:\n[^\n\S]*)+/,T=/^`[^\\`]*(?:\\.[^\\`]*)*`/,Y=/^(?:'''|"""|'|")/,W=/^(?:[^\\']|\\[\s\S])*/,q=/^(?:[^\\"#]|\\[\s\S]|\#(?!\{))*/,f=/^(?:[^\\']|\\[\s\S]|'(?!''))*/,p=/^(?:[^\\"#]|\\[\s\S]|"(?!"")|\#(?!\{))*/,X=/((?:\\\\)+)|\\[^\S\n]*\n\s*/g,G=/\s*\n\s*/g,d=/\n+([^\n\S]*)(?=\S)/g,$=/^\/(?!\/)((?:[^[\/\n\\]|\\[^\n]|\[(?:\\[^\n]|[^\]\n\\])*\])*)(\/)?/,j=/^\w*/,Z=/^(?!.*(.).*\1)[imgy]*$/,m=/^(?:[^\\\/#]|\\[\s\S]|\/(?!\/\/)|\#(?!\{))*/,g=/((?:\\\\)+)|\\(\s)|\s+(?:#.*)?/g,M=/^(\/|\/{3}\s*)(\*)/,O=/^\/=?\s/,u=/\*\//,L=/^\s*(?:,|\??\.(?![.\d])|::)/,k=/((?:^|[^\\])(?:\\\\)*)\\(?:(0[0-7]|[1-7])|(x(?![\da-fA-F]{2}).{0,2})|(u(?![\da-fA-F]{4}).{0,4}))/,F=/^[^\n\S]*\n/,K=/\n[^\n\S]*$/,z=/\s+$/,l=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|=","**=","//=","%%="],J=["NEW","TYPEOF","DELETE","DO"],Q=["!","~"],x=["&&","||","&","|","^"],U=["<<",">>",">>>"],h=["==","!=","<",">","<=",">="],D=["*","/","%","//","%%"],B=["IN","OF","INSTANCEOF"],n=["TRUE","FALSE"],i=["IDENTIFIER",")","]","?","@","THIS","SUPER"],b=i.concat(["NUMBER","STRING","STRING_END","REGEX","REGEX_END","BOOL","NULL","UNDEFINED","}","::"]),A=b.concat(["++","--"]),N=["INDENT","OUTDENT","TERMINATOR"],y=[")","}","]"]}.call(this),t.exports}(),_dereq_["./parser"]=function(){var e={},t={exports:e},n=function(){function e(){this.yy={}}var t=function(e,t,n,i){for(n=n||{},i=e.length;i--;n[e[i]]=t);return n},n=[1,20],i=[1,75],r=[1,71],s=[1,76],o=[1,77],a=[1,73],c=[1,74],h=[1,50],l=[1,52],u=[1,53],p=[1,54],d=[1,55],f=[1,45],m=[1,46],g=[1,27],v=[1,60],y=[1,61],b=[1,70],k=[1,43],w=[1,26],T=[1,58],C=[1,59],E=[1,57],F=[1,38],N=[1,44],L=[1,56],x=[1,65],S=[1,66],D=[1,67],R=[1,68],A=[1,42],I=[1,64],_=[1,29],O=[1,30],$=[1,31],j=[1,32],M=[1,33],B=[1,34],V=[1,35],P=[1,78],U=[1,6,26,34,108],G=[1,88],H=[1,81],q=[1,80],X=[1,79],W=[1,82],Y=[1,83],K=[1,84],z=[1,85],J=[1,86],Q=[1,87],Z=[1,91],et=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],tt=[1,97],nt=[1,98],it=[1,99],rt=[1,100],st=[1,102],ot=[1,103],at=[1,96],ct=[2,112],ht=[1,6,25,26,34,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],lt=[2,79],ut=[1,108],pt=[2,58],dt=[1,112],ft=[1,117],mt=[1,118],gt=[1,120],vt=[1,6,25,26,34,46,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],yt=[2,76],bt=[1,6,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],kt=[1,155],wt=[1,157],Tt=[1,152],Ct=[1,6,25,26,34,46,55,60,63,72,73,74,75,77,79,80,84,86,90,91,92,97,99,108,110,111,112,116,117,132,135,136,139,140,141,142,143,144,145,146,147,148],Et=[2,95],Ft=[1,6,25,26,34,49,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],Nt=[1,6,25,26,34,46,49,55,60,63,72,73,74,75,77,79,80,84,86,90,91,92,97,99,108,110,111,112,116,117,123,124,132,135,136,139,140,141,142,143,144,145,146,147,148],Lt=[1,206],xt=[1,205],St=[1,6,25,26,34,38,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],Dt=[2,56],Rt=[1,216],At=[6,25,26,55,60],It=[6,25,26,46,55,60,63],_t=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,142,144,145,146,147],Ot=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132],$t=[72,73,74,75,77,80,90,91],jt=[1,235],Mt=[2,133],Bt=[1,6,25,26,34,46,55,60,63,72,73,74,75,77,79,80,84,90,91,92,97,99,108,110,111,112,116,117,123,124,132,135,136,141,142,143,144,145,146,147],Vt=[1,244],Pt=[6,25,26,60,92,97],Ut=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,117,132],Gt=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,111,117,132],Ht=[123,124],qt=[60,123,124],Xt=[1,255],Wt=[6,25,26,60,84],Yt=[6,25,26,49,60,84],Kt=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,144,145,146,147],zt=[11,28,30,32,33,36,37,40,41,42,43,44,51,52,53,57,58,79,82,85,89,94,95,96,102,106,107,110,112,114,116,125,131,133,134,135,136,137,139,140],Jt=[2,122],Qt=[6,25,26],Zt=[2,57],en=[1,268],tn=[1,269],nn=[1,6,25,26,34,55,60,63,79,84,92,97,99,104,105,108,110,111,112,116,117,127,129,132,135,136,141,142,143,144,145,146,147],rn=[26,127,129],sn=[1,6,26,34,55,60,63,79,84,92,97,99,108,111,117,132],on=[2,71],an=[1,291],cn=[1,292],hn=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,127,132,135,136,141,142,143,144,145,146,147],ln=[1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,112,116,117,132],un=[1,303],pn=[1,304],dn=[6,25,26,60],fn=[1,6,25,26,34,55,60,63,79,84,92,97,99,104,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],mn=[25,60],gn={trace:function(){},yy:{},symbols_:{error:2,Root:3,Body:4,Line:5,TERMINATOR:6,Expression:7,Statement:8,Return:9,Comment:10,STATEMENT:11,Value:12,Invocation:13,Code:14,Operation:15,Assign:16,If:17,Try:18,While:19,For:20,Switch:21,Class:22,Throw:23,Block:24,INDENT:25,OUTDENT:26,Identifier:27,IDENTIFIER:28,AlphaNumeric:29,NUMBER:30,String:31,STRING:32,STRING_START:33,STRING_END:34,Regex:35,REGEX:36,REGEX_START:37,REGEX_END:38,Literal:39,JS:40,DEBUGGER:41,UNDEFINED:42,NULL:43,BOOL:44,Assignable:45,"=":46,AssignObj:47,ObjAssignable:48,":":49,ThisProperty:50,RETURN:51,HERECOMMENT:52,PARAM_START:53,ParamList:54,PARAM_END:55,FuncGlyph:56,"->":57,"=>":58,OptComma:59,",":60,Param:61,ParamVar:62,"...":63,Array:64,Object:65,Splat:66,SimpleAssignable:67,Accessor:68,Parenthetical:69,Range:70,This:71,".":72,"?.":73,"::":74,"?::":75,Index:76,INDEX_START:77,IndexValue:78,INDEX_END:79,INDEX_SOAK:80,Slice:81,"{":82,AssignList:83,"}":84,CLASS:85,EXTENDS:86,OptFuncExist:87,Arguments:88,SUPER:89,FUNC_EXIST:90,CALL_START:91,CALL_END:92,ArgList:93,THIS:94,"@":95,"[":96,"]":97,RangeDots:98,"..":99,Arg:100,SimpleArgs:101,TRY:102,Catch:103,FINALLY:104,CATCH:105,THROW:106,"(":107,")":108,WhileSource:109,WHILE:110,WHEN:111,UNTIL:112,Loop:113,LOOP:114,ForBody:115,FOR:116,BY:117,ForStart:118,ForSource:119,ForVariables:120,OWN:121,ForValue:122,FORIN:123,FOROF:124,SWITCH:125,Whens:126,ELSE:127,When:128,LEADING_WHEN:129,IfBlock:130,IF:131,POST_IF:132,UNARY:133,UNARY_MATH:134,"-":135,"+":136,YIELD:137,FROM:138,"--":139,"++":140,"?":141,MATH:142,"**":143,SHIFT:144,COMPARE:145,LOGIC:146,RELATION:147,COMPOUND_ASSIGN:148,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",11:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",32:"STRING",33:"STRING_START",34:"STRING_END",36:"REGEX",37:"REGEX_START",38:"REGEX_END",40:"JS",41:"DEBUGGER",42:"UNDEFINED",43:"NULL",44:"BOOL",46:"=",49:":",51:"RETURN",52:"HERECOMMENT",53:"PARAM_START",55:"PARAM_END",57:"->",58:"=>",60:",",63:"...",72:".",73:"?.",74:"::",75:"?::",77:"INDEX_START",79:"INDEX_END",80:"INDEX_SOAK",82:"{",84:"}",85:"CLASS",86:"EXTENDS",89:"SUPER",90:"FUNC_EXIST",91:"CALL_START",92:"CALL_END",94:"THIS",95:"@",96:"[",97:"]",99:"..",102:"TRY",104:"FINALLY",105:"CATCH",106:"THROW",107:"(",108:")",110:"WHILE",111:"WHEN",112:"UNTIL",114:"LOOP",116:"FOR",117:"BY",121:"OWN",123:"FORIN",124:"FOROF",125:"SWITCH",127:"ELSE",129:"LEADING_WHEN",131:"IF",132:"POST_IF",133:"UNARY",134:"UNARY_MATH",135:"-",136:"+",137:"YIELD",138:"FROM",139:"--",140:"++",141:"?",142:"MATH",143:"**",144:"SHIFT",145:"COMPARE",146:"LOGIC",147:"RELATION",148:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[4,1],[4,3],[4,2],[5,1],[5,1],[8,1],[8,1],[8,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[7,1],[24,2],[24,3],[27,1],[29,1],[29,1],[31,1],[31,3],[35,1],[35,3],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[39,1],[16,3],[16,4],[16,5],[47,1],[47,3],[47,5],[47,1],[48,1],[48,1],[48,1],[9,2],[9,1],[10,1],[14,5],[14,2],[56,1],[56,1],[59,0],[59,1],[54,0],[54,1],[54,3],[54,4],[54,6],[61,1],[61,2],[61,3],[61,1],[62,1],[62,1],[62,1],[62,1],[66,2],[67,1],[67,2],[67,2],[67,1],[45,1],[45,1],[45,1],[12,1],[12,1],[12,1],[12,1],[12,1],[68,2],[68,2],[68,2],[68,2],[68,1],[68,1],[76,3],[76,2],[78,1],[78,1],[65,4],[83,0],[83,1],[83,3],[83,4],[83,6],[22,1],[22,2],[22,3],[22,4],[22,2],[22,3],[22,4],[22,5],[13,3],[13,3],[13,1],[13,2],[87,0],[87,1],[88,2],[88,4],[71,1],[71,1],[50,2],[64,2],[64,4],[98,1],[98,1],[70,5],[81,3],[81,2],[81,2],[81,1],[93,1],[93,3],[93,4],[93,4],[93,6],[100,1],[100,1],[100,1],[101,1],[101,3],[18,2],[18,3],[18,4],[18,5],[103,3],[103,3],[103,2],[23,2],[69,3],[69,5],[109,2],[109,4],[109,2],[109,4],[19,2],[19,2],[19,2],[19,1],[113,2],[113,2],[20,2],[20,2],[20,2],[115,2],[115,4],[115,2],[118,2],[118,3],[122,1],[122,1],[122,1],[122,1],[120,1],[120,3],[119,2],[119,2],[119,4],[119,4],[119,4],[119,6],[119,6],[21,5],[21,7],[21,4],[21,6],[126,1],[126,2],[128,3],[128,4],[130,3],[130,5],[17,1],[17,3],[17,3],[17,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,2],[15,2],[15,2],[15,2],[15,2],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,3],[15,5],[15,4],[15,3]],performAction:function(e,t,n,i,r,s,o){var a=s.length-1; -switch(r){case 1:return this.$=i.addLocationDataFn(o[a],o[a])(new i.Block);case 2:return this.$=s[a];case 3:this.$=i.addLocationDataFn(o[a],o[a])(i.Block.wrap([s[a]]));break;case 4:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].push(s[a]));break;case 5:this.$=s[a-1];break;case 6:case 7:case 8:case 9:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:case 19:case 20:case 21:case 22:case 27:case 32:case 34:case 45:case 46:case 47:case 48:case 56:case 57:case 67:case 68:case 69:case 70:case 75:case 76:case 79:case 83:case 89:case 133:case 134:case 136:case 166:case 167:case 183:case 189:this.$=s[a];break;case 10:case 25:case 26:case 28:case 30:case 33:case 35:this.$=i.addLocationDataFn(o[a],o[a])(new i.Literal(s[a]));break;case 23:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Block);break;case 24:case 31:case 90:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-1]);break;case 29:case 146:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Parens(s[a-1]));break;case 36:this.$=i.addLocationDataFn(o[a],o[a])(new i.Undefined);break;case 37:this.$=i.addLocationDataFn(o[a],o[a])(new i.Null);break;case 38:this.$=i.addLocationDataFn(o[a],o[a])(new i.Bool(s[a]));break;case 39:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a]));break;case 40:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a]));break;case 41:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1]));break;case 42:case 72:case 77:case 78:case 80:case 81:case 82:case 168:case 169:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(s[a]));break;case 43:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),s[a],"object"));break;case 44:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(i.addLocationDataFn(o[a-4])(new i.Value(s[a-4])),s[a-1],"object"));break;case 49:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Return(s[a]));break;case 50:this.$=i.addLocationDataFn(o[a],o[a])(new i.Return);break;case 51:this.$=i.addLocationDataFn(o[a],o[a])(new i.Comment(s[a]));break;case 52:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Code(s[a-3],s[a],s[a-1]));break;case 53:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Code([],s[a],s[a-1]));break;case 54:this.$=i.addLocationDataFn(o[a],o[a])("func");break;case 55:this.$=i.addLocationDataFn(o[a],o[a])("boundfunc");break;case 58:case 95:this.$=i.addLocationDataFn(o[a],o[a])([]);break;case 59:case 96:case 128:case 170:this.$=i.addLocationDataFn(o[a],o[a])([s[a]]);break;case 60:case 97:case 129:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].concat(s[a]));break;case 61:case 98:case 130:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-3].concat(s[a]));break;case 62:case 99:case 132:this.$=i.addLocationDataFn(o[a-5],o[a])(s[a-5].concat(s[a-2]));break;case 63:this.$=i.addLocationDataFn(o[a],o[a])(new i.Param(s[a]));break;case 64:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Param(s[a-1],null,!0));break;case 65:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Param(s[a-2],s[a]));break;case 66:case 135:this.$=i.addLocationDataFn(o[a],o[a])(new i.Expansion);break;case 71:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Splat(s[a-1]));break;case 73:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].add(s[a]));break;case 74:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(s[a-1],[].concat(s[a])));break;case 84:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a]));break;case 85:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Access(s[a],"soak"));break;case 86:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"))),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 87:this.$=i.addLocationDataFn(o[a-1],o[a])([i.addLocationDataFn(o[a-1])(new i.Access(new i.Literal("prototype"),"soak")),i.addLocationDataFn(o[a])(new i.Access(s[a]))]);break;case 88:this.$=i.addLocationDataFn(o[a],o[a])(new i.Access(new i.Literal("prototype")));break;case 91:this.$=i.addLocationDataFn(o[a-1],o[a])(i.extend(s[a],{soak:!0}));break;case 92:this.$=i.addLocationDataFn(o[a],o[a])(new i.Index(s[a]));break;case 93:this.$=i.addLocationDataFn(o[a],o[a])(new i.Slice(s[a]));break;case 94:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Obj(s[a-2],s[a-3].generated));break;case 100:this.$=i.addLocationDataFn(o[a],o[a])(new i.Class);break;case 101:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(null,null,s[a]));break;case 102:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(null,s[a]));break;case 103:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(null,s[a-1],s[a]));break;case 104:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Class(s[a]));break;case 105:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Class(s[a-1],null,s[a]));break;case 106:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Class(s[a-2],s[a]));break;case 107:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Class(s[a-3],s[a-1],s[a]));break;case 108:case 109:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Call(s[a-2],s[a],s[a-1]));break;case 110:this.$=i.addLocationDataFn(o[a],o[a])(new i.Call("super",[new i.Splat(new i.Literal("arguments"))]));break;case 111:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Call("super",s[a]));break;case 112:this.$=i.addLocationDataFn(o[a],o[a])(!1);break;case 113:this.$=i.addLocationDataFn(o[a],o[a])(!0);break;case 114:this.$=i.addLocationDataFn(o[a-1],o[a])([]);break;case 115:case 131:this.$=i.addLocationDataFn(o[a-3],o[a])(s[a-2]);break;case 116:case 117:this.$=i.addLocationDataFn(o[a],o[a])(new i.Value(new i.Literal("this")));break;case 118:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Value(i.addLocationDataFn(o[a-1])(new i.Literal("this")),[i.addLocationDataFn(o[a])(new i.Access(s[a]))],"this"));break;case 119:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Arr([]));break;case 120:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Arr(s[a-2]));break;case 121:this.$=i.addLocationDataFn(o[a],o[a])("inclusive");break;case 122:this.$=i.addLocationDataFn(o[a],o[a])("exclusive");break;case 123:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Range(s[a-3],s[a-1],s[a-2]));break;case 124:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Range(s[a-2],s[a],s[a-1]));break;case 125:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(s[a-1],null,s[a]));break;case 126:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Range(null,s[a],s[a-1]));break;case 127:this.$=i.addLocationDataFn(o[a],o[a])(new i.Range(null,null,s[a]));break;case 137:this.$=i.addLocationDataFn(o[a-2],o[a])([].concat(s[a-2],s[a]));break;case 138:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Try(s[a]));break;case 139:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Try(s[a-1],s[a][0],s[a][1]));break;case 140:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Try(s[a-2],null,null,s[a]));break;case 141:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Try(s[a-3],s[a-2][0],s[a-2][1],s[a]));break;case 142:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-1],s[a]]);break;case 143:this.$=i.addLocationDataFn(o[a-2],o[a])([i.addLocationDataFn(o[a-1])(new i.Value(s[a-1])),s[a]]);break;case 144:this.$=i.addLocationDataFn(o[a-1],o[a])([null,s[a]]);break;case 145:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Throw(s[a]));break;case 147:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Parens(s[a-2]));break;case 148:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a]));break;case 149:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{guard:s[a]}));break;case 150:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(s[a],{invert:!0}));break;case 151:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.While(s[a-2],{invert:!0,guard:s[a]}));break;case 152:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].addBody(s[a]));break;case 153:case 154:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a].addBody(i.addLocationDataFn(o[a-1])(i.Block.wrap([s[a-1]]))));break;case 155:this.$=i.addLocationDataFn(o[a],o[a])(s[a]);break;case 156:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(s[a]));break;case 157:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.While(i.addLocationDataFn(o[a-1])(new i.Literal("true"))).addBody(i.addLocationDataFn(o[a])(i.Block.wrap([s[a]]))));break;case 158:case 159:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a-1],s[a]));break;case 160:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.For(s[a],s[a-1]));break;case 161:this.$=i.addLocationDataFn(o[a-1],o[a])({source:i.addLocationDataFn(o[a])(new i.Value(s[a]))});break;case 162:this.$=i.addLocationDataFn(o[a-3],o[a])({source:i.addLocationDataFn(o[a-2])(new i.Value(s[a-2])),step:s[a]});break;case 163:this.$=i.addLocationDataFn(o[a-1],o[a])(function(){return s[a].own=s[a-1].own,s[a].name=s[a-1][0],s[a].index=s[a-1][1],s[a]}());break;case 164:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a]);break;case 165:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return s[a].own=!0,s[a]}());break;case 171:this.$=i.addLocationDataFn(o[a-2],o[a])([s[a-2],s[a]]);break;case 172:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a]});break;case 173:this.$=i.addLocationDataFn(o[a-1],o[a])({source:s[a],object:!0});break;case 174:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a]});break;case 175:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],guard:s[a],object:!0});break;case 176:this.$=i.addLocationDataFn(o[a-3],o[a])({source:s[a-2],step:s[a]});break;case 177:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],guard:s[a-2],step:s[a]});break;case 178:this.$=i.addLocationDataFn(o[a-5],o[a])({source:s[a-4],step:s[a-2],guard:s[a]});break;case 179:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Switch(s[a-3],s[a-1]));break;case 180:this.$=i.addLocationDataFn(o[a-6],o[a])(new i.Switch(s[a-5],s[a-3],s[a-1]));break;case 181:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Switch(null,s[a-1]));break;case 182:this.$=i.addLocationDataFn(o[a-5],o[a])(new i.Switch(null,s[a-3],s[a-1]));break;case 184:this.$=i.addLocationDataFn(o[a-1],o[a])(s[a-1].concat(s[a]));break;case 185:this.$=i.addLocationDataFn(o[a-2],o[a])([[s[a-1],s[a]]]);break;case 186:this.$=i.addLocationDataFn(o[a-3],o[a])([[s[a-2],s[a-1]]]);break;case 187:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}));break;case 188:this.$=i.addLocationDataFn(o[a-4],o[a])(s[a-4].addElse(i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a-1],s[a],{type:s[a-2]}))));break;case 190:this.$=i.addLocationDataFn(o[a-2],o[a])(s[a-2].addElse(s[a]));break;case 191:case 192:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.If(s[a],i.addLocationDataFn(o[a-2])(i.Block.wrap([s[a-2]])),{type:s[a-1],statement:!0}));break;case 193:case 194:case 197:case 198:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op(s[a-1],s[a]));break;case 195:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("-",s[a]));break;case 196:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("+",s[a]));break;case 199:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-2].concat(s[a-1]),s[a]));break;case 200:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a]));break;case 201:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a]));break;case 202:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("--",s[a-1],null,!0));break;case 203:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Op("++",s[a-1],null,!0));break;case 204:this.$=i.addLocationDataFn(o[a-1],o[a])(new i.Existence(s[a-1]));break;case 205:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("+",s[a-2],s[a]));break;case 206:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op("-",s[a-2],s[a]));break;case 207:case 208:case 209:case 210:case 211:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Op(s[a-1],s[a-2],s[a]));break;case 212:this.$=i.addLocationDataFn(o[a-2],o[a])(function(){return"!"===s[a-1].charAt(0)?new i.Op(s[a-1].slice(1),s[a-2],s[a]).invert():new i.Op(s[a-1],s[a-2],s[a])}());break;case 213:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Assign(s[a-2],s[a],s[a-1]));break;case 214:this.$=i.addLocationDataFn(o[a-4],o[a])(new i.Assign(s[a-4],s[a-1],s[a-3]));break;case 215:this.$=i.addLocationDataFn(o[a-3],o[a])(new i.Assign(s[a-3],s[a],s[a-2]));break;case 216:this.$=i.addLocationDataFn(o[a-2],o[a])(new i.Extends(s[a-2],s[a]))}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{1:[3]},{1:[2,2],6:P},t(U,[2,3]),t(U,[2,6],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(U,[2,7],{118:69,109:92,115:93,110:x,112:S,116:R,132:Z}),t(et,[2,11],{87:94,68:95,76:101,72:tt,73:nt,74:it,75:rt,77:st,80:ot,90:at,91:ct}),t(et,[2,12],{76:101,87:104,68:105,72:tt,73:nt,74:it,75:rt,77:st,80:ot,90:at,91:ct}),t(et,[2,13]),t(et,[2,14]),t(et,[2,15]),t(et,[2,16]),t(et,[2,17]),t(et,[2,18]),t(et,[2,19]),t(et,[2,20]),t(et,[2,21]),t(et,[2,22]),t(et,[2,8]),t(et,[2,9]),t(et,[2,10]),t(ht,lt,{46:[1,106]}),t(ht,[2,80]),t(ht,[2,81]),t(ht,[2,82]),t(ht,[2,83]),t([1,6,25,26,34,38,55,60,63,72,73,74,75,77,79,80,84,90,92,97,99,108,110,111,112,116,117,132,135,136,141,142,143,144,145,146,147],[2,110],{88:107,91:ut}),t([6,25,55,60],pt,{54:109,61:110,62:111,27:113,50:114,64:115,65:116,28:i,63:dt,82:b,95:ft,96:mt}),{24:119,25:gt},{7:121,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:123,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:124,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:125,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:127,8:126,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,138:[1,128],139:B,140:V},{12:130,13:131,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:132,50:63,64:47,65:48,67:129,69:23,70:24,71:25,82:b,89:w,94:T,95:C,96:E,107:L},{12:130,13:131,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:132,50:63,64:47,65:48,67:133,69:23,70:24,71:25,82:b,89:w,94:T,95:C,96:E,107:L},t(vt,yt,{86:[1,137],139:[1,134],140:[1,135],148:[1,136]}),t(et,[2,189],{127:[1,138]}),{24:139,25:gt},{24:140,25:gt},t(et,[2,155]),{24:141,25:gt},{7:142,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,143],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(bt,[2,100],{39:22,69:23,70:24,71:25,64:47,65:48,29:49,35:51,27:62,50:63,31:72,12:130,13:131,45:132,24:144,67:146,25:gt,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,82:b,86:[1,145],89:w,94:T,95:C,96:E,107:L}),{7:147,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,141,142,143,144,145,146,147],[2,50],{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,69:23,70:24,71:25,56:28,67:36,130:37,109:39,113:40,115:41,64:47,65:48,29:49,35:51,27:62,50:63,118:69,31:72,8:122,7:148,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,51:f,52:m,53:g,57:v,58:y,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,114:D,125:A,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V}),t(et,[2,51]),t(vt,[2,77]),t(vt,[2,78]),t(ht,[2,32]),t(ht,[2,33]),t(ht,[2,34]),t(ht,[2,35]),t(ht,[2,36]),t(ht,[2,37]),t(ht,[2,38]),{4:149,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,150],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:151,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:153,94:T,95:C,96:E,97:Tt,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(ht,[2,116]),t(ht,[2,117],{27:158,28:i}),{25:[2,54]},{25:[2,55]},t(Ct,[2,72]),t(Ct,[2,75]),{7:159,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:160,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:161,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:163,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:162,25:gt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{27:168,28:i,50:169,64:170,65:171,70:164,82:b,95:ft,96:E,120:165,121:[1,166],122:167},{119:172,123:[1,173],124:[1,174]},t([6,25,60,84],Et,{31:72,83:175,47:176,48:177,10:178,27:179,29:180,50:181,28:i,30:r,32:s,33:o,52:m,95:ft}),t(Ft,[2,26]),t(Ft,[2,27]),t(ht,[2,30]),{12:130,13:182,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:132,50:63,64:47,65:48,67:183,69:23,70:24,71:25,82:b,89:w,94:T,95:C,96:E,107:L},t(Nt,[2,25]),t(Ft,[2,28]),{4:184,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(U,[2,5],{7:4,8:5,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,69:23,70:24,71:25,56:28,67:36,130:37,109:39,113:40,115:41,64:47,65:48,29:49,35:51,27:62,50:63,118:69,31:72,5:185,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,51:f,52:m,53:g,57:v,58:y,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,110:x,112:S,114:D,116:R,125:A,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V}),t(et,[2,204]),{7:186,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:187,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:188,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:189,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:190,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:191,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:192,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:193,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:194,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,154]),t(et,[2,159]),{7:195,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,153]),t(et,[2,158]),{88:196,91:ut},t(Ct,[2,73]),{91:[2,113]},{27:197,28:i},{27:198,28:i},t(Ct,[2,88],{27:199,28:i}),{27:200,28:i},t(Ct,[2,89]),{7:202,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:Lt,64:47,65:48,67:36,69:23,70:24,71:25,78:201,81:203,82:b,85:k,89:w,94:T,95:C,96:E,98:204,99:xt,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{76:207,77:st,80:ot},{88:208,91:ut},t(Ct,[2,74]),{6:[1,210],7:209,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,211],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(St,[2,111]),{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,92:[1,212],93:213,94:T,95:C,96:E,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([6,25],Dt,{59:217,55:[1,215],60:Rt}),t(At,[2,59]),t(At,[2,63],{46:[1,219],63:[1,218]}),t(At,[2,66]),t(It,[2,67]),t(It,[2,68]),t(It,[2,69]),t(It,[2,70]),{27:158,28:i},{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:153,94:T,95:C,96:E,97:Tt,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,53]),{4:221,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,26:[1,220],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,135,136,142,143,144,145,146,147],[2,193],{118:69,109:89,115:90,141:X}),{109:92,110:x,112:S,115:93,116:R,118:69,132:Z},t(_t,[2,194],{118:69,109:89,115:90,141:X,143:Y}),t(_t,[2,195],{118:69,109:89,115:90,141:X,143:Y}),t(_t,[2,196],{118:69,109:89,115:90,141:X,143:Y}),t(et,[2,197],{118:69,109:92,115:93}),t(Ot,[2,198],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:222,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,200],{72:yt,73:yt,74:yt,75:yt,77:yt,80:yt,90:yt,91:yt}),{68:95,72:tt,73:nt,74:it,75:rt,76:101,77:st,80:ot,87:94,90:at,91:ct},{68:105,72:tt,73:nt,74:it,75:rt,76:101,77:st,80:ot,87:104,90:at,91:ct},t($t,lt),t(et,[2,201],{72:yt,73:yt,74:yt,75:yt,77:yt,80:yt,90:yt,91:yt}),t(et,[2,202]),t(et,[2,203]),{6:[1,225],7:223,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,224],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:226,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{24:227,25:gt,131:[1,228]},t(et,[2,138],{103:229,104:[1,230],105:[1,231]}),t(et,[2,152]),t(et,[2,160]),{25:[1,232],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{126:233,128:234,129:jt},t(et,[2,101]),{7:236,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(bt,[2,104],{24:237,25:gt,72:yt,73:yt,74:yt,75:yt,77:yt,80:yt,90:yt,91:yt,86:[1,238]}),t(Ot,[2,145],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,49],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{6:P,108:[1,239]},{4:240,5:3,7:4,8:5,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([6,25,60,97],Mt,{118:69,109:89,115:90,98:241,63:[1,242],99:xt,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Bt,[2,119]),t([6,25,97],Dt,{59:243,60:Vt}),t(Pt,[2,128]),{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:245,94:T,95:C,96:E,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Pt,[2,134]),t(Pt,[2,135]),t(Nt,[2,118]),{24:246,25:gt,109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Ut,[2,148],{118:69,109:89,115:90,110:x,111:[1,247],112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ut,[2,150],{118:69,109:89,115:90,110:x,111:[1,248],112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,156]),t(Gt,[2,157],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,132,135,136,141,142,143,144,145,146,147],[2,161],{117:[1,249]}),t(Ht,[2,164]),{27:168,28:i,50:169,64:170,65:171,82:b,95:ft,96:mt,120:250,122:167},t(Ht,[2,170],{60:[1,251]}),t(qt,[2,166]),t(qt,[2,167]),t(qt,[2,168]),t(qt,[2,169]),t(et,[2,163]),{7:252,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:253,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([6,25,84],Dt,{59:254,60:Xt}),t(Wt,[2,96]),t(Wt,[2,42],{49:[1,256]}),t(Wt,[2,45]),t(Yt,[2,46]),t(Yt,[2,47]),t(Yt,[2,48]),{38:[1,257],68:105,72:tt,73:nt,74:it,75:rt,76:101,77:st,80:ot,87:104,90:at,91:ct},t($t,yt),{6:P,34:[1,258]},t(U,[2,4]),t(Kt,[2,205],{118:69,109:89,115:90,141:X,142:W,143:Y}),t(Kt,[2,206],{118:69,109:89,115:90,141:X,142:W,143:Y}),t(_t,[2,207],{118:69,109:89,115:90,141:X,143:Y}),t(_t,[2,208],{118:69,109:89,115:90,141:X,143:Y}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,144,145,146,147],[2,209],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,145,146],[2,210],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,147:Q}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,146],[2,211],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,147:Q}),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,117,132,145,146,147],[2,212],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K}),t(Gt,[2,192],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Gt,[2,191],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(St,[2,108]),t(Ct,[2,84]),t(Ct,[2,85]),t(Ct,[2,86]),t(Ct,[2,87]),{79:[1,259]},{63:Lt,79:[2,92],98:260,99:xt,109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{79:[2,93]},{7:261,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,79:[2,127],82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(zt,[2,121]),t(zt,Jt),t(Ct,[2,91]),t(St,[2,109]),t(Ot,[2,39],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:262,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:263,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(St,[2,114]),t([6,25,92],Dt,{59:264,60:Vt}),t(Pt,Mt,{118:69,109:89,115:90,63:[1,265],110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{56:266,57:v,58:y},t(Qt,Zt,{62:111,27:113,50:114,64:115,65:116,61:267,28:i,63:dt,82:b,95:ft,96:mt}),{6:en,25:tn},t(At,[2,64]),{7:270,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(nn,[2,23]),{6:P,26:[1,271]},t(Ot,[2,199],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,213],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:272,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:273,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Ot,[2,216],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,190]),{7:274,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,139],{104:[1,275]}),{24:276,25:gt},{24:279,25:gt,27:277,28:i,65:278,82:b},{126:280,128:234,129:jt},{26:[1,281],127:[1,282],128:283,129:jt},t(rn,[2,183]),{7:285,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,101:284,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(sn,[2,102],{118:69,109:89,115:90,24:286,25:gt,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,105]),{7:287,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(ht,[2,146]),{6:P,26:[1,288]},{7:289,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t([11,28,30,32,33,36,37,40,41,42,43,44,51,52,53,57,58,82,85,89,94,95,96,102,106,107,110,112,114,116,125,131,133,134,135,136,137,139,140],Jt,{6:on,25:on,60:on,97:on}),{6:an,25:cn,97:[1,290]},t([6,25,26,92,97],Zt,{12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,9:18,10:19,45:21,39:22,69:23,70:24,71:25,56:28,67:36,130:37,109:39,113:40,115:41,64:47,65:48,29:49,35:51,27:62,50:63,118:69,31:72,8:122,66:156,7:214,100:293,11:n,28:i,30:r,32:s,33:o,36:a,37:c,40:h,41:l,42:u,43:p,44:d,51:f,52:m,53:g,57:v,58:y,63:wt,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,110:x,112:S,114:D,116:R,125:A,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V}),t(Qt,Dt,{59:294,60:Vt}),t(hn,[2,187]),{7:295,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:296,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:297,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Ht,[2,165]),{27:168,28:i,50:169,64:170,65:171,82:b,95:ft,96:mt,122:298},t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,112,116,132],[2,172],{118:69,109:89,115:90,111:[1,299],117:[1,300],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(ln,[2,173],{118:69,109:89,115:90,111:[1,301],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{6:un,25:pn,84:[1,302]},t([6,25,26,84],Zt,{31:72,48:177,10:178,27:179,29:180,50:181,47:305,28:i,30:r,32:s,33:o,52:m,95:ft}),{7:306,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:[1,307],27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(ht,[2,31]),t(Ft,[2,29]),t(Ct,[2,90]),{7:308,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,79:[2,125],82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{79:[2,126],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Ot,[2,40],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{26:[1,309],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{6:an,25:cn,92:[1,310]},t(Pt,on),{24:311,25:gt},t(At,[2,60]),{27:113,28:i,50:114,61:312,62:111,63:dt,64:115,65:116,82:b,95:ft,96:mt},t(dn,pt,{61:110,62:111,27:113,50:114,64:115,65:116,54:313,28:i,63:dt,82:b,95:ft,96:mt}),t(At,[2,65],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(nn,[2,24]),{26:[1,314],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Ot,[2,215],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{24:315,25:gt,109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{24:316,25:gt},t(et,[2,140]),{24:317,25:gt},{24:318,25:gt},t(fn,[2,144]),{26:[1,319],127:[1,320],128:283,129:jt},t(et,[2,181]),{24:321,25:gt},t(rn,[2,184]),{24:322,25:gt,60:[1,323]},t(mn,[2,136],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(et,[2,103]),t(sn,[2,106],{118:69,109:89,115:90,24:324,25:gt,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{108:[1,325]},{97:[1,326],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(Bt,[2,120]),{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,100:327,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:214,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,25:kt,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,63:wt,64:47,65:48,66:156,67:36,69:23,70:24,71:25,82:b,85:k,89:w,93:328,94:T,95:C,96:E,100:154,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Pt,[2,129]),{6:an,25:cn,26:[1,329]},t(Gt,[2,149],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Gt,[2,151],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Gt,[2,162],{118:69,109:89,115:90,110:x,112:S,116:R,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ht,[2,171]),{7:330,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:331,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:332,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(Bt,[2,94]),{10:178,27:179,28:i,29:180,30:r,31:72,32:s,33:o,47:333,48:177,50:181,52:m,95:ft},t(dn,Et,{31:72,47:176,48:177,10:178,27:179,29:180,50:181,83:334,28:i,30:r,32:s,33:o,52:m,95:ft}),t(Wt,[2,97]),t(Wt,[2,43],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{7:335,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{79:[2,124],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},t(et,[2,41]),t(St,[2,115]),t(et,[2,52]),t(At,[2,61]),t(Qt,Dt,{59:336,60:Rt}),t(et,[2,214]),t(hn,[2,188]),t(et,[2,141]),t(fn,[2,142]),t(fn,[2,143]),t(et,[2,179]),{24:337,25:gt},{26:[1,338]},t(rn,[2,185],{6:[1,339]}),{7:340,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},t(et,[2,107]),t(ht,[2,147]),t(ht,[2,123]),t(Pt,[2,130]),t(Qt,Dt,{59:341,60:Vt}),t(Pt,[2,131]),t([1,6,25,26,34,55,60,63,79,84,92,97,99,108,110,111,112,116,132],[2,174],{118:69,109:89,115:90,117:[1,342],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(ln,[2,176],{118:69,109:89,115:90,111:[1,343],135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,175],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Wt,[2,98]),t(Qt,Dt,{59:344,60:Xt}),{26:[1,345],109:89,110:x,112:S,115:90,116:R,118:69,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q},{6:en,25:tn,26:[1,346]},{26:[1,347]},t(et,[2,182]),t(rn,[2,186]),t(mn,[2,137],{118:69,109:89,115:90,110:x,112:S,116:R,132:G,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),{6:an,25:cn,26:[1,348]},{7:349,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{7:350,8:122,9:18,10:19,11:n,12:6,13:7,14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,27:62,28:i,29:49,30:r,31:72,32:s,33:o,35:51,36:a,37:c,39:22,40:h,41:l,42:u,43:p,44:d,45:21,50:63,51:f,52:m,53:g,56:28,57:v,58:y,64:47,65:48,67:36,69:23,70:24,71:25,82:b,85:k,89:w,94:T,95:C,96:E,102:F,106:N,107:L,109:39,110:x,112:S,113:40,114:D,115:41,116:R,118:69,125:A,130:37,131:I,133:_,134:O,135:$,136:j,137:M,139:B,140:V},{6:un,25:pn,26:[1,351]},t(Wt,[2,44]),t(At,[2,62]),t(et,[2,180]),t(Pt,[2,132]),t(Ot,[2,177],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Ot,[2,178],{118:69,109:89,115:90,135:H,136:q,141:X,142:W,143:Y,144:K,145:z,146:J,147:Q}),t(Wt,[2,99])],defaultActions:{60:[2,54],61:[2,55],96:[2,113],203:[2,93]},parseError:function(e,t){if(!t.recoverable)throw Error(e); -this.trace(e)},parse:function(e){function t(){var e;return e=f.lex()||p,"number"!=typeof e&&(e=n.symbols_[e]||e),e}var n=this,i=[0],r=[null],s=[],o=this.table,a="",c=0,h=0,l=0,u=2,p=1,d=s.slice.call(arguments,1),f=Object.create(this.lexer),m={yy:{}};for(var g in this.yy)Object.prototype.hasOwnProperty.call(this.yy,g)&&(m.yy[g]=this.yy[g]);f.setInput(e,m.yy),m.yy.lexer=f,m.yy.parser=this,f.yylloc===void 0&&(f.yylloc={});var v=f.yylloc;s.push(v);var y=f.options&&f.options.ranges;this.parseError="function"==typeof m.yy.parseError?m.yy.parseError:Object.getPrototypeOf(this).parseError;for(var b,k,w,T,C,E,F,N,L,x={};;){if(w=i[i.length-1],this.defaultActions[w]?T=this.defaultActions[w]:((null===b||b===void 0)&&(b=t()),T=o[w]&&o[w][b]),T===void 0||!T.length||!T[0]){var S="";L=[];for(E in o[w])this.terminals_[E]&&E>u&&L.push("'"+this.terminals_[E]+"'");S=f.showPosition?"Parse error on line "+(c+1)+":\n"+f.showPosition()+"\nExpecting "+L.join(", ")+", got '"+(this.terminals_[b]||b)+"'":"Parse error on line "+(c+1)+": Unexpected "+(b==p?"end of input":"'"+(this.terminals_[b]||b)+"'"),this.parseError(S,{text:f.match,token:this.terminals_[b]||b,line:f.yylineno,loc:v,expected:L})}if(T[0]instanceof Array&&T.length>1)throw Error("Parse Error: multiple actions possible at state: "+w+", token: "+b);switch(T[0]){case 1:i.push(b),r.push(f.yytext),s.push(f.yylloc),i.push(T[1]),b=null,k?(b=k,k=null):(h=f.yyleng,a=f.yytext,c=f.yylineno,v=f.yylloc,l>0&&l--);break;case 2:if(F=this.productions_[T[1]][1],x.$=r[r.length-F],x._$={first_line:s[s.length-(F||1)].first_line,last_line:s[s.length-1].last_line,first_column:s[s.length-(F||1)].first_column,last_column:s[s.length-1].last_column},y&&(x._$.range=[s[s.length-(F||1)].range[0],s[s.length-1].range[1]]),C=this.performAction.apply(x,[a,h,c,m.yy,T[1],r,s].concat(d)),C!==void 0)return C;F&&(i=i.slice(0,2*-1*F),r=r.slice(0,-1*F),s=s.slice(0,-1*F)),i.push(this.productions_[T[1]][0]),r.push(x.$),s.push(x._$),N=o[i[i.length-2]][i[i.length-1]],i.push(N);break;case 3:return!0}}return!0}};return e.prototype=gn,gn.Parser=e,new e}();return _dereq_!==void 0&&e!==void 0&&(e.parser=n,e.Parser=n.Parser,e.parse=function(){return n.parse.apply(n,arguments)},e.main=function(t){t[1]||(console.log("Usage: "+t[0]+" FILE"),process.exit(1));var n=_dereq_("fs").readFileSync(_dereq_("path").normalize(t[1]),"utf8");return e.parser.parse(n)},t!==void 0&&_dereq_.main===t&&e.main(process.argv.slice(1))),t.exports}(),_dereq_["./scope"]=function(){var e={},t={exports:e};return function(){var t,n=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};e.Scope=t=function(){function e(e,t,n,i){var r,s;this.parent=e,this.expressions=t,this.method=n,this.referencedVars=i,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(this.utilities={}),this.root=null!=(r=null!=(s=this.parent)?s.root:void 0)?r:this}return e.prototype.add=function(e,t,n){return this.shared&&!n?this.parent.add(e,t,n):Object.prototype.hasOwnProperty.call(this.positions,e)?this.variables[this.positions[e]].type=t:this.positions[e]=this.variables.push({name:e,type:t})-1},e.prototype.namedMethod=function(){var e;return(null!=(e=this.method)?e.name:void 0)||!this.parent?this.method:this.parent.namedMethod()},e.prototype.find=function(e){return this.check(e)?!0:(this.add(e,"var"),!1)},e.prototype.parameter=function(e){return this.shared&&this.parent.check(e,!0)?void 0:this.add(e,"param")},e.prototype.check=function(e){var t;return!!(this.type(e)||(null!=(t=this.parent)?t.check(e):void 0))},e.prototype.temporary=function(e,t,n){return null==n&&(n=!1),n?(t+parseInt(e,36)).toString(36).replace(/\d/g,"a"):e+(t||"")},e.prototype.type=function(e){var t,n,i,r;for(i=this.variables,t=0,n=i.length;n>t;t++)if(r=i[t],r.name===e)return r.type;return null},e.prototype.freeVariable=function(e,t){var i,r,s;for(null==t&&(t={}),i=0;;){if(s=this.temporary(e,i,t.single),!(this.check(s)||n.call(this.root.referencedVars,s)>=0))break;i++}return(null!=(r=t.reserve)?r:!0)&&this.add(s,"var",!0),s},e.prototype.assign=function(e,t){return this.add(e,{value:t,assigned:!0},!0),this.hasAssignments=!0},e.prototype.hasDeclarations=function(){return!!this.declaredVariables().length},e.prototype.declaredVariables=function(){var e;return function(){var t,n,i,r;for(i=this.variables,r=[],t=0,n=i.length;n>t;t++)e=i[t],"var"===e.type&&r.push(e.name);return r}.call(this).sort()},e.prototype.assignedVariables=function(){var e,t,n,i,r;for(n=this.variables,i=[],e=0,t=n.length;t>e;e++)r=n[e],r.type.assigned&&i.push(r.name+" = "+r.type.value);return i},e}()}.call(this),t.exports}(),_dereq_["./nodes"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b,k,w,T,C,E,F,N,L,x,S,D,R,A,I,_,O,$,j,M,B,V,P,U,G,H,q,X,W,Y,K,z,J,Q,Z,et,tt,nt,it,rt,st,ot,at,ct,ht,lt,ut,pt,dt,ft,mt,gt,vt,yt,bt,kt=function(e,t){function n(){this.constructor=e}for(var i in t)wt.call(t,i)&&(e[i]=t[i]);return n.prototype=t.prototype,e.prototype=new n,e.__super__=t.prototype,e},wt={}.hasOwnProperty,Tt=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1},Ct=[].slice;Error.stackTraceLimit=1/0,P=_dereq_("./scope").Scope,dt=_dereq_("./lexer"),$=dt.RESERVED,V=dt.STRICT_PROSCRIBED,ft=_dereq_("./helpers"),et=ft.compact,rt=ft.flatten,it=ft.extend,lt=ft.merge,tt=ft.del,gt=ft.starts,nt=ft.ends,mt=ft.some,Z=ft.addLocationDataFn,ht=ft.locationDataToString,vt=ft.throwSyntaxError,e.extend=it,e.addLocationDataFn=Z,Q=function(){return!0},D=function(){return!1},X=function(){return this},S=function(){return this.negated=!this.negated,this},e.CodeFragment=h=function(){function e(e,t){var n;this.code=""+t,this.locationData=null!=e?e.locationData:void 0,this.type=(null!=e?null!=(n=e.constructor)?n.name:void 0:void 0)||"unknown"}return e.prototype.toString=function(){return""+this.code+(this.locationData?": "+ht(this.locationData):"")},e}(),st=function(e){var t;return function(){var n,i,r;for(r=[],n=0,i=e.length;i>n;n++)t=e[n],r.push(t.code);return r}().join("")},e.Base=r=function(){function e(){}return e.prototype.compile=function(e,t){return st(this.compileToFragments(e,t))},e.prototype.compileToFragments=function(e,t){var n;return e=it({},e),t&&(e.level=t),n=this.unfoldSoak(e)||this,n.tab=e.indent,e.level!==L&&n.isStatement(e)?n.compileClosure(e):n.compileNode(e)},e.prototype.compileClosure=function(e){var n,i,r,a,h,l,u;return(a=this.jumps())&&a.error("cannot use a pure statement in an expression"),e.sharedScope=!0,r=new c([],s.wrap([this])),n=[],((i=this.contains(at))||this.contains(ct))&&(n=[new x("this")],i?(h="apply",n.push(new x("arguments"))):h="call",r=new z(r,[new t(new x(h))])),l=new o(r,n).compileNode(e),(r.isGenerator||(null!=(u=r.base)?u.isGenerator:void 0))&&(l.unshift(this.makeCode("(yield* ")),l.push(this.makeCode(")"))),l},e.prototype.cache=function(e,t,n){var r,s,o;return r=null!=n?n(this):this.isComplex(),r?(s=new x(e.scope.freeVariable("ref")),o=new i(s,this),t?[o.compileToFragments(e,t),[this.makeCode(s.value)]]:[o,s]):(s=t?this.compileToFragments(e,t):this,[s,s])},e.prototype.cacheToCodeFragments=function(e){return[st(e[0]),st(e[1])]},e.prototype.makeReturn=function(e){var t;return t=this.unwrapAll(),e?new o(new x(e+".push"),[t]):new M(t)},e.prototype.contains=function(e){var t;return t=void 0,this.traverseChildren(!1,function(n){return e(n)?(t=n,!1):void 0}),t},e.prototype.lastNonComment=function(e){var t;for(t=e.length;t--;)if(!(e[t]instanceof l))return e[t];return null},e.prototype.toString=function(e,t){var n;return null==e&&(e=""),null==t&&(t=this.constructor.name),n="\n"+e+t,this.soak&&(n+="?"),this.eachChild(function(t){return n+=t.toString(e+q)}),n},e.prototype.eachChild=function(e){var t,n,i,r,s,o,a,c;if(!this.children)return this;for(a=this.children,i=0,s=a.length;s>i;i++)if(t=a[i],this[t])for(c=rt([this[t]]),r=0,o=c.length;o>r;r++)if(n=c[r],e(n)===!1)return this;return this},e.prototype.traverseChildren=function(e,t){return this.eachChild(function(n){var i;return i=t(n),i!==!1?n.traverseChildren(e,t):void 0})},e.prototype.invert=function(){return new I("!",this)},e.prototype.unwrapAll=function(){var e;for(e=this;e!==(e=e.unwrap()););return e},e.prototype.children=[],e.prototype.isStatement=D,e.prototype.jumps=D,e.prototype.isComplex=Q,e.prototype.isChainable=D,e.prototype.isAssignable=D,e.prototype.unwrap=X,e.prototype.unfoldSoak=D,e.prototype.assigns=D,e.prototype.updateLocationDataIfMissing=function(e){return this.locationData?this:(this.locationData=e,this.eachChild(function(t){return t.updateLocationDataIfMissing(e)}))},e.prototype.error=function(e){return vt(e,this.locationData)},e.prototype.makeCode=function(e){return new h(this,e)},e.prototype.wrapInBraces=function(e){return[].concat(this.makeCode("("),e,this.makeCode(")"))},e.prototype.joinFragmentArrays=function(e,t){var n,i,r,s,o;for(n=[],r=s=0,o=e.length;o>s;r=++s)i=e[r],r&&n.push(this.makeCode(t)),n=n.concat(i);return n},e}(),e.Block=s=function(e){function t(e){this.expressions=et(rt(e||[]))}return kt(t,e),t.prototype.children=["expressions"],t.prototype.push=function(e){return this.expressions.push(e),this},t.prototype.pop=function(){return this.expressions.pop()},t.prototype.unshift=function(e){return this.expressions.unshift(e),this},t.prototype.unwrap=function(){return 1===this.expressions.length?this.expressions[0]:this},t.prototype.isEmpty=function(){return!this.expressions.length},t.prototype.isStatement=function(e){var t,n,i,r;for(r=this.expressions,n=0,i=r.length;i>n;n++)if(t=r[n],t.isStatement(e))return!0;return!1},t.prototype.jumps=function(e){var t,n,i,r,s;for(s=this.expressions,n=0,r=s.length;r>n;n++)if(t=s[n],i=t.jumps(e))return i},t.prototype.makeReturn=function(e){var t,n;for(n=this.expressions.length;n--;)if(t=this.expressions[n],!(t instanceof l)){this.expressions[n]=t.makeReturn(e),t instanceof M&&!t.expression&&this.expressions.splice(n,1);break}return this},t.prototype.compileToFragments=function(e,n){return null==e&&(e={}),e.scope?t.__super__.compileToFragments.call(this,e,n):this.compileRoot(e)},t.prototype.compileNode=function(e){var n,i,r,s,o,a,c,h,l;for(this.tab=e.indent,l=e.level===L,i=[],h=this.expressions,s=o=0,a=h.length;a>o;s=++o)c=h[s],c=c.unwrapAll(),c=c.unfoldSoak(e)||c,c instanceof t?i.push(c.compileNode(e)):l?(c.front=!0,r=c.compileToFragments(e),c.isStatement(e)||(r.unshift(this.makeCode(""+this.tab)),r.push(this.makeCode(";"))),i.push(r)):i.push(c.compileToFragments(e,E));return l?this.spaced?[].concat(this.joinFragmentArrays(i,"\n\n"),this.makeCode("\n")):this.joinFragmentArrays(i,"\n"):(n=i.length?this.joinFragmentArrays(i,", "):[this.makeCode("void 0")],i.length>1&&e.level>=E?this.wrapInBraces(n):n)},t.prototype.compileRoot=function(e){var t,n,i,r,s,o,a,c,h,u,p;for(e.indent=e.bare?"":q,e.level=L,this.spaced=!0,e.scope=new P(null,this,null,null!=(h=e.referencedVars)?h:[]),u=e.locals||[],r=0,s=u.length;s>r;r++)o=u[r],e.scope.parameter(o);return a=[],e.bare||(c=function(){var e,n,r,s;for(r=this.expressions,s=[],i=e=0,n=r.length;n>e&&(t=r[i],t.unwrap()instanceof l);i=++e)s.push(t);return s}.call(this),p=this.expressions.slice(c.length),this.expressions=c,c.length&&(a=this.compileNode(lt(e,{indent:""})),a.push(this.makeCode("\n"))),this.expressions=p),n=this.compileWithDeclarations(e),e.bare?n:[].concat(a,this.makeCode("(function() {\n"),n,this.makeCode("\n}).call(this);\n"))},t.prototype.compileWithDeclarations=function(e){var t,n,i,r,s,o,a,c,h,u,p,d,f,m;for(r=[],c=[],h=this.expressions,s=o=0,a=h.length;a>o&&(i=h[s],i=i.unwrap(),i instanceof l||i instanceof x);s=++o);return e=lt(e,{level:L}),s&&(d=this.expressions.splice(s,9e9),u=[this.spaced,!1],m=u[0],this.spaced=u[1],p=[this.compileNode(e),m],r=p[0],this.spaced=p[1],this.expressions=d),c=this.compileNode(e),f=e.scope,f.expressions===this&&(n=e.scope.hasDeclarations(),t=f.hasAssignments,n||t?(s&&r.push(this.makeCode("\n")),r.push(this.makeCode(this.tab+"var ")),n&&r.push(this.makeCode(f.declaredVariables().join(", "))),t&&(n&&r.push(this.makeCode(",\n"+(this.tab+q))),r.push(this.makeCode(f.assignedVariables().join(",\n"+(this.tab+q))))),r.push(this.makeCode(";\n"+(this.spaced?"\n":"")))):r.length&&c.length&&r.push(this.makeCode("\n"))),r.concat(c)},t.wrap=function(e){return 1===e.length&&e[0]instanceof t?e[0]:new t(e)},t}(r),e.Literal=x=function(e){function t(e){this.value=e}return kt(t,e),t.prototype.makeReturn=function(){return this.isStatement()?this:t.__super__.makeReturn.apply(this,arguments)},t.prototype.isAssignable=function(){return g.test(this.value)},t.prototype.isStatement=function(){var e;return"break"===(e=this.value)||"continue"===e||"debugger"===e},t.prototype.isComplex=D,t.prototype.assigns=function(e){return e===this.value},t.prototype.jumps=function(e){return"break"!==this.value||(null!=e?e.loop:void 0)||(null!=e?e.block:void 0)?"continue"!==this.value||(null!=e?e.loop:void 0)?void 0:this:this},t.prototype.compileNode=function(e){var t,n,i;return n="this"===this.value?(null!=(i=e.scope.method)?i.bound:void 0)?e.scope.method.context:this.value:this.value.reserved?'"'+this.value+'"':this.value,t=this.isStatement()?""+this.tab+n+";":n,[this.makeCode(t)]},t.prototype.toString=function(){return' "'+this.value+'"'},t}(r),e.Undefined=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(e){return[this.makeCode(e.level>=T?"(void 0)":"void 0")]},t}(r),e.Null=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode("null")]},t}(r),e.Bool=function(e){function t(e){this.val=e}return kt(t,e),t.prototype.isAssignable=D,t.prototype.isComplex=D,t.prototype.compileNode=function(){return[this.makeCode(this.val)]},t}(r),e.Return=M=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Q,t.prototype.makeReturn=X,t.prototype.jumps=X,t.prototype.compileToFragments=function(e,n){var i,r;return i=null!=(r=this.expression)?r.makeReturn():void 0,!i||i instanceof t?t.__super__.compileToFragments.call(this,e,n):i.compileToFragments(e,n)},t.prototype.compileNode=function(e){var t,n,i;return t=[],n=null!=(i=this.expression)?"function"==typeof i.isYieldReturn?i.isYieldReturn():void 0:void 0,n||t.push(this.makeCode(this.tab+("return"+(this.expression?" ":"")))),this.expression&&(t=t.concat(this.expression.compileToFragments(e,N))),n||t.push(this.makeCode(";")),t},t}(r),e.Value=z=function(e){function t(e,n,i){return!n&&e instanceof t?e:(this.base=e,this.properties=n||[],i&&(this[i]=!0),this)}return kt(t,e),t.prototype.children=["base","properties"],t.prototype.add=function(e){return this.properties=this.properties.concat(e),this},t.prototype.hasProperties=function(){return!!this.properties.length},t.prototype.bareLiteral=function(e){return!this.properties.length&&this.base instanceof e},t.prototype.isArray=function(){return this.bareLiteral(n)},t.prototype.isRange=function(){return this.bareLiteral(j)},t.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},t.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},t.prototype.isSimpleNumber=function(){return this.bareLiteral(x)&&B.test(this.base.value)},t.prototype.isString=function(){return this.bareLiteral(x)&&y.test(this.base.value)},t.prototype.isRegex=function(){return this.bareLiteral(x)&&v.test(this.base.value)},t.prototype.isAtomic=function(){var e,t,n,i;for(i=this.properties.concat(this.base),e=0,t=i.length;t>e;e++)if(n=i[e],n.soak||n instanceof o)return!1;return!0},t.prototype.isNotCallable=function(){return this.isSimpleNumber()||this.isString()||this.isRegex()||this.isArray()||this.isRange()||this.isSplice()||this.isObject()},t.prototype.isStatement=function(e){return!this.properties.length&&this.base.isStatement(e)},t.prototype.assigns=function(e){return!this.properties.length&&this.base.assigns(e)},t.prototype.jumps=function(e){return!this.properties.length&&this.base.jumps(e)},t.prototype.isObject=function(e){return this.properties.length?!1:this.base instanceof A&&(!e||this.base.generated)},t.prototype.isSplice=function(){var e,t;return t=this.properties,e=t[t.length-1],e instanceof U},t.prototype.looksStatic=function(e){var t;return this.base.value===e&&1===this.properties.length&&"prototype"!==(null!=(t=this.properties[0].name)?t.value:void 0)},t.prototype.unwrap=function(){return this.properties.length?this:this.base},t.prototype.cacheReference=function(e){var n,r,s,o,a;return a=this.properties,s=a[a.length-1],2>this.properties.length&&!this.base.isComplex()&&!(null!=s?s.isComplex():void 0)?[this,this]:(n=new t(this.base,this.properties.slice(0,-1)),n.isComplex()&&(r=new x(e.scope.freeVariable("base")),n=new t(new O(new i(r,n)))),s?(s.isComplex()&&(o=new x(e.scope.freeVariable("name")),s=new w(new i(o,s.index)),o=new w(o)),[n.add(s),new t(r||n.base,[o||s])]):[n,r])},t.prototype.compileNode=function(e){var t,n,i,r,s;for(this.base.front=this.front,s=this.properties,t=this.base.compileToFragments(e,s.length?T:null),(this.base instanceof O||s.length)&&B.test(st(t))&&t.push(this.makeCode(".")),n=0,i=s.length;i>n;n++)r=s[n],t.push.apply(t,r.compileToFragments(e));return t},t.prototype.unfoldSoak=function(e){return null!=this.unfoldedSoak?this.unfoldedSoak:this.unfoldedSoak=function(n){return function(){var r,s,o,a,c,h,l,p,d,f;if(o=n.base.unfoldSoak(e))return(p=o.body.properties).push.apply(p,n.properties),o;for(d=n.properties,s=a=0,c=d.length;c>a;s=++a)if(h=d[s],h.soak)return h.soak=!1,r=new t(n.base,n.properties.slice(0,s)),f=new t(n.base,n.properties.slice(s)),r.isComplex()&&(l=new x(e.scope.freeVariable("ref")),r=new O(new i(l,r)),f.base=l),new b(new u(r),f,{soak:!0});return!1}}(this)()},t}(r),e.Comment=l=function(e){function t(e){this.comment=e}return kt(t,e),t.prototype.isStatement=Q,t.prototype.makeReturn=X,t.prototype.compileNode=function(e,t){var n,i;return i=this.comment.replace(/^(\s*)#(?=\s)/gm,"$1 *"),n="/*"+ut(i,this.tab)+(Tt.call(i,"\n")>=0?"\n"+this.tab:"")+" */",(t||e.level)===L&&(n=e.indent+n),[this.makeCode("\n"),this.makeCode(n)]},t}(r),e.Call=o=function(e){function n(e,t,n){this.args=null!=t?t:[],this.soak=n,this.isNew=!1,this.isSuper="super"===e,this.variable=this.isSuper?null:e,e instanceof z&&e.isNotCallable()&&e.error("literal is not a function")}return kt(n,e),n.prototype.children=["variable","args"],n.prototype.newInstance=function(){var e,t;return e=(null!=(t=this.variable)?t.base:void 0)||this.variable,e instanceof n&&!e.isNew?e.newInstance():this.isNew=!0,this},n.prototype.superReference=function(e){var n,r,s,o,a,c,h,l;return a=e.scope.namedMethod(),(null!=a?a.klass:void 0)?(o=a.klass,c=a.name,l=a.variable,o.isComplex()&&(s=new x(e.scope.parent.freeVariable("base")),r=new z(new O(new i(s,o))),l.base=r,l.properties.splice(0,o.properties.length)),(c.isComplex()||c instanceof w&&c.index.isAssignable())&&(h=new x(e.scope.parent.freeVariable("name")),c=new w(new i(h,c.index)),l.properties.pop(),l.properties.push(c)),n=[new t(new x("__super__"))],a["static"]&&n.push(new t(new x("constructor"))),n.push(null!=h?new w(h):c),new z(null!=s?s:o,n).compile(e)):(null!=a?a.ctor:void 0)?a.name+".__super__.constructor":this.error("cannot call super outside of an instance method.")},n.prototype.superThis=function(e){var t;return t=e.scope.method,t&&!t.klass&&t.context||"this"},n.prototype.unfoldSoak=function(e){var t,i,r,s,o,a,c,h,l;if(this.soak){if(this.variable){if(i=yt(e,this,"variable"))return i;c=new z(this.variable).cacheReference(e),s=c[0],l=c[1]}else s=new x(this.superReference(e)),l=new z(s);return l=new n(l,this.args),l.isNew=this.isNew,s=new x("typeof "+s.compile(e)+' === "function"'),new b(s,new z(l),{soak:!0})}for(t=this,a=[];;)if(t.variable instanceof n)a.push(t),t=t.variable;else{if(!(t.variable instanceof z))break;if(a.push(t),!((t=t.variable.base)instanceof n))break}for(h=a.reverse(),r=0,o=h.length;o>r;r++)t=h[r],i&&(t.variable instanceof n?t.variable=i:t.variable.base=i),i=yt(e,t,"variable");return i},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l;if(null!=(h=this.variable)&&(h.front=this.front),r=G.compileSplattedArray(e,this.args,!0),r.length)return this.compileSplat(e,r);for(i=[],l=this.args,n=o=0,a=l.length;a>o;n=++o)t=l[n],n&&i.push(this.makeCode(", ")),i.push.apply(i,t.compileToFragments(e,E));return s=[],this.isSuper?(c=this.superReference(e)+(".call("+this.superThis(e)),i.length&&(c+=", "),s.push(this.makeCode(c))):(this.isNew&&s.push(this.makeCode("new ")),s.push.apply(s,this.variable.compileToFragments(e,T)),s.push(this.makeCode("("))),s.push.apply(s,i),s.push(this.makeCode(")")),s},n.prototype.compileSplat=function(e,t){var n,i,r,s,o,a;return this.isSuper?[].concat(this.makeCode(this.superReference(e)+".apply("+this.superThis(e)+", "),t,this.makeCode(")")):this.isNew?(s=this.tab+q,[].concat(this.makeCode("(function(func, args, ctor) {\n"+s+"ctor.prototype = func.prototype;\n"+s+"var child = new ctor, result = func.apply(child, args);\n"+s+"return Object(result) === result ? result : child;\n"+this.tab+"})("),this.variable.compileToFragments(e,E),this.makeCode(", "),t,this.makeCode(", function(){})"))):(n=[],i=new z(this.variable),(o=i.properties.pop())&&i.isComplex()?(a=e.scope.freeVariable("ref"),n=n.concat(this.makeCode("("+a+" = "),i.compileToFragments(e,E),this.makeCode(")"),o.compileToFragments(e))):(r=i.compileToFragments(e,T),B.test(st(r))&&(r=this.wrapInBraces(r)),o?(a=st(r),r.push.apply(r,o.compileToFragments(e))):a="null",n=n.concat(r)),n=n.concat(this.makeCode(".apply("+a+", "),t,this.makeCode(")")))},n}(r),e.Extends=d=function(e){function t(e,t){this.child=e,this.parent=t}return kt(t,e),t.prototype.children=["child","parent"],t.prototype.compileToFragments=function(e){return new o(new z(new x(bt("extend",e))),[this.child,this.parent]).compileToFragments(e)},t}(r),e.Access=t=function(e){function t(e,t){this.name=e,this.name.asKey=!0,this.soak="soak"===t}return kt(t,e),t.prototype.children=["name"],t.prototype.compileToFragments=function(e){var t;return t=this.name.compileToFragments(e),g.test(st(t))?t.unshift(this.makeCode(".")):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.isComplex=D,t}(r),e.Index=w=function(e){function t(e){this.index=e}return kt(t,e),t.prototype.children=["index"],t.prototype.compileToFragments=function(e){return[].concat(this.makeCode("["),this.index.compileToFragments(e,N),this.makeCode("]"))},t.prototype.isComplex=function(){return this.index.isComplex()},t}(r),e.Range=j=function(e){function t(e,t,n){this.from=e,this.to=t,this.exclusive="exclusive"===n,this.equals=this.exclusive?"":"="}return kt(t,e),t.prototype.children=["from","to"],t.prototype.compileVariables=function(e){var t,n,i,r,s,o;return e=lt(e,{top:!0}),t=tt(e,"isComplex"),n=this.cacheToCodeFragments(this.from.cache(e,E,t)),this.fromC=n[0],this.fromVar=n[1],i=this.cacheToCodeFragments(this.to.cache(e,E,t)),this.toC=i[0],this.toVar=i[1],(o=tt(e,"step"))&&(r=this.cacheToCodeFragments(o.cache(e,E,t)),this.step=r[0],this.stepVar=r[1]),s=[this.fromVar.match(R),this.toVar.match(R)],this.fromNum=s[0],this.toNum=s[1],this.stepVar?this.stepNum=this.stepVar.match(R):void 0},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f;return this.fromVar||this.compileVariables(e),e.index?(a=this.fromNum&&this.toNum,s=tt(e,"index"),o=tt(e,"name"),h=o&&o!==s,f=s+" = "+this.fromC,this.toC!==this.toVar&&(f+=", "+this.toC),this.step!==this.stepVar&&(f+=", "+this.step),l=[s+" <"+this.equals,s+" >"+this.equals],c=l[0],r=l[1],n=this.stepNum?pt(this.stepNum[0])>0?c+" "+this.toVar:r+" "+this.toVar:a?(u=[pt(this.fromNum[0]),pt(this.toNum[0])],i=u[0],d=u[1],u,d>=i?c+" "+d:r+" "+d):(t=this.stepVar?this.stepVar+" > 0":this.fromVar+" <= "+this.toVar,t+" ? "+c+" "+this.toVar+" : "+r+" "+this.toVar),p=this.stepVar?s+" += "+this.stepVar:a?h?d>=i?"++"+s:"--"+s:d>=i?s+"++":s+"--":h?t+" ? ++"+s+" : --"+s:t+" ? "+s+"++ : "+s+"--",h&&(f=o+" = "+f),h&&(p=o+" = "+p),[this.makeCode(f+"; "+n+"; "+p)]):this.compileArray(e)},t.prototype.compileArray=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d;return this.fromNum&&this.toNum&&20>=Math.abs(this.fromNum-this.toNum)?(h=function(){p=[];for(var e=l=+this.fromNum,t=+this.toNum;t>=l?t>=e:e>=t;t>=l?e++:e--)p.push(e);return p}.apply(this),this.exclusive&&h.pop(),[this.makeCode("["+h.join(", ")+"]")]):(o=this.tab+q,s=e.scope.freeVariable("i",{single:!0}),u=e.scope.freeVariable("results"),c="\n"+o+u+" = [];",this.fromNum&&this.toNum?(e.index=s,n=st(this.compileNode(e))):(d=s+" = "+this.fromC+(this.toC!==this.toVar?", "+this.toC:""),i=this.fromVar+" <= "+this.toVar,n="var "+d+"; "+i+" ? "+s+" <"+this.equals+" "+this.toVar+" : "+s+" >"+this.equals+" "+this.toVar+"; "+i+" ? "+s+"++ : "+s+"--"),a="{ "+u+".push("+s+"); }\n"+o+"return "+u+";\n"+e.indent,r=function(e){return null!=e?e.contains(at):void 0},(r(this.from)||r(this.to))&&(t=", arguments"),[this.makeCode("(function() {"+c+"\n"+o+"for ("+n+")"+a+"}).apply(this"+(null!=t?t:"")+")")])},t}(r),e.Slice=U=function(e){function t(e){this.range=e,t.__super__.constructor.call(this)}return kt(t,e),t.prototype.children=["range"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;return s=this.range,o=s.to,i=s.from,r=i&&i.compileToFragments(e,N)||[this.makeCode("0")],o&&(t=o.compileToFragments(e,N),n=st(t),(this.range.exclusive||-1!==+n)&&(a=", "+(this.range.exclusive?n:B.test(n)?""+(+n+1):(t=o.compileToFragments(e,T),"+"+st(t)+" + 1 || 9e9")))),[this.makeCode(".slice("+st(r)+(a||"")+")")]},t}(r),e.Obj=A=function(e){function n(e,t){this.generated=null!=t?t:!1,this.objects=this.properties=e||[]}return kt(n,e),n.prototype.children=["properties"],n.prototype.compileNode=function(e){var n,r,s,o,a,c,h,u,p,d,f,m,g,v,y,b,k,w,T,C,E;if(T=this.properties,this.generated)for(h=0,g=T.length;g>h;h++)b=T[h],b instanceof z&&b.error("cannot have an implicit value in an implicit object");for(r=p=0,v=T.length;v>p&&(w=T[r],!((w.variable||w).base instanceof O));r=++p);for(s=T.length>r,a=e.indent+=q,m=this.lastNonComment(this.properties),n=[],s&&(k=e.scope.freeVariable("obj"),n.push(this.makeCode("(\n"+a+k+" = "))),n.push(this.makeCode("{"+(0===T.length||0===r?"}":"\n"))),o=f=0,y=T.length;y>f;o=++f)w=T[o],o===r&&(0!==o&&n.push(this.makeCode("\n"+a+"}")),n.push(this.makeCode(",\n"))),u=o===T.length-1||o===r-1?"":w===m||w instanceof l?"\n":",\n",c=w instanceof l?"":a,s&&r>o&&(c+=q),w instanceof i&&w.variable instanceof z&&w.variable.hasProperties()&&w.variable.error("invalid object key"),w instanceof z&&w["this"]&&(w=new i(w.properties[0].name,w,"object")),w instanceof l||(r>o?(w instanceof i||(w=new i(w,w,"object")),(w.variable.base||w.variable).asKey=!0):(w instanceof i?(d=w.variable,E=w.value):(C=w.base.cache(e),d=C[0],E=C[1]),w=new i(new z(new x(k),[new t(d)]),E))),c&&n.push(this.makeCode(c)),n.push.apply(n,w.compileToFragments(e,L)),u&&n.push(this.makeCode(u));return s?n.push(this.makeCode(",\n"+a+k+"\n"+this.tab+")")):0!==T.length&&n.push(this.makeCode("\n"+this.tab+"}")),this.front&&!s?this.wrapInBraces(n):n},n.prototype.assigns=function(e){var t,n,i,r;for(r=this.properties,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},n}(r),e.Arr=n=function(e){function t(e){this.objects=e||[]}return kt(t,e),t.prototype.children=["objects"],t.prototype.compileNode=function(e){var t,n,i,r,s,o,a;if(!this.objects.length)return[this.makeCode("[]")];if(e.indent+=q,t=G.compileSplattedArray(e,this.objects),t.length)return t;for(t=[],n=function(){var t,n,i,r;for(i=this.objects,r=[],t=0,n=i.length;n>t;t++)a=i[t],r.push(a.compileToFragments(e,E));return r}.call(this),r=s=0,o=n.length;o>s;r=++s)i=n[r],r&&t.push(this.makeCode(", ")),t.push.apply(t,i);return st(t).indexOf("\n")>=0?(t.unshift(this.makeCode("[\n"+e.indent)),t.push(this.makeCode("\n"+this.tab+"]"))):(t.unshift(this.makeCode("[")),t.push(this.makeCode("]"))),t},t.prototype.assigns=function(e){var t,n,i,r;for(r=this.objects,t=0,n=r.length;n>t;t++)if(i=r[t],i.assigns(e))return!0;return!1},t}(r),e.Class=a=function(e){function n(e,t,n){this.variable=e,this.parent=t,this.body=null!=n?n:new s,this.boundFuncs=[],this.body.classBody=!0}return kt(n,e),n.prototype.children=["variable","parent","body"],n.prototype.determineName=function(){var e,n,i;return this.variable?(n=this.variable.properties,i=n[n.length-1],e=i?i instanceof t&&i.name.value:this.variable.base.value,Tt.call(V,e)>=0&&this.variable.error("class variable name may not be "+e),e&&(e=g.test(e)&&e)):null},n.prototype.setContext=function(e){return this.body.traverseChildren(!1,function(t){return t.classBody?!1:t instanceof x&&"this"===t.value?t.value=e:t instanceof c&&t.bound?t.context=e:void 0})},n.prototype.addBoundFunctions=function(e){var n,i,r,s,o;for(o=this.boundFuncs,i=0,r=o.length;r>i;i++)n=o[i],s=new z(new x("this"),[new t(n)]).compile(e),this.ctor.body.unshift(new x(s+" = "+bt("bind",e)+"("+s+", this)"))},n.prototype.addProperties=function(e,n,r){var s,o,a,h,l,u;return u=e.base.properties.slice(0),h=function(){var e;for(e=[];o=u.shift();)o instanceof i&&(a=o.variable.base,delete o.context,l=o.value,"constructor"===a.value?(this.ctor&&o.error("cannot define more than one constructor in a class"),l.bound&&o.error("cannot define a constructor as a bound function"),l instanceof c?o=this.ctor=l:(this.externalCtor=r.classScope.freeVariable("class"),o=new i(new x(this.externalCtor),l))):o.variable["this"]?l["static"]=!0:(s=a.isComplex()?new w(a):new t(a),o.variable=new z(new x(n),[new t(new x("prototype")),s]),l instanceof c&&l.bound&&(this.boundFuncs.push(a),l.bound=!1))),e.push(o);return e}.call(this),et(h)},n.prototype.walkBody=function(e,t){return this.traverseChildren(!1,function(r){return function(o){var a,c,h,l,u,p,d;if(a=!0,o instanceof n)return!1;if(o instanceof s){for(d=c=o.expressions,h=l=0,u=d.length;u>l;h=++l)p=d[h],p instanceof i&&p.variable.looksStatic(e)?p.value["static"]=!0:p instanceof z&&p.isObject(!0)&&(a=!1,c[h]=r.addProperties(p,e,t));o.expressions=c=rt(c)}return a&&!(o instanceof n)}}(this))},n.prototype.hoistDirectivePrologue=function(){var e,t,n;for(t=0,e=this.body.expressions;(n=e[t])&&n instanceof l||n instanceof z&&n.isString();)++t;return this.directives=e.splice(0,t)},n.prototype.ensureConstructor=function(e){return this.ctor||(this.ctor=new c,this.externalCtor?this.ctor.body.push(new x(this.externalCtor+".apply(this, arguments)")):this.parent&&this.ctor.body.push(new x(e+".__super__.constructor.apply(this, arguments)")),this.ctor.body.makeReturn(),this.body.expressions.unshift(this.ctor)),this.ctor.ctor=this.ctor.name=e,this.ctor.klass=null,this.ctor.noReturn=!0},n.prototype.compileNode=function(e){var t,n,r,a,h,l,u,p,f;return(a=this.body.jumps())&&a.error("Class bodies cannot contain pure statements"),(n=this.body.contains(at))&&n.error("Class bodies shouldn't reference arguments"),u=this.determineName()||"_Class",u.reserved&&(u="_"+u),l=new x(u),r=new c([],s.wrap([this.body])),t=[],e.classScope=r.makeScope(e.scope),this.hoistDirectivePrologue(),this.setContext(u),this.walkBody(u,e),this.ensureConstructor(u),this.addBoundFunctions(e),this.body.spaced=!0,this.body.expressions.push(l),this.parent&&(f=new x(e.classScope.freeVariable("superClass",{reserve:!1})),this.body.expressions.unshift(new d(l,f)),r.params.push(new _(f)),t.push(this.parent)),(p=this.body.expressions).unshift.apply(p,this.directives),h=new O(new o(r,t)),this.variable&&(h=new i(this.variable,h)),h.compileToFragments(e)},n}(r),e.Assign=i=function(e){function n(e,t,n,i){var r,s,o;this.variable=e,this.value=t,this.context=n,this.param=i&&i.param,this.subpattern=i&&i.subpattern,o=s=this.variable.unwrapAll().value,r=Tt.call(V,o)>=0,r&&"object"!==this.context&&this.variable.error('variable name may not be "'+s+'"')}return kt(n,e),n.prototype.children=["variable","value"],n.prototype.isStatement=function(e){return(null!=e?e.level:void 0)===L&&null!=this.context&&Tt.call(this.context,"?")>=0 -},n.prototype.assigns=function(e){return this["object"===this.context?"value":"variable"].assigns(e)},n.prototype.unfoldSoak=function(e){return yt(e,this,"variable")},n.prototype.compileNode=function(e){var t,n,i,r,s,o,a,h,l,u,p,d,f,m;if(i=this.variable instanceof z){if(this.variable.isArray()||this.variable.isObject())return this.compilePatternMatch(e);if(this.variable.isSplice())return this.compileSplice(e);if("||="===(h=this.context)||"&&="===h||"?="===h)return this.compileConditional(e);if("**="===(l=this.context)||"//="===l||"%%="===l)return this.compileSpecialMath(e)}return this.value instanceof c&&(this.value["static"]?(this.value.klass=this.variable.base,this.value.name=this.variable.properties[0],this.value.variable=this.variable):(null!=(u=this.variable.properties)?u.length:void 0)>=2&&(p=this.variable.properties,o=p.length>=3?Ct.call(p,0,r=p.length-2):(r=0,[]),a=p[r++],s=p[r++],"prototype"===(null!=(d=a.name)?d.value:void 0)&&(this.value.klass=new z(this.variable.base,o),this.value.name=s,this.value.variable=this.variable))),this.context||(m=this.variable.unwrapAll(),m.isAssignable()||this.variable.error('"'+this.variable.compile(e)+'" cannot be assigned'),("function"==typeof m.hasProperties?m.hasProperties():void 0)||(this.param?e.scope.add(m.value,"var"):e.scope.find(m.value))),f=this.value.compileToFragments(e,E),n=this.variable.compileToFragments(e,E),"object"===this.context?n.concat(this.makeCode(": "),f):(t=n.concat(this.makeCode(" "+(this.context||"=")+" "),f),E>=e.level?t:this.wrapInBraces(t))},n.prototype.compilePatternMatch=function(e){var i,r,s,o,a,c,h,l,u,d,f,m,v,y,b,k,T,C,N,S,D,R,A,I,_,j,M,B;if(I=e.level===L,j=this.value,y=this.variable.base.objects,!(b=y.length))return s=j.compileToFragments(e),e.level>=F?this.wrapInBraces(s):s;if(l=this.variable.isObject(),I&&1===b&&!((v=y[0])instanceof G))return v instanceof n?(T=v,C=T.variable,h=C.base,v=T.value):h=l?v["this"]?v.properties[0].name:v:new x(0),i=g.test(h.unwrap().value||0),j=new z(j),j.properties.push(new(i?t:w)(h)),N=v.unwrap().value,Tt.call($,N)>=0&&v.error("assignment to a reserved word: "+v.compile(e)),new n(v,j,null,{param:this.param}).compileToFragments(e,L);for(M=j.compileToFragments(e,E),B=st(M),r=[],o=!1,(!g.test(B)||this.variable.assigns(B))&&(r.push([this.makeCode((k=e.scope.freeVariable("ref"))+" = ")].concat(Ct.call(M))),M=[this.makeCode(k)],B=k),c=d=0,f=y.length;f>d;c=++d){if(v=y[c],h=c,l&&(v instanceof n?(S=v,D=S.variable,h=D.base,v=S.value):v.base instanceof O?(R=new z(v.unwrapAll()).cacheReference(e),v=R[0],h=R[1]):h=v["this"]?v.properties[0].name:v),!o&&v instanceof G)m=v.name.unwrap().value,v=v.unwrap(),_=b+" <= "+B+".length ? "+bt("slice",e)+".call("+B+", "+c,(A=b-c-1)?(u=e.scope.freeVariable("i",{single:!0}),_+=", "+u+" = "+B+".length - "+A+") : ("+u+" = "+c+", [])"):_+=") : []",_=new x(_),o=u+"++";else{if(!o&&v instanceof p){(A=b-c-1)&&(1===A?o=B+".length - 1":(u=e.scope.freeVariable("i",{single:!0}),_=new x(u+" = "+B+".length - "+A),o=u+"++",r.push(_.compileToFragments(e,E))));continue}m=v.unwrap().value,(v instanceof G||v instanceof p)&&v.error("multiple splats/expansions are disallowed in an assignment"),"number"==typeof h?(h=new x(o||h),i=!1):i=l&&g.test(h.unwrap().value||0),_=new z(new x(B),[new(i?t:w)(h)])}null!=m&&Tt.call($,m)>=0&&v.error("assignment to a reserved word: "+v.compile(e)),r.push(new n(v,_,null,{param:this.param,subpattern:!0}).compileToFragments(e,E))}return I||this.subpattern||r.push(M),a=this.joinFragmentArrays(r,", "),E>e.level?a:this.wrapInBraces(a)},n.prototype.compileConditional=function(e){var t,i,r,s;return r=this.variable.cacheReference(e),i=r[0],s=r[1],!i.properties.length&&i.base instanceof x&&"this"!==i.base.value&&!e.scope.check(i.base.value)&&this.variable.error('the variable "'+i.base.value+"\" can't be assigned with "+this.context+" because it has not been declared before"),Tt.call(this.context,"?")>=0?(e.isExistentialEquals=!0,new b(new u(i),s,{type:"if"}).addElse(new n(s,this.value,"=")).compileToFragments(e)):(t=new I(this.context.slice(0,-1),i,new n(s,this.value,"=")).compileToFragments(e),E>=e.level?t:this.wrapInBraces(t))},n.prototype.compileSpecialMath=function(e){var t,i,r;return i=this.variable.cacheReference(e),t=i[0],r=i[1],new n(t,new I(this.context.slice(0,-1),r,this.value)).compileToFragments(e)},n.prototype.compileSplice=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;return a=this.variable.properties.pop().range,i=a.from,l=a.to,n=a.exclusive,o=this.variable.compile(e),i?(c=this.cacheToCodeFragments(i.cache(e,F)),r=c[0],s=c[1]):r=s="0",l?i instanceof z&&i.isSimpleNumber()&&l instanceof z&&l.isSimpleNumber()?(l=l.compile(e)-s,n||(l+=1)):(l=l.compile(e,T)+" - "+s,n||(l+=" + 1")):l="9e9",h=this.value.cache(e,E),u=h[0],p=h[1],t=[].concat(this.makeCode("[].splice.apply("+o+", ["+r+", "+l+"].concat("),u,this.makeCode(")), "),p),e.level>L?this.wrapInBraces(t):t},n}(r),e.Code=c=function(e){function t(e,t,n){this.params=e||[],this.body=t||new s,this.bound="boundfunc"===n,this.isGenerator=!!this.body.contains(function(e){var t;return e instanceof I&&("yield"===(t=e.operator)||"yield*"===t)})}return kt(t,e),t.prototype.children=["params","body"],t.prototype.isStatement=function(){return!!this.ctor},t.prototype.jumps=D,t.prototype.makeScope=function(e){return new P(e,this.body,this)},t.prototype.compileNode=function(e){var r,a,c,h,l,u,d,f,m,g,v,y,k,w,C,E,F,N,L,S,D,R,A,O,$,j,M,B,V,P,U,G,H;if(this.bound&&(null!=(A=e.scope.method)?A.bound:void 0)&&(this.context=e.scope.method.context),this.bound&&!this.context)return this.context="_this",H=new t([new _(new x(this.context))],new s([this])),a=new o(H,[new x("this")]),a.updateLocationDataIfMissing(this.locationData),a.compileNode(e);for(e.scope=tt(e,"classScope")||this.makeScope(e.scope),e.scope.shared=tt(e,"sharedScope"),e.indent+=q,delete e.bare,delete e.isExistentialEquals,L=[],h=[],O=this.params,u=0,m=O.length;m>u;u++)N=O[u],N instanceof p||e.scope.parameter(N.asReference(e));for($=this.params,d=0,g=$.length;g>d;d++)if(N=$[d],N.splat||N instanceof p){for(j=this.params,f=0,v=j.length;v>f;f++)F=j[f],F instanceof p||!F.name.value||e.scope.add(F.name.value,"var",!0);V=new i(new z(new n(function(){var t,n,i,r;for(i=this.params,r=[],n=0,t=i.length;t>n;n++)F=i[n],r.push(F.asReference(e));return r}.call(this))),new z(new x("arguments")));break}for(M=this.params,E=0,y=M.length;y>E;E++)N=M[E],N.isComplex()?(U=R=N.asReference(e),N.value&&(U=new I("?",R,N.value)),h.push(new i(new z(N.name),U,"=",{param:!0}))):(R=N,N.value&&(C=new x(R.name.value+" == null"),U=new i(new z(N.name),N.value,"="),h.push(new b(C,U)))),V||L.push(R);for(G=this.body.isEmpty(),V&&h.unshift(V),h.length&&(B=this.body.expressions).unshift.apply(B,h),l=S=0,k=L.length;k>S;l=++S)F=L[l],L[l]=F.compileToFragments(e),e.scope.parameter(st(L[l]));for(P=[],this.eachParamName(function(e,t){return Tt.call(P,e)>=0&&t.error("multiple parameters named "+e),P.push(e)}),G||this.noReturn||this.body.makeReturn(),c="function",this.isGenerator&&(c+="*"),this.ctor&&(c+=" "+this.name),c+="(",r=[this.makeCode(c)],l=D=0,w=L.length;w>D;l=++D)F=L[l],l&&r.push(this.makeCode(", ")),r.push.apply(r,F);return r.push(this.makeCode(") {")),this.body.isEmpty()||(r=r.concat(this.makeCode("\n"),this.body.compileWithDeclarations(e),this.makeCode("\n"+this.tab))),r.push(this.makeCode("}")),this.ctor?[this.makeCode(this.tab)].concat(Ct.call(r)):this.front||e.level>=T?this.wrapInBraces(r):r},t.prototype.eachParamName=function(e){var t,n,i,r,s;for(r=this.params,s=[],t=0,n=r.length;n>t;t++)i=r[t],s.push(i.eachName(e));return s},t.prototype.traverseChildren=function(e,n){return e?t.__super__.traverseChildren.call(this,e,n):void 0},t}(r),e.Param=_=function(e){function t(e,t,n){var i,r;this.name=e,this.value=t,this.splat=n,r=i=this.name.unwrapAll().value,Tt.call(V,r)>=0&&this.name.error('parameter name "'+i+'" is not allowed')}return kt(t,e),t.prototype.children=["name","value"],t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e,E)},t.prototype.asReference=function(e){var t,n;return this.reference?this.reference:(n=this.name,n["this"]?(t=n.properties[0].name.value,t.reserved&&(t="_"+t),n=new x(e.scope.freeVariable(t))):n.isComplex()&&(n=new x(e.scope.freeVariable("arg"))),n=new z(n),this.splat&&(n=new G(n)),n.updateLocationDataIfMissing(this.locationData),this.reference=n)},t.prototype.isComplex=function(){return this.name.isComplex()},t.prototype.eachName=function(e,t){var n,r,s,o,a,c;if(null==t&&(t=this.name),n=function(t){return e("@"+t.properties[0].name.value,t)},t instanceof x)return e(t.value,t);if(t instanceof z)return n(t);for(c=t.objects,r=0,s=c.length;s>r;r++)a=c[r],a instanceof i?this.eachName(e,a.value.unwrap()):a instanceof G?(o=a.name.unwrap(),e(o.value,o)):a instanceof z?a.isArray()||a.isObject()?this.eachName(e,a.base):a["this"]?n(a):e(a.base.value,a.base):a instanceof p||a.error("illegal parameter "+a.compile())},t}(r),e.Splat=G=function(e){function t(e){this.name=e.compile?e:new x(e)}return kt(t,e),t.prototype.children=["name"],t.prototype.isAssignable=Q,t.prototype.assigns=function(e){return this.name.assigns(e)},t.prototype.compileToFragments=function(e){return this.name.compileToFragments(e)},t.prototype.unwrap=function(){return this.name},t.compileSplattedArray=function(e,n,i){var r,s,o,a,c,h,l,u,p,d,f;for(l=-1;(f=n[++l])&&!(f instanceof t););if(l>=n.length)return[];if(1===n.length)return f=n[0],c=f.compileToFragments(e,E),i?c:[].concat(f.makeCode(bt("slice",e)+".call("),c,f.makeCode(")"));for(r=n.slice(l),h=u=0,d=r.length;d>u;h=++u)f=r[h],o=f.compileToFragments(e,E),r[h]=f instanceof t?[].concat(f.makeCode(bt("slice",e)+".call("),o,f.makeCode(")")):[].concat(f.makeCode("["),o,f.makeCode("]"));return 0===l?(f=n[0],a=f.joinFragmentArrays(r.slice(1),", "),r[0].concat(f.makeCode(".concat("),a,f.makeCode(")"))):(s=function(){var t,i,r,s;for(r=n.slice(0,l),s=[],t=0,i=r.length;i>t;t++)f=r[t],s.push(f.compileToFragments(e,E));return s}(),s=n[0].joinFragmentArrays(s,", "),a=n[l].joinFragmentArrays(r,", "),p=n[n.length-1],[].concat(n[0].makeCode("["),s,n[l].makeCode("].concat("),a,p.makeCode(")")))},t}(r),e.Expansion=p=function(e){function t(){return t.__super__.constructor.apply(this,arguments)}return kt(t,e),t.prototype.isComplex=D,t.prototype.compileNode=function(){return this.error("Expansion must be used inside a destructuring assignment or parameter list")},t.prototype.asReference=function(){return this},t.prototype.eachName=function(){},t}(r),e.While=J=function(e){function t(e,t){this.condition=(null!=t?t.invert:void 0)?e.invert():e,this.guard=null!=t?t.guard:void 0}return kt(t,e),t.prototype.children=["condition","guard","body"],t.prototype.isStatement=Q,t.prototype.makeReturn=function(e){return e?t.__super__.makeReturn.apply(this,arguments):(this.returns=!this.jumps({loop:!0}),this)},t.prototype.addBody=function(e){return this.body=e,this},t.prototype.jumps=function(){var e,t,n,i,r;if(e=this.body.expressions,!e.length)return!1;for(t=0,i=e.length;i>t;t++)if(r=e[t],n=r.jumps({loop:!0}))return n;return!1},t.prototype.compileNode=function(e){var t,n,i,r;return e.indent+=q,r="",n=this.body,n.isEmpty()?n=this.makeCode(""):(this.returns&&(n.makeReturn(i=e.scope.freeVariable("results")),r=""+this.tab+i+" = [];\n"),this.guard&&(n.expressions.length>1?n.expressions.unshift(new b(new O(this.guard).invert(),new x("continue"))):this.guard&&(n=s.wrap([new b(this.guard,n)]))),n=[].concat(this.makeCode("\n"),n.compileToFragments(e,L),this.makeCode("\n"+this.tab))),t=[].concat(this.makeCode(r+this.tab+"while ("),this.condition.compileToFragments(e,N),this.makeCode(") {"),n,this.makeCode("}")),this.returns&&t.push(this.makeCode("\n"+this.tab+"return "+i+";")),t},t}(r),e.Op=I=function(e){function n(e,t,n,i){if("in"===e)return new k(t,n);if("do"===e)return this.generateDo(t);if("new"===e){if(t instanceof o&&!t["do"]&&!t.isNew)return t.newInstance();(t instanceof c&&t.bound||t["do"])&&(t=new O(t))}return this.operator=r[e]||e,this.first=t,this.second=n,this.flip=!!i,this}var r,s;return kt(n,e),r={"==":"===","!=":"!==",of:"in",yieldfrom:"yield*"},s={"!==":"===","===":"!=="},n.prototype.children=["first","second"],n.prototype.isSimpleNumber=D,n.prototype.isYield=function(){var e;return"yield"===(e=this.operator)||"yield*"===e},n.prototype.isYieldReturn=function(){return this.isYield()&&this.first instanceof M},n.prototype.isUnary=function(){return!this.second},n.prototype.isComplex=function(){var e;return!(this.isUnary()&&("+"===(e=this.operator)||"-"===e)&&this.first instanceof z&&this.first.isSimpleNumber())},n.prototype.isChainable=function(){var e;return"<"===(e=this.operator)||">"===e||">="===e||"<="===e||"==="===e||"!=="===e},n.prototype.invert=function(){var e,t,i,r,o;if(this.isChainable()&&this.first.isChainable()){for(e=!0,t=this;t&&t.operator;)e&&(e=t.operator in s),t=t.first;if(!e)return new O(this).invert();for(t=this;t&&t.operator;)t.invert=!t.invert,t.operator=s[t.operator],t=t.first;return this}return(r=s[this.operator])?(this.operator=r,this.first.unwrap()instanceof n&&this.first.invert(),this):this.second?new O(this).invert():"!"===this.operator&&(i=this.first.unwrap())instanceof n&&("!"===(o=i.operator)||"in"===o||"instanceof"===o)?i:new n("!",this)},n.prototype.unfoldSoak=function(e){var t;return("++"===(t=this.operator)||"--"===t||"delete"===t)&&yt(e,this,"first")},n.prototype.generateDo=function(e){var t,n,r,s,a,h,l,u;for(h=[],n=e instanceof i&&(l=e.value.unwrap())instanceof c?l:e,u=n.params||[],r=0,s=u.length;s>r;r++)a=u[r],a.value?(h.push(a.value),delete a.value):h.push(a);return t=new o(e,h),t["do"]=!0,t},n.prototype.compileNode=function(e){var t,n,i,r,s,o;if(n=this.isChainable()&&this.first.isChainable(),n||(this.first.front=this.front),"delete"===this.operator&&e.scope.check(this.first.unwrapAll().value)&&this.error("delete operand may not be argument or var"),("--"===(r=this.operator)||"++"===r)&&(s=this.first.unwrapAll().value,Tt.call(V,s)>=0)&&this.error('cannot increment/decrement "'+this.first.unwrapAll().value+'"'),this.isYield())return this.compileYield(e);if(this.isUnary())return this.compileUnary(e);if(n)return this.compileChain(e);switch(this.operator){case"?":return this.compileExistence(e);case"**":return this.compilePower(e);case"//":return this.compileFloorDivision(e);case"%%":return this.compileModulo(e);default:return i=this.first.compileToFragments(e,F),o=this.second.compileToFragments(e,F),t=[].concat(i,this.makeCode(" "+this.operator+" "),o),F>=e.level?t:this.wrapInBraces(t)}},n.prototype.compileChain=function(e){var t,n,i,r;return i=this.first.second.cache(e),this.first.second=i[0],r=i[1],n=this.first.compileToFragments(e,F),t=n.concat(this.makeCode(" "+(this.invert?"&&":"||")+" "),r.compileToFragments(e),this.makeCode(" "+this.operator+" "),this.second.compileToFragments(e,F)),this.wrapInBraces(t)},n.prototype.compileExistence=function(e){var t,n;return this.first.isComplex()?(n=new x(e.scope.freeVariable("ref")),t=new O(new i(n,this.first))):(t=this.first,n=t),new b(new u(t),n,{type:"if"}).addElse(this.second).compileToFragments(e)},n.prototype.compileUnary=function(e){var t,i,r;return i=[],t=this.operator,i.push([this.makeCode(t)]),"!"===t&&this.first instanceof u?(this.first.negated=!this.first.negated,this.first.compileToFragments(e)):e.level>=T?new O(this).compileToFragments(e):(r="+"===t||"-"===t,("new"===t||"typeof"===t||"delete"===t||r&&this.first instanceof n&&this.first.operator===t)&&i.push([this.makeCode(" ")]),(r&&this.first instanceof n||"new"===t&&this.first.isStatement(e))&&(this.first=new O(this.first)),i.push(this.first.compileToFragments(e,F)),this.flip&&i.reverse(),this.joinFragmentArrays(i,""))},n.prototype.compileYield=function(e){var t,n;return n=[],t=this.operator,null==e.scope.parent&&this.error("yield statements must occur within a function generator."),Tt.call(Object.keys(this.first),"expression")>=0&&!(this.first instanceof W)?this.isYieldReturn()?n.push(this.first.compileToFragments(e,L)):null!=this.first.expression&&n.push(this.first.expression.compileToFragments(e,F)):(n.push([this.makeCode("("+t+" ")]),n.push(this.first.compileToFragments(e,F)),n.push([this.makeCode(")")])),this.joinFragmentArrays(n,"")},n.prototype.compilePower=function(e){var n;return n=new z(new x("Math"),[new t(new x("pow"))]),new o(n,[this.first,this.second]).compileToFragments(e)},n.prototype.compileFloorDivision=function(e){var i,r;return r=new z(new x("Math"),[new t(new x("floor"))]),i=new n("/",this.first,this.second),new o(r,[i]).compileToFragments(e)},n.prototype.compileModulo=function(e){var t;return t=new z(new x(bt("modulo",e))),new o(t,[this.first,this.second]).compileToFragments(e)},n.prototype.toString=function(e){return n.__super__.toString.call(this,e,this.constructor.name+" "+this.operator)},n}(r),e.In=k=function(e){function t(e,t){this.object=e,this.array=t}return kt(t,e),t.prototype.children=["object","array"],t.prototype.invert=S,t.prototype.compileNode=function(e){var t,n,i,r,s;if(this.array instanceof z&&this.array.isArray()&&this.array.base.objects.length){for(s=this.array.base.objects,n=0,i=s.length;i>n;n++)if(r=s[n],r instanceof G){t=!0;break}if(!t)return this.compileOrTest(e)}return this.compileLoopTest(e)},t.prototype.compileOrTest=function(e){var t,n,i,r,s,o,a,c,h,l,u,p;for(c=this.object.cache(e,F),u=c[0],a=c[1],h=this.negated?[" !== "," && "]:[" === "," || "],t=h[0],n=h[1],p=[],l=this.array.base.objects,i=s=0,o=l.length;o>s;i=++s)r=l[i],i&&p.push(this.makeCode(n)),p=p.concat(i?a:u,this.makeCode(t),r.compileToFragments(e,T));return F>e.level?p:this.wrapInBraces(p)},t.prototype.compileLoopTest=function(e){var t,n,i,r;return i=this.object.cache(e,E),r=i[0],n=i[1],t=[].concat(this.makeCode(bt("indexOf",e)+".call("),this.array.compileToFragments(e,E),this.makeCode(", "),n,this.makeCode(") "+(this.negated?"< 0":">= 0"))),st(r)===st(n)?t:(t=r.concat(this.makeCode(", "),t),E>e.level?t:this.wrapInBraces(t))},t.prototype.toString=function(e){return t.__super__.toString.call(this,e,this.constructor.name+(this.negated?"!":""))},t}(r),e.Try=Y=function(e){function t(e,t,n,i){this.attempt=e,this.errorVariable=t,this.recovery=n,this.ensure=i}return kt(t,e),t.prototype.children=["attempt","recovery","ensure"],t.prototype.isStatement=Q,t.prototype.jumps=function(e){var t;return this.attempt.jumps(e)||(null!=(t=this.recovery)?t.jumps(e):void 0)},t.prototype.makeReturn=function(e){return this.attempt&&(this.attempt=this.attempt.makeReturn(e)),this.recovery&&(this.recovery=this.recovery.makeReturn(e)),this},t.prototype.compileNode=function(e){var t,n,r,s;return e.indent+=q,s=this.attempt.compileToFragments(e,L),t=this.recovery?(r=new x("_error"),this.errorVariable?this.recovery.unshift(new i(this.errorVariable,r)):void 0,[].concat(this.makeCode(" catch ("),r.compileToFragments(e),this.makeCode(") {\n"),this.recovery.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}"))):this.ensure||this.recovery?[]:[this.makeCode(" catch (_error) {}")],n=this.ensure?[].concat(this.makeCode(" finally {\n"),this.ensure.compileToFragments(e,L),this.makeCode("\n"+this.tab+"}")):[],[].concat(this.makeCode(this.tab+"try {\n"),s,this.makeCode("\n"+this.tab+"}"),t,n)},t}(r),e.Throw=W=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.isStatement=Q,t.prototype.jumps=D,t.prototype.makeReturn=X,t.prototype.compileNode=function(e){return[].concat(this.makeCode(this.tab+"throw "),this.expression.compileToFragments(e),this.makeCode(";"))},t}(r),e.Existence=u=function(e){function t(e){this.expression=e}return kt(t,e),t.prototype.children=["expression"],t.prototype.invert=S,t.prototype.compileNode=function(e){var t,n,i,r;return this.expression.front=this.front,i=this.expression.compile(e,F),g.test(i)&&!e.scope.check(i)?(r=this.negated?["===","||"]:["!==","&&"],t=r[0],n=r[1],i="typeof "+i+" "+t+' "undefined" '+n+" "+i+" "+t+" null"):i=i+" "+(this.negated?"==":"!=")+" null",[this.makeCode(C>=e.level?i:"("+i+")")]},t}(r),e.Parens=O=function(e){function t(e){this.body=e}return kt(t,e),t.prototype.children=["body"],t.prototype.unwrap=function(){return this.body},t.prototype.isComplex=function(){return this.body.isComplex()},t.prototype.compileNode=function(e){var t,n,i;return n=this.body.unwrap(),n instanceof z&&n.isAtomic()?(n.front=this.front,n.compileToFragments(e)):(i=n.compileToFragments(e,N),t=F>e.level&&(n instanceof I||n instanceof o||n instanceof f&&n.returns),t?i:this.wrapInBraces(i))},t}(r),e.For=f=function(e){function t(e,t){var n;this.source=t.source,this.guard=t.guard,this.step=t.step,this.name=t.name,this.index=t.index,this.body=s.wrap([e]),this.own=!!t.own,this.object=!!t.object,this.object&&(n=[this.index,this.name],this.name=n[0],this.index=n[1]),this.index instanceof z&&this.index.error("index cannot be a pattern matching expression"),this.range=this.source instanceof z&&this.source.base instanceof j&&!this.source.properties.length,this.pattern=this.name instanceof z,this.range&&this.index&&this.index.error("indexes do not apply to range loops"),this.range&&this.pattern&&this.name.error("cannot pattern match over range loops"),this.own&&!this.object&&this.name.error("cannot use own with for-in"),this.returns=!1}return kt(t,e),t.prototype.children=["body","source","guard","step"],t.prototype.compileNode=function(e){var t,n,r,o,a,c,h,l,u,p,d,f,m,v,y,k,w,T,C,F,N,S,D,A,I,_,$,j,B,V,P,U,G,H;return t=s.wrap([this.body]),D=t.expressions,T=D[D.length-1],(null!=T?T.jumps():void 0)instanceof M&&(this.returns=!1),B=this.range?this.source.base:this.source,j=e.scope,this.pattern||(F=this.name&&this.name.compile(e,E)),v=this.index&&this.index.compile(e,E),F&&!this.pattern&&j.find(F),v&&j.find(v),this.returns&&($=j.freeVariable("results")),y=this.object&&v||j.freeVariable("i",{single:!0}),k=this.range&&F||v||y,w=k!==y?k+" = ":"",this.step&&!this.range&&(A=this.cacheToCodeFragments(this.step.cache(e,E,ot)),V=A[0],U=A[1],P=U.match(R)),this.pattern&&(F=y),H="",d="",h="",f=this.tab+q,this.range?p=B.compileToFragments(lt(e,{index:y,name:F,step:this.step,isComplex:ot})):(G=this.source.compile(e,E),!F&&!this.own||g.test(G)||(h+=""+this.tab+(S=j.freeVariable("ref"))+" = "+G+";\n",G=S),F&&!this.pattern&&(N=F+" = "+G+"["+k+"]"),this.object||(V!==U&&(h+=""+this.tab+V+";\n"),this.step&&P&&(u=0>pt(P[0]))||(C=j.freeVariable("len")),a=""+w+y+" = 0, "+C+" = "+G+".length",c=""+w+y+" = "+G+".length - 1",r=y+" < "+C,o=y+" >= 0",this.step?(P?u&&(r=o,a=c):(r=U+" > 0 ? "+r+" : "+o,a="("+U+" > 0 ? ("+a+") : "+c+")"),m=y+" += "+U):m=""+(k!==y?"++"+y:y+"++"),p=[this.makeCode(a+"; "+r+"; "+w+m)])),this.returns&&(I=""+this.tab+$+" = [];\n",_="\n"+this.tab+"return "+$+";",t.makeReturn($)),this.guard&&(t.expressions.length>1?t.expressions.unshift(new b(new O(this.guard).invert(),new x("continue"))):this.guard&&(t=s.wrap([new b(this.guard,t)]))),this.pattern&&t.expressions.unshift(new i(this.name,new x(G+"["+k+"]"))),l=[].concat(this.makeCode(h),this.pluckDirectCall(e,t)),N&&(H="\n"+f+N+";"),this.object&&(p=[this.makeCode(k+" in "+G)],this.own&&(d="\n"+f+"if (!"+bt("hasProp",e)+".call("+G+", "+k+")) continue;")),n=t.compileToFragments(lt(e,{indent:f}),L),n&&n.length>0&&(n=[].concat(this.makeCode("\n"),n,this.makeCode("\n"))),[].concat(l,this.makeCode(""+(I||"")+this.tab+"for ("),p,this.makeCode(") {"+d+H),n,this.makeCode(this.tab+"}"+(_||"")))},t.prototype.pluckDirectCall=function(e,t){var n,r,s,a,h,l,u,p,d,f,m,g,v,y,b,k;for(r=[],d=t.expressions,h=l=0,u=d.length;u>l;h=++l)s=d[h],s=s.unwrapAll(),s instanceof o&&(k=null!=(f=s.variable)?f.unwrapAll():void 0,(k instanceof c||k instanceof z&&(null!=(m=k.base)?m.unwrapAll():void 0)instanceof c&&1===k.properties.length&&("call"===(g=null!=(v=k.properties[0].name)?v.value:void 0)||"apply"===g))&&(a=(null!=(y=k.base)?y.unwrapAll():void 0)||k,p=new x(e.scope.freeVariable("fn")),n=new z(p),k.base&&(b=[n,k],k.base=b[0],n=b[1]),t.expressions[h]=new o(n,s.args),r=r.concat(this.makeCode(this.tab),new i(p,a).compileToFragments(e,L),this.makeCode(";\n"))));return r},t}(J),e.Switch=H=function(e){function t(e,t,n){this.subject=e,this.cases=t,this.otherwise=n}return kt(t,e),t.prototype.children=["subject","cases","otherwise"],t.prototype.isStatement=Q,t.prototype.jumps=function(e){var t,n,i,r,s,o,a,c;for(null==e&&(e={block:!0}),o=this.cases,i=0,s=o.length;s>i;i++)if(a=o[i],n=a[0],t=a[1],r=t.jumps(e))return r;return null!=(c=this.otherwise)?c.jumps(e):void 0},t.prototype.makeReturn=function(e){var t,n,i,r,o;for(r=this.cases,t=0,n=r.length;n>t;t++)i=r[t],i[1].makeReturn(e);return e&&(this.otherwise||(this.otherwise=new s([new x("void 0")]))),null!=(o=this.otherwise)&&o.makeReturn(e),this},t.prototype.compileNode=function(e){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g;for(c=e.indent+q,h=e.indent=c+q,o=[].concat(this.makeCode(this.tab+"switch ("),this.subject?this.subject.compileToFragments(e,N):this.makeCode("false"),this.makeCode(") {\n")),f=this.cases,a=l=0,p=f.length;p>l;a=++l){for(m=f[a],r=m[0],t=m[1],g=rt([r]),u=0,d=g.length;d>u;u++)i=g[u],this.subject||(i=i.invert()),o=o.concat(this.makeCode(c+"case "),i.compileToFragments(e,N),this.makeCode(":\n"));if((n=t.compileToFragments(e,L)).length>0&&(o=o.concat(n,this.makeCode("\n"))),a===this.cases.length-1&&!this.otherwise)break;s=this.lastNonComment(t.expressions),s instanceof M||s instanceof x&&s.jumps()&&"debugger"!==s.value||o.push(i.makeCode(h+"break;\n"))}return this.otherwise&&this.otherwise.expressions.length&&o.push.apply(o,[this.makeCode(c+"default:\n")].concat(Ct.call(this.otherwise.compileToFragments(e,L)),[this.makeCode("\n")])),o.push(this.makeCode(this.tab+"}")),o},t}(r),e.If=b=function(e){function t(e,t,n){this.body=t,null==n&&(n={}),this.condition="unless"===n.type?e.invert():e,this.elseBody=null,this.isChain=!1,this.soak=n.soak}return kt(t,e),t.prototype.children=["condition","body","elseBody"],t.prototype.bodyNode=function(){var e;return null!=(e=this.body)?e.unwrap():void 0},t.prototype.elseBodyNode=function(){var e;return null!=(e=this.elseBody)?e.unwrap():void 0},t.prototype.addElse=function(e){return this.isChain?this.elseBodyNode().addElse(e):(this.isChain=e instanceof t,this.elseBody=this.ensureBlock(e),this.elseBody.updateLocationDataIfMissing(e.locationData)),this},t.prototype.isStatement=function(e){var t;return(null!=e?e.level:void 0)===L||this.bodyNode().isStatement(e)||(null!=(t=this.elseBodyNode())?t.isStatement(e):void 0)},t.prototype.jumps=function(e){var t;return this.body.jumps(e)||(null!=(t=this.elseBody)?t.jumps(e):void 0)},t.prototype.compileNode=function(e){return this.isStatement(e)?this.compileStatement(e):this.compileExpression(e)},t.prototype.makeReturn=function(e){return e&&(this.elseBody||(this.elseBody=new s([new x("void 0")]))),this.body&&(this.body=new s([this.body.makeReturn(e)])),this.elseBody&&(this.elseBody=new s([this.elseBody.makeReturn(e)])),this},t.prototype.ensureBlock=function(e){return e instanceof s?e:new s([e])},t.prototype.compileStatement=function(e){var n,i,r,s,o,a,c;return r=tt(e,"chainChild"),(o=tt(e,"isExistentialEquals"))?new t(this.condition.invert(),this.elseBodyNode(),{type:"if"}).compileToFragments(e):(c=e.indent+q,s=this.condition.compileToFragments(e,N),i=this.ensureBlock(this.body).compileToFragments(lt(e,{indent:c})),a=[].concat(this.makeCode("if ("),s,this.makeCode(") {\n"),i,this.makeCode("\n"+this.tab+"}")),r||a.unshift(this.makeCode(this.tab)),this.elseBody?(n=a.concat(this.makeCode(" else ")),this.isChain?(e.chainChild=!0,n=n.concat(this.elseBody.unwrap().compileToFragments(e,L))):n=n.concat(this.makeCode("{\n"),this.elseBody.compileToFragments(lt(e,{indent:c}),L),this.makeCode("\n"+this.tab+"}")),n):a)},t.prototype.compileExpression=function(e){var t,n,i,r;return i=this.condition.compileToFragments(e,C),n=this.bodyNode().compileToFragments(e,E),t=this.elseBodyNode()?this.elseBodyNode().compileToFragments(e,E):[this.makeCode("void 0")],r=i.concat(this.makeCode(" ? "),n,this.makeCode(" : "),t),e.level>=C?this.wrapInBraces(r):r},t.prototype.unfoldSoak=function(){return this.soak&&this},t}(r),K={extend:function(e){return"function(child, parent) { for (var key in parent) { if ("+bt("hasProp",e)+".call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }"},bind:function(){return"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }"},indexOf:function(){return"[].indexOf || function(item) { for (var i = 0, l = this.length; i < l; i++) { if (i in this && this[i] === item) return i; } return -1; }"},modulo:function(){return"function(a, b) { return (+a % (b = +b) + b) % b; }"},hasProp:function(){return"{}.hasOwnProperty"},slice:function(){return"[].slice"}},L=1,N=2,E=3,C=4,F=5,T=6,q=" ",g=/^(?!\d)[$\w\x7f-\uffff]+$/,B=/^[+-]?\d+$/,m=/^[+-]?0x[\da-f]+/i,R=/^[+-]?(?:0x[\da-f]+|\d*\.?\d+(?:e[+-]?\d+)?)$/i,y=/^['"]/,v=/^\//,bt=function(e,t){var n,i;return i=t.scope.root,e in i.utilities?i.utilities[e]:(n=i.freeVariable(e),i.assign(n,K[e](t)),i.utilities[e]=n)},ut=function(e,t){return e=e.replace(/\n/g,"$&"+t),e.replace(/\s+$/,"")},pt=function(e){return null==e?0:e.match(m)?parseInt(e,16):parseFloat(e)},at=function(e){return e instanceof x&&"arguments"===e.value&&!e.asKey},ct=function(e){return e instanceof x&&"this"===e.value&&!e.asKey||e instanceof c&&e.bound||e instanceof o&&e.isSuper},ot=function(e){return e.isComplex()||("function"==typeof e.isAssignable?e.isAssignable():void 0)},yt=function(e,t,n){var i;if(i=t[n].unfoldSoak(e))return t[n]=i.body,i.body=new z(t),i}}.call(this),t.exports}(),_dereq_["./sourcemap"]=function(){var e={},t={exports:e};return function(){var e,n;e=function(){function e(e){this.line=e,this.columns=[]}return e.prototype.add=function(e,t,n){var i,r;return r=t[0],i=t[1],null==n&&(n={}),this.columns[e]&&n.noReplace?void 0:this.columns[e]={line:this.line,column:e,sourceLine:r,sourceColumn:i}},e.prototype.sourceLocation=function(e){for(var t;!((t=this.columns[e])||0>=e);)e--;return t&&[t.sourceLine,t.sourceColumn]},e}(),n=function(){function t(){this.lines=[]}var n,i,r,s;return t.prototype.add=function(t,n,i){var r,s,o,a;return null==i&&(i={}),o=n[0],s=n[1],a=(r=this.lines)[o]||(r[o]=new e(o)),a.add(s,t,i)},t.prototype.sourceLocation=function(e){var t,n,i;for(n=e[0],t=e[1];!((i=this.lines[n])||0>=n);)n--;return i&&i.sourceLocation(t)},t.prototype.generate=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v;for(null==e&&(e={}),null==t&&(t=null),v=0,s=0,a=0,o=0,d=!1,n="",f=this.lines,u=i=0,c=f.length;c>i;u=++i)if(l=f[u])for(m=l.columns,r=0,h=m.length;h>r;r++)if(p=m[r]){for(;p.line>v;)s=0,d=!1,n+=";",v++;d&&(n+=",",d=!1),n+=this.encodeVlq(p.column-s),s=p.column,n+=this.encodeVlq(0),n+=this.encodeVlq(p.sourceLine-a),a=p.sourceLine,n+=this.encodeVlq(p.sourceColumn-o),o=p.sourceColumn,d=!0}return g={version:3,file:e.generatedFile||"",sourceRoot:e.sourceRoot||"",sources:e.sourceFiles||[""],names:[],mappings:n},e.inline&&(g.sourcesContent=[t]),JSON.stringify(g,null,2)},r=5,i=1<e?1:0,a=(Math.abs(e)<<1)+o;a||!t;)n=a&s,a>>=r,a&&(n|=i),t+=this.encodeBase64(n);return t},n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t.prototype.encodeBase64=function(e){return n[e]||function(){throw Error("Cannot Base64 encode value: "+e)}()},t}(),t.exports=n}.call(this),t.exports}(),_dereq_["./coffee-script"]=function(){var e={},t={exports:e};return function(){var t,n,i,r,s,o,a,c,h,l,u,p,d,f,m,g,v,y,b={}.hasOwnProperty,k=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};if(a=_dereq_("fs"),v=_dereq_("vm"),f=_dereq_("path"),t=_dereq_("./lexer").Lexer,d=_dereq_("./parser").parser,h=_dereq_("./helpers"),n=_dereq_("./sourcemap"),e.VERSION="1.9.3",e.FILE_EXTENSIONS=[".coffee",".litcoffee",".coffee.md"],e.helpers=h,y=function(e){return function(t,n){var i;null==n&&(n={});try{return e.call(this,t,n) -}catch(r){if(i=r,"string"!=typeof t)throw i;throw h.updateSyntaxError(i,t,n.filename)}}},e.compile=r=y(function(e,t){var i,r,s,o,a,c,l,u,f,m,g,v,y,b,k;for(v=h.merge,o=h.extend,t=o({},t),t.sourceMap&&(g=new n),k=p.tokenize(e,t),t.referencedVars=function(){var e,t,n;for(n=[],e=0,t=k.length;t>e;e++)b=k[e],b.variable&&n.push(b[1]);return n}(),c=d.parse(k).compileToFragments(t),s=0,t.header&&(s+=1),t.shiftLine&&(s+=1),r=0,f="",u=0,m=c.length;m>u;u++)a=c[u],t.sourceMap&&(a.locationData&&!/^[;\s]*$/.test(a.code)&&g.add([a.locationData.first_line,a.locationData.first_column],[s,r],{noReplace:!0}),y=h.count(a.code,"\n"),s+=y,y?r=a.code.length-(a.code.lastIndexOf("\n")+1):r+=a.code.length),f+=a.code;return t.header&&(l="Generated by CoffeeScript "+this.VERSION,f="// "+l+"\n"+f),t.sourceMap?(i={js:f},i.sourceMap=g,i.v3SourceMap=g.generate(t,e),i):f}),e.tokens=y(function(e,t){return p.tokenize(e,t)}),e.nodes=y(function(e,t){return"string"==typeof e?d.parse(p.tokenize(e,t)):d.parse(e)}),e.run=function(e,t){var n,i,s,o;return null==t&&(t={}),s=_dereq_.main,s.filename=process.argv[1]=t.filename?a.realpathSync(t.filename):".",s.moduleCache&&(s.moduleCache={}),i=t.filename?f.dirname(a.realpathSync(t.filename)):a.realpathSync("."),s.paths=_dereq_("module")._nodeModulePaths(i),(!h.isCoffee(s.filename)||_dereq_.extensions)&&(n=r(e,t),e=null!=(o=n.js)?o:n),s._compile(e,s.filename)},e.eval=function(e,t){var n,i,s,o,a,c,h,l,u,p,d,m,g,y,k,w,T;if(null==t&&(t={}),e=e.trim()){if(o=null!=(m=v.Script.createContext)?m:v.createContext,c=null!=(g=v.isContext)?g:function(){return t.sandbox instanceof o().constructor},o){if(null!=t.sandbox){if(c(t.sandbox))w=t.sandbox;else{w=o(),y=t.sandbox;for(l in y)b.call(y,l)&&(T=y[l],w[l]=T)}w.global=w.root=w.GLOBAL=w}else w=global;if(w.__filename=t.filename||"eval",w.__dirname=f.dirname(w.__filename),w===global&&!w.module&&!w.require){for(n=_dereq_("module"),w.module=i=new n(t.modulename||"eval"),w.require=s=function(e){return n._load(e,i,!0)},i.filename=w.__filename,k=Object.getOwnPropertyNames(_dereq_),a=0,u=k.length;u>a;a++)d=k[a],"paths"!==d&&(s[d]=_dereq_[d]);s.paths=i.paths=n._nodeModulePaths(process.cwd()),s.resolve=function(e){return n._resolveFilename(e,i)}}}p={};for(l in t)b.call(t,l)&&(T=t[l],p[l]=T);return p.bare=!0,h=r(e,p),w===global?v.runInThisContext(h):v.runInContext(h,w)}},e.register=function(){return _dereq_("./register")},_dereq_.extensions)for(m=this.FILE_EXTENSIONS,l=0,u=m.length;u>l;l++)s=m[l],null==(i=_dereq_.extensions)[s]&&(i[s]=function(){throw Error("Use CoffeeScript.register() or require the coffee-script/register module to require "+s+" files.")});e._compileFile=function(e,t){var n,i,s,o;null==t&&(t=!1),s=a.readFileSync(e,"utf8"),o=65279===s.charCodeAt(0)?s.substring(1):s;try{n=r(o,{filename:e,sourceMap:t,literate:h.isLiterate(e)})}catch(c){throw i=c,h.updateSyntaxError(i,o,e)}return n},p=new t,d.lexer={lex:function(){var e,t;return t=d.tokens[this.pos++],t?(e=t[0],this.yytext=t[1],this.yylloc=t[2],d.errorToken=t.origin||t,this.yylineno=this.yylloc.first_line):e="",e},setInput:function(e){return d.tokens=e,this.pos=0},upcomingInput:function(){return""}},d.yy=_dereq_("./nodes"),d.yy.parseError=function(e,t){var n,i,r,s,o,a;return o=t.token,s=d.errorToken,a=d.tokens,i=s[0],r=s[1],n=s[2],r=function(){switch(!1){case s!==a[a.length-1]:return"end of input";case"INDENT"!==i&&"OUTDENT"!==i:return"indentation";case"IDENTIFIER"!==i&&"NUMBER"!==i&&"STRING"!==i&&"STRING_START"!==i&&"REGEX"!==i&&"REGEX_START"!==i:return i.replace(/_START$/,"").toLowerCase();default:return h.nameWhitespaceCharacter(r)}}(),h.throwSyntaxError("unexpected "+r,n)},o=function(e,t){var n,i,r,s,o,a,c,h,l,u,p,d;return s=void 0,r="",e.isNative()?r="native":(e.isEval()?(s=e.getScriptNameOrSourceURL(),s||(r=e.getEvalOrigin()+", ")):s=e.getFileName(),s||(s=""),h=e.getLineNumber(),i=e.getColumnNumber(),u=t(s,h,i),r=u?s+":"+u[0]+":"+u[1]:s+":"+h+":"+i),o=e.getFunctionName(),a=e.isConstructor(),c=!(e.isToplevel()||a),c?(l=e.getMethodName(),d=e.getTypeName(),o?(p=n="",d&&o.indexOf(d)&&(p=d+"."),l&&o.indexOf("."+l)!==o.length-l.length-1&&(n=" [as "+l+"]"),""+p+o+n+" ("+r+")"):d+"."+(l||"")+" ("+r+")"):a?"new "+(o||"")+" ("+r+")":o?o+" ("+r+")":r},g={},c=function(t){var n,i;if(g[t])return g[t];if(i=null!=f?f.extname(t):void 0,!(0>k.call(e.FILE_EXTENSIONS,i)))return n=e._compileFile(t,!0),g[t]=n.sourceMap},Error.prepareStackTrace=function(t,n){var i,r,s;return s=function(e,t,n){var i,r;return r=c(e),r&&(i=r.sourceLocation([t-1,n-1])),i?[i[0]+1,i[1]+1]:null},r=function(){var t,r,a;for(a=[],t=0,r=n.length;r>t&&(i=n[t],i.getFunction()!==e.run);t++)a.push(" at "+o(i,s));return a}(),""+t+"\n"+r.join("\n")+"\n"}}.call(this),t.exports}(),_dereq_["./browser"]=function(){var exports={},module={exports:exports};return function(){var CoffeeScript,compile,runScripts,indexOf=[].indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(t in this&&this[t]===e)return t;return-1};CoffeeScript=_dereq_("./coffee-script"),CoffeeScript.require=_dereq_,compile=CoffeeScript.compile,CoffeeScript.eval=function(code,options){return null==options&&(options={}),null==options.bare&&(options.bare=!0),eval(compile(code,options))},CoffeeScript.run=function(e,t){return null==t&&(t={}),t.bare=!0,t.shiftLine=!0,Function(compile(e,t))()},"undefined"!=typeof window&&null!==window&&("undefined"!=typeof btoa&&null!==btoa&&"undefined"!=typeof JSON&&null!==JSON&&"undefined"!=typeof unescape&&null!==unescape&&"undefined"!=typeof encodeURIComponent&&null!==encodeURIComponent&&(compile=function(e,t){var n,i,r;return null==t&&(t={}),t.sourceMap=!0,t.inline=!0,i=CoffeeScript.compile(e,t),n=i.js,r=i.v3SourceMap,n+"\n//# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(r)))+"\n//# sourceURL=coffeescript"}),CoffeeScript.load=function(e,t,n,i){var r;return null==n&&(n={}),null==i&&(i=!1),n.sourceFiles=[e],r=window.ActiveXObject?new window.ActiveXObject("Microsoft.XMLHTTP"):new window.XMLHttpRequest,r.open("GET",e,!0),"overrideMimeType"in r&&r.overrideMimeType("text/plain"),r.onreadystatechange=function(){var s,o;if(4===r.readyState){if(0!==(o=r.status)&&200!==o)throw Error("Could not load "+e);if(s=[r.responseText,n],i||CoffeeScript.run.apply(CoffeeScript,s),t)return t(s)}},r.send(null)},runScripts=function(){var e,t,n,i,r,s,o,a,c,h,l;for(l=window.document.getElementsByTagName("script"),t=["text/coffeescript","text/literate-coffeescript"],e=function(){var e,n,i,r;for(r=[],e=0,n=l.length;n>e;e++)c=l[e],i=c.type,indexOf.call(t,i)>=0&&r.push(c);return r}(),s=0,n=function(){var t;return t=e[s],t instanceof Array?(CoffeeScript.run.apply(CoffeeScript,t),s++,n()):void 0},i=function(i,r){var s,o;return s={literate:i.type===t[1]},o=i.src||i.getAttribute("data-src"),o?CoffeeScript.load(o,function(t){return e[r]=t,n()},s,!0):(s.sourceFiles=["embedded"],e[r]=[i.innerHTML,s])},r=o=0,a=e.length;a>o;r=++o)h=e[r],i(h,r);return n()},window.addEventListener?window.addEventListener("DOMContentLoaded",runScripts,!1):window.attachEvent("onload",runScripts))}.call(this),module.exports}(),_dereq_["./coffee-script"]}();"function"==typeof define&&define.amd?define(function(){return CoffeeScript}):root.CoffeeScript=CoffeeScript})(this); -}); - -ace.define("ace/mode/coffee_worker",["require","exports","module","ace/lib/oop","ace/worker/mirror","ace/mode/coffee/coffee"], function(require, exports, module) { -"use strict"; - -var oop = require("../lib/oop"); -var Mirror = require("../worker/mirror").Mirror; -var coffee = require("../mode/coffee/coffee"); - -window.addEventListener = function() {}; - - -var Worker = exports.Worker = function(sender) { - Mirror.call(this, sender); - this.setTimeout(250); -}; - -oop.inherits(Worker, Mirror); - -(function() { - - this.onUpdate = function() { - var value = this.doc.getValue(); - var errors = []; - try { - coffee.compile(value); - } catch(e) { - var loc = e.location; - if (loc) { - errors.push({ - row: loc.first_line, - column: loc.first_column, - endRow: loc.last_line, - endColumn: loc.last_column, - text: e.message, - type: "error" - }); - } - } - this.sender.emit("annotate", errors); - }; - -}).call(Worker.prototype); - -}); - -ace.define("ace/lib/es5-shim",["require","exports","module"], function(require, exports, module) { - -function Empty() {} - -if (!Function.prototype.bind) { - Function.prototype.bind = function bind(that) { // .length is 1 - var target = this; - if (typeof target != "function") { - throw new TypeError("Function.prototype.bind called on incompatible " + target); - } - var args = slice.call(arguments, 1); // for normal call - var bound = function () { - - if (this instanceof bound) { - - var result = target.apply( - this, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return this; - - } else { - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - - } - - }; - if(target.prototype) { - Empty.prototype = target.prototype; - bound.prototype = new Empty(); - Empty.prototype = null; - } - return bound; - }; -} -var call = Function.prototype.call; -var prototypeOfArray = Array.prototype; -var prototypeOfObject = Object.prototype; -var slice = prototypeOfArray.slice; -var _toString = call.bind(prototypeOfObject.toString); -var owns = call.bind(prototypeOfObject.hasOwnProperty); -var defineGetter; -var defineSetter; -var lookupGetter; -var lookupSetter; -var supportsAccessors; -if ((supportsAccessors = owns(prototypeOfObject, "__defineGetter__"))) { - defineGetter = call.bind(prototypeOfObject.__defineGetter__); - defineSetter = call.bind(prototypeOfObject.__defineSetter__); - lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); - lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); -} -if ([1,2].splice(0).length != 2) { - if(function() { // test IE < 9 to splice bug - see issue #138 - function makeArray(l) { - var a = new Array(l+2); - a[0] = a[1] = 0; - return a; - } - var array = [], lengthBefore; - - array.splice.apply(array, makeArray(20)); - array.splice.apply(array, makeArray(26)); - - lengthBefore = array.length; //46 - array.splice(5, 0, "XXX"); // add one element - - lengthBefore + 1 == array.length - - if (lengthBefore + 1 == array.length) { - return true;// has right splice implementation without bugs - } - }()) {//IE 6/7 - var array_splice = Array.prototype.splice; - Array.prototype.splice = function(start, deleteCount) { - if (!arguments.length) { - return []; - } else { - return array_splice.apply(this, [ - start === void 0 ? 0 : start, - deleteCount === void 0 ? (this.length - start) : deleteCount - ].concat(slice.call(arguments, 2))) - } - }; - } else {//IE8 - Array.prototype.splice = function(pos, removeCount){ - var length = this.length; - if (pos > 0) { - if (pos > length) - pos = length; - } else if (pos == void 0) { - pos = 0; - } else if (pos < 0) { - pos = Math.max(length + pos, 0); - } - - if (!(pos+removeCount < length)) - removeCount = length - pos; - - var removed = this.slice(pos, pos+removeCount); - var insert = slice.call(arguments, 2); - var add = insert.length; - if (pos === length) { - if (add) { - this.push.apply(this, insert); - } - } else { - var remove = Math.min(removeCount, length - pos); - var tailOldPos = pos + remove; - var tailNewPos = tailOldPos + add - remove; - var tailCount = length - tailOldPos; - var lengthAfterRemove = length - remove; - - if (tailNewPos < tailOldPos) { // case A - for (var i = 0; i < tailCount; ++i) { - this[tailNewPos+i] = this[tailOldPos+i]; - } - } else if (tailNewPos > tailOldPos) { // case B - for (i = tailCount; i--; ) { - this[tailNewPos+i] = this[tailOldPos+i]; - } - } // else, add == remove (nothing to do) - - if (add && pos === lengthAfterRemove) { - this.length = lengthAfterRemove; // truncate array - this.push.apply(this, insert); - } else { - this.length = lengthAfterRemove + add; // reserves space - for (i = 0; i < add; ++i) { - this[pos+i] = insert[i]; - } - } - } - return removed; - }; - } -} -if (!Array.isArray) { - Array.isArray = function isArray(obj) { - return _toString(obj) == "[object Array]"; - }; -} -var boxedString = Object("a"), - splitString = boxedString[0] != "a" || !(0 in boxedString); - -if (!Array.prototype.forEach) { - Array.prototype.forEach = function forEach(fun /*, thisp*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - thisp = arguments[1], - i = -1, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(); // TODO message - } - - while (++i < length) { - if (i in self) { - fun.call(thisp, self[i], i, object); - } - } - }; -} -if (!Array.prototype.map) { - Array.prototype.map = function map(fun /*, thisp*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - result = Array(length), - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self) - result[i] = fun.call(thisp, self[i], i, object); - } - return result; - }; -} -if (!Array.prototype.filter) { - Array.prototype.filter = function filter(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - result = [], - value, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self) { - value = self[i]; - if (fun.call(thisp, value, i, object)) { - result.push(value); - } - } - } - return result; - }; -} -if (!Array.prototype.every) { - Array.prototype.every = function every(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self && !fun.call(thisp, self[i], i, object)) { - return false; - } - } - return true; - }; -} -if (!Array.prototype.some) { - Array.prototype.some = function some(fun /*, thisp */) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0, - thisp = arguments[1]; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - - for (var i = 0; i < length; i++) { - if (i in self && fun.call(thisp, self[i], i, object)) { - return true; - } - } - return false; - }; -} -if (!Array.prototype.reduce) { - Array.prototype.reduce = function reduce(fun /*, initial*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - if (!length && arguments.length == 1) { - throw new TypeError("reduce of empty array with no initial value"); - } - - var i = 0; - var result; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i++]; - break; - } - if (++i >= length) { - throw new TypeError("reduce of empty array with no initial value"); - } - } while (true); - } - - for (; i < length; i++) { - if (i in self) { - result = fun.call(void 0, result, self[i], i, object); - } - } - - return result; - }; -} -if (!Array.prototype.reduceRight) { - Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { - var object = toObject(this), - self = splitString && _toString(this) == "[object String]" ? - this.split("") : - object, - length = self.length >>> 0; - if (_toString(fun) != "[object Function]") { - throw new TypeError(fun + " is not a function"); - } - if (!length && arguments.length == 1) { - throw new TypeError("reduceRight of empty array with no initial value"); - } - - var result, i = length - 1; - if (arguments.length >= 2) { - result = arguments[1]; - } else { - do { - if (i in self) { - result = self[i--]; - break; - } - if (--i < 0) { - throw new TypeError("reduceRight of empty array with no initial value"); - } - } while (true); - } - - do { - if (i in this) { - result = fun.call(void 0, result, self[i], i, object); - } - } while (i--); - - return result; - }; -} -if (!Array.prototype.indexOf || ([0, 1].indexOf(1, 2) != -1)) { - Array.prototype.indexOf = function indexOf(sought /*, fromIndex */ ) { - var self = splitString && _toString(this) == "[object String]" ? - this.split("") : - toObject(this), - length = self.length >>> 0; - - if (!length) { - return -1; - } - - var i = 0; - if (arguments.length > 1) { - i = toInteger(arguments[1]); - } - i = i >= 0 ? i : Math.max(0, length + i); - for (; i < length; i++) { - if (i in self && self[i] === sought) { - return i; - } - } - return -1; - }; -} -if (!Array.prototype.lastIndexOf || ([0, 1].lastIndexOf(0, -3) != -1)) { - Array.prototype.lastIndexOf = function lastIndexOf(sought /*, fromIndex */) { - var self = splitString && _toString(this) == "[object String]" ? - this.split("") : - toObject(this), - length = self.length >>> 0; - - if (!length) { - return -1; - } - var i = length - 1; - if (arguments.length > 1) { - i = Math.min(i, toInteger(arguments[1])); - } - i = i >= 0 ? i : length - Math.abs(i); - for (; i >= 0; i--) { - if (i in self && sought === self[i]) { - return i; - } - } - return -1; - }; -} -if (!Object.getPrototypeOf) { - Object.getPrototypeOf = function getPrototypeOf(object) { - return object.__proto__ || ( - object.constructor ? - object.constructor.prototype : - prototypeOfObject - ); - }; -} -if (!Object.getOwnPropertyDescriptor) { - var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + - "non-object: "; - Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { - if ((typeof object != "object" && typeof object != "function") || object === null) - throw new TypeError(ERR_NON_OBJECT + object); - if (!owns(object, property)) - return; - - var descriptor, getter, setter; - descriptor = { enumerable: true, configurable: true }; - if (supportsAccessors) { - var prototype = object.__proto__; - object.__proto__ = prototypeOfObject; - - var getter = lookupGetter(object, property); - var setter = lookupSetter(object, property); - object.__proto__ = prototype; - - if (getter || setter) { - if (getter) descriptor.get = getter; - if (setter) descriptor.set = setter; - return descriptor; - } - } - descriptor.value = object[property]; - return descriptor; - }; -} -if (!Object.getOwnPropertyNames) { - Object.getOwnPropertyNames = function getOwnPropertyNames(object) { - return Object.keys(object); - }; -} -if (!Object.create) { - var createEmpty; - if (Object.prototype.__proto__ === null) { - createEmpty = function () { - return { "__proto__": null }; - }; - } else { - createEmpty = function () { - var empty = {}; - for (var i in empty) - empty[i] = null; - empty.constructor = - empty.hasOwnProperty = - empty.propertyIsEnumerable = - empty.isPrototypeOf = - empty.toLocaleString = - empty.toString = - empty.valueOf = - empty.__proto__ = null; - return empty; - } - } - - Object.create = function create(prototype, properties) { - var object; - if (prototype === null) { - object = createEmpty(); - } else { - if (typeof prototype != "object") - throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); - var Type = function () {}; - Type.prototype = prototype; - object = new Type(); - object.__proto__ = prototype; - } - if (properties !== void 0) - Object.defineProperties(object, properties); - return object; - }; -} - -function doesDefinePropertyWork(object) { - try { - Object.defineProperty(object, "sentinel", {}); - return "sentinel" in object; - } catch (exception) { - } -} -if (Object.defineProperty) { - var definePropertyWorksOnObject = doesDefinePropertyWork({}); - var definePropertyWorksOnDom = typeof document == "undefined" || - doesDefinePropertyWork(document.createElement("div")); - if (!definePropertyWorksOnObject || !definePropertyWorksOnDom) { - var definePropertyFallback = Object.defineProperty; - } -} - -if (!Object.defineProperty || definePropertyFallback) { - var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; - var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " - var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + - "on this javascript engine"; - - Object.defineProperty = function defineProperty(object, property, descriptor) { - if ((typeof object != "object" && typeof object != "function") || object === null) - throw new TypeError(ERR_NON_OBJECT_TARGET + object); - if ((typeof descriptor != "object" && typeof descriptor != "function") || descriptor === null) - throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); - if (definePropertyFallback) { - try { - return definePropertyFallback.call(Object, object, property, descriptor); - } catch (exception) { - } - } - if (owns(descriptor, "value")) { - - if (supportsAccessors && (lookupGetter(object, property) || - lookupSetter(object, property))) - { - var prototype = object.__proto__; - object.__proto__ = prototypeOfObject; - delete object[property]; - object[property] = descriptor.value; - object.__proto__ = prototype; - } else { - object[property] = descriptor.value; - } - } else { - if (!supportsAccessors) - throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); - if (owns(descriptor, "get")) - defineGetter(object, property, descriptor.get); - if (owns(descriptor, "set")) - defineSetter(object, property, descriptor.set); - } - - return object; - }; -} -if (!Object.defineProperties) { - Object.defineProperties = function defineProperties(object, properties) { - for (var property in properties) { - if (owns(properties, property)) - Object.defineProperty(object, property, properties[property]); - } - return object; - }; -} -if (!Object.seal) { - Object.seal = function seal(object) { - return object; - }; -} -if (!Object.freeze) { - Object.freeze = function freeze(object) { - return object; - }; -} -try { - Object.freeze(function () {}); -} catch (exception) { - Object.freeze = (function freeze(freezeObject) { - return function freeze(object) { - if (typeof object == "function") { - return object; - } else { - return freezeObject(object); - } - }; - })(Object.freeze); -} -if (!Object.preventExtensions) { - Object.preventExtensions = function preventExtensions(object) { - return object; - }; -} -if (!Object.isSealed) { - Object.isSealed = function isSealed(object) { - return false; - }; -} -if (!Object.isFrozen) { - Object.isFrozen = function isFrozen(object) { - return false; - }; -} -if (!Object.isExtensible) { - Object.isExtensible = function isExtensible(object) { - if (Object(object) === object) { - throw new TypeError(); // TODO message - } - var name = ''; - while (owns(object, name)) { - name += '?'; - } - object[name] = true; - var returnValue = owns(object, name); - delete object[name]; - return returnValue; - }; -} -if (!Object.keys) { - var hasDontEnumBug = true, - dontEnums = [ - "toString", - "toLocaleString", - "valueOf", - "hasOwnProperty", - "isPrototypeOf", - "propertyIsEnumerable", - "constructor" - ], - dontEnumsLength = dontEnums.length; - - for (var key in {"toString": null}) { - hasDontEnumBug = false; - } - - Object.keys = function keys(object) { - - if ( - (typeof object != "object" && typeof object != "function") || - object === null - ) { - throw new TypeError("Object.keys called on a non-object"); - } - - var keys = []; - for (var name in object) { - if (owns(object, name)) { - keys.push(name); - } - } - - if (hasDontEnumBug) { - for (var i = 0, ii = dontEnumsLength; i < ii; i++) { - var dontEnum = dontEnums[i]; - if (owns(object, dontEnum)) { - keys.push(dontEnum); - } - } - } - return keys; - }; - -} -if (!Date.now) { - Date.now = function now() { - return new Date().getTime(); - }; -} -var ws = "\x09\x0A\x0B\x0C\x0D\x20\xA0\u1680\u180E\u2000\u2001\u2002\u2003" + - "\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028" + - "\u2029\uFEFF"; -if (!String.prototype.trim || ws.trim()) { - ws = "[" + ws + "]"; - var trimBeginRegexp = new RegExp("^" + ws + ws + "*"), - trimEndRegexp = new RegExp(ws + ws + "*$"); - String.prototype.trim = function trim() { - return String(this).replace(trimBeginRegexp, "").replace(trimEndRegexp, ""); - }; -} - -function toInteger(n) { - n = +n; - if (n !== n) { // isNaN - n = 0; - } else if (n !== 0 && n !== (1/0) && n !== -(1/0)) { - n = (n > 0 || -1) * Math.floor(Math.abs(n)); - } - return n; -} - -function isPrimitive(input) { - var type = typeof input; - return ( - input === null || - type === "undefined" || - type === "boolean" || - type === "number" || - type === "string" - ); -} - -function toPrimitive(input) { - var val, valueOf, toString; - if (isPrimitive(input)) { - return input; - } - valueOf = input.valueOf; - if (typeof valueOf === "function") { - val = valueOf.call(input); - if (isPrimitive(val)) { - return val; - } - } - toString = input.toString; - if (typeof toString === "function") { - val = toString.call(input); - if (isPrimitive(val)) { - return val; - } - } - throw new TypeError(); -} -var toObject = function (o) { - if (o == null) { // this matches both null and undefined - throw new TypeError("can't convert "+o+" to object"); - } - return Object(o); -}; - -}); diff --git a/htdocs/includes/ckeditor/ckeditor/LICENSE.md b/htdocs/includes/ckeditor/ckeditor/LICENSE.md index 9ab2d17459a..85f19516bc5 100644 --- a/htdocs/includes/ckeditor/ckeditor/LICENSE.md +++ b/htdocs/includes/ckeditor/ckeditor/LICENSE.md @@ -8,11 +8,11 @@ Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") - http://www.gnu.org/licenses/gpl.html + https://www.gnu.org/licenses/gpl.html (See Appendix A) - GNU Lesser General Public License Version 2.1 or later (the "LGPL") - http://www.gnu.org/licenses/lgpl.html + https://www.gnu.org/licenses/lgpl.html (See Appendix B) - Mozilla Public License Version 1.1 or later (the "MPL") diff --git a/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md b/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md index 610c807808b..f6ae334d229 100644 --- a/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md +++ b/htdocs/includes/ckeditor/ckeditor/plugins/scayt/LICENSE.md @@ -7,10 +7,10 @@ Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All Licensed under the terms of any of the following licenses at your choice: * GNU General Public License Version 2 or later (the "GPL"): - http://www.gnu.org/licenses/gpl.html + https://www.gnu.org/licenses/gpl.html * GNU Lesser General Public License Version 2.1 or later (the "LGPL"): - http://www.gnu.org/licenses/lgpl.html + https://www.gnu.org/licenses/lgpl.html * Mozilla Public License Version 1.1 or later (the "MPL"): http://www.mozilla.org/MPL/MPL-1.1.html diff --git a/htdocs/includes/ckeditor/ckeditor/plugins/scayt/README.md b/htdocs/includes/ckeditor/ckeditor/plugins/scayt/README.md index 40254ee2f1b..eef5ffad887 100644 --- a/htdocs/includes/ckeditor/ckeditor/plugins/scayt/README.md +++ b/htdocs/includes/ckeditor/ckeditor/plugins/scayt/README.md @@ -74,7 +74,7 @@ Please use the [SCAYT plugin for CKEditor 4 GitHub issue page](https://github.co License ------- -This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). +This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](https://www.gnu.org/licenses/gpl.html), [LGPL](https://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). See LICENSE.md for more information. diff --git a/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md b/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md index c7d374ad19a..31a7f84e462 100644 --- a/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md +++ b/htdocs/includes/ckeditor/ckeditor/plugins/wsc/LICENSE.md @@ -7,10 +7,10 @@ Copyright © 2012, [CKSource](http://cksource.com) - Frederico Knabben. All Licensed under the terms of any of the following licenses at your choice: * GNU General Public License Version 2 or later (the "GPL"): - http://www.gnu.org/licenses/gpl.html + https://www.gnu.org/licenses/gpl.html * GNU Lesser General Public License Version 2.1 or later (the "LGPL"): - http://www.gnu.org/licenses/lgpl.html + https://www.gnu.org/licenses/lgpl.html * Mozilla Public License Version 1.1 or later (the "MPL"): http://www.mozilla.org/MPL/MPL-1.1.html diff --git a/htdocs/includes/ckeditor/ckeditor/plugins/wsc/README.md b/htdocs/includes/ckeditor/ckeditor/plugins/wsc/README.md index 9a6daab14b4..95323cfc728 100644 --- a/htdocs/includes/ckeditor/ckeditor/plugins/wsc/README.md +++ b/htdocs/includes/ckeditor/ckeditor/plugins/wsc/README.md @@ -73,7 +73,7 @@ Please use the [WSC Dialog plugin for CKEditor 4 GitHub issue page](https://gith License ------- -This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](http://www.gnu.org/licenses/gpl.html), [LGPL](http://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). +This plugin is licensed under the terms of any of the following licenses at your choice: [GPL](https://www.gnu.org/licenses/gpl.html), [LGPL](https://www.gnu.org/licenses/lgpl.html) and [MPL](http://www.mozilla.org/MPL/MPL-1.1.html). See LICENSE.md for more information. diff --git a/htdocs/includes/jquery/plugins/blockUI/jquery.blockUI.js b/htdocs/includes/jquery/plugins/blockUI/jquery.blockUI.js index 90ce5d64df3..fc2cb8988a6 100644 --- a/htdocs/includes/jquery/plugins/blockUI/jquery.blockUI.js +++ b/htdocs/includes/jquery/plugins/blockUI/jquery.blockUI.js @@ -7,7 +7,7 @@ * Copyright (c) 2007-2013 M. Alsup * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html + * https://www.gnu.org/licenses/gpl.html * * Thanks to Amir-Hossein Sobhi for some excellent contributions! */ diff --git a/htdocs/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js b/htdocs/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js index 8e8e1d9e01f..88a6af1ca8a 100644 --- a/htdocs/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js +++ b/htdocs/includes/jquery/plugins/jquerytreeview/lib/jquery.cookie.js @@ -4,7 +4,7 @@ * Copyright (c) 2006 Klaus Hartl (stilbuero.de) * Dual licensed under the MIT and GPL licenses: * http://www.opensource.org/licenses/mit-license.php - * http://www.gnu.org/licenses/gpl.html + * https://www.gnu.org/licenses/gpl.html * */ @@ -89,4 +89,4 @@ jQuery.cookie = function(name, value, options) { } return cookieValue; } -}; \ No newline at end of file +}; diff --git a/htdocs/includes/jquery/plugins/jquerytreeview/readme.md b/htdocs/includes/jquery/plugins/jquerytreeview/readme.md index 27257d1384c..dfae294c574 100644 --- a/htdocs/includes/jquery/plugins/jquerytreeview/readme.md +++ b/htdocs/includes/jquery/plugins/jquerytreeview/readme.md @@ -44,4 +44,4 @@ Copyright (c) 2007 Jörn Zaefferer Dual licensed under the MIT and GPL licenses: - http://www.opensource.org/licenses/mit-license.php -- http://www.gnu.org/licenses/gpl.html \ No newline at end of file +- https://www.gnu.org/licenses/gpl.html diff --git a/htdocs/includes/mike42/escpos-php/doc/escpos.conf b/htdocs/includes/mike42/escpos-php/doc/escpos.conf index 01c76dc422a..54ea2874aa5 100644 --- a/htdocs/includes/mike42/escpos-php/doc/escpos.conf +++ b/htdocs/includes/mike42/escpos-php/doc/escpos.conf @@ -20,7 +20,7 @@ # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all text # before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv +# built into libc) for the transcoding. See https://www.gnu.org/software/libiconv # for the list of possible encodings. # The default value is: UTF-8. @@ -758,7 +758,7 @@ INPUT = ../Escpos.php ../src/ ../README.md # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of +# documentation (see: https://www.gnu.org/software/libiconv) for the list of # possible encodings. # The default value is: UTF-8. @@ -950,7 +950,7 @@ SOURCE_TOOLTIPS = YES # If the USE_HTAGS tag is set to YES then the references to source code will # point to the HTML generated by the htags(1) tool instead of doxygen built-in # source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version +# (see https://www.gnu.org/software/global/global.html). You will need version # 4.8.6 or higher. # # To use it do the following: diff --git a/htdocs/includes/nusoap/lib/class.nusoap_base.php b/htdocs/includes/nusoap/lib/class.nusoap_base.php index 8bace693902..8c1afbdc8dd 100644 --- a/htdocs/includes/nusoap/lib/class.nusoap_base.php +++ b/htdocs/includes/nusoap/lib/class.nusoap_base.php @@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public -along with this program. If not, see . +along with this program. If not, see . The NuSOAP project home is: http://sourceforge.net/projects/nusoap/ @@ -990,4 +990,4 @@ function usleepWindows($usec) } -?> \ No newline at end of file +?> diff --git a/htdocs/includes/nusoap/lib/nusoap.php b/htdocs/includes/nusoap/lib/nusoap.php index 6bd651e512c..1846884a7d1 100644 --- a/htdocs/includes/nusoap/lib/nusoap.php +++ b/htdocs/includes/nusoap/lib/nusoap.php @@ -17,7 +17,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public -along with this program. If not, see . +along with this program. If not, see . The NuSOAP project home is: http://sourceforge.net/projects/nusoap/ diff --git a/htdocs/includes/nusoap/lib/nusoapmime.php b/htdocs/includes/nusoap/lib/nusoapmime.php index 7278652816a..f27b65bd147 100644 --- a/htdocs/includes/nusoap/lib/nusoapmime.php +++ b/htdocs/includes/nusoap/lib/nusoapmime.php @@ -16,7 +16,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public -along with this program. If not, see . +along with this program. If not, see . The NuSOAP project home is: http://sourceforge.net/projects/nusoap/ diff --git a/htdocs/includes/odtphp/Segment.php b/htdocs/includes/odtphp/Segment.php index 8cea06db50b..cd8bec8c4ff 100644 --- a/htdocs/includes/odtphp/Segment.php +++ b/htdocs/includes/odtphp/Segment.php @@ -11,7 +11,7 @@ class SegmentException extends Exception * * @copyright 2008 - Julien Pauli - Cyril PIERRE de GEYER - Anaska (http://www.anaska.com) * @copyright 2012 - Stephen Larroque - lrq3000@gmail.com - * @license http://www.gnu.org/copyleft/gpl.html GPL License + * @license https://www.gnu.org/copyleft/gpl.html GPL License * @version 1.4.5 (last update 2013-04-07) */ class Segment implements IteratorAggregate, Countable diff --git a/htdocs/includes/odtphp/SegmentIterator.php b/htdocs/includes/odtphp/SegmentIterator.php index dbcac5b981f..8fc2f27087f 100644 --- a/htdocs/includes/odtphp/SegmentIterator.php +++ b/htdocs/includes/odtphp/SegmentIterator.php @@ -5,7 +5,7 @@ * You need Zip Extension or PclZip library * * @copyright GPL License 2008 - Julien Pauli - Cyril PIERRE de GEYER - Anaska (http://www.anaska.com) - * @license http://www.gnu.org/copyleft/gpl.html GPL License + * @license https://www.gnu.org/copyleft/gpl.html GPL License * @version 1.3 */ class SegmentIterator implements RecursiveIterator diff --git a/htdocs/includes/odtphp/odf.php b/htdocs/includes/odtphp/odf.php index 21e9b56b4bb..23e994d4bc8 100644 --- a/htdocs/includes/odtphp/odf.php +++ b/htdocs/includes/odtphp/odf.php @@ -15,7 +15,7 @@ class OdfException extends Exception * @copyright 2010-2015 - Laurent Destailleur - eldy@users.sourceforge.net * @copyright 2010 - Vikas Mahajan - http://vikasmahajan.wordpress.com * @copyright 2012 - Stephen Larroque - lrq3000@gmail.com - * @license http://www.gnu.org/copyleft/gpl.html GPL License + * @license https://www.gnu.org/copyleft/gpl.html GPL License * @version 1.5.0 */ class Odf diff --git a/htdocs/includes/odtphp/zip/PclZipProxy.php b/htdocs/includes/odtphp/zip/PclZipProxy.php index 7f6fe8a6a2d..45ea50d5047 100644 --- a/htdocs/includes/odtphp/zip/PclZipProxy.php +++ b/htdocs/includes/odtphp/zip/PclZipProxy.php @@ -12,7 +12,7 @@ class PclZipProxyException extends Exception * * @copyright GPL License 2008 - Julien Pauli - Cyril PIERRE de GEYER - Anaska (http://www.anaska.com) * @copyright GPL License 2010 - Laurent Destailleur - eldy@users.sourceforge.net - * @license http://www.gnu.org/copyleft/gpl.html GPL License + * @license https://www.gnu.org/copyleft/gpl.html GPL License * @version 1.4 */ class PclZipProxy implements ZipInterface @@ -157,4 +157,4 @@ class PclZipProxy implements ZipInterface } } -?> \ No newline at end of file +?> diff --git a/htdocs/includes/odtphp/zip/PhpZipProxy.php b/htdocs/includes/odtphp/zip/PhpZipProxy.php index af0fb24f15e..0035858e33d 100644 --- a/htdocs/includes/odtphp/zip/PhpZipProxy.php +++ b/htdocs/includes/odtphp/zip/PhpZipProxy.php @@ -9,7 +9,7 @@ class PhpZipProxyException extends Exception * Encoding : ISO-8859-1 * * @copyright GPL License 2008 - Julien Pauli - Cyril PIERRE de GEYER - Anaska (http://www.anaska.com) - * @license http://www.gnu.org/copyleft/gpl.html GPL License + * @license https://www.gnu.org/copyleft/gpl.html GPL License * @version 1.3 */ @@ -89,4 +89,4 @@ class PhpZipProxy implements ZipInterface return $this->zipArchive->close(); } } -?> \ No newline at end of file +?> diff --git a/htdocs/includes/odtphp/zip/ZipInterface.php b/htdocs/includes/odtphp/zip/ZipInterface.php index caa539c46ec..6b724859137 100644 --- a/htdocs/includes/odtphp/zip/ZipInterface.php +++ b/htdocs/includes/odtphp/zip/ZipInterface.php @@ -6,45 +6,45 @@ * Encoding : ISO-8859-1 * * @copyright GPL License 2008 - Julien Pauli - Cyril PIERRE de GEYER - Anaska (http://www.anaska.com) - * @license http://www.gnu.org/copyleft/gpl.html GPL License + * @license https://www.gnu.org/copyleft/gpl.html GPL License * @version 1.3 */ interface ZipInterface { /** * Open a Zip archive - * + * * @param string $filename the name of the archive to open * @return true if openning has succeeded - */ + */ public function open($filename); /** * Retrieve the content of a file within the archive from its name - * + * * @param string $name the name of the file to extract * @return the content of the file in a string - */ + */ public function getFromName($name); /** * Add a file within the archive from a string - * + * * @param string $localname the local path to the file in the archive * @param string $contents the content of the file * @return true if the file has been successful added - */ + */ public function addFromString($localname, $contents); /** * Add a file within the archive from a file - * + * * @param string $filename the path to the file we want to add * @param string $localname the local path to the file in the archive * @return true if the file has been successful added - */ + */ public function addFile($filename, $localname = null); /** * Close the Zip archive * @return true - */ + */ public function close(); } -?> \ No newline at end of file +?> diff --git a/htdocs/includes/odtphp/zip/pclzip/gnu-lgpl.txt b/htdocs/includes/odtphp/zip/pclzip/gnu-lgpl.txt index 2d73841c319..82fc70b870e 100644 --- a/htdocs/includes/odtphp/zip/pclzip/gnu-lgpl.txt +++ b/htdocs/includes/odtphp/zip/pclzip/gnu-lgpl.txt @@ -484,7 +484,7 @@ convey the exclusion of warranty; and each file should have at least the Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public - License along with this library; If not, see . + License along with this library; If not, see . Also add information on how to contact you by electronic and paper mail. diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config index 8992916acaf..500460e8ab5 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions index f9d69784ae2..b648e20c2b0 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/cs/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config index cef47e9502d..b959379b133 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -37,7 +37,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIVISION/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions index 1db4d30bb1c..1599ccd1815 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/da/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config index ff7e29899cc..7e2ba9d2891 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions index ce85641a3c9..8214f384878 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/de/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config index f008e61cc90..00acff8bc34 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/en/uk/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config index fa16f5639df..8f7d9e084ec 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ ## I'm surprised that the Excel Documentation suggests $ rath ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #¡NULO! DIV0 = #¡DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions index 51ce48b3153..aa065969f3d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/es/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config index a481864a6fa..36bc3fc70b8 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = $ # Symbol not known, should it be a € (Euro)? ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #TYHJÄ! DIV0 = #JAKO/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions index 7bed722a641..c10b3b9f381 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fi/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config index 2240d6b9f8b..80f7d5411a6 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NUL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions index 8d25f6ac193..cce977b15bc 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/fr/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config index dec7cbde15d..c6c315814c4 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions index 4abce13b91b..941c1b740d0 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/hu/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config index f862a02d72d..97af8b9a570 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULLO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions index b9219a6a4ce..862cf8302c8 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/it/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config index 7377a181df0..a14b476c945 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #LEEG! DIV0 = #DEEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions index b6b8296ef04..79b7acd1ef9 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/nl/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config index 15fcc128640..e3e3cc4f786 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULL! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions index 57a80a7a406..3cccce42a1d 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/no/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config index fb1e7b13d9d..ea111797270 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = zł ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ZERO! DIV0 = #DZIEL/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions index 2e5697973c1..5607f8f672c 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pl/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config index e99aad6bea4..d39c5c63438 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/br/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = R$ ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config index 36df63cc012..5e486bb29ff 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/pt/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = € ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #NULO! DIV0 = #DIV/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config index 205c342ada4..098c8075d29 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = р ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #ПУСТО! DIV0 = #ДЕЛ/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions index 324c3df2a81..86bcd4f63a7 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/ru/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config index 454e52ef52f..c2094c06249 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/sv/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = kr ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #Skärning! DIV0 = #Division/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config index 8a103d3c196..cca084b2ba5 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/config @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or @@ -36,7 +36,7 @@ currencySymbol = YTL ## -## Excel Error Codes (For future use) +## Excel Error Codes (For future use) ## NULL = #BOŞ! DIV0 = #SAYI/0! diff --git a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions index 79645214714..3e7c225f402 100644 --- a/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions +++ b/htdocs/includes/phpoffice/phpexcel/Classes/PHPExcel/locale/tr/functions @@ -1,6 +1,6 @@ ## ## PHPExcel -## +## ## Copyright (c) 2006 - 2013 PHPExcel ## ## This library is free software; you can redistribute it and/or diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php index 300eadb0f70..eff8bb61f29 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php @@ -263,13 +263,13 @@ class AutoLoader * @return bool false unless className now exists */ private function loadLastResort($className, $loader = null) { - // @CHANGE LDR Add protection to avoid conflict with other autoloader - /*print 'Try to load '.$className."\n"; - if (in_array($className, array('Google_Client'))) - { - return false; - }*/ - $loaders = array_unique(static::$rogueLoaders); + // @CHANGE LDR Add protection to avoid conflict with other autoloader + /*print 'Try to load '.$className."\n"; + if (in_array($className, array('Google_Client'))) + { + return false; + }*/ + $loaders = array_unique(static::$rogueLoaders); if (isset($loader)) { if (false === array_search($loader, $loaders)) static::$rogueLoaders[] = $loader; @@ -291,11 +291,20 @@ class AutoLoader * * @return bool false unless className exists */ - private function loadThisLoader($className, $loader) { - if (is_callable($loader) - && false !== $file = $loader($className) - && $this->exists($className, $loader)) + private function loadThisLoader($className, $loader) + { + if (is_array($loader) + && is_callable($loader)) { + $b = new $loader[0]; + if (false !== $file = $b::$loader[1]($className) + && $this->exists($className, $b::$loader[1])) { return $file; + } + } elseif (is_callable($loader) + && false !== $file = $loader($className) + && $this->exists($className, $loader)) { + return $file; + } return false; } @@ -307,10 +316,8 @@ class AutoLoader */ private function alias($className, $currentClass) { - // @CHANGE LDR if ($className == 'Luracast\Restler\string') return; if ($className == 'Luracast\Restler\mixed') return; - if ($className != $currentClass && false !== strpos($className, $currentClass)) if (!class_exists($currentClass, false) diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php b/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php index 28202efb7ad..c98a17a62d6 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Data/Validator.php @@ -1,4 +1,5 @@ 'trim', + //'*' => 'some_global_filter', //applied to all parameters + 'string' => 'trim', //apply filter function by type (string) //'string' => 'strip_tags', //'string' => 'htmlspecialchars', //'int' => 'abs', @@ -59,6 +61,29 @@ class Validator implements iValidate throw new Invalid('Expecting only alphabetic characters.'); } + /** + * Validate UUID strings. + * + * Check that given value contains only alpha numeric characters and the length is 36 chars. + * + * @param $input + * @param ValidationInfo $info + * + * @return string + * + * @throws Invalid + */ + public static function uuid($input, ValidationInfo $info = null) + { + if (is_string($input) && preg_match( + '/^\{?[0-9a-f]{8}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?[0-9a-f]{4}\-?[0-9a-f]{12}\}?$/i', + $input + )) { + return strtolower($input); + } + throw new Invalid('Expecting a Universally Unique IDentifier (UUID) string.'); + } + /** * Validate alpha numeric characters. * @@ -141,7 +166,7 @@ class Validator implements iValidate public static function color($input, ValidationInfo $info = null) { if (preg_match('/^#[a-f0-9]{6}$/i', $input)) { - return $input; + return $input; } throw new Invalid('Expecting color as hexadecimal digits.'); } @@ -204,8 +229,9 @@ class Validator implements iValidate public static function ip($input, ValidationInfo $info = null) { $r = filter_var($input, FILTER_VALIDATE_IP); - if ($r) + if ($r) { return $r; + } throw new Invalid('Expecting IP address in IPV6 or IPV4 format'); } @@ -471,8 +497,7 @@ class Validator implements iValidate } if (method_exists($class = get_called_class(), $info->type) && $info->type != 'validate') { - if(!$info->required && empty($input)) - { + if (!$info->required && empty($input)) { //optional parameter with a empty value assume null return null; } @@ -524,6 +549,7 @@ class Validator implements iValidate case 'string' : case 'password' : //password fields with string case 'search' : //search field with string + if (is_bool($input)) $input = $input ? 'true' : 'false'; if (!is_string($input)) { $error .= '. Expecting alpha numeric value'; break; @@ -555,22 +581,41 @@ class Validator implements iValidate case 'bool': case 'boolean': - if ($input === 'true' || $input === true) return true; - if (is_numeric($input)) return $input > 0; - return false; - + if (is_bool($input)) { + return $input; + } + if (is_numeric($input)) { + if ($input == 1) { + return true; + } + if ($input == 0) { + return false; + } + } elseif (is_string($input)) { + switch (strtolower($input)) { + case 'true': + return true; + case 'false': + return false; + } + } + if ($info->fix) { + return $input ? true : false; + } + $error .= '. Expecting boolean value'; + break; case 'array': if ($info->fix && is_string($input)) { $input = explode(CommentParser::$arrayDelimiter, $input); } if (is_array($input)) { $contentType = - Util::nestedValue($info, 'contentType') ? : null; + Util::nestedValue($info, 'contentType') ?: null; if ($info->fix) { if ($contentType == 'indexed') { $input = $info->filterArray($input, true); } elseif ($contentType == 'associative') { - $input = $info->filterArray($input, true); + $input = $info->filterArray($input, false); } } elseif ( $contentType == 'indexed' && @@ -609,6 +654,8 @@ class Validator implements iValidate $name = $info->name; $info->type = $contentType; unset($info->contentType); + unset($info->min); + unset($info->max); foreach ($input as $key => $chinput) { $info->name = "{$name}[$key]"; $input[$key] = static::validate($chinput, $info); diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php index 28dfd560969..00c763e8ff5 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/JsonFormat.php @@ -1,4 +1,5 @@ handleJsonError(); } catch (\RuntimeException $e) { throw new RestException(400, $e->getMessage()); @@ -157,13 +158,13 @@ class JsonFormat extends Format throw new RestException(400, 'Error parsing JSON'); } - return Obj::toArray($decoded); + return $decoded; //Obj::toArray($decoded); } /** * Pretty print JSON string * - * @param string $json + * @param string $json * * @return string formatted json */ @@ -271,7 +272,7 @@ class JsonFormat extends Format } if (isset($message)) { - throw new \RuntimeException('Error encoding/decoding JSON: '. $message); + throw new \RuntimeException('Error encoding/decoding JSON: ' . $message); } } } diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php index fd4b41ff98d..251262017c3 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php @@ -44,7 +44,9 @@ class Scope //API classes 'Resources' => 'Luracast\Restler\Resources', - 'Explorer' => 'Luracast\Restler\Explorer', + 'Explorer' => 'Luracast\Restler\Explorer\v2\Explorer', + 'Explorer1' => 'Luracast\Restler\Explorer\v1\Explorer', + 'Explorer2' => 'Luracast\Restler\Explorer\v2\Explorer', //Cache classes 'HumanReadableCache' => 'Luracast\Restler\HumanReadableCache', @@ -52,7 +54,7 @@ class Scope 'MemcacheCache' => 'Luracast\Restler\MemcacheCache', //Utility classes - 'Obj' => 'Luracast\Restler\Data\Obj', + 'Object' => 'Luracast\Restler\Data\Obj', 'Text' => 'Luracast\Restler\Data\Text', 'Arr' => 'Luracast\Restler\Data\Arr', diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Util.php b/htdocs/includes/restler/framework/Luracast/Restler/Util.php index e7324a3a620..9674550814f 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Util.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Util.php @@ -229,8 +229,8 @@ class Util // @CHANGE LDR if (! is_string($className)) return ''; //var_dump($className); - - $className = explode('\\', $className); + + $className = explode('\\', $className); return end($className); } } diff --git a/htdocs/includes/tcpdi/tcpdi_parser.php b/htdocs/includes/tcpdi/tcpdi_parser.php index cdeaf4f94e6..d8374ec8c00 100644 --- a/htdocs/includes/tcpdi/tcpdi_parser.php +++ b/htdocs/includes/tcpdi/tcpdi_parser.php @@ -5,14 +5,14 @@ // Begin : 2013-09-25 // Last Update : 2013-09-25 // Author : Paul Nicholls - https://github.com/pauln -// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) +// License : GNU-LGPL v3 (https://www.gnu.org/copyleft/lesser.html) // // Based on : tcpdf_parser.php // Version : 1.0.003 // Begin : 2011-05-23 // Last Update : 2013-03-17 // Author : Nicola Asuni - Tecnick.com LTD - www.tecnick.com - info@tecnick.com -// License : GNU-LGPL v3 (http://www.gnu.org/copyleft/lesser.html) +// License : GNU-LGPL v3 (https://www.gnu.org/copyleft/lesser.html) // ------------------------------------------------------------------- // Copyright (C) 2011-2013 Nicola Asuni - Tecnick.com LTD // diff --git a/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT b/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT index daf21f7d3eb..49147d01a71 100644 --- a/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT +++ b/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT @@ -6,6 +6,8 @@ under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. + + 2002-2019 Nicola Asuni - Tecnick.com LTD ********************************************************************** ********************************************************************** diff --git a/htdocs/includes/tecnickcom/tcpdf/README.md b/htdocs/includes/tecnickcom/tcpdf/README.md index baa518137cb..734b9879faa 100644 --- a/htdocs/includes/tecnickcom/tcpdf/README.md +++ b/htdocs/includes/tecnickcom/tcpdf/README.md @@ -6,7 +6,7 @@ * **category** Library * **author** Nicola Asuni -* **copyright** 2002-2018 Nicola Asuni - Tecnick.com LTD +* **copyright** 2002-2019 Nicola Asuni - Tecnick.com LTD * **license** http://www.gnu.org/copyleft/lesser.html GNU-LGPL v3 (see LICENSE.TXT) * **link** http://www.tcpdf.org * **source** https://github.com/tecnickcom/TCPDF diff --git a/htdocs/includes/tecnickcom/tcpdf/VERSION b/htdocs/includes/tecnickcom/tcpdf/VERSION new file mode 100644 index 00000000000..91e4a9f2622 --- /dev/null +++ b/htdocs/includes/tecnickcom/tcpdf/VERSION @@ -0,0 +1 @@ +6.3.2 diff --git a/htdocs/includes/tecnickcom/tcpdf/composer.json b/htdocs/includes/tecnickcom/tcpdf/composer.json index 47fd50d1573..70416fd3513 100644 --- a/htdocs/includes/tecnickcom/tcpdf/composer.json +++ b/htdocs/includes/tecnickcom/tcpdf/composer.json @@ -1,46 +1,47 @@ { - "name" : "tecnickcom/tcpdf", - "version" : "6.2.26", - "homepage" : "http://www.tcpdf.org/", - "type" : "library", - "description" : "TCPDF is a PHP class for generating PDF documents and barcodes.", - "keywords" : [ - "PDF", - "tcpdf", - "PDFD32000-2008", - "qrcode", - "datamatrix", - "pdf417", - "barcodes" - ], - "license" : "LGPL-3.0", - "authors" : [{ - "name" : "Nicola Asuni", - "email" : "info@tecnick.com", - "role" : "lead" - } - ], - "require" : { - "php" : ">=5.3.0" - }, - "autoload" : { - "classmap" : [ - "config", - "include", - "tcpdf.php", - "tcpdf_parser.php", - "tcpdf_import.php", - "tcpdf_barcodes_1d.php", - "tcpdf_barcodes_2d.php", - "include/tcpdf_colors.php", - "include/tcpdf_filters.php", - "include/tcpdf_font_data.php", - "include/tcpdf_fonts.php", - "include/tcpdf_images.php", - "include/tcpdf_static.php", - "include/barcodes/datamatrix.php", - "include/barcodes/pdf417.php", - "include/barcodes/qrcode.php" - ] - } -} \ No newline at end of file + "name": "tecnickcom/tcpdf", + "version": "6.3.2", + "homepage": "http://www.tcpdf.org/", + "type": "library", + "description": "TCPDF is a PHP class for generating PDF documents and barcodes.", + "keywords": [ + "PDF", + "tcpdf", + "PDFD32000-2008", + "qrcode", + "datamatrix", + "pdf417", + "barcodes" + ], + "license": "LGPL-3.0", + "authors": [ + { + "name": "Nicola Asuni", + "email": "info@tecnick.com", + "role": "lead" + } + ], + "require": { + "php": ">=5.3.0" + }, + "autoload": { + "classmap": [ + "config", + "include", + "tcpdf.php", + "tcpdf_parser.php", + "tcpdf_import.php", + "tcpdf_barcodes_1d.php", + "tcpdf_barcodes_2d.php", + "include/tcpdf_colors.php", + "include/tcpdf_filters.php", + "include/tcpdf_font_data.php", + "include/tcpdf_fonts.php", + "include/tcpdf_images.php", + "include/tcpdf_static.php", + "include/barcodes/datamatrix.php", + "include/barcodes/pdf417.php", + "include/barcodes/qrcode.php" + ] + } +} diff --git a/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php b/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php index 5217600291a..59e73e25984 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/barcodes/qrcode.php @@ -236,7 +236,7 @@ if (!defined('QRCODEDEFS')) { /** * if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly */ - // @CHANGE LDR + // @CHANGE DOL LDR define('QR_FIND_FROM_RANDOM', false); /** diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_colors.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_colors.php index 77f1c4cc841..27fb7afd192 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_colors.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_colors.php @@ -358,7 +358,7 @@ class TCPDF_COLORS { $color_code = self::$webcolor[$color]; } else { // spot color - $returncolor = self::getSpotColor($color, $spotc); + $returncolor = self::getSpotColor($hcolor, $spotc); if ($returncolor === false) { $returncolor = $defcol; } diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_filters.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_filters.php index dfb80c5d259..3bb89c092ad 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_filters.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_filters.php @@ -279,7 +279,7 @@ class TCPDF_FILTERS { // convert string to binary string $bitstring = ''; for ($i = 0; $i < $data_length; ++$i) { - $bitstring .= sprintf('%08b', ord($data{$i})); + $bitstring .= sprintf('%08b', ord($data[$i])); } // get the number of bits $data_length = strlen($bitstring); @@ -376,7 +376,7 @@ class TCPDF_FILTERS { $i = 0; while($i < $data_length) { // get current byte value - $byte = ord($data{$i}); + $byte = ord($data[$i]); if ($byte == 128) { // a length value of 128 denote EOD break; @@ -389,7 +389,7 @@ class TCPDF_FILTERS { } else { // if length is in the range 129 to 255, // the following single byte shall be copied 257 - length (2 to 128) times during decompression - $decoded .= str_repeat($data{($i + 1)}, (257 - $byte)); + $decoded .= str_repeat($data[($i + 1)], (257 - $byte)); // move to next block $i += 2; } diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_fonts.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_fonts.php index 9242ca4bfdb..218fb6df1e5 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_fonts.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_fonts.php @@ -1664,6 +1664,7 @@ class TCPDF_FONTS { * @public static */ public static function unichr($c, $unicode=true) { + $c = intval($c); if (!$unicode) { return chr($c); } elseif ($c <= 0x7F) { diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_images.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_images.php index 86b3c20dbd8..5e504f2101c 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_images.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_images.php @@ -311,7 +311,7 @@ class TCPDF_IMAGES { if ($n > 0) { $trns = array(); for ($i = 0; $i < $n; ++ $i) { - $trns[] = ord($t{$i}); + $trns[] = ord($t[$i]); } } } diff --git a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php index df1b28e1ef8..7d2c1f54a3d 100644 --- a/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php +++ b/htdocs/includes/tecnickcom/tcpdf/include/tcpdf_static.php @@ -55,7 +55,7 @@ class TCPDF_STATIC { * Current TCPDF version. * @private static */ - private static $tcpdf_version = '6.2.26'; + private static $tcpdf_version = '6.3.2'; /** * String alias for total number of pages. @@ -1926,10 +1926,10 @@ class TCPDF_STATIC { $alt = array_unique($alt); foreach ($alt as $path) { if (!self::file_exists($path)) { - return false; + continue; } $ret = @file_get_contents($path); - if ($ret !== false) { + if ( $ret != false ) { return $ret; } // try to use CURL for URLs diff --git a/htdocs/includes/tecnickcom/tcpdf/tcpdf.php b/htdocs/includes/tecnickcom/tcpdf/tcpdf.php index 24ef434ab8a..6c5779c789f 100644 --- a/htdocs/includes/tecnickcom/tcpdf/tcpdf.php +++ b/htdocs/includes/tecnickcom/tcpdf/tcpdf.php @@ -1,13 +1,13 @@ font subsetting; *
  • methods to publish some XHTML + CSS code, Javascript and Forms;
  • *
  • images, graphic (geometric figures) and transformation methods; - *
  • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImagMagick (http://www.imagemagick.org/www/formats.html)
  • + *
  • supports JPEG, PNG and SVG images natively, all images supported by GD (GD, GD2, GD2PART, GIF, JPEG, PNG, BMP, XBM, XPM) and all images supported via ImageMagick (http://www.imagemagick.org/www/formats.html)
  • *
  • 1D and 2D barcodes: CODE 39, ANSI MH10.8M-1983, USD-3, 3 of 9, CODE 93, USS-93, Standard 2 of 5, Interleaved 2 of 5, CODE 128 A/B/C, 2 and 5 Digits UPC-Based Extension, EAN 8, EAN 13, UPC-A, UPC-E, MSI, POSTNET, PLANET, RMS4CC (Royal Mail 4-state Customer Code), CBC (Customer Bar Code), KIX (Klant index - Customer index), Intelligent Mail Barcode, Onecode, USPS-B-3200, CODABAR, CODE 11, PHARMACODE, PHARMACODE TWO-TRACKS, Datamatrix, QR-Code, PDF417;
  • *
  • JPEG and PNG ICC profiles, Grayscale, RGB, CMYK, Spot Colors and Transparencies;
  • *
  • automatic page header and footer management;
  • @@ -104,7 +104,7 @@ * Tools to encode your unicode fonts are on fonts/utils directory.

    * @package com.tecnick.tcpdf * @author Nicola Asuni - * @version 6.2.26 + * @version 6.3.2 */ // TCPDF configuration @@ -128,7 +128,7 @@ require_once(dirname(__FILE__).'/include/tcpdf_static.php'); * TCPDF project (http://www.tcpdf.org) has been originally derived in 2002 from the Public Domain FPDF class by Olivier Plathey (http://www.fpdf.org), but now is almost entirely rewritten.
    * @package com.tecnick.tcpdf * @brief PHP class for generating PDF documents without requiring external extensions. - * @version 6.2.26 + * @version 6.3.2 * @author Nicola Asuni - info@tecnick.com * @IgnoreAnnotation("protected") * @IgnoreAnnotation("public") @@ -1219,7 +1219,7 @@ class TCPDF { * @protected * @since 4.5.025 (2009-03-10) */ - protected $default_monospaced_font = 'courier'; + protected $default_monospaced_font = 'freemono'; /** * Cloned copy of the current class object. @@ -1760,6 +1760,13 @@ class TCPDF { */ protected $pdfa_mode = false; + /** + * version of PDF/A mode (1 - 3). + * @protected + * @since 6.2.26 (2019-03-12) + */ + protected $pdfa_version = 1; + /** * Document creation date-time * @protected @@ -1781,6 +1788,13 @@ class TCPDF { */ protected $custom_xmp = ''; + /** + * Custom XMP RDF data. + * @protected + * @since 6.3.0 (2019-09-19) + */ + protected $custom_xmp_rdf = ''; + /** * Overprint mode array. * (Check the "Entries in a Graphics State Parameter Dictionary" on PDF 32000-1:2008). @@ -1834,7 +1848,7 @@ class TCPDF { * @param $unicode (boolean) TRUE means that the input text is unicode (default = true) * @param $encoding (string) Charset encoding (used only when converting back html entities); default is UTF-8. * @param $diskcache (boolean) DEPRECATED FEATURE - * @param $pdfa (boolean) If TRUE set the document to PDF/A mode. + * @param $pdfa (integer) If not false, set the document to PDF/A mode and the good version (1 or 3). * @public * @see getPageSizeFromFormat(), setPageFormat() */ @@ -1850,8 +1864,14 @@ class TCPDF { $this->font_obj_ids = array(); $this->page_obj_id = array(); $this->form_obj_id = array(); + // set pdf/a mode - $this->pdfa_mode = $pdfa; + if ($pdfa != false) { + $this->pdfa_mode = true; + $this->pdfa_version = $pdfa; // 1 or 3 + } else + $this->pdfa_mode = false; + $this->force_srgb = false; // set language direction $this->rtl = false; @@ -1960,7 +1980,7 @@ class TCPDF { // set default JPEG quality $this->jpeg_quality = 75; // initialize some settings - TCPDF_FONTS::utf8Bidi(array(''), '', false, $this->isunicode, $this->CurrentFont); + TCPDF_FONTS::utf8Bidi(array(), '', false, $this->isunicode, $this->CurrentFont); // set default font $this->SetFont($this->FontFamily, $this->FontStyle, $this->FontSizePt); $this->setHeaderFont(array($this->FontFamily, $this->FontStyle, $this->FontSizePt)); @@ -1986,6 +2006,7 @@ class TCPDF { $this->default_graphic_vars = $this->getGraphicVars(); $this->header_xobj_autoreset = false; $this->custom_xmp = ''; + $this->custom_xmp_rdf = ''; // Call cleanup method after script execution finishes or exit() is called. // NOTE: This will not be executed if the process is killed with a SIGTERM or SIGKILL signal. register_shutdown_function(array($this, '_destroy'), true); @@ -2828,10 +2849,13 @@ class TCPDF { * @since 1.4 */ public function SetCompression($compress=true) { + $this->compress = false; if (function_exists('gzcompress')) { - $this->compress = $compress ? true : false; - } else { - $this->compress = false; + if ($compress) { + if ( !$this->pdfa_mode) { + $this->compress = true; + } + } } } @@ -4807,7 +4831,7 @@ class TCPDF { $this->PageAnnots[$page] = array(); } $this->PageAnnots[$page][] = array('n' => ++$this->n, 'x' => $x, 'y' => $y, 'w' => $w, 'h' => $h, 'txt' => $text, 'opt' => $opt, 'numspaces' => $spaces); - if (!$this->pdfa_mode) { + if (!$this->pdfa_mode || ($this->pdfa_mode && $this->pdfa_version == 3)) { if ((($opt['Subtype'] == 'FileAttachment') OR ($opt['Subtype'] == 'Sound')) AND (!TCPDF_STATIC::empty_string($opt['FS'])) AND (@TCPDF_STATIC::file_exists($opt['FS']) OR TCPDF_STATIC::isValidURL($opt['FS'])) AND (!isset($this->embeddedfiles[basename($opt['FS'])]))) { @@ -4833,8 +4857,8 @@ class TCPDF { * @see Annotation() */ protected function _putEmbeddedFiles() { - if ($this->pdfa_mode) { - // embedded files are not allowed in PDF/A mode + if ($this->pdfa_mode && $this->pdfa_version != 3) { + // embedded files are not allowed in PDF/A mode version 1 and 2 return; } reset($this->embeddedfiles); @@ -4847,7 +4871,10 @@ class TCPDF { $this->efnames[$filename] = $filedata['f'].' 0 R'; // embedded file specification object $out = $this->_getobj($filedata['f'])."\n"; - $out .= '<_datastring($filename, $filedata['f']).' /EF <> >>'; + $out .= '<_datastring($filename, $filedata['f']); + $out .= ' /UF '.$this->_datastring($filename, $filedata['f']); + $out .= ' /AFRelationship /Source'; + $out .= ' /EF <> >>'; $out .= "\n".'endobj'; $this->_out($out); // embedded file object @@ -4856,6 +4883,11 @@ class TCPDF { $data = gzcompress($data); $filter = ' /Filter /FlateDecode'; } + + if ($this->pdfa_version == 3) { + $filter = ' /Subtype /text#2Fxml'; + } + $stream = $this->_getrawstream($data, $filedata['n']); $out = $this->_getobj($filedata['n'])."\n"; $out .= '<< /Type /EmbeddedFile'.$filter.' /Length '.strlen($stream).' /Params <> >>'; @@ -6219,12 +6251,12 @@ class TCPDF { * $this->setPage($page); * if ($page == $start_page) { * // first page - * $height = $this->h - $start_y - $this->bMargin; + * $height += $this->h - $start_y - $this->bMargin; * } elseif ($page == $end_page) { * // last page - * $height = $end_y - $this->tMargin; + * $height += $end_y - $this->tMargin; * } else { - * $height = $this->h - $this->tMargin - $this->bMargin; + * $height += $this->h - $this->tMargin - $this->bMargin; * } * } * } @@ -7737,6 +7769,7 @@ class TCPDF { return ''; } + protected static $cleaned_ids = array(); /** * Unset all class variables except the following critical variables. * @param $destroyall (boolean) if true destroys all class variables, otherwise preserves critical variables. @@ -7749,11 +7782,24 @@ class TCPDF { if (isset($this->internal_encoding) AND !empty($this->internal_encoding)) { mb_internal_encoding($this->internal_encoding); } + if (isset(self::$cleaned_ids[$this->file_id])) { + $destroyall = false; + } if ($destroyall AND !$preserve_objcopy) { + self::$cleaned_ids[$this->file_id] = true; // remove all temporary files - $tmpfiles = glob(K_PATH_CACHE.'__tcpdf_'.$this->file_id.'_*'); - if (!empty($tmpfiles)) { - array_map('unlink', $tmpfiles); + if ($handle = opendir(K_PATH_CACHE)) { + while ( false !== ( $file_name = readdir( $handle ) ) ) { + if (strpos($file_name, '__tcpdf_'.$this->file_id.'_') === 0) { + unlink(K_PATH_CACHE.$file_name); + } + } + closedir($handle); + } + if (isset($this->imagekeys)) { + foreach($this->imagekeys as $file) { + unlink($file); + } } } $preserve = array( @@ -8368,7 +8414,7 @@ class TCPDF { if (is_string($pl['txt']) && !empty($pl['txt'])) { if ($pl['txt'][0] == '#') { // internal destination - $annots .= ' /Dest /'.TCPDF_STATIC::encodeNameObject(substr($pl['txt'], 1)); + $annots .= ' /A <>'; } elseif ($pl['txt'][0] == '%') { // embedded PDF file $filename = basename(substr($pl['txt'], 1)); @@ -8380,7 +8426,7 @@ class TCPDF { $annots .= ' /A << /S /JavaScript /JS '.$this->_textstring($jsa, $annot_obj_id).'>>'; } else { $parsedUrl = parse_url($pl['txt']); - if (empty($parsedUrl['scheme']) AND (strtolower(substr($parsedUrl['path'], -4)) == '.pdf')) { + if (empty($parsedUrl['scheme']) AND (!empty($parsedUrl['path']) && strtolower(substr($parsedUrl['path'], -4)) == '.pdf')) { // relative link to a PDF file $dest = '[0 /Fit]'; // default page 0 if (!empty($parsedUrl['fragment'])) { @@ -8487,8 +8533,8 @@ class TCPDF { break; } case 'fileattachment': { - if ($this->pdfa_mode) { - // embedded files are not allowed in PDF/A mode + if ($this->pdfa_mode && $this->pdfa_version != 3) { + // embedded files are not allowed in PDF/A mode version 1 and 2 break; } if (!isset($pl['opt']['fs'])) { @@ -9500,6 +9546,17 @@ class TCPDF { $this->custom_xmp = $xmp; } + /** + * Set additional XMP data to be added on the default XMP data just before the end of "rdf:RDF" tag. + * IMPORTANT: This data is added as-is without controls, so you have to validate your data before using this method! + * @param $xmp (string) Custom XMP RDF data. + * @since 6.3.0 (2019-09-19) + * @public + */ + public function setExtraXMPRDF($xmp) { + $this->custom_xmp_rdf = $xmp; + } + /** * Put XMP data object and return ID. * @return (int) The object ID. @@ -9569,7 +9626,7 @@ class TCPDF { $xmp .= "\t\t".''."\n"; if ($this->pdfa_mode) { $xmp .= "\t\t".''."\n"; - $xmp .= "\t\t\t".'1'."\n"; + $xmp .= "\t\t\t".''.$this->pdfa_version.''."\n"; $xmp .= "\t\t\t".'B'."\n"; $xmp .= "\t\t".''."\n"; } @@ -9627,6 +9684,7 @@ class TCPDF { $xmp .= "\t\t\t\t".''."\n"; $xmp .= "\t\t\t".''."\n"; $xmp .= "\t\t".''."\n"; + $xmp .= $this->custom_xmp_rdf; $xmp .= "\t".''."\n"; $xmp .= $this->custom_xmp; $xmp .= ''."\n"; @@ -13988,7 +14046,7 @@ class TCPDF { * @since 3.1.000 (2008-06-09) */ public function setPDFVersion($version='1.7') { - if ($this->pdfa_mode) { + if ($this->pdfa_mode && $this->pdfa_version == 1 ) { // PDF/A mode $this->PDFVersion = '1.4'; } else { @@ -15502,8 +15560,7 @@ class TCPDF { *
  • int $style['module_height'] height of a single module in points
  • *
  • array $style['fgcolor'] color array for bars and text
  • *
  • mixed $style['bgcolor'] color array for background or false for transparent
  • - *
  • string $style['position'] barcode position on the page: L = left margin; C = center; R = right margin; S = stretch
  • $style['module_width'] width of a single module in points
  • - *
  • $style['module_height'] height of a single module in points
  • + *
  • string $style['position'] barcode position on the page: L = left margin; C = center; R = right margin; S = stretch
  • * @param $align (string) Indicates the alignment of the pointer next to barcode insertion relative to barcode height. The value can be:
    • T: top-right for LTR or top-left for RTL
    • M: middle-right for LTR or middle-left for RTL
    • B: bottom-right for LTR or bottom-left for RTL
    • N: next line
    * @param $distort (boolean) if true distort the barcode to fit width and height, otherwise preserve aspect ratio * @author Nicola Asuni @@ -16897,10 +16954,10 @@ class TCPDF { if (($dom[$key]['value'] == 'pre') OR ($dom[$key]['value'] == 'tt')) { $dom[$key]['fontname'] = $this->default_monospaced_font; } - if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value']{1}) > 0) AND (intval($dom[$key]['value']{1}) < 7)) { + if (!empty($dom[$key]['value']) AND ($dom[$key]['value'][0] == 'h') AND (intval($dom[$key]['value'][1]) > 0) AND (intval($dom[$key]['value'][1]) < 7)) { // headings h1, h2, h3, h4, h5, h6 if (!isset($dom[$key]['attribute']['size']) AND !isset($dom[$key]['style']['font-size'])) { - $headsize = (4 - intval($dom[$key]['value']{1})) * 2; + $headsize = (4 - intval($dom[$key]['value'][1])) * 2; $dom[$key]['fontsize'] = $dom[0]['fontsize'] + $headsize; } if (!isset($dom[$key]['style']['font-weight'])) { @@ -18686,7 +18743,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $hbz = 0; // distance from y to line bottom $hb = 0; // vertical space between block tags // calculate vertical space for block tags - if (isset($this->tagvspaces[$tag['value']][0]['h']) AND ($this->tagvspaces[$tag['value']][0]['h'] >= 0)) { + if (isset($this->tagvspaces[$tag['value']][0]['h']) && !empty($this->tagvspaces[$tag['value']][0]['h']) && ($this->tagvspaces[$tag['value']][0]['h'] >= 0)) { $cur_h = $this->tagvspaces[$tag['value']][0]['h']; } elseif (isset($tag['fontsize'])) { $cur_h = $this->getCellHeight($tag['fontsize'] / $this->k); @@ -18718,7 +18775,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: } // closing vertical space $hbc = 0; - if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { + if (isset($this->tagvspaces[$tag['value']][1]['h']) && !empty($this->tagvspaces[$tag['value']][1]['h']) && ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { $pre_h = $this->tagvspaces[$tag['value']][1]['h']; } elseif (isset($parent['fontsize'])) { $pre_h = $this->getCellHeight($parent['fontsize'] / $this->k); @@ -19379,7 +19436,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: $hbz = 0; // distance from y to line bottom $hb = 0; // vertical space between block tags // calculate vertical space for block tags - if (isset($this->tagvspaces[$tag['value']][1]['h']) AND ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { + if (isset($this->tagvspaces[$tag['value']][1]['h']) && !empty($this->tagvspaces[$tag['value']][1]['h']) && ($this->tagvspaces[$tag['value']][1]['h'] >= 0)) { $pre_h = $this->tagvspaces[$tag['value']][1]['h']; } elseif (isset($parent['fontsize'])) { $pre_h = $this->getCellHeight($parent['fontsize'] / $this->k); @@ -23995,7 +24052,7 @@ Putting 1 is equivalent to putting 0 and calling Ln() just after. Default value: case 'stop': { // gradient stops if (substr($attribs['offset'], -1) == '%') { - $offset = floatval(substr($attribs['offset'], -1)) / 100; + $offset = floatval(substr($attribs['offset'], 0, -1)) / 100; } else { $offset = floatval($attribs['offset']); if ($offset > 1) { diff --git a/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php b/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php index 0c389aeb54a..78bfc5b5bf4 100644 --- a/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php +++ b/htdocs/includes/tecnickcom/tcpdf/tcpdf_barcodes_1d.php @@ -453,7 +453,7 @@ class TCPDFBarcode { $k = 0; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $char = $code{$i}; + $char = $code[$i]; if(!isset($chr[$char])) { // invalid character return false; @@ -464,7 +464,7 @@ class TCPDFBarcode { } else { $t = false; // space } - $w = $chr[$char]{$j}; + $w = $chr[$char][$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -520,10 +520,10 @@ class TCPDFBarcode { $code_ext = ''; $clen = strlen($code); for ($i = 0 ; $i < $clen; ++$i) { - if (ord($code{$i}) > 127) { + if (ord($code[$i]) > 127) { return false; } - $code_ext .= $encode[$code{$i}]; + $code_ext .= $encode[$code[$i]]; } return $code_ext; } @@ -543,7 +543,7 @@ class TCPDFBarcode { $sum = 0; $clen = strlen($code); for ($i = 0 ; $i < $clen; ++$i) { - $k = array_keys($chars, $code{$i}); + $k = array_keys($chars, $code[$i]); $sum += $k[0]; } $j = ($sum % 43); @@ -643,10 +643,10 @@ class TCPDFBarcode { $code_ext = ''; $clen = strlen($code); for ($i = 0 ; $i < $clen; ++$i) { - if (ord($code{$i}) > 127) { + if (ord($code[$i]) > 127) { return false; } - $code_ext .= $encode[$code{$i}]; + $code_ext .= $encode[$code[$i]]; } // checksum $code_ext .= $this->checksum_code93($code_ext); @@ -656,7 +656,7 @@ class TCPDFBarcode { $k = 0; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $char = ord($code{$i}); + $char = ord($code[$i]); if(!isset($chr[$char])) { // invalid character return false; @@ -667,7 +667,7 @@ class TCPDFBarcode { } else { $t = false; // space } - $w = $chr[$char]{$j}; + $w = $chr[$char][$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -699,7 +699,7 @@ class TCPDFBarcode { $p = 1; $check = 0; for ($i = ($len - 1); $i >= 0; --$i) { - $k = array_keys($chars, $code{$i}); + $k = array_keys($chars, $code[$i]); $check += ($k[0] * $p); ++$p; if ($p > 20) { @@ -713,7 +713,7 @@ class TCPDFBarcode { $p = 1; $check = 0; for ($i = $len; $i >= 0; --$i) { - $k = array_keys($chars, $code{$i}); + $k = array_keys($chars, $code[$i]); $check += ($k[0] * $p); ++$p; if ($p > 15) { @@ -738,11 +738,11 @@ class TCPDFBarcode { $len = strlen($code); $sum = 0; for ($i = 0; $i < $len; $i+=2) { - $sum += $code{$i}; + $sum += $code[$i]; } $sum *= 3; for ($i = 1; $i < $len; $i+=2) { - $sum += ($code{$i}); + $sum += ($code[$i]); } $r = $sum % 10; if($r > 0) { @@ -783,7 +783,7 @@ class TCPDFBarcode { $p = 2; $check = 0; for ($i = ($clen - 1); $i >= 0; --$i) { - $check += (hexdec($code{$i}) * $p); + $check += (hexdec($code[$i]) * $p); ++$p; if ($p > 7) { $p = 2; @@ -798,7 +798,7 @@ class TCPDFBarcode { $seq = '110'; // left guard $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $digit = $code{$i}; + $digit = $code[$i]; if (!isset($chr[$digit])) { // invalid character return false; @@ -841,7 +841,7 @@ class TCPDFBarcode { $seq = '11011010'; $clen = strlen($code); for ($i = 0; $i < $clen; ++$i) { - $digit = $code{$i}; + $digit = $code[$i]; if (!isset($chr[$digit])) { // invalid character return false; @@ -867,8 +867,8 @@ class TCPDFBarcode { $k = 0; for ($i = 0; $i < $len; ++$i) { $w += 1; - if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq{$i} != $seq{($i+1)}))) { - if ($seq{$i} == '1') { + if (($i == ($len - 1)) OR (($i < ($len - 1)) AND ($seq[$i] != $seq[($i+1)]))) { + if ($seq[$i] == '1') { $t = true; // bar } else { $t = false; // space @@ -919,8 +919,8 @@ class TCPDFBarcode { $k = 0; $clen = strlen($code); for ($i = 0; $i < $clen; $i = ($i + 2)) { - $char_bar = $code{$i}; - $char_space = $code{$i+1}; + $char_bar = $code[$i]; + $char_space = $code[$i+1]; if((!isset($chr[$char_bar])) OR (!isset($chr[$char_space]))) { // invalid character return false; @@ -929,7 +929,7 @@ class TCPDFBarcode { $seq = ''; $chrlen = strlen($chr[$char_bar]); for ($s = 0; $s < $chrlen; $s++){ - $seq .= $chr[$char_bar]{$s} . $chr[$char_space]{$s}; + $seq .= $chr[$char_bar][$s] . $chr[$char_space][$s]; } $seqlen = strlen($seq); for ($j = 0; $j < $seqlen; ++$j) { @@ -938,7 +938,7 @@ class TCPDFBarcode { } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -1085,7 +1085,7 @@ class TCPDFBarcode { case 'A': { // MODE A $startid = 103; for ($i = 0; $i < $len; ++$i) { - $char = $code{$i}; + $char = $code[$i]; $char_id = ord($char); if (($char_id >= 241) AND ($char_id <= 244)) { $code_data[] = $fnc_a[$char_id]; @@ -1100,7 +1100,7 @@ class TCPDFBarcode { case 'B': { // MODE B $startid = 104; for ($i = 0; $i < $len; ++$i) { - $char = $code{$i}; + $char = $code[$i]; $char_id = ord($char); if (($char_id >= 241) AND ($char_id <= 244)) { $code_data[] = $fnc_b[$char_id]; @@ -1124,7 +1124,7 @@ class TCPDFBarcode { return false; } for ($i = 0; $i < $len; $i+=2) { - $chrnum = $code{$i}.$code{$i+1}; + $chrnum = $code[$i].$code[$i+1]; if (preg_match('/([0-9]{2})/', $chrnum) > 0) { $code_data[] = intval($chrnum); } else { @@ -1180,7 +1180,7 @@ class TCPDFBarcode { } } for ($i = 0; $i < $seq[2]; ++$i) { - $char = $seq[1]{$i}; + $char = $seq[1][$i]; $char_id = ord($char); if (($char_id >= 241) AND ($char_id <= 244)) { $code_data[] = $fnc_a[$char_id]; @@ -1223,7 +1223,7 @@ class TCPDFBarcode { } } for ($i = 0; $i < $seq[2]; ++$i) { - $char = $seq[1]{$i}; + $char = $seq[1][$i]; $char_id = ord($char); if (($char_id >= 241) AND ($char_id <= 244)) { $code_data[] = $fnc_b[$char_id]; @@ -1240,7 +1240,7 @@ class TCPDFBarcode { $code_data[] = 99; } for ($i = 0; $i < $seq[2]; $i+=2) { - $chrnum = $seq[1]{$i}.$seq[1]{$i+1}; + $chrnum = $seq[1][$i].$seq[1][$i+1]; $code_data[] = intval($chrnum); } break; @@ -1271,7 +1271,7 @@ class TCPDFBarcode { } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; } @@ -1337,14 +1337,14 @@ class TCPDFBarcode { // calculate check digit $sum_a = 0; for ($i = 1; $i < $data_len; $i+=2) { - $sum_a += $code{$i}; + $sum_a += $code[$i]; } if ($len > 12) { $sum_a *= 3; } $sum_b = 0; for ($i = 0; $i < $data_len; $i+=2) { - $sum_b += ($code{$i}); + $sum_b += ($code[$i]); } if ($len < 13) { $sum_b *= 3; @@ -1356,7 +1356,7 @@ class TCPDFBarcode { if ($code_len == $data_len) { // add check digit $code .= $r; - } elseif ($r !== intval($code{$data_len})) { + } elseif ($r !== intval($code[$data_len])) { // wrong checkdigit return false; } @@ -1467,7 +1467,7 @@ class TCPDFBarcode { $bararray = array('code' => $upce_code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); $p = $upce_parities[$code[1]][$r]; for ($i = 0; $i < 6; ++$i) { - $seq .= $codes[$p[$i]][$upce_code{$i}]; + $seq .= $codes[$p[$i]][$upce_code[$i]]; } $seq .= '010101'; // right guard bar } else { @@ -1475,17 +1475,17 @@ class TCPDFBarcode { $half_len = intval(ceil($len / 2)); if ($len == 8) { for ($i = 0; $i < $half_len; ++$i) { - $seq .= $codes['A'][$code{$i}]; + $seq .= $codes['A'][$code[$i]]; } } else { $p = $parities[$code[0]]; for ($i = 1; $i < $half_len; ++$i) { - $seq .= $codes[$p[$i-1]][$code{$i}]; + $seq .= $codes[$p[$i-1]][$code[$i]]; } } $seq .= '01010'; // center guard bar for ($i = $half_len; $i < $len; ++$i) { - $seq .= $codes['C'][$code{$i}]; + $seq .= $codes['C'][$code[$i]]; } $seq .= '101'; // right guard bar } @@ -1493,8 +1493,8 @@ class TCPDFBarcode { $w = 0; for ($i = 0; $i < $clen; ++$i) { $w += 1; - if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq{$i} != $seq{($i+1)}))) { - if ($seq{$i} == '1') { + if (($i == ($clen - 1)) OR (($i < ($clen - 1)) AND ($seq[$i] != $seq[$i+1]))) { + if ($seq[$i] == '1') { $t = true; // bar } else { $t = false; // space @@ -1578,7 +1578,7 @@ class TCPDFBarcode { $seq .= $codes[$p[0]][$code[0]]; for ($i = 1; $i < $len; ++$i) { $seq .= '01'; // separator - $seq .= $codes[$p[$i]][$code{$i}]; + $seq .= $codes[$p[$i]][$code[$i]]; } $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 1, 'bcode' => array()); return $this->binseq_to_array($seq, $bararray); @@ -1629,7 +1629,7 @@ class TCPDFBarcode { // calculate checksum $sum = 0; for ($i = 0; $i < $len; ++$i) { - $sum += intval($code{$i}); + $sum += intval($code[$i]); } $chkd = ($sum % 10); if($chkd > 0) { @@ -1643,7 +1643,7 @@ class TCPDFBarcode { $bararray['maxw'] += 2; for ($i = 0; $i < $len; ++$i) { for ($j = 0; $j < 5; ++$j) { - $h = $barlen[$code{$i}][$j]; + $h = $barlen[$code[$i]][$j]; $p = floor(1 / $h); $bararray['bcode'][$k++] = array('t' => 1, 'w' => 1, 'h' => $h, 'p' => $p); $bararray['bcode'][$k++] = array('t' => 0, 'w' => 1, 'h' => 2, 'p' => 0); @@ -1756,8 +1756,8 @@ class TCPDFBarcode { $row = 0; $col = 0; for ($i = 0; $i < $len; ++$i) { - $row += $checktable[$code{$i}][0]; - $col += $checktable[$code{$i}][1]; + $row += $checktable[$code[$i]][0]; + $col += $checktable[$code[$i]][1]; } $row %= 6; $col %= 6; @@ -1774,7 +1774,7 @@ class TCPDFBarcode { } for ($i = 0; $i < $len; ++$i) { for ($j = 0; $j < 4; ++$j) { - switch ($barmode[$code{$i}][$j]) { + switch ($barmode[$code[$i]][$j]) { case 1: { $p = 0; $h = 2; @@ -1846,17 +1846,17 @@ class TCPDFBarcode { $code = 'A'.strtoupper($code).'A'; $len = strlen($code); for ($i = 0; $i < $len; ++$i) { - if (!isset($chr[$code{$i}])) { + if (!isset($chr[$code[$i]])) { return false; } - $seq = $chr[$code{$i}]; + $seq = $chr[$code[$i]]; for ($j = 0; $j < 8; ++$j) { if (($j % 2) == 0) { $t = true; // bar } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -1896,7 +1896,7 @@ class TCPDFBarcode { $p = 1; $check = 0; for ($i = ($len - 1); $i >= 0; --$i) { - $digit = $code{$i}; + $digit = $code[$i]; if ($digit == '-') { $dval = 10; } else { @@ -1918,7 +1918,7 @@ class TCPDFBarcode { $p = 1; $check = 0; for ($i = $len; $i >= 0; --$i) { - $digit = $code{$i}; + $digit = $code[$i]; if ($digit == '-') { $dval = 10; } else { @@ -1937,17 +1937,17 @@ class TCPDFBarcode { $code = 'S'.$code.'S'; $len += 3; for ($i = 0; $i < $len; ++$i) { - if (!isset($chr[$code{$i}])) { + if (!isset($chr[$code[$i]])) { return false; } - $seq = $chr[$code{$i}]; + $seq = $chr[$code[$i]]; for ($j = 0; $j < 6; ++$j) { if (($j % 2) == 0) { $t = true; // bar } else { $t = false; // space } - $w = $seq{$j}; + $w = $seq[$j]; $bararray['bcode'][$k] = array('t' => $t, 'w' => $w, 'h' => 1, 'p' => 0); $bararray['maxw'] += $w; ++$k; @@ -2016,7 +2016,7 @@ class TCPDFBarcode { $bararray = array('code' => $code, 'maxw' => 0, 'maxh' => 2, 'bcode' => array()); $len = strlen($seq); for ($i = 0; $i < $len; ++$i) { - switch ($seq{$i}) { + switch ($seq[$i]) { case '1': { $p = 1; $h = 1; @@ -2255,7 +2255,7 @@ class TCPDFBarcode { $bitval = 1; $len = strlen($hex); for($pos = ($len - 1); $pos >= 0; --$pos) { - $dec = bcadd($dec, bcmul(hexdec($hex{$pos}), $bitval)); + $dec = bcadd($dec, bcmul(hexdec($hex[$pos]), $bitval)); $bitval = bcmul($bitval, 16); } return $dec; diff --git a/htdocs/includes/tecnickcom/tcpdf/tcpdf_parser.php b/htdocs/includes/tecnickcom/tcpdf/tcpdf_parser.php index 780ec2129d1..bd3d719c7ac 100644 --- a/htdocs/includes/tecnickcom/tcpdf/tcpdf_parser.php +++ b/htdocs/includes/tecnickcom/tcpdf/tcpdf_parser.php @@ -531,10 +531,10 @@ class TCPDF_PARSER { if ($char == '(') { $open_bracket = 1; while ($open_bracket > 0) { - if (!isset($this->pdfdata{$strpos})) { + if (!isset($this->pdfdata[$strpos])) { break; } - $ch = $this->pdfdata{$strpos}; + $ch = $this->pdfdata[$strpos]; switch ($ch) { case '\\': { // REVERSE SOLIDUS (5Ch) (Backslash) // skip next character @@ -578,7 +578,7 @@ class TCPDF_PARSER { } case '<': // \x3C LESS-THAN SIGN case '>': { // \x3E GREATER-THAN SIGN - if (isset($this->pdfdata{($offset + 1)}) AND ($this->pdfdata{($offset + 1)} == $char)) { + if (isset($this->pdfdata[($offset + 1)]) AND ($this->pdfdata[($offset + 1)] == $char)) { // dictionary object $objtype = $char.$char; $offset += 2; diff --git a/htdocs/index.php b/htdocs/index.php index bce3b9dc083..c1c6d4a1f63 100644 --- a/htdocs/index.php +++ b/htdocs/index.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -80,7 +80,7 @@ llxHeader('', $title); $resultboxes=FormOther::getBoxesArea($user, "0"); // Load $resultboxes (selectboxlist + boxactivated + boxlista + boxlistb) -print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'title_home'); +print load_fiche_titre($langs->trans("HomeArea"), $resultboxes['selectboxlist'], 'home'); if (! empty($conf->global->MAIN_MOTD)) { @@ -301,7 +301,7 @@ if (empty($user->societe_id) && empty($conf->global->MAIN_DISABLE_GLOBAL_BOXSTAT "supplier_proposal", "projects", "trips", - "holidays", + "holiday", "donations" ); @@ -409,7 +409,8 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { if (!empty($conf->supplier_order->enabled) && $user->rights->fournisseur->commande->lire) { include_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.commande.class.php'; $board = new CommandeFournisseur($db); - $dashboardlines[$board->element] = $board->load_board($user); + $dashboardlines[$board->element . '_opened'] = $board->load_board($user, "opened"); + $dashboardlines[$board->element . '_awaiting'] = $board->load_board($user, 'awaiting'); } // Number of services enabled (delayed) @@ -541,7 +542,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { 'groupName' => 'SuppliersOrders', 'globalStatsKey' => 'supplier_orders', 'stats' => - array('order_supplier'), + array('order_supplier_opened', 'order_supplier_awaiting'), ), 'invoice_supplier' => array( @@ -655,7 +656,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) { foreach ($dashboardgroup as $groupKey => $groupElement) { $boards = array(); - if (!empty($conf->global->MAIN_DISPLAY_NEW_OPENED_DASH_BOARD) || !empty($conf->global->MAIN_FEATURES_LEVEL)) { + if (empty($conf->global->MAIN_DISABLE_NEW_OPENED_DASH_BOARD)) { foreach ($groupElement['stats'] as $infoKey) { if (!empty($valid_dashboardlines[$infoKey])) { $boards[] = $valid_dashboardlines[$infoKey]; diff --git a/htdocs/install/check.php b/htdocs/install/check.php index 1e248071135..6dfc7c2546e 100644 --- a/htdocs/install/check.php +++ b/htdocs/install/check.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -147,6 +147,16 @@ else print 'Ok '.$langs->trans("PHPSupportCurl")."
    \n"; } +// Check if PHP calendar extension is available +if (! function_exists("easter_date")) +{ + print 'Error '.$langs->trans("ErrorPHPDoesNotSupportCalendar")."
    \n"; +} +else +{ + print 'Ok '.$langs->trans("PHPSupportCalendar")."
    \n"; +} + // Check if UTF8 supported if (! function_exists("utf8_encode")) diff --git a/htdocs/install/default.css b/htdocs/install/default.css index 2e005a30b21..0e1e23f8f2c 100644 --- a/htdocs/install/default.css +++ b/htdocs/install/default.css @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ diff --git a/htdocs/install/fileconf.php b/htdocs/install/fileconf.php index be70efd5460..c953790f8c0 100644 --- a/htdocs/install/fileconf.php +++ b/htdocs/install/fileconf.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/install/inc.php b/htdocs/install/inc.php index c8dc7fd4382..049bef7ff89 100644 --- a/htdocs/install/inc.php +++ b/htdocs/install/inc.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -544,12 +544,16 @@ function detect_dolibarr_main_url_root() $dolibarr_main_url_root = $_SERVER["SERVER_URL"] . $_SERVER["DOCUMENT_URI"]; } // If SCRIPT_URI, SERVER_URL, DOCUMENT_URI not defined (Ie: Apache 2.0.44 for Windows) else { - $proto = ( (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || $_SERVER['SERVER_PORT'] == 443) ? 'https' : 'http'; + $proto = ((!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') || (! empty($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT'] == 443)) ? 'https' : 'http'; if (!empty($_SERVER["HTTP_HOST"])) { $serverport = $_SERVER["HTTP_HOST"]; - } else { + } + elseif (!empty($_SERVER["SERVER_NAME"])) { $serverport = $_SERVER["SERVER_NAME"]; } + else { + $serverport = 'localhost'; + } $dolibarr_main_url_root = $proto . "://" . $serverport . $_SERVER["SCRIPT_NAME"]; } // Clean proposed URL diff --git a/htdocs/install/index.php b/htdocs/install/index.php index e30336d4c88..bf53bc343ba 100644 --- a/htdocs/install/index.php +++ b/htdocs/install/index.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/install/install.forced.sample.php b/htdocs/install/install.forced.sample.php index 2d66084e076..98f102ddea0 100644 --- a/htdocs/install/install.forced.sample.php +++ b/htdocs/install/install.forced.sample.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @var bool Hide PHP informations */ diff --git a/htdocs/install/lib/repair.lib.php b/htdocs/install/lib/repair.lib.php index bc2d746968c..98eac2437fa 100644 --- a/htdocs/install/lib/repair.lib.php +++ b/htdocs/install/lib/repair.lib.php @@ -12,8 +12,8 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - * or see http://www.gnu.org/ + * along with this program. If not, see . + * or see https://www.gnu.org/ */ /** diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql index 460fc1f1557..f2a48da68fb 100644 --- a/htdocs/install/mysql/data/llx_00_c_country.sql +++ b/htdocs/install/mysql/data/llx_00_c_country.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Do not add comment at end of line. This file is parsed by install and -- are removed diff --git a/htdocs/install/mysql/data/llx_10_c_regions.sql b/htdocs/install/mysql/data/llx_10_c_regions.sql index 34d903a0da7..be485ddb6b1 100644 --- a/htdocs/install/mysql/data/llx_10_c_regions.sql +++ b/htdocs/install/mysql/data/llx_10_c_regions.sql @@ -22,7 +22,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_20_c_departements.sql b/htdocs/install/mysql/data/llx_20_c_departements.sql index 7ed2ed76ac0..7e9417b487b 100644 --- a/htdocs/install/mysql/data/llx_20_c_departements.sql +++ b/htdocs/install/mysql/data/llx_20_c_departements.sql @@ -21,7 +21,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- @@ -1604,4 +1604,4 @@ INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI041', NULL, NULL, 'CENTRAL SLOVENIA', 'Central Slovenia'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI038', NULL, NULL, 'UPPER CARNIOLA', 'Upper Carniola'); INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI043', NULL, NULL, 'GORIZIA', 'Gorizia'); -INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI044', NULL, NULL, 'COASTAL–KARST', 'Coastal–Karst'); \ No newline at end of file +INSERT INTO llx_c_departements (fk_region, code_departement, cheflieu, tncc, ncc, nom) VALUES ('20204', 'SI044', NULL, NULL, 'COASTAL–KARST', 'Coastal–Karst'); diff --git a/htdocs/install/mysql/data/llx_accounting_abc.sql b/htdocs/install/mysql/data/llx_accounting_abc.sql index 54ae1d6e466..6a04816ca27 100644 --- a/htdocs/install/mysql/data/llx_accounting_abc.sql +++ b/htdocs/install/mysql/data/llx_accounting_abc.sql @@ -20,7 +20,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_be.sql b/htdocs/install/mysql/data/llx_accounting_account_be.sql index 75ee10f7de8..433f840b6d9 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_be.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_be.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_bf.sql b/htdocs/install/mysql/data/llx_accounting_account_bf.sql index 51961097b77..4b8049ccd17 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_bf.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_bf.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_bj.sql b/htdocs/install/mysql/data/llx_accounting_account_bj.sql index 13aa8b135e7..4bd43fce8c0 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_bj.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_bj.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_cd.sql b/htdocs/install/mysql/data/llx_accounting_account_cd.sql index 25e1e5b7809..c8e5c76e01b 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cd.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cd.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_cf.sql b/htdocs/install/mysql/data/llx_accounting_account_cf.sql index 6968641d6ae..dabff7f17d8 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cf.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cf.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_cg.sql b/htdocs/install/mysql/data/llx_accounting_account_cg.sql index 92d3fa34428..1664d2e0891 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cg.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cg.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_ci.sql b/htdocs/install/mysql/data/llx_accounting_account_ci.sql index 9df71c78316..dbf97f85d14 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ci.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ci.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_cl.sql b/htdocs/install/mysql/data/llx_accounting_account_cl.sql index 3e962a18680..aed4eb7194a 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cl.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cl.sql @@ -19,7 +19,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_cm.sql b/htdocs/install/mysql/data/llx_accounting_account_cm.sql index c2514a83379..84361c2e094 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_cm.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_cm.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_de.sql b/htdocs/install/mysql/data/llx_accounting_account_de.sql index d74a18212b7..cb936761992 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_de.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_de.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- @@ -7630,4 +7630,4 @@ INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 8756, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Statistische Konten für außergewöhnliche und aperiodische Geschäftsvorfälle für Anhangsangabe nach § 285 Nr. 31 und Nr. 32 HGB', 9993, 9, 'Aufwendungen von außergewöhnlicher Größenordnung oder Bedeutung'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 8757, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Statistische Konten für außergewöhnliche und aperiodische Geschäftsvorfälle für Anhangsangabe nach § 285 Nr. 31 und Nr. 32 HGB', 9994, 9, 'Aufwendungen (aperiodisch)'); INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 8758, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Statistische Konten für außergewöhnliche und aperiodische Geschäftsvorfälle für Anhangsangabe nach § 285 Nr. 31 und Nr. 32 HGB', 9995, 9, 'Aufwendungen von außergewöhnlicher Größenordnung oder Bedeutung (aperiodisch)'); -INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 8759, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Statistische Konten für außergewöhnliche und aperiodische Geschäftsvorfälle für Anhangsangabe nach § 285 Nr. 31 und Nr. 32 HGB', 9998, 9, 'Gegenkonto 9990-9997'); \ No newline at end of file +INSERT INTO llx_accounting_account (entity, rowid, fk_pcg_version, pcg_type, pcg_subtype, account_number, account_parent, label) VALUES (__ENTITY__, 8759, 'SKR04', 'Vortrags-, Kapital-, Korrektur- und statistische Konten', 'Statistische Konten für außergewöhnliche und aperiodische Geschäftsvorfälle für Anhangsangabe nach § 285 Nr. 31 und Nr. 32 HGB', 9998, 9, 'Gegenkonto 9990-9997'); diff --git a/htdocs/install/mysql/data/llx_accounting_account_dk.sql b/htdocs/install/mysql/data/llx_accounting_account_dk.sql index 83d9942d9db..873ba33b8dd 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_dk.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_dk.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_dz.sql b/htdocs/install/mysql/data/llx_accounting_account_dz.sql index bdb36303f3a..121c485fe27 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_dz.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_dz.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_es.sql b/htdocs/install/mysql/data/llx_accounting_account_es.sql index 93a80265bb9..834260e8c99 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_es.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_es.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_fr.sql b/htdocs/install/mysql/data/llx_accounting_account_fr.sql index 267602143f3..0052cf86446 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_fr.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_fr.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_ga.sql b/htdocs/install/mysql/data/llx_accounting_account_ga.sql index f99a42df171..5c803111ff4 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ga.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ga.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_gb.sql b/htdocs/install/mysql/data/llx_accounting_account_gb.sql index fd05c70fa99..4de339ed983 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_gb.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_gb.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_gq.sql b/htdocs/install/mysql/data/llx_accounting_account_gq.sql index dd82a35d64c..6e216bc970b 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_gq.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_gq.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_km.sql b/htdocs/install/mysql/data/llx_accounting_account_km.sql index 14cb877f999..c58d10d1adb 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_km.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_km.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_ml.sql b/htdocs/install/mysql/data/llx_accounting_account_ml.sql index d54f0fb7844..4cc28f75cc9 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ml.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ml.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_ne.sql b/htdocs/install/mysql/data/llx_accounting_account_ne.sql index e43ff41a0a1..c102c6d62e8 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ne.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ne.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_nl.sql b/htdocs/install/mysql/data/llx_accounting_account_nl.sql index 8cd08eb474d..075cd419406 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_nl.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_nl.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_ro.sql b/htdocs/install/mysql/data/llx_accounting_account_ro.sql index e1904508852..cee2cfe6276 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_ro.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_ro.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_sn.sql b/htdocs/install/mysql/data/llx_accounting_account_sn.sql index c4eec7245a5..32b63f9d5ed 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_sn.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_sn.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_td.sql b/htdocs/install/mysql/data/llx_accounting_account_td.sql index 71871663bc3..c83ab1accc2 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_td.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_td.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_account_tg.sql b/htdocs/install/mysql/data/llx_accounting_account_tg.sql index 21e3989fd74..bdab9e5f9eb 100644 --- a/htdocs/install/mysql/data/llx_accounting_account_tg.sql +++ b/htdocs/install/mysql/data/llx_accounting_account_tg.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_accounting_category.sql b/htdocs/install/mysql/data/llx_accounting_category.sql index a569114506e..6621dc32f52 100644 --- a/htdocs/install/mysql/data/llx_accounting_category.sql +++ b/htdocs/install/mysql/data/llx_accounting_category.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql index 0e2a1875e21..abc961b49d5 100644 --- a/htdocs/install/mysql/data/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql @@ -21,7 +21,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_actioncomm.sql b/htdocs/install/mysql/data/llx_c_actioncomm.sql index 7f7c3d6ea2e..238a096fcb2 100644 --- a/htdocs/install/mysql/data/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/data/llx_c_actioncomm.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_availability.sql b/htdocs/install/mysql/data/llx_c_availability.sql index 1a3612f0239..7d834aa2809 100644 --- a/htdocs/install/mysql/data/llx_c_availability.sql +++ b/htdocs/install/mysql/data/llx_c_availability.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql index d59e0cbc290..324223b274d 100644 --- a/htdocs/install/mysql/data/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_civilite.sql b/htdocs/install/mysql/data/llx_c_civilite.sql index a14e84be27d..1288fb23cea 100644 --- a/htdocs/install/mysql/data/llx_c_civilite.sql +++ b/htdocs/install/mysql/data/llx_c_civilite.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_currencies.sql b/htdocs/install/mysql/data/llx_c_currencies.sql index 8446618e9b5..caa76d491cd 100644 --- a/htdocs/install/mysql/data/llx_c_currencies.sql +++ b/htdocs/install/mysql/data/llx_c_currencies.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_ecotaxe.sql b/htdocs/install/mysql/data/llx_c_ecotaxe.sql index 12505ba81c6..c3ba5068629 100644 --- a/htdocs/install/mysql/data/llx_c_ecotaxe.sql +++ b/htdocs/install/mysql/data/llx_c_ecotaxe.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_effectif.sql b/htdocs/install/mysql/data/llx_c_effectif.sql index 6e9bc4ed0e9..cb67da5d73c 100644 --- a/htdocs/install/mysql/data/llx_c_effectif.sql +++ b/htdocs/install/mysql/data/llx_c_effectif.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql index 87741d1054b..f417804ff93 100644 --- a/htdocs/install/mysql/data/llx_c_email_templates.sql +++ b/htdocs/install/mysql/data/llx_c_email_templates.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_exp_tax_cat.sql b/htdocs/install/mysql/data/llx_c_exp_tax_cat.sql index ba6516d81ad..dd36f78a121 100644 --- a/htdocs/install/mysql/data/llx_c_exp_tax_cat.sql +++ b/htdocs/install/mysql/data/llx_c_exp_tax_cat.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_exp_tax_range.sql b/htdocs/install/mysql/data/llx_c_exp_tax_range.sql index ad15c320153..b2d936ad910 100644 --- a/htdocs/install/mysql/data/llx_c_exp_tax_range.sql +++ b/htdocs/install/mysql/data/llx_c_exp_tax_range.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- @@ -44,4 +44,4 @@ INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active) values (13,8, 0, 1, 1); INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active) values (14,8, 5000, 1, 1); -INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active) values (15,8, 20000, 1, 1); \ No newline at end of file +INSERT INTO llx_c_exp_tax_range (rowid,fk_c_exp_tax_cat,range_ik, entity, active) values (15,8, 20000, 1, 1); diff --git a/htdocs/install/mysql/data/llx_c_format_cards.sql b/htdocs/install/mysql/data/llx_c_format_cards.sql index b235fdccc5b..77cdcd6e904 100644 --- a/htdocs/install/mysql/data/llx_c_format_cards.sql +++ b/htdocs/install/mysql/data/llx_c_format_cards.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/data/llx_c_forme_juridique.sql b/htdocs/install/mysql/data/llx_c_forme_juridique.sql index ec8e687203f..d57c9a7081d 100644 --- a/htdocs/install/mysql/data/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/data/llx_c_forme_juridique.sql @@ -22,7 +22,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_holiday_type.sql b/htdocs/install/mysql/data/llx_c_holiday_type.sql index 64ab84f410f..addd7f9942e 100644 --- a/htdocs/install/mysql/data/llx_c_holiday_type.sql +++ b/htdocs/install/mysql/data/llx_c_holiday_type.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Ne pas placer de commentaire en fin de ligne, ce fichier est parsé lors -- de l'install et tous les sigles '--' sont supprimés. diff --git a/htdocs/install/mysql/data/llx_c_hrm_department.sql b/htdocs/install/mysql/data/llx_c_hrm_department.sql index 714963896cc..d36d32c6703 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_department.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_department.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- @@ -36,4 +36,4 @@ INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(12, 60 INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(14, 70,'LOGISTIC', 'Logistics', 1); INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(15, 75,'CONSTRUCT', 'Engineering/design', 0); INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(16, 80,'PRODUCTION', 'Production', 1); -INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(17, 85,'QUALITY', 'Quality assurance', 0); \ No newline at end of file +INSERT INTO llx_c_hrm_department (rowid, pos, code, label, active) VALUES(17, 85,'QUALITY', 'Quality assurance', 0); diff --git a/htdocs/install/mysql/data/llx_c_hrm_function.sql b/htdocs/install/mysql/data/llx_c_hrm_function.sql index 900439f9709..5da4d60e1b7 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_function.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_function.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- diff --git a/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql b/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql index 737fe66f9da..9f779ecf64b 100644 --- a/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql +++ b/htdocs/install/mysql/data/llx_c_hrm_public_holiday.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_incoterms.sql b/htdocs/install/mysql/data/llx_c_incoterms.sql index 3294c8285a3..3f2e4cbac2e 100644 --- a/htdocs/install/mysql/data/llx_c_incoterms.sql +++ b/htdocs/install/mysql/data/llx_c_incoterms.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_input_method.sql b/htdocs/install/mysql/data/llx_c_input_method.sql index f3bd0fa6590..bd988c2d07a 100644 --- a/htdocs/install/mysql/data/llx_c_input_method.sql +++ b/htdocs/install/mysql/data/llx_c_input_method.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_input_reason.sql b/htdocs/install/mysql/data/llx_c_input_reason.sql index 36bc3faec04..ff3621aed16 100644 --- a/htdocs/install/mysql/data/llx_c_input_reason.sql +++ b/htdocs/install/mysql/data/llx_c_input_reason.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_lead_status.sql b/htdocs/install/mysql/data/llx_c_lead_status.sql index 82450a9c4e1..78adaad67c6 100644 --- a/htdocs/install/mysql/data/llx_c_lead_status.sql +++ b/htdocs/install/mysql/data/llx_c_lead_status.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_paiement.sql b/htdocs/install/mysql/data/llx_c_paiement.sql index b0d9d0ed233..ffe129ec501 100644 --- a/htdocs/install/mysql/data/llx_c_paiement.sql +++ b/htdocs/install/mysql/data/llx_c_paiement.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_paper_format.sql b/htdocs/install/mysql/data/llx_c_paper_format.sql index 8df46f0d325..bfa2b1b87ec 100644 --- a/htdocs/install/mysql/data/llx_c_paper_format.sql +++ b/htdocs/install/mysql/data/llx_c_paper_format.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_payment_term.sql b/htdocs/install/mysql/data/llx_c_payment_term.sql index 232e0ebc865..b5ff008912b 100644 --- a/htdocs/install/mysql/data/llx_c_payment_term.sql +++ b/htdocs/install/mysql/data/llx_c_payment_term.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_propalst.sql b/htdocs/install/mysql/data/llx_c_propalst.sql index b6d8b7f56e6..eabd80fc279 100644 --- a/htdocs/install/mysql/data/llx_c_propalst.sql +++ b/htdocs/install/mysql/data/llx_c_propalst.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_prospectlevel.sql b/htdocs/install/mysql/data/llx_c_prospectlevel.sql index c0bc26d883f..9c26099abed 100644 --- a/htdocs/install/mysql/data/llx_c_prospectlevel.sql +++ b/htdocs/install/mysql/data/llx_c_prospectlevel.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_revenuestamp.sql b/htdocs/install/mysql/data/llx_c_revenuestamp.sql index ee4e9ab7873..8f8eaca93ca 100644 --- a/htdocs/install/mysql/data/llx_c_revenuestamp.sql +++ b/htdocs/install/mysql/data/llx_c_revenuestamp.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index d3f353ff016..ef80be26c09 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_stcomm.sql b/htdocs/install/mysql/data/llx_c_stcomm.sql index 088be6c83ec..e2ce18efd76 100644 --- a/htdocs/install/mysql/data/llx_c_stcomm.sql +++ b/htdocs/install/mysql/data/llx_c_stcomm.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_ticket_category.sql b/htdocs/install/mysql/data/llx_c_ticket_category.sql index 033b5818ae7..7a1a6d557d8 100644 --- a/htdocs/install/mysql/data/llx_c_ticket_category.sql +++ b/htdocs/install/mysql/data/llx_c_ticket_category.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Contenu de la table llx_c_ticket_category diff --git a/htdocs/install/mysql/data/llx_c_ticket_severity.sql b/htdocs/install/mysql/data/llx_c_ticket_severity.sql index e6c6f52dd39..0f385ab2005 100644 --- a/htdocs/install/mysql/data/llx_c_ticket_severity.sql +++ b/htdocs/install/mysql/data/llx_c_ticket_severity.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Contenu de la table llx_c_ticket_severity diff --git a/htdocs/install/mysql/data/llx_c_ticket_type.sql b/htdocs/install/mysql/data/llx_c_ticket_type.sql index db1691018c2..c3c6deae58f 100644 --- a/htdocs/install/mysql/data/llx_c_ticket_type.sql +++ b/htdocs/install/mysql/data/llx_c_ticket_type.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Contenu de la table llx_c_ticket_type diff --git a/htdocs/install/mysql/data/llx_c_tva.sql b/htdocs/install/mysql/data/llx_c_tva.sql index c0a03c141bf..0888c68783c 100644 --- a/htdocs/install/mysql/data/llx_c_tva.sql +++ b/htdocs/install/mysql/data/llx_c_tva.sql @@ -20,7 +20,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_type_contact.sql b/htdocs/install/mysql/data/llx_c_type_contact.sql index 006a65d2641..d7ec13f5833 100644 --- a/htdocs/install/mysql/data/llx_c_type_contact.sql +++ b/htdocs/install/mysql/data/llx_c_type_contact.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_type_container.sql b/htdocs/install/mysql/data/llx_c_type_container.sql index 403ddd8c252..949f0bad687 100644 --- a/htdocs/install/mysql/data/llx_c_type_container.sql +++ b/htdocs/install/mysql/data/llx_c_type_container.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_type_fees.sql b/htdocs/install/mysql/data/llx_c_type_fees.sql index d78455e2939..77eb20a06f3 100644 --- a/htdocs/install/mysql/data/llx_c_type_fees.sql +++ b/htdocs/install/mysql/data/llx_c_type_fees.sql @@ -19,7 +19,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_type_resource.sql b/htdocs/install/mysql/data/llx_c_type_resource.sql index 66480157eef..fb93d6ff68b 100644 --- a/htdocs/install/mysql/data/llx_c_type_resource.sql +++ b/htdocs/install/mysql/data/llx_c_type_resource.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_typent.sql b/htdocs/install/mysql/data/llx_c_typent.sql index be24586f36d..ef725f43d98 100644 --- a/htdocs/install/mysql/data/llx_c_typent.sql +++ b/htdocs/install/mysql/data/llx_c_typent.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_c_units.sql b/htdocs/install/mysql/data/llx_c_units.sql index 30484471ca8..727835a6a9c 100644 --- a/htdocs/install/mysql/data/llx_c_units.sql +++ b/htdocs/install/mysql/data/llx_c_units.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/data/llx_const.sql b/htdocs/install/mysql/data/llx_const.sql index bca58905104..ced4a0d8427 100644 --- a/htdocs/install/mysql/data/llx_const.sql +++ b/htdocs/install/mysql/data/llx_const.sql @@ -18,7 +18,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/data/llx_expensereport_ik.sql b/htdocs/install/mysql/data/llx_expensereport_ik.sql index 3b90fcd9bd0..1f66e138b99 100644 --- a/htdocs/install/mysql/data/llx_expensereport_ik.sql +++ b/htdocs/install/mysql/data/llx_expensereport_ik.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- @@ -44,4 +44,4 @@ INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffs INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (13,8, 13, 0.595, 0); INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (14,8, 14, 0.337, 1288); -INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (15,8, 15, 0.401, 0); \ No newline at end of file +INSERT INTO llx_expensereport_ik (rowid,fk_c_exp_tax_cat, fk_range, coef, ikoffset) values (15,8, 15, 0.401, 0); diff --git a/htdocs/install/mysql/functions/functions.sql b/htdocs/install/mysql/functions/functions.sql index 2fe712961ee..9e169109da7 100644 --- a/htdocs/install/mysql/functions/functions.sql +++ b/htdocs/install/mysql/functions/functions.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- ============================================================================ diff --git a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql index ea959cd7a74..134d8c3190e 100644 --- a/htdocs/install/mysql/migration/10.0.0-11.0.0.sql +++ b/htdocs/install/mysql/migration/10.0.0-11.0.0.sql @@ -33,6 +33,19 @@ ALTER TABLE llx_account_bookkeeping ADD COLUMN date_export datetime DEFAULT NULL ALTER TABLE llx_expensereport ADD COLUMN paid smallint default 0 NOT NULL; UPDATE llx_expensereport set paid = 1 WHERE fk_statut = 6 and paid = 0; +UPDATE llx_c_units SET short_label = 'i' WHERE code = 'MI'; +UPDATE llx_c_units SET unit_type = 'weight', short_label = 'kg', scale = 0 WHERE code = 'KG'; +UPDATE llx_c_units SET unit_type = 'weight', short_label = 'g', scale = -3 WHERE code = 'G'; +UPDATE llx_c_units SET unit_type = 'time' WHERE code IN ('S','H','D'); +UPDATE llx_c_units SET unit_type = 'size' WHERE code IN ('M','LM'); +UPDATE llx_c_units SET label = 'SizeUnitm', scale = 0 WHERE code IN ('M'); +UPDATE llx_c_units SET active = 0, scale = 0 WHERE code IN ('LM'); +UPDATE llx_c_units SET unit_type = 'surface', scale = 0 WHERE code IN ('M2'); +UPDATE llx_c_units SET unit_type = 'volume', scale = 0 WHERE code IN ('M3','L'); +UPDATE llx_c_units SET scale = -3, active = 0 WHERE code IN ('L'); +UPDATE llx_c_units SET label = 'VolumeUnitm3' WHERE code IN ('M3'); +UPDATE llx_c_units SET label = 'SurfaceUnitm2' WHERE code IN ('M2'); + -- For v11 @@ -123,18 +136,35 @@ ALTER TABLE llx_projet ADD COLUMN usage_organize_event integer DEFAULT 0; UPDATE llx_projet set usage_opportunity = 1 WHERE fk_opp_status > 0; +create table llx_societe_contacts +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, + date_creation datetime NOT NULL, + fk_soc integer NOT NULL, + fk_c_type_contact int NOT NULL, + fk_socpeople integer NOT NULL, + tms TIMESTAMP, + import_key VARCHAR(14) +)ENGINE=innodb; + +ALTER TABLE llx_societe_contacts ADD UNIQUE INDEX idx_societe_contacts_idx1 (entity, fk_soc, fk_c_type_contact, fk_socpeople); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_socpeople FOREIGN KEY (fk_socpeople) REFERENCES llx_socpeople(rowid); + ALTER TABLE llx_accounting_account MODIFY COLUMN rowid bigint AUTO_INCREMENT; ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL; ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL; - + create table llx_c_hrm_public_holiday ( id integer AUTO_INCREMENT PRIMARY KEY, entity integer DEFAULT 0 NOT NULL, -- multi company id, 0 = all - fk_country integer, + fk_country integer, code varchar(62), dayrule varchar(64) DEFAULT '', -- 'easter', 'eastermonday', ... day integer, @@ -197,3 +227,89 @@ INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, m INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-REPUBLICDAY', 0, 117, '', 0, 1, 26, 1); INSERT INTO llx_c_hrm_public_holiday (code, entity, fk_country, dayrule, year, month, day, active) VALUES('IN-GANDI', 0, 117, '', 0, 10, 2, 1); +create table llx_adherent_type_lang +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_type integer DEFAULT 0 NOT NULL, + lang varchar(5) DEFAULT 0 NOT NULL, + label varchar(255) NOT NULL, + description text, + email text, + import_key varchar(14) DEFAULT NULL +)ENGINE=innodb; + +create table llx_fichinter_rec +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + titre varchar(50) NOT NULL, + entity integer DEFAULT 1 NOT NULL, -- multi company id + fk_soc integer DEFAULT NULL, + datec datetime, -- date de creation + fk_contrat integer DEFAULT 0, -- contrat auquel est rattache la fiche + fk_user_author integer, -- createur + fk_projet integer, -- projet auquel est associe la facture + duree real, -- duree totale de l'intervention + description text, + modelpdf varchar(50), + note_private text, + note_public text, + frequency integer, -- frequency (for example: 3 for every 3 month) + unit_frequency varchar(2) DEFAULT 'm', -- 'm' for month (date_when must be a day <= 28), 'y' for year, ... + date_when datetime DEFAULT NULL, -- date for next gen (when an invoice is generated, this field must be updated with next date) + date_last_gen datetime DEFAULT NULL, -- date for last gen (date with last successfull generation of invoice) + nb_gen_done integer DEFAULT NULL, -- nb of generation done (when an invoice is generated, this field must incremented) + nb_gen_max integer DEFAULT NULL, -- maximum number of generation + auto_validate integer NULL DEFAULT NULL -- statut of the generated intervention + +)ENGINE=innodb; + +ALTER TABLE llx_fichinter_rec ADD UNIQUE INDEX idx_fichinter_rec_uk_titre (titre, entity); +ALTER TABLE llx_fichinter_rec ADD INDEX idx_fichinter_rec_fk_soc (fk_soc); +ALTER TABLE llx_fichinter_rec ADD INDEX idx_fichinter_rec_fk_user_author (fk_user_author); +ALTER TABLE llx_fichinter_rec ADD INDEX idx_fichinter_rec_fk_projet (fk_projet); +ALTER TABLE llx_fichinter_rec ADD CONSTRAINT fk_fichinter_rec_fk_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); +ALTER TABLE llx_fichinter_rec ADD CONSTRAINT fk_fichinter_rec_fk_projet FOREIGN KEY (fk_projet) REFERENCES llx_projet (rowid); + +create table llx_fichinterdet_rec +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_fichinter integer NOT NULL, + date datetime, -- date de la ligne d'intervention + description text, -- description de la ligne d'intervention + duree integer, -- duree de la ligne d'intervention + rang integer DEFAULT 0, -- ordre affichage sur la fiche + total_ht DOUBLE(24, 8) NULL DEFAULT NULL, + subprice DOUBLE(24, 8) NULL DEFAULT NULL, + fk_parent_line integer NULL DEFAULT NULL, + fk_product integer NULL DEFAULT NULL, + label varchar(255) NULL DEFAULT NULL, + tva_tx DOUBLE(6, 3) NULL DEFAULT NULL, + localtax1_tx DOUBLE(6, 3) NULL DEFAULT 0, + localtax1_type VARCHAR(1) NULL DEFAULT NULL, + localtax2_tx DOUBLE(6, 3) NULL DEFAULT 0, + localtax2_type VARCHAR(1) NULL DEFAULT NULL, + qty double NULL DEFAULT NULL, + remise_percent double NULL DEFAULT 0, + remise double NULL DEFAULT 0, + fk_remise_except integer NULL DEFAULT NULL, + price DOUBLE(24, 8) NULL DEFAULT NULL, + total_tva DOUBLE(24, 8) NULL DEFAULT NULL, + total_localtax1 DOUBLE(24, 8) NULL DEFAULT 0, + total_localtax2 DOUBLE(24, 8) NULL DEFAULT 0, + total_ttc DOUBLE(24, 8) NULL DEFAULT NULL, + product_type INTEGER NULL DEFAULT 0, + date_start datetime NULL DEFAULT NULL, + date_end datetime NULL DEFAULT NULL, + info_bits INTEGER NULL DEFAULT 0, + buy_price_ht DOUBLE(24, 8) NULL DEFAULT 0, + fk_product_fournisseur_price integer NULL DEFAULT NULL, + fk_code_ventilation integer NOT NULL DEFAULT 0, + fk_export_commpta integer NOT NULL DEFAULT 0, + special_code integer UNSIGNED NULL DEFAULT 0, + fk_unit integer NULL DEFAULT NULL, + import_key varchar(14) NULL DEFAULT NULL +)ENGINE=innodb; + +ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_start datetime DEFAULT NULL AFTER product_type; +ALTER TABLE llx_supplier_proposaldet ADD COLUMN date_end datetime DEFAULT NULL AFTER date_start; + diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index 35454810005..4bb083ab797 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -178,14 +178,14 @@ INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VAL INSERT INTO llx_c_units (code, scale, label, short_label, unit_type, active) VALUES ('Y','31557600','year','y', 'time', 1); UPDATE llx_c_units SET short_label = 'i' WHERE code = 'MI'; -UPDATE llx_c_units SET unit_type = 'weight', short_label = 'kg' WHERE code = 'KG'; -UPDATE llx_c_units SET unit_type = 'weight', short_label = 'g' WHERE code = 'G'; +UPDATE llx_c_units SET unit_type = 'weight', short_label = 'kg', scale = 0 WHERE code = 'KG'; +UPDATE llx_c_units SET unit_type = 'weight', short_label = 'g', scale = -3 WHERE code = 'G'; UPDATE llx_c_units SET unit_type = 'time' WHERE code IN ('S','H','D'); UPDATE llx_c_units SET unit_type = 'size' WHERE code IN ('M','LM'); -UPDATE llx_c_units SET label = 'SizeUnitm' WHERE code IN ('M'); -UPDATE llx_c_units SET active = 0 WHERE code IN ('LM'); -UPDATE llx_c_units SET unit_type = 'surface' WHERE code IN ('M2'); -UPDATE llx_c_units SET unit_type = 'volume' WHERE code IN ('M3','L'); +UPDATE llx_c_units SET label = 'SizeUnitm', scale = 0 WHERE code IN ('M'); +UPDATE llx_c_units SET active = 0, scale = 0 WHERE code IN ('LM'); +UPDATE llx_c_units SET unit_type = 'surface', scale = 0 WHERE code IN ('M2'); +UPDATE llx_c_units SET unit_type = 'volume', scale = 0 WHERE code IN ('M3','L'); UPDATE llx_c_units SET scale = -3, active = 0 WHERE code IN ('L'); UPDATE llx_c_units SET label = 'VolumeUnitm3' WHERE code IN ('M3'); UPDATE llx_c_units SET label = 'SurfaceUnitm2' WHERE code IN ('M2'); diff --git a/htdocs/install/mysql/tables/llx_accounting_account.key.sql b/htdocs/install/mysql/tables/llx_accounting_account.key.sql index cf62da87daa..e1506bcf135 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_accounting_account.sql b/htdocs/install/mysql/tables/llx_accounting_account.sql index fd1962b6c09..e06faab0f00 100644 --- a/htdocs/install/mysql/tables/llx_accounting_account.sql +++ b/htdocs/install/mysql/tables/llx_accounting_account.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table of 'accounts' for accountancy expert module -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql index e035a957f5a..ca71d90aa0b 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql index 88aa6d4e129..f851061db63 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.key.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.key.sql index 5fc53842284..bb6b8795848 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql index 56088ac1c01..cbf387b9b70 100644 --- a/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql +++ b/htdocs/install/mysql/tables/llx_accounting_bookkeeping_tmp.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql index 4cff341ed52..90590fb427d 100644 --- a/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql +++ b/htdocs/install/mysql/tables/llx_accounting_fiscalyear.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_journal.key.sql b/htdocs/install/mysql/tables/llx_accounting_journal.key.sql index 7e16f707710..80515dc1f4b 100644 --- a/htdocs/install/mysql/tables/llx_accounting_journal.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_journal.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_accounting_journal.sql b/htdocs/install/mysql/tables/llx_accounting_journal.sql index 80d129ba3f6..82bc965e715 100644 --- a/htdocs/install/mysql/tables/llx_accounting_journal.sql +++ b/htdocs/install/mysql/tables/llx_accounting_journal.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table of journals for accountancy -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_accounting_system.key.sql b/htdocs/install/mysql/tables/llx_accounting_system.key.sql index 8365c481d81..3a2c6edf921 100644 --- a/htdocs/install/mysql/tables/llx_accounting_system.key.sql +++ b/htdocs/install/mysql/tables/llx_accounting_system.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_accounting_system.sql b/htdocs/install/mysql/tables/llx_accounting_system.sql index cbee4ee25d3..8e1d081a78e 100644 --- a/htdocs/install/mysql/tables/llx_accounting_system.sql +++ b/htdocs/install/mysql/tables/llx_accounting_system.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table of chart of accounts -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_actioncomm.key.sql b/htdocs/install/mysql/tables/llx_actioncomm.key.sql index 71fe3976a81..64fbe874fc2 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_actioncomm.sql b/htdocs/install/mysql/tables/llx_actioncomm.sql index ad6ea20115c..1cd3c9cf27e 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Actions commerciales diff --git a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.key.sql index 80a7212673e..ab27788abc8 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql index 5b412cf83f2..c820feac430 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql index 4e10b5489bc..94e50d05634 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_reminder.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql b/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql index 9c8e7beed46..2edb11c45c5 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_reminder.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_actioncomm_reminder( @@ -24,4 +24,4 @@ CREATE TABLE llx_actioncomm_reminder( offsetunit varchar(1) NOT NULL, status integer NOT NULL DEFAULT 0 -- END MODULEBUILDER FIELDS -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql index 8c7bb4ad237..3414142a660 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql index 7632b1fd810..b9323b2bb10 100644 --- a/htdocs/install/mysql/tables/llx_actioncomm_resources.sql +++ b/htdocs/install/mysql/tables/llx_actioncomm_resources.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- Table used for relations between an action event and a resource (in most cases diff --git a/htdocs/install/mysql/tables/llx_adherent.key.sql b/htdocs/install/mysql/tables/llx_adherent.key.sql index c875e2cee20..2b176bef2d1 100644 --- a/htdocs/install/mysql/tables/llx_adherent.key.sql +++ b/htdocs/install/mysql/tables/llx_adherent.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_adherent.sql b/htdocs/install/mysql/tables/llx_adherent.sql index 588fb323dae..b071e31eb27 100644 --- a/htdocs/install/mysql/tables/llx_adherent.sql +++ b/htdocs/install/mysql/tables/llx_adherent.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== -- diff --git a/htdocs/install/mysql/tables/llx_adherent_extrafields.key.sql b/htdocs/install/mysql/tables/llx_adherent_extrafields.key.sql index 6989d271ccc..190d802395d 100644 --- a/htdocs/install/mysql/tables/llx_adherent_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_adherent_extrafields.key.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_adherent_extrafields.sql b/htdocs/install/mysql/tables/llx_adherent_extrafields.sql index 3ad91052c24..50f47c7954b 100644 --- a/htdocs/install/mysql/tables/llx_adherent_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_adherent_extrafields.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_adherent_type.key.sql b/htdocs/install/mysql/tables/llx_adherent_type.key.sql index f70280c41c4..af70a6285d3 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.key.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_adherent_type.sql b/htdocs/install/mysql/tables/llx_adherent_type.sql index 084d0457941..5a2dee3b12b 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== -- diff --git a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.key.sql b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.key.sql index 30dc8120904..0a0b336a7f0 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql index 1b551b1ac1a..2950147730b 100644 --- a/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_adherent_type_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_adherent_type_lang.sql b/htdocs/install/mysql/tables/llx_adherent_type_lang.sql new file mode 100644 index 00000000000..179a9418790 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_adherent_type_lang.sql @@ -0,0 +1,30 @@ +-- ============================================================================ +-- Copyright (C) 2002-2003 Rodolphe Quiedeville +-- Copyright (C) 2005-2010 Regis Houssin +-- Copyright (C) 2009 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ============================================================================ + +create table llx_adherent_type_lang +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + fk_type integer DEFAULT 0 NOT NULL, + lang varchar(5) DEFAULT 0 NOT NULL, + label varchar(255) NOT NULL, + description text, + email text, + import_key varchar(14) DEFAULT NULL +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_advtargetemailing.key.sql b/htdocs/install/mysql/tables/llx_advtargetemailing.key.sql index d56b13b427f..441dec301c2 100644 --- a/htdocs/install/mysql/tables/llx_advtargetemailing.key.sql +++ b/htdocs/install/mysql/tables/llx_advtargetemailing.key.sql @@ -12,6 +12,6 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . ALTER TABLE llx_advtargetemailing ADD UNIQUE INDEX uk_advtargetemailing_name (name); diff --git a/htdocs/install/mysql/tables/llx_advtargetemailing.sql b/htdocs/install/mysql/tables/llx_advtargetemailing.sql index 3698e5e6626..22d49768887 100644 --- a/htdocs/install/mysql/tables/llx_advtargetemailing.sql +++ b/htdocs/install/mysql/tables/llx_advtargetemailing.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table to setup advanced targeting for emailing -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_asset.key.sql b/htdocs/install/mysql/tables/llx_asset.key.sql index 101a5d50250..a82f29ee58b 100644 --- a/htdocs/install/mysql/tables/llx_asset.key.sql +++ b/htdocs/install/mysql/tables/llx_asset.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. ALTER TABLE llx_asset ADD INDEX idx_asset_rowid (rowid); diff --git a/htdocs/install/mysql/tables/llx_asset.sql b/htdocs/install/mysql/tables/llx_asset.sql index b6b2de3fcb3..b5bb1d1bfe2 100644 --- a/htdocs/install/mysql/tables/llx_asset.sql +++ b/htdocs/install/mysql/tables/llx_asset.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_asset( @@ -31,4 +31,4 @@ CREATE TABLE llx_asset( fk_user_modif integer, import_key varchar(14), status integer NOT NULL -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_asset_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_extrafields.sql index 19a3edf6ddc..364f0e3d08f 100644 --- a/htdocs/install/mysql/tables/llx_asset_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_extrafields.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. create table llx_asset_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_asset_type.key.sql b/htdocs/install/mysql/tables/llx_asset_type.key.sql index 412f2ffff20..4a7c4cb1145 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.key.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.key.sql @@ -11,6 +11,6 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . ALTER TABLE llx_asset_type ADD UNIQUE INDEX uk_asset_type_label (label, entity); diff --git a/htdocs/install/mysql/tables/llx_asset_type.sql b/htdocs/install/mysql/tables/llx_asset_type.sql index 7a8866456b1..bd1c300d087 100644 --- a/htdocs/install/mysql/tables/llx_asset_type.sql +++ b/htdocs/install/mysql/tables/llx_asset_type.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . create table llx_asset_type ( diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql index 22c2eee9753..ec0b4b28619 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . ALTER TABLE llx_asset_type_extrafields ADD INDEX idx_asset_type_extrafields (fk_object); diff --git a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql index 2faae65702b..59ebe94c7d8 100644 --- a/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_asset_type_extrafields.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . create table llx_asset_type_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_bank.key.sql b/htdocs/install/mysql/tables/llx_bank.key.sql index 8eb2e963a32..c1299f7a1a5 100644 --- a/htdocs/install/mysql/tables/llx_bank.key.sql +++ b/htdocs/install/mysql/tables/llx_bank.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank.sql b/htdocs/install/mysql/tables/llx_bank.sql index 6c2c8d34537..eb04e314545 100644 --- a/htdocs/install/mysql/tables/llx_bank.sql +++ b/htdocs/install/mysql/tables/llx_bank.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_account.key.sql b/htdocs/install/mysql/tables/llx_bank_account.key.sql index 7ef818522a7..1c3d70961a2 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.key.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_bank_account.sql b/htdocs/install/mysql/tables/llx_bank_account.sql index ebe6672e70d..28a1a0baf34 100644 --- a/htdocs/install/mysql/tables/llx_bank_account.sql +++ b/htdocs/install/mysql/tables/llx_bank_account.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================= diff --git a/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql b/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql index 0f6e8052115..62b06778564 100644 --- a/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_bank_account_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql index 97b1508237c..5d9d8847154 100644 --- a/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bank_account_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_categ.sql b/htdocs/install/mysql/tables/llx_bank_categ.sql index 26b9eab244e..90c18c102d7 100644 --- a/htdocs/install/mysql/tables/llx_bank_categ.sql +++ b/htdocs/install/mysql/tables/llx_bank_categ.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_class.key.sql b/htdocs/install/mysql/tables/llx_bank_class.key.sql index 96847ba6817..0ca5cac8b04 100644 --- a/htdocs/install/mysql/tables/llx_bank_class.key.sql +++ b/htdocs/install/mysql/tables/llx_bank_class.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_class.sql b/htdocs/install/mysql/tables/llx_bank_class.sql index 7f77756a88a..185e149138d 100644 --- a/htdocs/install/mysql/tables/llx_bank_class.sql +++ b/htdocs/install/mysql/tables/llx_bank_class.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table to link bank tag/categories with bank lines -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_url.key.sql b/htdocs/install/mysql/tables/llx_bank_url.key.sql index 19489b9a31c..ff8fc50b768 100644 --- a/htdocs/install/mysql/tables/llx_bank_url.key.sql +++ b/htdocs/install/mysql/tables/llx_bank_url.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bank_url.sql b/htdocs/install/mysql/tables/llx_bank_url.sql index 0fd99a32e9a..613a50c9961 100644 --- a/htdocs/install/mysql/tables/llx_bank_url.sql +++ b/htdocs/install/mysql/tables/llx_bank_url.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_blockedlog.sql b/htdocs/install/mysql/tables/llx_blockedlog.sql index 959f1adb44c..cf1db2e329e 100644 --- a/htdocs/install/mysql/tables/llx_blockedlog.sql +++ b/htdocs/install/mysql/tables/llx_blockedlog.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bom_bom.key.sql b/htdocs/install/mysql/tables/llx_bom_bom.key.sql index aed37c7ce47..cd2e4e6487c 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom.key.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_bom_bom.sql b/htdocs/install/mysql/tables/llx_bom_bom.sql index 11e1ce74ffd..d66c3f9ffbf 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_bom_bom( diff --git a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql index 2f748847455..10c44459a8b 100644 --- a/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bom_bom_extrafields.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. create table llx_bom_bom_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_bom_bomline.key.sql b/htdocs/install/mysql/tables/llx_bom_bomline.key.sql index ee8eaaeeb6c..c5e52844c47 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline.key.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_bom_bomline.sql b/htdocs/install/mysql/tables/llx_bom_bomline.sql index 4b0aa515950..cb7079cf16a 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_bom_bomline( -- BEGIN MODULEBUILDER FIELDS diff --git a/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql b/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql index a81715d0184..1b468da3a22 100644 --- a/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_bom_bomline_extrafields.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. create table llx_bom_bomline_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_bookmark.key.sql b/htdocs/install/mysql/tables/llx_bookmark.key.sql index e4fb3bad584..f933939ceb7 100644 --- a/htdocs/install/mysql/tables/llx_bookmark.key.sql +++ b/htdocs/install/mysql/tables/llx_bookmark.key.sql @@ -12,10 +12,10 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== ALTER TABLE llx_bookmark ADD UNIQUE uk_bookmark_url (fk_user, url); -ALTER TABLE llx_bookmark ADD UNIQUE uk_bookmark_title (fk_user, title); \ No newline at end of file +ALTER TABLE llx_bookmark ADD UNIQUE uk_bookmark_title (fk_user, title); diff --git a/htdocs/install/mysql/tables/llx_bookmark.sql b/htdocs/install/mysql/tables/llx_bookmark.sql index 5bc72c8565e..1c11525528c 100644 --- a/htdocs/install/mysql/tables/llx_bookmark.sql +++ b/htdocs/install/mysql/tables/llx_bookmark.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_bordereau_cheque.key.sql b/htdocs/install/mysql/tables/llx_bordereau_cheque.key.sql index bc1c2347eca..18d7946ee68 100644 --- a/htdocs/install/mysql/tables/llx_bordereau_cheque.key.sql +++ b/htdocs/install/mysql/tables/llx_bordereau_cheque.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql index e0d3209b9ea..3050b831eec 100644 --- a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql +++ b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_boxes.key.sql b/htdocs/install/mysql/tables/llx_boxes.key.sql index caec9208938..3d00e340ae8 100644 --- a/htdocs/install/mysql/tables/llx_boxes.key.sql +++ b/htdocs/install/mysql/tables/llx_boxes.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_boxes.sql b/htdocs/install/mysql/tables/llx_boxes.sql index eeb294b5209..3ab3ffa0d91 100644 --- a/htdocs/install/mysql/tables/llx_boxes.sql +++ b/htdocs/install/mysql/tables/llx_boxes.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_boxes_def.key.sql b/htdocs/install/mysql/tables/llx_boxes_def.key.sql index 2173504dc26..88cb9456921 100644 --- a/htdocs/install/mysql/tables/llx_boxes_def.key.sql +++ b/htdocs/install/mysql/tables/llx_boxes_def.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_boxes_def.sql b/htdocs/install/mysql/tables/llx_boxes_def.sql index e9fd966fdb7..285bbc22603 100644 --- a/htdocs/install/mysql/tables/llx_boxes_def.sql +++ b/htdocs/install/mysql/tables/llx_boxes_def.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_budget.sql b/htdocs/install/mysql/tables/llx_budget.sql index 908bfc1337c..d67e65e8f2b 100644 --- a/htdocs/install/mysql/tables/llx_budget.sql +++ b/htdocs/install/mysql/tables/llx_budget.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_budget_lines.key.sql b/htdocs/install/mysql/tables/llx_budget_lines.key.sql index b31e74b324d..9eaf6a721af 100644 --- a/htdocs/install/mysql/tables/llx_budget_lines.key.sql +++ b/htdocs/install/mysql/tables/llx_budget_lines.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_budget_lines.sql b/htdocs/install/mysql/tables/llx_budget_lines.sql index 63d015fc8f7..1397b604316 100644 --- a/htdocs/install/mysql/tables/llx_budget_lines.sql +++ b/htdocs/install/mysql/tables/llx_budget_lines.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql index 91fe439e46d..5042fbae6ae 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with category for accounting account -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_accounting_category.sql b/htdocs/install/mysql/tables/llx_c_accounting_category.sql index 275e001f18d..697bd2a99f1 100644 --- a/htdocs/install/mysql/tables/llx_c_accounting_category.sql +++ b/htdocs/install/mysql/tables/llx_c_accounting_category.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with category for accounting account. -- Note: Each accounting account is inside one chart system, so we can have diff --git a/htdocs/install/mysql/tables/llx_c_action_trigger.key.sql b/htdocs/install/mysql/tables/llx_c_action_trigger.key.sql index 3260c01d498..9d1861dec1e 100644 --- a/htdocs/install/mysql/tables/llx_c_action_trigger.key.sql +++ b/htdocs/install/mysql/tables/llx_c_action_trigger.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_action_trigger.sql b/htdocs/install/mysql/tables/llx_c_action_trigger.sql index 55e93c9b3d0..647e10adcc4 100644 --- a/htdocs/install/mysql/tables/llx_c_action_trigger.sql +++ b/htdocs/install/mysql/tables/llx_c_action_trigger.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- This table is a list of all available possible automatic actions -- It is read only by admin page to select action code and save them diff --git a/htdocs/install/mysql/tables/llx_c_actioncomm.key.sql b/htdocs/install/mysql/tables/llx_c_actioncomm.key.sql index 23bf4d11d97..6cde12fa1f4 100644 --- a/htdocs/install/mysql/tables/llx_c_actioncomm.key.sql +++ b/htdocs/install/mysql/tables/llx_c_actioncomm.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_actioncomm.sql b/htdocs/install/mysql/tables/llx_c_actioncomm.sql index a2b2d0cb069..695aabbe6e4 100644 --- a/htdocs/install/mysql/tables/llx_c_actioncomm.sql +++ b/htdocs/install/mysql/tables/llx_c_actioncomm.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_availability.key.sql b/htdocs/install/mysql/tables/llx_c_availability.key.sql index 1601da0e804..7c78a51e9dc 100644 --- a/htdocs/install/mysql/tables/llx_c_availability.key.sql +++ b/htdocs/install/mysql/tables/llx_c_availability.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_availability.sql b/htdocs/install/mysql/tables/llx_c_availability.sql index 0a6b7e18db0..cef03abe548 100644 --- a/htdocs/install/mysql/tables/llx_c_availability.sql +++ b/htdocs/install/mysql/tables/llx_c_availability.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_barcode_type.key.sql b/htdocs/install/mysql/tables/llx_c_barcode_type.key.sql index c87f844574e..477b6d21c43 100644 --- a/htdocs/install/mysql/tables/llx_c_barcode_type.key.sql +++ b/htdocs/install/mysql/tables/llx_c_barcode_type.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_barcode_type.sql b/htdocs/install/mysql/tables/llx_c_barcode_type.sql index ad03c14966e..fc76fab2dc9 100644 --- a/htdocs/install/mysql/tables/llx_c_barcode_type.sql +++ b/htdocs/install/mysql/tables/llx_c_barcode_type.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_chargesociales.sql b/htdocs/install/mysql/tables/llx_c_chargesociales.sql index 5b5cf1edf24..9da2976348f 100644 --- a/htdocs/install/mysql/tables/llx_c_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_c_chargesociales.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_civility.key.sql b/htdocs/install/mysql/tables/llx_c_civility.key.sql index ff095fe9d03..509060f1d9d 100644 --- a/htdocs/install/mysql/tables/llx_c_civility.key.sql +++ b/htdocs/install/mysql/tables/llx_c_civility.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_civility.sql b/htdocs/install/mysql/tables/llx_c_civility.sql index 139d0b68f3b..1198691ed60 100644 --- a/htdocs/install/mysql/tables/llx_c_civility.sql +++ b/htdocs/install/mysql/tables/llx_c_civility.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_country.key.sql b/htdocs/install/mysql/tables/llx_c_country.key.sql index b65d78d559f..da0f7f402a0 100644 --- a/htdocs/install/mysql/tables/llx_c_country.key.sql +++ b/htdocs/install/mysql/tables/llx_c_country.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_country.sql b/htdocs/install/mysql/tables/llx_c_country.sql index ab3935c3103..0a2cff4bc30 100644 --- a/htdocs/install/mysql/tables/llx_c_country.sql +++ b/htdocs/install/mysql/tables/llx_c_country.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_currencies.key.sql b/htdocs/install/mysql/tables/llx_c_currencies.key.sql index aed9154e4a3..cbb777e96f0 100644 --- a/htdocs/install/mysql/tables/llx_c_currencies.key.sql +++ b/htdocs/install/mysql/tables/llx_c_currencies.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_currencies.sql b/htdocs/install/mysql/tables/llx_c_currencies.sql index 41a1538a002..1943fa6eb41 100644 --- a/htdocs/install/mysql/tables/llx_c_currencies.sql +++ b/htdocs/install/mysql/tables/llx_c_currencies.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_departements.key.sql b/htdocs/install/mysql/tables/llx_c_departements.key.sql index 66194440610..19820231a6c 100644 --- a/htdocs/install/mysql/tables/llx_c_departements.key.sql +++ b/htdocs/install/mysql/tables/llx_c_departements.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_departements.sql b/htdocs/install/mysql/tables/llx_c_departements.sql index b08552af9f9..d1b4c5aed2c 100644 --- a/htdocs/install/mysql/tables/llx_c_departements.sql +++ b/htdocs/install/mysql/tables/llx_c_departements.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_ecotaxe.key.sql b/htdocs/install/mysql/tables/llx_c_ecotaxe.key.sql index a57e7fad279..fdf51dc5a49 100644 --- a/htdocs/install/mysql/tables/llx_c_ecotaxe.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ecotaxe.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_ecotaxe.sql b/htdocs/install/mysql/tables/llx_c_ecotaxe.sql index 96bc5e01285..981303ffb55 100644 --- a/htdocs/install/mysql/tables/llx_c_ecotaxe.sql +++ b/htdocs/install/mysql/tables/llx_c_ecotaxe.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== @@ -26,4 +26,4 @@ create table llx_c_ecotaxe organization varchar(255), -- Organisme gerant le bareme tarifaire fk_pays integer NOT NULL, -- Pays correspondant active tinyint DEFAULT 1 NOT NULL -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_effectif.key.sql b/htdocs/install/mysql/tables/llx_c_effectif.key.sql index 9167460be32..b85d0bd38bd 100644 --- a/htdocs/install/mysql/tables/llx_c_effectif.key.sql +++ b/htdocs/install/mysql/tables/llx_c_effectif.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_effectif.sql b/htdocs/install/mysql/tables/llx_c_effectif.sql index e37f1b29281..26cab5c43da 100644 --- a/htdocs/install/mysql/tables/llx_c_effectif.sql +++ b/htdocs/install/mysql/tables/llx_c_effectif.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_email_senderprofile.key.sql b/htdocs/install/mysql/tables/llx_c_email_senderprofile.key.sql index a4896ea162c..7918f8b020b 100644 --- a/htdocs/install/mysql/tables/llx_c_email_senderprofile.key.sql +++ b/htdocs/install/mysql/tables/llx_c_email_senderprofile.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with templates of emails -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql b/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql index f6297648b33..3bc69695f5d 100644 --- a/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql +++ b/htdocs/install/mysql/tables/llx_c_email_senderprofile.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with templates of emails -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_email_templates.key.sql b/htdocs/install/mysql/tables/llx_c_email_templates.key.sql index 665b8d610f0..466e072ca48 100644 --- a/htdocs/install/mysql/tables/llx_c_email_templates.key.sql +++ b/htdocs/install/mysql/tables/llx_c_email_templates.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with templates of emails -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_email_templates.sql b/htdocs/install/mysql/tables/llx_c_email_templates.sql index a4f5a0c25c5..3fd97fb2804 100644 --- a/htdocs/install/mysql/tables/llx_c_email_templates.sql +++ b/htdocs/install/mysql/tables/llx_c_email_templates.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with templates of emails -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_exp_tax_cat.sql b/htdocs/install/mysql/tables/llx_c_exp_tax_cat.sql index e7227b2a2e9..15d89c4747c 100644 --- a/htdocs/install/mysql/tables/llx_c_exp_tax_cat.sql +++ b/htdocs/install/mysql/tables/llx_c_exp_tax_cat.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -23,4 +23,4 @@ CREATE TABLE IF NOT EXISTS llx_c_exp_tax_cat ( label varchar(48) NOT NULL, entity integer DEFAULT 1 NOT NULL, active integer DEFAULT 1 NOT NULL -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_c_exp_tax_range.sql b/htdocs/install/mysql/tables/llx_c_exp_tax_range.sql index f108549eb45..e80eeb15d50 100644 --- a/htdocs/install/mysql/tables/llx_c_exp_tax_range.sql +++ b/htdocs/install/mysql/tables/llx_c_exp_tax_range.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_field_list.sql b/htdocs/install/mysql/tables/llx_c_field_list.sql index fa528bec0ef..c99bfe91690 100644 --- a/htdocs/install/mysql/tables/llx_c_field_list.sql +++ b/htdocs/install/mysql/tables/llx_c_field_list.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Change are done into list pages to use the new code to manage -- selection by users of fields. Once all changes are done with new diff --git a/htdocs/install/mysql/tables/llx_c_format_cards.sql b/htdocs/install/mysql/tables/llx_c_format_cards.sql index b58170c0d48..b69b9eb19d1 100644 --- a/htdocs/install/mysql/tables/llx_c_format_cards.sql +++ b/htdocs/install/mysql/tables/llx_c_format_cards.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_forme_juridique.key.sql b/htdocs/install/mysql/tables/llx_c_forme_juridique.key.sql index 2ef43317a16..d03b92848fa 100644 --- a/htdocs/install/mysql/tables/llx_c_forme_juridique.key.sql +++ b/htdocs/install/mysql/tables/llx_c_forme_juridique.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_forme_juridique.sql b/htdocs/install/mysql/tables/llx_c_forme_juridique.sql index ea8b45bf2d7..0b74a25090c 100644 --- a/htdocs/install/mysql/tables/llx_c_forme_juridique.sql +++ b/htdocs/install/mysql/tables/llx_c_forme_juridique.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_holiday_types.key.sql b/htdocs/install/mysql/tables/llx_c_holiday_types.key.sql index 854742695a8..d6be743f8fb 100644 --- a/htdocs/install/mysql/tables/llx_c_holiday_types.key.sql +++ b/htdocs/install/mysql/tables/llx_c_holiday_types.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_holiday_types.sql b/htdocs/install/mysql/tables/llx_c_holiday_types.sql index 6bd375b6d1f..9c09d486bec 100755 --- a/htdocs/install/mysql/tables/llx_c_holiday_types.sql +++ b/htdocs/install/mysql/tables/llx_c_holiday_types.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_hrm_department.sql b/htdocs/install/mysql/tables/llx_c_hrm_department.sql index 3407f38d0bd..13380bf03b9 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_department.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_department.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . create table llx_c_hrm_department ( diff --git a/htdocs/install/mysql/tables/llx_c_hrm_function.sql b/htdocs/install/mysql/tables/llx_c_hrm_function.sql index 38b63bfc5db..3d6fc37fc2b 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_function.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_function.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . create table llx_c_hrm_function ( diff --git a/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.key.sql b/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.key.sql index 453eda6b4c3..6ec72bfed63 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.key.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.sql b/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.sql index e26d6ee4772..f3f26e41866 100644 --- a/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.sql +++ b/htdocs/install/mysql/tables/llx_c_hrm_public_holiday.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_incoterms.key.sql b/htdocs/install/mysql/tables/llx_c_incoterms.key.sql index 65614a90c4d..1b40c3ec889 100644 --- a/htdocs/install/mysql/tables/llx_c_incoterms.key.sql +++ b/htdocs/install/mysql/tables/llx_c_incoterms.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_incoterms.sql b/htdocs/install/mysql/tables/llx_c_incoterms.sql index c960f0fab2f..5b4dc3f60e2 100644 --- a/htdocs/install/mysql/tables/llx_c_incoterms.sql +++ b/htdocs/install/mysql/tables/llx_c_incoterms.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_input_method.key.sql b/htdocs/install/mysql/tables/llx_c_input_method.key.sql index 9b5b2d6839f..6dbe4d61bd1 100644 --- a/htdocs/install/mysql/tables/llx_c_input_method.key.sql +++ b/htdocs/install/mysql/tables/llx_c_input_method.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_input_method.sql b/htdocs/install/mysql/tables/llx_c_input_method.sql index 1e14c661e48..40ed48f8fc6 100644 --- a/htdocs/install/mysql/tables/llx_c_input_method.sql +++ b/htdocs/install/mysql/tables/llx_c_input_method.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_input_reason.key.sql b/htdocs/install/mysql/tables/llx_c_input_reason.key.sql index 2f8af1183de..a461b103ddf 100644 --- a/htdocs/install/mysql/tables/llx_c_input_reason.key.sql +++ b/htdocs/install/mysql/tables/llx_c_input_reason.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_input_reason.sql b/htdocs/install/mysql/tables/llx_c_input_reason.sql index e8cdba2873c..d82e39eb6f5 100644 --- a/htdocs/install/mysql/tables/llx_c_input_reason.sql +++ b/htdocs/install/mysql/tables/llx_c_input_reason.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_lead_status.key.sql b/htdocs/install/mysql/tables/llx_c_lead_status.key.sql index c6a273c0e1c..88cee8fc857 100644 --- a/htdocs/install/mysql/tables/llx_c_lead_status.key.sql +++ b/htdocs/install/mysql/tables/llx_c_lead_status.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_lead_status.sql b/htdocs/install/mysql/tables/llx_c_lead_status.sql index ef23ab48261..9027c0f6ca1 100644 --- a/htdocs/install/mysql/tables/llx_c_lead_status.sql +++ b/htdocs/install/mysql/tables/llx_c_lead_status.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . create table llx_c_lead_status ( diff --git a/htdocs/install/mysql/tables/llx_c_paiement.key.sql b/htdocs/install/mysql/tables/llx_c_paiement.key.sql index cf25e3a6703..a8c1047d86b 100644 --- a/htdocs/install/mysql/tables/llx_c_paiement.key.sql +++ b/htdocs/install/mysql/tables/llx_c_paiement.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_paiement.sql b/htdocs/install/mysql/tables/llx_c_paiement.sql index 8286e4c8e1f..739d31e946d 100644 --- a/htdocs/install/mysql/tables/llx_c_paiement.sql +++ b/htdocs/install/mysql/tables/llx_c_paiement.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_paper_format.sql b/htdocs/install/mysql/tables/llx_c_paper_format.sql index f0d7a3f14f3..45c56ce379f 100644 --- a/htdocs/install/mysql/tables/llx_c_paper_format.sql +++ b/htdocs/install/mysql/tables/llx_c_paper_format.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== @@ -34,4 +34,4 @@ create table llx_c_paper_format -- un inch = 2.54 cm -- 1 point = 1cm * (72/2.54) -- 1 point = 1mm * (72/25.4) --- 1 point = 1in * 72 \ No newline at end of file +-- 1 point = 1in * 72 diff --git a/htdocs/install/mysql/tables/llx_c_payment_term.key.sql b/htdocs/install/mysql/tables/llx_c_payment_term.key.sql index d2cb94aaeb2..e68ac3c3915 100644 --- a/htdocs/install/mysql/tables/llx_c_payment_term.key.sql +++ b/htdocs/install/mysql/tables/llx_c_payment_term.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_payment_term.sql b/htdocs/install/mysql/tables/llx_c_payment_term.sql index 188c2c4f428..087ab63c184 100644 --- a/htdocs/install/mysql/tables/llx_c_payment_term.sql +++ b/htdocs/install/mysql/tables/llx_c_payment_term.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_price_expression.sql b/htdocs/install/mysql/tables/llx_c_price_expression.sql index 085f60fe537..f6e4bbb4174 100755 --- a/htdocs/install/mysql/tables/llx_c_price_expression.sql +++ b/htdocs/install/mysql/tables/llx_c_price_expression.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_price_global_variable.sql b/htdocs/install/mysql/tables/llx_c_price_global_variable.sql index 0f5630ed193..4b70a803104 100644 --- a/htdocs/install/mysql/tables/llx_c_price_global_variable.sql +++ b/htdocs/install/mysql/tables/llx_c_price_global_variable.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_price_global_variable_updater.sql b/htdocs/install/mysql/tables/llx_c_price_global_variable_updater.sql index 0c1dcfba701..09cefdc72be 100644 --- a/htdocs/install/mysql/tables/llx_c_price_global_variable_updater.sql +++ b/htdocs/install/mysql/tables/llx_c_price_global_variable_updater.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_c_propalst.key.sql b/htdocs/install/mysql/tables/llx_c_propalst.key.sql index 222ab9ef549..f476f8e42c6 100644 --- a/htdocs/install/mysql/tables/llx_c_propalst.key.sql +++ b/htdocs/install/mysql/tables/llx_c_propalst.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_propalst.sql b/htdocs/install/mysql/tables/llx_c_propalst.sql index 2a42b15a457..2a107b52735 100644 --- a/htdocs/install/mysql/tables/llx_c_propalst.sql +++ b/htdocs/install/mysql/tables/llx_c_propalst.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_prospectlevel.sql b/htdocs/install/mysql/tables/llx_c_prospectlevel.sql index fb5ffd88a39..70e26dc3a26 100644 --- a/htdocs/install/mysql/tables/llx_c_prospectlevel.sql +++ b/htdocs/install/mysql/tables/llx_c_prospectlevel.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_regions.key.sql b/htdocs/install/mysql/tables/llx_c_regions.key.sql index 82295ba52b3..b21c0545337 100644 --- a/htdocs/install/mysql/tables/llx_c_regions.key.sql +++ b/htdocs/install/mysql/tables/llx_c_regions.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_regions.sql b/htdocs/install/mysql/tables/llx_c_regions.sql index 768a234dbbd..f622538ecfc 100644 --- a/htdocs/install/mysql/tables/llx_c_regions.sql +++ b/htdocs/install/mysql/tables/llx_c_regions.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_revenuestamp.sql b/htdocs/install/mysql/tables/llx_c_revenuestamp.sql index 9bdff7f0053..8602549adf6 100644 --- a/htdocs/install/mysql/tables/llx_c_revenuestamp.sql +++ b/htdocs/install/mysql/tables/llx_c_revenuestamp.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.key.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.key.sql index a75dfaf2740..f7dc2bbfe3b 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.key.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql index efacec420c9..9adc6b3cb0c 100644 --- a/htdocs/install/mysql/tables/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/tables/llx_c_shipment_mode.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_stcomm.key.sql b/htdocs/install/mysql/tables/llx_c_stcomm.key.sql index e7a3cc13cf3..5a6035f0e52 100644 --- a/htdocs/install/mysql/tables/llx_c_stcomm.key.sql +++ b/htdocs/install/mysql/tables/llx_c_stcomm.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_stcomm.sql b/htdocs/install/mysql/tables/llx_c_stcomm.sql index a9e9d47384c..5f31666b28c 100644 --- a/htdocs/install/mysql/tables/llx_c_stcomm.sql +++ b/htdocs/install/mysql/tables/llx_c_stcomm.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql index aa3151d49a4..3afa9b5be1d 100644 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql index ce792e2476e..2ccfe4d0758 100755 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql index 095458d699f..a564f0059d2 100644 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql index 937ba22cd0f..bb8a75abaa9 100755 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql index a8d743a74ea..7a4374e35fa 100644 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql index 9997b66ba0d..d480036d5d5 100755 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_c_tva.key.sql b/htdocs/install/mysql/tables/llx_c_tva.key.sql index 7911284fdb1..6675bc82db5 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.key.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_tva.sql b/htdocs/install/mysql/tables/llx_c_tva.sql index 62d5b04125f..b9a6cc4e12c 100644 --- a/htdocs/install/mysql/tables/llx_c_tva.sql +++ b/htdocs/install/mysql/tables/llx_c_tva.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_type_contact.key.sql b/htdocs/install/mysql/tables/llx_c_type_contact.key.sql index 5a76ff0cfa6..a8b11ea2d41 100644 --- a/htdocs/install/mysql/tables/llx_c_type_contact.key.sql +++ b/htdocs/install/mysql/tables/llx_c_type_contact.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_type_contact.sql b/htdocs/install/mysql/tables/llx_c_type_contact.sql index b764041cb6e..c222b0fe273 100644 --- a/htdocs/install/mysql/tables/llx_c_type_contact.sql +++ b/htdocs/install/mysql/tables/llx_c_type_contact.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Defini les types de contact d'un element sert de reference pour -- la table llx_element_contact diff --git a/htdocs/install/mysql/tables/llx_c_type_container.key.sql b/htdocs/install/mysql/tables/llx_c_type_container.key.sql index 7a81f352f63..c1ff63102e0 100644 --- a/htdocs/install/mysql/tables/llx_c_type_container.key.sql +++ b/htdocs/install/mysql/tables/llx_c_type_container.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_type_container.sql b/htdocs/install/mysql/tables/llx_c_type_container.sql index 33be89a67f4..53a89fe873b 100644 --- a/htdocs/install/mysql/tables/llx_c_type_container.sql +++ b/htdocs/install/mysql/tables/llx_c_type_container.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Defini les types de contact d'un element sert de reference pour -- la table llx_element_contact diff --git a/htdocs/install/mysql/tables/llx_c_type_fees.key.sql b/htdocs/install/mysql/tables/llx_c_type_fees.key.sql index 10ba48ec30d..db070eb7055 100644 --- a/htdocs/install/mysql/tables/llx_c_type_fees.key.sql +++ b/htdocs/install/mysql/tables/llx_c_type_fees.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_type_fees.sql b/htdocs/install/mysql/tables/llx_c_type_fees.sql index 787aac8d2c8..3f9c49c95d7 100644 --- a/htdocs/install/mysql/tables/llx_c_type_fees.sql +++ b/htdocs/install/mysql/tables/llx_c_type_fees.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Type of expense report -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_type_resource.key.sql b/htdocs/install/mysql/tables/llx_c_type_resource.key.sql index dc5c5ee150a..aa29c5a9d8e 100644 --- a/htdocs/install/mysql/tables/llx_c_type_resource.key.sql +++ b/htdocs/install/mysql/tables/llx_c_type_resource.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_type_resource.sql b/htdocs/install/mysql/tables/llx_c_type_resource.sql index a12abb95f83..e490755b1f7 100644 --- a/htdocs/install/mysql/tables/llx_c_type_resource.sql +++ b/htdocs/install/mysql/tables/llx_c_type_resource.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Defini les types de contact d'un element sert de reference pour -- la table llx_element_contact diff --git a/htdocs/install/mysql/tables/llx_c_typent.key.sql b/htdocs/install/mysql/tables/llx_c_typent.key.sql index fb5c263a943..71373cadc66 100644 --- a/htdocs/install/mysql/tables/llx_c_typent.key.sql +++ b/htdocs/install/mysql/tables/llx_c_typent.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_typent.sql b/htdocs/install/mysql/tables/llx_c_typent.sql index 5b78abf1a75..0b15e70b15b 100644 --- a/htdocs/install/mysql/tables/llx_c_typent.sql +++ b/htdocs/install/mysql/tables/llx_c_typent.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_units.key.sql b/htdocs/install/mysql/tables/llx_c_units.key.sql index 3ec5b9ba6fb..d3e1d40e50a 100644 --- a/htdocs/install/mysql/tables/llx_c_units.key.sql +++ b/htdocs/install/mysql/tables/llx_c_units.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_units.sql b/htdocs/install/mysql/tables/llx_c_units.sql index 87ecc993d67..d4ff78b79f1 100644 --- a/htdocs/install/mysql/tables/llx_c_units.sql +++ b/htdocs/install/mysql/tables/llx_c_units.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_ziptown.key.sql b/htdocs/install/mysql/tables/llx_c_ziptown.key.sql index a8bc952a160..0b4dfae5fd7 100644 --- a/htdocs/install/mysql/tables/llx_c_ziptown.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ziptown.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_c_ziptown.sql b/htdocs/install/mysql/tables/llx_c_ziptown.sql index 3bc41baacda..2238d0d5dd4 100644 --- a/htdocs/install/mysql/tables/llx_c_ziptown.sql +++ b/htdocs/install/mysql/tables/llx_c_ziptown.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_categorie.key.sql b/htdocs/install/mysql/tables/llx_categorie.key.sql index 1369378e59f..f1bc9746a46 100644 --- a/htdocs/install/mysql/tables/llx_categorie.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie.key.sql @@ -13,11 +13,11 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ ALTER TABLE llx_categorie ADD UNIQUE INDEX uk_categorie_ref (entity, fk_parent, label, type); ALTER TABLE llx_categorie ADD INDEX idx_categorie_type (type); -ALTER TABLE llx_categorie ADD INDEX idx_categorie_label (label); \ No newline at end of file +ALTER TABLE llx_categorie ADD INDEX idx_categorie_label (label); diff --git a/htdocs/install/mysql/tables/llx_categorie.sql b/htdocs/install/mysql/tables/llx_categorie.sql index 2b39cf58f7b..ed1cb828363 100644 --- a/htdocs/install/mysql/tables/llx_categorie.sql +++ b/htdocs/install/mysql/tables/llx_categorie.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_account.key.sql b/htdocs/install/mysql/tables/llx_categorie_account.key.sql index ccf33bcac09..7dd4c87c5cd 100644 --- a/htdocs/install/mysql/tables/llx_categorie_account.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_account.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_account.sql b/htdocs/install/mysql/tables/llx_categorie_account.sql index 3105482b01c..2f98f3a25b1 100644 --- a/htdocs/install/mysql/tables/llx_categorie_account.sql +++ b/htdocs/install/mysql/tables/llx_categorie_account.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table to link bank tag/categories with bank accounts -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_categorie_contact.key.sql b/htdocs/install/mysql/tables/llx_categorie_contact.key.sql index 7720749afcc..e937c1212e8 100644 --- a/htdocs/install/mysql/tables/llx_categorie_contact.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_contact.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_contact.sql b/htdocs/install/mysql/tables/llx_categorie_contact.sql index d05cc195322..c8fc8cf1fac 100644 --- a/htdocs/install/mysql/tables/llx_categorie_contact.sql +++ b/htdocs/install/mysql/tables/llx_categorie_contact.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql b/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql index 28a2cb6a8d4..7e1e7fdde5e 100644 --- a/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_fournisseur.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_fournisseur.sql b/htdocs/install/mysql/tables/llx_categorie_fournisseur.sql index 8133aeb8a46..b84a33bd275 100644 --- a/htdocs/install/mysql/tables/llx_categorie_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_categorie_fournisseur.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_lang.key.sql b/htdocs/install/mysql/tables/llx_categorie_lang.key.sql index 0f588e0a173..cf2cb2adca5 100644 --- a/htdocs/install/mysql/tables/llx_categorie_lang.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_lang.key.sql @@ -12,9 +12,9 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ ALTER TABLE llx_categorie_lang ADD UNIQUE INDEX uk_category_lang (fk_category, lang); -ALTER TABLE llx_categorie_lang ADD CONSTRAINT fk_category_lang_fk_category FOREIGN KEY (fk_category) REFERENCES llx_categorie (rowid); \ No newline at end of file +ALTER TABLE llx_categorie_lang ADD CONSTRAINT fk_category_lang_fk_category FOREIGN KEY (fk_category) REFERENCES llx_categorie (rowid); diff --git a/htdocs/install/mysql/tables/llx_categorie_lang.sql b/htdocs/install/mysql/tables/llx_categorie_lang.sql index ab2fb83405a..ba1ad3c9875 100644 --- a/htdocs/install/mysql/tables/llx_categorie_lang.sql +++ b/htdocs/install/mysql/tables/llx_categorie_lang.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_member.key.sql b/htdocs/install/mysql/tables/llx_categorie_member.key.sql index e9e22de8f57..3798ad59f43 100644 --- a/htdocs/install/mysql/tables/llx_categorie_member.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_member.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_member.sql b/htdocs/install/mysql/tables/llx_categorie_member.sql index 187bbbaf6f3..b8ffedffc1e 100644 --- a/htdocs/install/mysql/tables/llx_categorie_member.sql +++ b/htdocs/install/mysql/tables/llx_categorie_member.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_product.key.sql b/htdocs/install/mysql/tables/llx_categorie_product.key.sql index 2f18ce9a3b2..6c268dca714 100644 --- a/htdocs/install/mysql/tables/llx_categorie_product.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_product.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_product.sql b/htdocs/install/mysql/tables/llx_categorie_product.sql index b1e4191cbcb..f9a970a03b2 100644 --- a/htdocs/install/mysql/tables/llx_categorie_product.sql +++ b/htdocs/install/mysql/tables/llx_categorie_product.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_project.key.sql b/htdocs/install/mysql/tables/llx_categorie_project.key.sql index f92e86ff6e9..2ae095e5a19 100644 --- a/htdocs/install/mysql/tables/llx_categorie_project.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_project.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_project.sql b/htdocs/install/mysql/tables/llx_categorie_project.sql index ca536822ac2..8e6341d0c36 100644 --- a/htdocs/install/mysql/tables/llx_categorie_project.sql +++ b/htdocs/install/mysql/tables/llx_categorie_project.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_societe.key.sql b/htdocs/install/mysql/tables/llx_categorie_societe.key.sql index 17605fc3520..c239c25ed30 100644 --- a/htdocs/install/mysql/tables/llx_categorie_societe.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_societe.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_societe.sql b/htdocs/install/mysql/tables/llx_categorie_societe.sql index 948eae8707c..6c2c58ca42b 100644 --- a/htdocs/install/mysql/tables/llx_categorie_societe.sql +++ b/htdocs/install/mysql/tables/llx_categorie_societe.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_user.key.sql b/htdocs/install/mysql/tables/llx_categorie_user.key.sql index 599230edd04..a49b5bf5056 100644 --- a/htdocs/install/mysql/tables/llx_categorie_user.key.sql +++ b/htdocs/install/mysql/tables/llx_categorie_user.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_categorie_user.sql b/htdocs/install/mysql/tables/llx_categorie_user.sql index 42068188db0..a3bcb33e60b 100644 --- a/htdocs/install/mysql/tables/llx_categorie_user.sql +++ b/htdocs/install/mysql/tables/llx_categorie_user.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_categories_extrafields.key.sql b/htdocs/install/mysql/tables/llx_categories_extrafields.key.sql index 6089f886028..9e358e90f33 100644 --- a/htdocs/install/mysql/tables/llx_categories_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_categories_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_categories_extrafields.sql b/htdocs/install/mysql/tables/llx_categories_extrafields.sql index ff91cc34b2b..8a2a82f7382 100644 --- a/htdocs/install/mysql/tables/llx_categories_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_categories_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_chargesociales.sql b/htdocs/install/mysql/tables/llx_chargesociales.sql index 9efef8aec68..57434c93d98 100644 --- a/htdocs/install/mysql/tables/llx_chargesociales.sql +++ b/htdocs/install/mysql/tables/llx_chargesociales.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande.key.sql b/htdocs/install/mysql/tables/llx_commande.key.sql index eece575a238..510f4078d3f 100644 --- a/htdocs/install/mysql/tables/llx_commande.key.sql +++ b/htdocs/install/mysql/tables/llx_commande.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_commande.sql b/htdocs/install/mysql/tables/llx_commande.sql index 35b6798e77a..c6b9049a64f 100644 --- a/htdocs/install/mysql/tables/llx_commande.sql +++ b/htdocs/install/mysql/tables/llx_commande.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_extrafields.key.sql b/htdocs/install/mysql/tables/llx_commande_extrafields.key.sql index 74e8820ef24..0f52468a15c 100644 --- a/htdocs/install/mysql/tables/llx_commande_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_extrafields.sql index 44ca056b849..e6f3f768489 100644 --- a/htdocs/install/mysql/tables/llx_commande_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.key.sql index 89b1096fd8e..b5adc891fd7 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql index 5f26a87734a..bc5cadea228 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql index 369a25f2b32..9049cf57065 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.key.sql @@ -12,10 +12,10 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_commande (fk_commande); ALTER TABLE llx_commande_fournisseur_dispatch ADD INDEX idx_commande_fournisseur_dispatch_fk_reception (fk_reception); -ALTER TABLE llx_commande_fournisseur_dispatch ADD CONSTRAINT fk_commande_fournisseur_dispatch_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid); \ No newline at end of file +ALTER TABLE llx_commande_fournisseur_dispatch ADD CONSTRAINT fk_commande_fournisseur_dispatch_fk_reception FOREIGN KEY (fk_reception) REFERENCES llx_reception (rowid); diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql index 9a6e05d1af1..750b40cb73c 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- This table is just an history table to track all receiving done for a -- particular supplier order. A movement with same information is also done diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.key.sql index c836fbaea6a..7cd1a344b7e 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql index f00eabf42fa..c30cc1c75dd 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_dispatch_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.key.sql index 2d4af196186..88871b93c7f 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql index affbc94fc50..6f72a447f10 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_extrafields.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql b/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql index f2abce0742f..4c576f16f51 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseur_log.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.key.sql index 99d953ec17c..6c2da9cf094 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.key.sql @@ -12,8 +12,8 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -ALTER TABLE llx_commande_fournisseurdet ADD CONSTRAINT fk_commande_fournisseurdet_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid); \ No newline at end of file +ALTER TABLE llx_commande_fournisseurdet ADD CONSTRAINT fk_commande_fournisseurdet_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid); diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql index f107e348bbe..c7a7f8ecf7f 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.key.sql index 81e177d4aa3..9df77d2aedd 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql index a3c2917491c..189b4d7d593 100644 --- a/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commande_fournisseurdet_extrafields.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commandedet.key.sql b/htdocs/install/mysql/tables/llx_commandedet.key.sql index 4420d968d9a..bba65d62aa0 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.key.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commandedet.sql b/htdocs/install/mysql/tables/llx_commandedet.sql index f30401304a6..615ec8f269c 100644 --- a/htdocs/install/mysql/tables/llx_commandedet.sql +++ b/htdocs/install/mysql/tables/llx_commandedet.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commandedet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_commandedet_extrafields.key.sql index 56da1940fc3..1d4913a8d88 100644 --- a/htdocs/install/mysql/tables/llx_commandedet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_commandedet_extrafields.key.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql b/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql index 24e59f9d9b5..37b7dd6a349 100644 --- a/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_commandedet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_comment.sql b/htdocs/install/mysql/tables/llx_comment.sql index df5f41ba91b..d881c84c0e3 100644 --- a/htdocs/install/mysql/tables/llx_comment.sql +++ b/htdocs/install/mysql/tables/llx_comment.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_const.key.sql b/htdocs/install/mysql/tables/llx_const.key.sql index 575f5f8a34b..d0781ce4edc 100644 --- a/htdocs/install/mysql/tables/llx_const.key.sql +++ b/htdocs/install/mysql/tables/llx_const.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_const.sql b/htdocs/install/mysql/tables/llx_const.sql index c27b8c45e9f..059025b49a4 100644 --- a/htdocs/install/mysql/tables/llx_const.sql +++ b/htdocs/install/mysql/tables/llx_const.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== @@ -42,4 +42,4 @@ create table llx_const -- 1 : first company constant -- 2 : second company constant -- 3 : etc... --- \ No newline at end of file +-- diff --git a/htdocs/install/mysql/tables/llx_contrat.key.sql b/htdocs/install/mysql/tables/llx_contrat.key.sql index 15cdb7161da..f1428c27090 100644 --- a/htdocs/install/mysql/tables/llx_contrat.key.sql +++ b/htdocs/install/mysql/tables/llx_contrat.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -30,4 +30,4 @@ ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_soc (fk_soc); ALTER TABLE llx_contrat ADD INDEX idx_contrat_fk_user_author (fk_user_author); ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe (rowid); -ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); \ No newline at end of file +ALTER TABLE llx_contrat ADD CONSTRAINT fk_contrat_user_author FOREIGN KEY (fk_user_author) REFERENCES llx_user (rowid); diff --git a/htdocs/install/mysql/tables/llx_contrat.sql b/htdocs/install/mysql/tables/llx_contrat.sql index 531f96adeb7..d3f84a8bb6c 100644 --- a/htdocs/install/mysql/tables/llx_contrat.sql +++ b/htdocs/install/mysql/tables/llx_contrat.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql b/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql index 277520d7c2e..78d0d1bc07c 100644 --- a/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_contrat_extrafields.sql b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql index 75a1f9cabc9..7ab3dfbbdc9 100644 --- a/htdocs/install/mysql/tables/llx_contrat_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_contratdet.key.sql b/htdocs/install/mysql/tables/llx_contratdet.key.sql index e79a3aeea33..c5cdd708eca 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.key.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_contratdet.sql b/htdocs/install/mysql/tables/llx_contratdet.sql index 376b8258a6c..4705bbab218 100644 --- a/htdocs/install/mysql/tables/llx_contratdet.sql +++ b/htdocs/install/mysql/tables/llx_contratdet.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql index 3d2f8546df7..da61a502d7d 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql index bc06733572e..8933fa66e16 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_contratdet_log.key.sql b/htdocs/install/mysql/tables/llx_contratdet_log.key.sql index 3173f48b216..4cdc072f8bf 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_log.key.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_log.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_contratdet_log.sql b/htdocs/install/mysql/tables/llx_contratdet_log.sql index 80250a87fd3..b13791f4832 100644 --- a/htdocs/install/mysql/tables/llx_contratdet_log.sql +++ b/htdocs/install/mysql/tables/llx_contratdet_log.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_cronjob.key.sql b/htdocs/install/mysql/tables/llx_cronjob.key.sql index 063a793165e..d0fac214ba0 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.key.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_cronjob.sql b/htdocs/install/mysql/tables/llx_cronjob.sql index 96458de8420..97057e6f41e 100644 --- a/htdocs/install/mysql/tables/llx_cronjob.sql +++ b/htdocs/install/mysql/tables/llx_cronjob.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_default_values.key.sql b/htdocs/install/mysql/tables/llx_default_values.key.sql index fe60f75884d..4f979653a0c 100644 --- a/htdocs/install/mysql/tables/llx_default_values.key.sql +++ b/htdocs/install/mysql/tables/llx_default_values.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_default_values.sql b/htdocs/install/mysql/tables/llx_default_values.sql index 4212b602bf7..8d969d624f0 100644 --- a/htdocs/install/mysql/tables/llx_default_values.sql +++ b/htdocs/install/mysql/tables/llx_default_values.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_deplacement.sql b/htdocs/install/mysql/tables/llx_deplacement.sql index ca58f82a642..8b9fa2a04ae 100644 --- a/htdocs/install/mysql/tables/llx_deplacement.sql +++ b/htdocs/install/mysql/tables/llx_deplacement.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_document_model.key.sql b/htdocs/install/mysql/tables/llx_document_model.key.sql index d813b57e1da..fef4c00e3f4 100644 --- a/htdocs/install/mysql/tables/llx_document_model.key.sql +++ b/htdocs/install/mysql/tables/llx_document_model.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_document_model.sql b/htdocs/install/mysql/tables/llx_document_model.sql index 4092fc0ca43..6fe6913fa68 100644 --- a/htdocs/install/mysql/tables/llx_document_model.sql +++ b/htdocs/install/mysql/tables/llx_document_model.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Table with list of document templates for document generation (odt/pdf/...) @@ -36,4 +36,4 @@ create table llx_document_model -- 1 : first company document model -- 2 : second company document model -- 3 : etc... --- \ No newline at end of file +-- diff --git a/htdocs/install/mysql/tables/llx_don.sql b/htdocs/install/mysql/tables/llx_don.sql index c9948133954..ee17fdd1e67 100644 --- a/htdocs/install/mysql/tables/llx_don.sql +++ b/htdocs/install/mysql/tables/llx_don.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.key.sql b/htdocs/install/mysql/tables/llx_don_extrafields.key.sql index 46a77f1c162..086cf0b5374 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_don_extrafields.sql b/htdocs/install/mysql/tables/llx_don_extrafields.sql index a854098a20f..bf2b780fcee 100644 --- a/htdocs/install/mysql/tables/llx_don_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_don_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_ecm_directories.key.sql b/htdocs/install/mysql/tables/llx_ecm_directories.key.sql index 1467ae6839e..03e7342d107 100644 --- a/htdocs/install/mysql/tables/llx_ecm_directories.key.sql +++ b/htdocs/install/mysql/tables/llx_ecm_directories.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -24,4 +24,4 @@ ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_c (fk_user ALTER TABLE llx_ecm_directories ADD INDEX idx_ecm_directories_fk_user_m (fk_user_m); ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_c FOREIGN KEY (fk_user_c) REFERENCES llx_user (rowid); -ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid); \ No newline at end of file +ALTER TABLE llx_ecm_directories ADD CONSTRAINT fk_ecm_directories_fk_user_m FOREIGN KEY (fk_user_m) REFERENCES llx_user (rowid); diff --git a/htdocs/install/mysql/tables/llx_ecm_directories.sql b/htdocs/install/mysql/tables/llx_ecm_directories.sql index a956b928ad5..1fa1467e296 100644 --- a/htdocs/install/mysql/tables/llx_ecm_directories.sql +++ b/htdocs/install/mysql/tables/llx_ecm_directories.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_ecm_files.key.sql b/htdocs/install/mysql/tables/llx_ecm_files.key.sql index a73d0251bff..e308b22f86f 100644 --- a/htdocs/install/mysql/tables/llx_ecm_files.key.sql +++ b/htdocs/install/mysql/tables/llx_ecm_files.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_ecm_files.sql b/htdocs/install/mysql/tables/llx_ecm_files.sql index 4af969b8ccc..2973a962b17 100644 --- a/htdocs/install/mysql/tables/llx_ecm_files.sql +++ b/htdocs/install/mysql/tables/llx_ecm_files.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_element_contact.key.sql b/htdocs/install/mysql/tables/llx_element_contact.key.sql index 2c76d0a8bc8..485f1632817 100644 --- a/htdocs/install/mysql/tables/llx_element_contact.key.sql +++ b/htdocs/install/mysql/tables/llx_element_contact.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -24,4 +24,3 @@ ALTER TABLE llx_element_contact ADD CONSTRAINT fk_element_contact_fk_c_type_cont ALTER TABLE llx_element_contact ADD INDEX idx_element_contact_fk_socpeople (fk_socpeople); -- Pas de contraite sur fk_socpeople car point sur llx_socpeople mais aussi llx_user - \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_element_contact.sql b/htdocs/install/mysql/tables/llx_element_contact.sql index 75a3b37c737..1b368be3f5a 100644 --- a/htdocs/install/mysql/tables/llx_element_contact.sql +++ b/htdocs/install/mysql/tables/llx_element_contact.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- Associate addresses with elements (contract, project, proposal, ...). diff --git a/htdocs/install/mysql/tables/llx_element_element.key.sql b/htdocs/install/mysql/tables/llx_element_element.key.sql index 99e05822914..3a6aa84ec35 100644 --- a/htdocs/install/mysql/tables/llx_element_element.key.sql +++ b/htdocs/install/mysql/tables/llx_element_element.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -23,4 +23,3 @@ ALTER TABLE llx_element_element ADD UNIQUE INDEX idx_element_element_idx1 (fk_so ALTER TABLE llx_element_element ADD INDEX idx_element_element_fk_target (fk_target); -- Pas de contraite sur fk_source et fk_target car pointe sur differentes tables - \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_element_element.sql b/htdocs/install/mysql/tables/llx_element_element.sql index 20e15b5902b..4c4567d89b2 100644 --- a/htdocs/install/mysql/tables/llx_element_element.sql +++ b/htdocs/install/mysql/tables/llx_element_element.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- Table used for relations between elements of different types: diff --git a/htdocs/install/mysql/tables/llx_element_resources.key.sql b/htdocs/install/mysql/tables/llx_element_resources.key.sql index 72dd5f3d850..69688ede71a 100644 --- a/htdocs/install/mysql/tables/llx_element_resources.key.sql +++ b/htdocs/install/mysql/tables/llx_element_resources.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -20,4 +20,3 @@ ALTER TABLE llx_element_resources ADD UNIQUE INDEX idx_element_resources_idx1 (resource_id, resource_type, element_id, element_type); ALTER TABLE llx_element_resources ADD INDEX idx_element_element_element_id (element_id); -- Pas de contraite sur resource_id et element_id car pointe sur differentes tables - \ No newline at end of file diff --git a/htdocs/install/mysql/tables/llx_element_resources.sql b/htdocs/install/mysql/tables/llx_element_resources.sql index d619626d3d7..95ee9b5a751 100644 --- a/htdocs/install/mysql/tables/llx_element_resources.sql +++ b/htdocs/install/mysql/tables/llx_element_resources.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ -- Table used to link an element actioncomm with a resource or user (llx_resource or llx_user) -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.key.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.key.sql index 56295db116a..b7b9ea96a2c 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.key.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql index df4640a14f4..10f3e4f8b9b 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollector.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_emailcollector_emailcollector( diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.key.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.key.sql index ef8a91b5d31..1b02ae721ba 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.key.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql index 011f2d827ce..226f74ce884 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectoraction.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_emailcollector_emailcollectoraction( @@ -28,4 +28,4 @@ CREATE TABLE llx_emailcollector_emailcollectoraction( import_key varchar(14), status integer NOT NULL -- END MODULEBUILDER FIELDS -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.key.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.key.sql index e0eb095fad1..e597b05dbb9 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.key.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql index 8ecccedb6d5..5f49227f655 100644 --- a/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql +++ b/htdocs/install/mysql/tables/llx_emailcollector_emailcollectorfilter.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_emailcollector_emailcollectorfilter( @@ -27,4 +27,4 @@ CREATE TABLE llx_emailcollector_emailcollectorfilter( import_key varchar(14), status integer NOT NULL -- END MODULEBUILDER FIELDS -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_entrepot.key.sql b/htdocs/install/mysql/tables/llx_entrepot.key.sql index 551eeda4e95..d5d057cfe05 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.key.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_entrepot.sql b/htdocs/install/mysql/tables/llx_entrepot.sql index 4c6f0480d5a..831e1f4a58e 100644 --- a/htdocs/install/mysql/tables/llx_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_entrepot.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_entrepot_extrafields.key.sql b/htdocs/install/mysql/tables/llx_entrepot_extrafields.key.sql index 72973186918..aba40034b3f 100644 --- a/htdocs/install/mysql/tables/llx_entrepot_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_entrepot_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql b/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql index c7a209eba8b..9fa75455f19 100644 --- a/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_entrepot_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_establishment.sql b/htdocs/install/mysql/tables/llx_establishment.sql index cb9aa676d40..89fec8f54e2 100644 --- a/htdocs/install/mysql/tables/llx_establishment.sql +++ b/htdocs/install/mysql/tables/llx_establishment.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- diff --git a/htdocs/install/mysql/tables/llx_event_element.sql b/htdocs/install/mysql/tables/llx_event_element.sql index 81f07b05e89..6058001c1d9 100644 --- a/htdocs/install/mysql/tables/llx_event_element.sql +++ b/htdocs/install/mysql/tables/llx_event_element.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ -- Table used for multi-user event diff --git a/htdocs/install/mysql/tables/llx_events.key.sql b/htdocs/install/mysql/tables/llx_events.key.sql index 3d723736758..7d6af28e1b4 100644 --- a/htdocs/install/mysql/tables/llx_events.key.sql +++ b/htdocs/install/mysql/tables/llx_events.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_events.sql b/htdocs/install/mysql/tables/llx_events.sql index c9f8f034a34..c3ae55f47e2 100644 --- a/htdocs/install/mysql/tables/llx_events.sql +++ b/htdocs/install/mysql/tables/llx_events.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== -- This table logs all dolibarr security events @@ -42,4 +42,4 @@ create table llx_events -- 1 : first company events -- 2 : second company events -- 3 : etc... --- \ No newline at end of file +-- diff --git a/htdocs/install/mysql/tables/llx_expedition.key.sql b/htdocs/install/mysql/tables/llx_expedition.key.sql index d5e041b6cdf..f2f5d3ce890 100644 --- a/htdocs/install/mysql/tables/llx_expedition.key.sql +++ b/htdocs/install/mysql/tables/llx_expedition.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expedition.sql b/htdocs/install/mysql/tables/llx_expedition.sql index 044f840dc07..e4c216f3da4 100644 --- a/htdocs/install/mysql/tables/llx_expedition.sql +++ b/htdocs/install/mysql/tables/llx_expedition.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expedition_extrafields.key.sql b/htdocs/install/mysql/tables/llx_expedition_extrafields.key.sql index b539f460a08..365265fe606 100644 --- a/htdocs/install/mysql/tables/llx_expedition_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_expedition_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expedition_extrafields.sql b/htdocs/install/mysql/tables/llx_expedition_extrafields.sql index eff8465fbf6..af4228efb41 100644 --- a/htdocs/install/mysql/tables/llx_expedition_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expedition_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_expeditiondet.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet.key.sql index 9c3cd0aa2e9..915602f51ae 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expeditiondet.sql b/htdocs/install/mysql/tables/llx_expeditiondet.sql index 54e170d041b..4a8a5423ce3 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql index 70bfe974f34..64660c9976c 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_batch.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_batch.sql b/htdocs/install/mysql/tables/llx_expeditiondet_batch.sql index 2a1234d9342..af3a261e893 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_batch.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_batch.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ CREATE TABLE llx_expeditiondet_batch ( diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.key.sql index 11e133442d5..67c5c6af925 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql index e27c7f3e505..112e41e9578 100644 --- a/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expeditiondet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expensereport.key.sql b/htdocs/install/mysql/tables/llx_expensereport.key.sql index 739caa58432..cd882997085 100644 --- a/htdocs/install/mysql/tables/llx_expensereport.key.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expensereport.sql b/htdocs/install/mysql/tables/llx_expensereport.sql index df38697adaf..a212bc55273 100755 --- a/htdocs/install/mysql/tables/llx_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_expensereport.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_expensereport_det.sql b/htdocs/install/mysql/tables/llx_expensereport_det.sql index ee583852deb..bd97600e2c8 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_det.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_det.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -56,4 +56,4 @@ CREATE TABLE llx_expensereport_det rang integer DEFAULT 0, -- position of line import_key varchar(14), rule_warning_message text -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport_extrafields.key.sql b/htdocs/install/mysql/tables/llx_expensereport_extrafields.key.sql index 1982600d8e3..f59b1d5594e 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql b/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql index 72b6a8c3194..8b6ad4e998f 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_expensereport_ik.sql b/htdocs/install/mysql/tables/llx_expensereport_ik.sql index 940f40480f6..3e767a8c396 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_ik.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_ik.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -27,4 +27,4 @@ CREATE TABLE IF NOT EXISTS llx_expensereport_ik ( coef double DEFAULT 0 NOT NULL, ikoffset double DEFAULT 0 NOT NULL, active integer DEFAULT 1 -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_expensereport_rules.sql b/htdocs/install/mysql/tables/llx_expensereport_rules.sql index feacf572c1f..aa6d7553639 100644 --- a/htdocs/install/mysql/tables/llx_expensereport_rules.sql +++ b/htdocs/install/mysql/tables/llx_expensereport_rules.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -31,4 +31,4 @@ CREATE TABLE llx_expensereport_rules ( code_expense_rules_type varchar(50) NOT NULL, is_for_all tinyint DEFAULT 0, entity integer DEFAULT 1 -) ENGINE=InnoDB; \ No newline at end of file +) ENGINE=InnoDB; diff --git a/htdocs/install/mysql/tables/llx_export_compta.sql b/htdocs/install/mysql/tables/llx_export_compta.sql index 4a5cda98071..ebe03e4f50c 100644 --- a/htdocs/install/mysql/tables/llx_export_compta.sql +++ b/htdocs/install/mysql/tables/llx_export_compta.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_export_model.key.sql b/htdocs/install/mysql/tables/llx_export_model.key.sql index 4e9485f68c4..38c6f860b82 100644 --- a/htdocs/install/mysql/tables/llx_export_model.key.sql +++ b/htdocs/install/mysql/tables/llx_export_model.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_export_model.sql b/htdocs/install/mysql/tables/llx_export_model.sql index 59bbb34ed19..53952430c14 100644 --- a/htdocs/install/mysql/tables/llx_export_model.sql +++ b/htdocs/install/mysql/tables/llx_export_model.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- =================================================================== @@ -28,4 +28,4 @@ create table llx_export_model field text NOT NULL, filter text -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_extrafields.key.sql b/htdocs/install/mysql/tables/llx_extrafields.key.sql index 55bfc77b421..42e4f6eb60d 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_extrafields.sql b/htdocs/install/mysql/tables/llx_extrafields.sql index 49480479a79..4fd80c0d9c2 100644 --- a/htdocs/install/mysql/tables/llx_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_extrafields.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture.key.sql b/htdocs/install/mysql/tables/llx_facture.key.sql index caed51240d7..a46e27c851d 100644 --- a/htdocs/install/mysql/tables/llx_facture.key.sql +++ b/htdocs/install/mysql/tables/llx_facture.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_facture.sql b/htdocs/install/mysql/tables/llx_facture.sql index aa714c06500..3b49ef04010 100644 --- a/htdocs/install/mysql/tables/llx_facture.sql +++ b/htdocs/install/mysql/tables/llx_facture.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_extrafields.key.sql b/htdocs/install/mysql/tables/llx_facture_extrafields.key.sql index e44905ccc2e..b86a4605877 100644 --- a/htdocs/install/mysql/tables/llx_facture_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_extrafields.sql index 9ef15f4e012..4f7b902c97f 100644 --- a/htdocs/install/mysql/tables/llx_facture_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.key.sql b/htdocs/install/mysql/tables/llx_facture_fourn.key.sql index 7b8dc66c9fa..18036c19d92 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_facture_fourn.sql b/htdocs/install/mysql/tables/llx_facture_fourn.sql index 36ee0a69f18..78b06370d8d 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.key.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.key.sql index 49582a4d73b..ac261a4c3f4 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -25,4 +25,4 @@ ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_product (fk ALTER TABLE llx_facture_fourn_det ADD INDEX idx_facture_fourn_det_fk_code_ventilation (fk_code_ventilation); ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_facture FOREIGN KEY (fk_facture_fourn) REFERENCES llx_facture_fourn (rowid); -ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid); \ No newline at end of file +ALTER TABLE llx_facture_fourn_det ADD CONSTRAINT fk_facture_fourn_det_fk_unit FOREIGN KEY (fk_unit) REFERENCES llx_c_units (rowid); diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql index 57097f600c0..08d9d944002 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.key.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.key.sql index 2ba04f4b256..b2256902ca7 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql index 4faca1a4865..7be8ff1c552 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_det_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.key.sql b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.key.sql index 3c51231d036..a5bf351d348 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql index d523856d999..8fb018cbfcc 100644 --- a/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_fourn_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_rec.key.sql b/htdocs/install/mysql/tables/llx_facture_rec.key.sql index 9529695cbe5..c17163317c4 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_facture_rec.sql b/htdocs/install/mysql/tables/llx_facture_rec.sql index 1add07c6e8c..d60537a36d0 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.key.sql b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.key.sql index c459a1167d7..a139284d04a 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql index aa0d14844d1..6895a7e2291 100644 --- a/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facture_rec_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet.key.sql b/htdocs/install/mysql/tables/llx_facturedet.key.sql index a0e84034d64..b2652b9728e 100644 --- a/htdocs/install/mysql/tables/llx_facturedet.key.sql +++ b/htdocs/install/mysql/tables/llx_facturedet.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet.sql b/htdocs/install/mysql/tables/llx_facturedet.sql index deb52576a8a..842bc5c206e 100644 --- a/htdocs/install/mysql/tables/llx_facturedet.sql +++ b/htdocs/install/mysql/tables/llx_facturedet.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_facturedet_extrafields.key.sql index 6334f84f81c..1a7d3a0d04e 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql b/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql index 0bd90804a1f..693abf00001 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec.key.sql b/htdocs/install/mysql/tables/llx_facturedet_rec.key.sql index 3facb7ade29..2580c33a7ab 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec.key.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec.sql b/htdocs/install/mysql/tables/llx_facturedet_rec.sql index 8bb0c06e8f8..a66d7ccb0c3 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.key.sql b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.key.sql index 8004d9b5d20..800f1aea2ab 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql index 7cfbb84712d..da2314ecffb 100644 --- a/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_facturedet_rec_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinter.key.sql b/htdocs/install/mysql/tables/llx_fichinter.key.sql index 64b59a6b644..9f73ec64a5d 100644 --- a/htdocs/install/mysql/tables/llx_fichinter.key.sql +++ b/htdocs/install/mysql/tables/llx_fichinter.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinter.sql b/htdocs/install/mysql/tables/llx_fichinter.sql index 2029e15aff5..e2508c372ca 100644 --- a/htdocs/install/mysql/tables/llx_fichinter.sql +++ b/htdocs/install/mysql/tables/llx_fichinter.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinter_extrafields.key.sql b/htdocs/install/mysql/tables/llx_fichinter_extrafields.key.sql index 00fc1801f31..6205d642090 100644 --- a/htdocs/install/mysql/tables/llx_fichinter_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_fichinter_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql b/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql index 47e3bbbcc17..13c7dd15dab 100644 --- a/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_fichinter_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinter_rec.key.sql b/htdocs/install/mysql/tables/llx_fichinter_rec.key.sql index ef164d9f8d0..22711ab3083 100644 --- a/htdocs/install/mysql/tables/llx_fichinter_rec.key.sql +++ b/htdocs/install/mysql/tables/llx_fichinter_rec.key.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_fichinter_rec.sql b/htdocs/install/mysql/tables/llx_fichinter_rec.sql index 4beea8e2db1..4a97bdc2e41 100644 --- a/htdocs/install/mysql/tables/llx_fichinter_rec.sql +++ b/htdocs/install/mysql/tables/llx_fichinter_rec.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinterdet.key.sql b/htdocs/install/mysql/tables/llx_fichinterdet.key.sql index 3266505fba9..2b1d8ff86dc 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet.key.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinterdet.sql b/htdocs/install/mysql/tables/llx_fichinterdet.sql index 676dfadbe35..36843b3f315 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.key.sql index e80db336c75..a63d789bd13 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql index 4c44e62e1db..65584c02201 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql b/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql index 40475b80d7d..ef799ea379a 100644 --- a/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql +++ b/htdocs/install/mysql/tables/llx_fichinterdet_rec.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_holiday.key.sql b/htdocs/install/mysql/tables/llx_holiday.key.sql index 6243d1eee56..61181a27db1 100644 --- a/htdocs/install/mysql/tables/llx_holiday.key.sql +++ b/htdocs/install/mysql/tables/llx_holiday.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_holiday.sql b/htdocs/install/mysql/tables/llx_holiday.sql index 47c68647ffb..ce8383fe94d 100644 --- a/htdocs/install/mysql/tables/llx_holiday.sql +++ b/htdocs/install/mysql/tables/llx_holiday.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_holiday_config.key.sql b/htdocs/install/mysql/tables/llx_holiday_config.key.sql index cda95c87f39..c1b18e760d1 100644 --- a/htdocs/install/mysql/tables/llx_holiday_config.key.sql +++ b/htdocs/install/mysql/tables/llx_holiday_config.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_holiday_config.sql b/htdocs/install/mysql/tables/llx_holiday_config.sql index 4ef6f15c7df..cf0002dff7d 100644 --- a/htdocs/install/mysql/tables/llx_holiday_config.sql +++ b/htdocs/install/mysql/tables/llx_holiday_config.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -22,4 +22,4 @@ rowid integer NOT NULL AUTO_INCREMENT PRIMARY KEY, name VARCHAR(128) NOT NULL, value TEXT NULL ) -ENGINE=innodb; \ No newline at end of file +ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_holiday_logs.sql b/htdocs/install/mysql/tables/llx_holiday_logs.sql index 7c84ebeaa20..baaa9f44ad4 100644 --- a/htdocs/install/mysql/tables/llx_holiday_logs.sql +++ b/htdocs/install/mysql/tables/llx_holiday_logs.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -27,4 +27,4 @@ type_action VARCHAR( 255 ) NOT NULL, prev_solde VARCHAR( 255 ) NOT NULL, new_solde VARCHAR( 255 ) NOT NULL ) -ENGINE=innodb; \ No newline at end of file +ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_holiday_users.key.sql b/htdocs/install/mysql/tables/llx_holiday_users.key.sql index e03dd6ebfcb..0a055b6006a 100644 --- a/htdocs/install/mysql/tables/llx_holiday_users.key.sql +++ b/htdocs/install/mysql/tables/llx_holiday_users.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_holiday_users.sql b/htdocs/install/mysql/tables/llx_holiday_users.sql index ae47c0a99e0..1d3bcbc9361 100644 --- a/htdocs/install/mysql/tables/llx_holiday_users.sql +++ b/htdocs/install/mysql/tables/llx_holiday_users.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -21,4 +21,4 @@ CREATE TABLE llx_holiday_users fk_user integer NOT NULL, fk_type integer NOT NULL, nb_holiday real NOT NULL DEFAULT 0 -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_import_model.key.sql b/htdocs/install/mysql/tables/llx_import_model.key.sql index d328829cb6d..fa576918404 100644 --- a/htdocs/install/mysql/tables/llx_import_model.key.sql +++ b/htdocs/install/mysql/tables/llx_import_model.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_import_model.sql b/htdocs/install/mysql/tables/llx_import_model.sql index 37ab1c00c12..2a110a2d80a 100644 --- a/htdocs/install/mysql/tables/llx_import_model.sql +++ b/htdocs/install/mysql/tables/llx_import_model.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- List of tables for available import models @@ -25,4 +25,4 @@ create table llx_import_model label varchar(50) NOT NULL, type varchar(50) NOT NULL, field text NOT NULL -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_inventory.key.sql b/htdocs/install/mysql/tables/llx_inventory.key.sql index a20fe45fe56..5e67b148993 100644 --- a/htdocs/install/mysql/tables/llx_inventory.key.sql +++ b/htdocs/install/mysql/tables/llx_inventory.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_inventory.sql b/htdocs/install/mysql/tables/llx_inventory.sql index 9e4d02408c9..70e409193aa 100644 --- a/htdocs/install/mysql/tables/llx_inventory.sql +++ b/htdocs/install/mysql/tables/llx_inventory.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_inventorydet.key.sql b/htdocs/install/mysql/tables/llx_inventorydet.key.sql index 3cef44ba52a..44890608b7e 100644 --- a/htdocs/install/mysql/tables/llx_inventorydet.key.sql +++ b/htdocs/install/mysql/tables/llx_inventorydet.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_inventorydet.sql b/htdocs/install/mysql/tables/llx_inventorydet.sql index 452b61e190e..1a2b63a9252 100644 --- a/htdocs/install/mysql/tables/llx_inventorydet.sql +++ b/htdocs/install/mysql/tables/llx_inventorydet.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_links.key.sql b/htdocs/install/mysql/tables/llx_links.key.sql index 7ba509e9d58..34c5e157664 100644 --- a/htdocs/install/mysql/tables/llx_links.key.sql +++ b/htdocs/install/mysql/tables/llx_links.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Linked files diff --git a/htdocs/install/mysql/tables/llx_links.sql b/htdocs/install/mysql/tables/llx_links.sql index 7e9fba8e2c5..807fed911e3 100644 --- a/htdocs/install/mysql/tables/llx_links.sql +++ b/htdocs/install/mysql/tables/llx_links.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Table to store external URL links to documents diff --git a/htdocs/install/mysql/tables/llx_livraison.key.sql b/htdocs/install/mysql/tables/llx_livraison.key.sql index 2769ee09c67..e0e21c13451 100644 --- a/htdocs/install/mysql/tables/llx_livraison.key.sql +++ b/htdocs/install/mysql/tables/llx_livraison.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraison.sql b/htdocs/install/mysql/tables/llx_livraison.sql index 5f7a6c52ef8..31af38edfb6 100644 --- a/htdocs/install/mysql/tables/llx_livraison.sql +++ b/htdocs/install/mysql/tables/llx_livraison.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraison_extrafields.key.sql b/htdocs/install/mysql/tables/llx_livraison_extrafields.key.sql index 68e1f30bd15..87d8931d27c 100644 --- a/htdocs/install/mysql/tables/llx_livraison_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_livraison_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraison_extrafields.sql b/htdocs/install/mysql/tables/llx_livraison_extrafields.sql index 8a140496016..70248d0ceca 100644 --- a/htdocs/install/mysql/tables/llx_livraison_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_livraison_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraisondet.key.sql b/htdocs/install/mysql/tables/llx_livraisondet.key.sql index f6783d55a04..3006d520907 100644 --- a/htdocs/install/mysql/tables/llx_livraisondet.key.sql +++ b/htdocs/install/mysql/tables/llx_livraisondet.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraisondet.sql b/htdocs/install/mysql/tables/llx_livraisondet.sql index cac8819f206..3b30da9a955 100644 --- a/htdocs/install/mysql/tables/llx_livraisondet.sql +++ b/htdocs/install/mysql/tables/llx_livraisondet.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.key.sql index e3fcb9a0f23..cc9ee6673d0 100644 --- a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql index 18295a90f5a..cb6300a8ca1 100644 --- a/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_livraisondet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_loan.sql b/htdocs/install/mysql/tables/llx_loan.sql index abb1eab0c09..a1a187b5ba4 100644 --- a/htdocs/install/mysql/tables/llx_loan.sql +++ b/htdocs/install/mysql/tables/llx_loan.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_loan_schedule.sql b/htdocs/install/mysql/tables/llx_loan_schedule.sql index 11c167ae305..42592815526 100644 --- a/htdocs/install/mysql/tables/llx_loan_schedule.sql +++ b/htdocs/install/mysql/tables/llx_loan_schedule.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_localtax.sql b/htdocs/install/mysql/tables/llx_localtax.sql index e1cef882e7c..b7aa682567f 100644 --- a/htdocs/install/mysql/tables/llx_localtax.sql +++ b/htdocs/install/mysql/tables/llx_localtax.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_mailing.sql b/htdocs/install/mysql/tables/llx_mailing.sql index 804a7309d24..8706159ad46 100644 --- a/htdocs/install/mysql/tables/llx_mailing.sql +++ b/htdocs/install/mysql/tables/llx_mailing.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql b/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql index 721344355f4..709b12de31b 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_mailing_cibles.sql b/htdocs/install/mysql/tables/llx_mailing_cibles.sql index dc9dc3874d0..b523c1d11eb 100644 --- a/htdocs/install/mysql/tables/llx_mailing_cibles.sql +++ b/htdocs/install/mysql/tables/llx_mailing_cibles.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.key.sql b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.key.sql index baa74a4d133..05e00e3578b 100644 --- a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.key.sql +++ b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.key.sql @@ -12,9 +12,9 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== -ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup); \ No newline at end of file +ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup); diff --git a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql index 743e6ba1220..00424256957 100644 --- a/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql +++ b/htdocs/install/mysql/tables/llx_mailing_unsubscribe.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_menu.key.sql b/htdocs/install/mysql/tables/llx_menu.key.sql index 53b26de8a04..10746d25b4c 100644 --- a/htdocs/install/mysql/tables/llx_menu.key.sql +++ b/htdocs/install/mysql/tables/llx_menu.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_menu.sql b/htdocs/install/mysql/tables/llx_menu.sql index 7cbd86bb1a1..59bb96297d7 100644 --- a/htdocs/install/mysql/tables/llx_menu.sql +++ b/htdocs/install/mysql/tables/llx_menu.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== @@ -43,4 +43,4 @@ CREATE TABLE llx_menu usertype integer NOT NULL DEFAULT 0, -- 0 if menu for all users, 1 for external only, 2 for internal only tms timestamp -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_multicurrency.sql b/htdocs/install/mysql/tables/llx_multicurrency.sql index 0f31ae8f038..6a5a92f9fd4 100644 --- a/htdocs/install/mysql/tables/llx_multicurrency.sql +++ b/htdocs/install/mysql/tables/llx_multicurrency.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_multicurrency_rate.sql b/htdocs/install/mysql/tables/llx_multicurrency_rate.sql index 545807c8aed..45486acb5ec 100644 --- a/htdocs/install/mysql/tables/llx_multicurrency_rate.sql +++ b/htdocs/install/mysql/tables/llx_multicurrency_rate.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_notify.sql b/htdocs/install/mysql/tables/llx_notify.sql index b0fa333dbb9..3ec7d05268e 100644 --- a/htdocs/install/mysql/tables/llx_notify.sql +++ b/htdocs/install/mysql/tables/llx_notify.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table of notification done -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_notify_def.sql b/htdocs/install/mysql/tables/llx_notify_def.sql index 3641e8cd2e7..bb516444b04 100644 --- a/htdocs/install/mysql/tables/llx_notify_def.sql +++ b/htdocs/install/mysql/tables/llx_notify_def.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table to declare permanent notifications (per workflow event) -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_notify_def_object.sql b/htdocs/install/mysql/tables/llx_notify_def_object.sql index d1ddd2d1b99..06a04e14029 100644 --- a/htdocs/install/mysql/tables/llx_notify_def_object.sql +++ b/htdocs/install/mysql/tables/llx_notify_def_object.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table to declare notifications (per object) -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_oauth_state.sql b/htdocs/install/mysql/tables/llx_oauth_state.sql index bab41e95f13..39ade6bc529 100644 --- a/htdocs/install/mysql/tables/llx_oauth_state.sql +++ b/htdocs/install/mysql/tables/llx_oauth_state.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_oauth_state ( @@ -22,4 +22,4 @@ CREATE TABLE llx_oauth_state ( fk_user integer, fk_adherent integer, entity integer DEFAULT 1 -)ENGINE=InnoDB; \ No newline at end of file +)ENGINE=InnoDB; diff --git a/htdocs/install/mysql/tables/llx_oauth_token.sql b/htdocs/install/mysql/tables/llx_oauth_token.sql index 6698335c07e..bbc236be6c1 100644 --- a/htdocs/install/mysql/tables/llx_oauth_token.sql +++ b/htdocs/install/mysql/tables/llx_oauth_token.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_oauth_token ( diff --git a/htdocs/install/mysql/tables/llx_online_signatures.sql b/htdocs/install/mysql/tables/llx_online_signatures.sql index 6883070df31..312cde50671 100644 --- a/htdocs/install/mysql/tables/llx_online_signatures.sql +++ b/htdocs/install/mysql/tables/llx_online_signatures.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ create table llx_onlinesignature diff --git a/htdocs/install/mysql/tables/llx_opensurvey_comments.key.sql b/htdocs/install/mysql/tables/llx_opensurvey_comments.key.sql index 33365f1ab20..a17c8e0cb86 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_comments.key.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_comments.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ ALTER TABLE llx_opensurvey_comments ADD INDEX idx_id_comment (id_comment); diff --git a/htdocs/install/mysql/tables/llx_opensurvey_comments.sql b/htdocs/install/mysql/tables/llx_opensurvey_comments.sql index 613627c46aa..74a9d9ec3cb 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_comments.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_comments.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_opensurvey_comments ( diff --git a/htdocs/install/mysql/tables/llx_opensurvey_formquestions.sql b/htdocs/install/mysql/tables/llx_opensurvey_formquestions.sql index cf6b89f1339..044fabc5029 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_formquestions.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_formquestions.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_opensurvey_formquestions ( diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql index ec10e64ac07..1d8670a52f2 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ ALTER TABLE llx_opensurvey_sondage ADD INDEX idx_date_fin (date_fin); diff --git a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql index e9b2481757d..c3f1cdbfee1 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_sondage.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_opensurvey_sondage ( diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_formanswers.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_formanswers.sql index 8a771604181..bd55d256a06 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_formanswers.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_formanswers.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_opensurvey_user_formanswers ( diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql index 810080e3466..11b61f241c8 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ ALTER TABLE llx_opensurvey_user_studs ADD INDEX idx_opensurvey_user_studs_id_users (id_users); diff --git a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql index 0e918d68a86..16ef0b2cf7e 100644 --- a/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql +++ b/htdocs/install/mysql/tables/llx_opensurvey_user_studs.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ CREATE TABLE llx_opensurvey_user_studs ( diff --git a/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql b/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql index 70e0174c6da..617036e66ee 100644 --- a/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql +++ b/htdocs/install/mysql/tables/llx_overwrite_trans.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_overwrite_trans.sql b/htdocs/install/mysql/tables/llx_overwrite_trans.sql index a42144cde6f..0276902ac52 100644 --- a/htdocs/install/mysql/tables/llx_overwrite_trans.sql +++ b/htdocs/install/mysql/tables/llx_overwrite_trans.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_paiement.sql b/htdocs/install/mysql/tables/llx_paiement.sql index a57c345c968..d0cfd727d95 100644 --- a/htdocs/install/mysql/tables/llx_paiement.sql +++ b/htdocs/install/mysql/tables/llx_paiement.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_paiement_facture.key.sql b/htdocs/install/mysql/tables/llx_paiement_facture.key.sql index 5ecd98cfe99..63fa3b59e12 100644 --- a/htdocs/install/mysql/tables/llx_paiement_facture.key.sql +++ b/htdocs/install/mysql/tables/llx_paiement_facture.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_paiement_facture.sql b/htdocs/install/mysql/tables/llx_paiement_facture.sql index 9526ca3aa9d..f15f651f7ae 100644 --- a/htdocs/install/mysql/tables/llx_paiement_facture.sql +++ b/htdocs/install/mysql/tables/llx_paiement_facture.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_paiementcharge.sql b/htdocs/install/mysql/tables/llx_paiementcharge.sql index 579628c44af..b489588777a 100644 --- a/htdocs/install/mysql/tables/llx_paiementcharge.sql +++ b/htdocs/install/mysql/tables/llx_paiementcharge.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_paiementfourn.sql b/htdocs/install/mysql/tables/llx_paiementfourn.sql index c1865d6b97c..519526f764a 100644 --- a/htdocs/install/mysql/tables/llx_paiementfourn.sql +++ b/htdocs/install/mysql/tables/llx_paiementfourn.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.key.sql b/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.key.sql index 46e56f43b3f..4b1b2525a3e 100644 --- a/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.key.sql +++ b/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql b/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql index a9e8da8a530..cb1b8441444 100644 --- a/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql +++ b/htdocs/install/mysql/tables/llx_paiementfourn_facturefourn.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== @@ -28,4 +28,4 @@ create table llx_paiementfourn_facturefourn multicurrency_code varchar(255), multicurrency_tx double(24,8) DEFAULT 1, multicurrency_amount double(24,8) DEFAULT 0 -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_payment_donation.sql b/htdocs/install/mysql/tables/llx_payment_donation.sql index 67f6eade0f0..6573bcb7119 100644 --- a/htdocs/install/mysql/tables/llx_payment_donation.sql +++ b/htdocs/install/mysql/tables/llx_payment_donation.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_payment_expensereport.sql b/htdocs/install/mysql/tables/llx_payment_expensereport.sql index aadd0a090fd..8a75bfcdbfd 100644 --- a/htdocs/install/mysql/tables/llx_payment_expensereport.sql +++ b/htdocs/install/mysql/tables/llx_payment_expensereport.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_payment_loan.sql b/htdocs/install/mysql/tables/llx_payment_loan.sql index 28edaf6cb37..a646ba1917b 100644 --- a/htdocs/install/mysql/tables/llx_payment_loan.sql +++ b/htdocs/install/mysql/tables/llx_payment_loan.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_payment_salary.key.sql b/htdocs/install/mysql/tables/llx_payment_salary.key.sql index d1df789eebe..946cd1a08ff 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.key.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_payment_salary.sql b/htdocs/install/mysql/tables/llx_payment_salary.sql index 00e81d68587..cc4aaf94ccb 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -38,4 +38,4 @@ create table llx_payment_salary fk_bank integer, fk_user_author integer, -- user creating fk_user_modif integer -- user making last change -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.key.sql b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.key.sql index c038f1337d0..9231351a749 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql index fc87cd8146d..3bfed602cff 100644 --- a/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_payment_salary_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_payment_various.sql b/htdocs/install/mysql/tables/llx_payment_various.sql index 95df9038c9b..4b48c649578 100644 --- a/htdocs/install/mysql/tables/llx_payment_various.sql +++ b/htdocs/install/mysql/tables/llx_payment_various.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -37,4 +37,4 @@ create table llx_payment_various fk_bank integer, fk_user_author integer, -- utilisateur qui a cree l'info fk_user_modif integer -- utilisateur qui a modifié l'info -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_pos_cash_fence.sql b/htdocs/install/mysql/tables/llx_pos_cash_fence.sql index f9967ec968b..2b937e215fa 100644 --- a/htdocs/install/mysql/tables/llx_pos_cash_fence.sql +++ b/htdocs/install/mysql/tables/llx_pos_cash_fence.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_pos_cash_fence( @@ -35,4 +35,4 @@ CREATE TABLE llx_pos_cash_fence( fk_user_valid integer, tms TIMESTAMP, import_key VARCHAR(14) -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_prelevement_bons.key.sql b/htdocs/install/mysql/tables/llx_prelevement_bons.key.sql index 29c11790339..66696232d5f 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_bons.key.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_bons.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_prelevement_bons.sql b/htdocs/install/mysql/tables/llx_prelevement_bons.sql index b796ffabcd6..2a8fd114440 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_bons.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_bons.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture.key.sql b/htdocs/install/mysql/tables/llx_prelevement_facture.key.sql index 6dd09b571cc..bc8b1bd8386 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture.key.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_facture.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture.sql b/htdocs/install/mysql/tables/llx_prelevement_facture.sql index 46bc762497e..2524f854a9c 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_facture.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql b/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql index cfcb672400b..b1f625de872 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_facture_demande.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_prelevement_lignes.key.sql b/htdocs/install/mysql/tables/llx_prelevement_lignes.key.sql index 9fcd5e99a17..b6a816fe6ac 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_lignes.key.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_lignes.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_prelevement_lignes.sql b/htdocs/install/mysql/tables/llx_prelevement_lignes.sql index 421f8ee4969..6d3b8ed3b58 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_lignes.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_lignes.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_prelevement_rejet.sql b/htdocs/install/mysql/tables/llx_prelevement_rejet.sql index 3c83e78d111..b766457b583 100644 --- a/htdocs/install/mysql/tables/llx_prelevement_rejet.sql +++ b/htdocs/install/mysql/tables/llx_prelevement_rejet.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_printing.sql b/htdocs/install/mysql/tables/llx_printing.sql index 451564ff74b..0f0c7c71d1b 100644 --- a/htdocs/install/mysql/tables/llx_printing.sql +++ b/htdocs/install/mysql/tables/llx_printing.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product.key.sql b/htdocs/install/mysql/tables/llx_product.key.sql index bd48aa99cd4..c3dd33c88c5 100644 --- a/htdocs/install/mysql/tables/llx_product.key.sql +++ b/htdocs/install/mysql/tables/llx_product.key.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql index fb6e4cf5f1a..858c89e8d2e 100755 --- a/htdocs/install/mysql/tables/llx_product.sql +++ b/htdocs/install/mysql/tables/llx_product.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_association.key.sql b/htdocs/install/mysql/tables/llx_product_association.key.sql index 05a47ce1439..9eb9fdd457b 100644 --- a/htdocs/install/mysql/tables/llx_product_association.key.sql +++ b/htdocs/install/mysql/tables/llx_product_association.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_association.sql b/htdocs/install/mysql/tables/llx_product_association.sql index 6b248aef17f..91cc14882f1 100644 --- a/htdocs/install/mysql/tables/llx_product_association.sql +++ b/htdocs/install/mysql/tables/llx_product_association.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_attribute.key.sql b/htdocs/install/mysql/tables/llx_product_attribute.key.sql index f107a855e61..e571961536d 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute.key.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_attribute.sql b/htdocs/install/mysql/tables/llx_product_attribute.sql index cb655508e89..f7ebee3cc23 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination.key.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination.key.sql index 770429d0524..d61912f8136 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_combination.key.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_combination.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination.sql index 85c46706014..361588c10b4 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_combination.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_combination.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -25,4 +25,4 @@ CREATE TABLE llx_product_attribute_combination variation_price_percentage INT NULL, variation_weight FLOAT NOT NULL, entity INT DEFAULT 1 NOT NULL -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination2val.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination2val.sql index af0da7f710d..1878e971fea 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_combination2val.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_combination2val.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -22,4 +22,4 @@ CREATE TABLE llx_product_attribute_combination2val fk_prod_combination INT NOT NULL, fk_prod_attr INT NOT NULL, fk_prod_attr_val INT NOT NULL -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_attribute_value.key.sql b/htdocs/install/mysql/tables/llx_product_attribute_value.key.sql index 42763665d71..f7b649fd0c3 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_value.key.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_value.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_attribute_value.sql b/htdocs/install/mysql/tables/llx_product_attribute_value.sql index 626f137789a..c4e0ec91459 100644 --- a/htdocs/install/mysql/tables/llx_product_attribute_value.sql +++ b/htdocs/install/mysql/tables/llx_product_attribute_value.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -24,4 +24,4 @@ CREATE TABLE llx_product_attribute_value ref VARCHAR(180) DEFAULT NULL, value VARCHAR(255) DEFAULT NULL, entity INT DEFAULT 1 NOT NULL -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_product_batch.key.sql b/htdocs/install/mysql/tables/llx_product_batch.key.sql index 100e092399d..eaea197d569 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.key.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_batch.sql b/htdocs/install/mysql/tables/llx_product_batch.sql index f502bb8c23f..70b7d024398 100644 --- a/htdocs/install/mysql/tables/llx_product_batch.sql +++ b/htdocs/install/mysql/tables/llx_product_batch.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- This table is dedicated to store detail (lots/serial) of a stock -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_customer_price.key.sql b/htdocs/install/mysql/tables/llx_product_customer_price.key.sql index a5411266e66..2b827740b60 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price.key.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_customer_price.sql b/htdocs/install/mysql/tables/llx_product_customer_price.sql index 443e48c0f5c..c7b6f1eb1a2 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price.sql @@ -16,7 +16,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_customer_price_log.sql b/htdocs/install/mysql/tables/llx_product_customer_price_log.sql index deec2ac78b5..4d79353e884 100644 --- a/htdocs/install/mysql/tables/llx_product_customer_price_log.sql +++ b/htdocs/install/mysql/tables/llx_product_customer_price_log.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_extrafields.key.sql b/htdocs/install/mysql/tables/llx_product_extrafields.key.sql index 3b5683844a9..114c4565632 100644 --- a/htdocs/install/mysql/tables/llx_product_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_product_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_product_extrafields.sql b/htdocs/install/mysql/tables/llx_product_extrafields.sql index 306faa91137..b265340d11c 100644 --- a/htdocs/install/mysql/tables/llx_product_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql index 67817733255..148f069fc33 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql index af5aa743db2..7e61a2df6b1 100755 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql b/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql index df5da98291f..cb59cc78bef 100644 --- a/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql +++ b/htdocs/install/mysql/tables/llx_product_fournisseur_price_log.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_lang.key.sql b/htdocs/install/mysql/tables/llx_product_lang.key.sql index 5c8ab0a5fc9..3d6e579bc59 100644 --- a/htdocs/install/mysql/tables/llx_product_lang.key.sql +++ b/htdocs/install/mysql/tables/llx_product_lang.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -20,4 +20,4 @@ ALTER TABLE llx_product_lang ADD UNIQUE INDEX uk_product_lang (fk_product, lang); -ALTER TABLE llx_product_lang ADD CONSTRAINT fk_product_lang_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); \ No newline at end of file +ALTER TABLE llx_product_lang ADD CONSTRAINT fk_product_lang_fk_product FOREIGN KEY (fk_product) REFERENCES llx_product (rowid); diff --git a/htdocs/install/mysql/tables/llx_product_lang.sql b/htdocs/install/mysql/tables/llx_product_lang.sql index cbccac26020..de21c8049af 100644 --- a/htdocs/install/mysql/tables/llx_product_lang.sql +++ b/htdocs/install/mysql/tables/llx_product_lang.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_lot.key.sql b/htdocs/install/mysql/tables/llx_product_lot.key.sql index d16a0993d55..8f6178e26f9 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.key.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_lot.sql b/htdocs/install/mysql/tables/llx_product_lot.sql index 3cf10b893ce..493a8792f20 100644 --- a/htdocs/install/mysql/tables/llx_product_lot.sql +++ b/htdocs/install/mysql/tables/llx_product_lot.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- This table is dedicated to store lots with detail of each lot. Key is fk_product-batch is unique. -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_lot_extrafields.key.sql b/htdocs/install/mysql/tables/llx_product_lot_extrafields.key.sql index aabf13c3ded..50edf5506ed 100644 --- a/htdocs/install/mysql/tables/llx_product_lot_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_product_lot_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql b/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql index 7e18c8f68ec..b3843ed9ba6 100644 --- a/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_product_lot_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_product_price.key.sql b/htdocs/install/mysql/tables/llx_product_price.key.sql index b3018cea95b..fb34ab58e9f 100644 --- a/htdocs/install/mysql/tables/llx_product_price.key.sql +++ b/htdocs/install/mysql/tables/llx_product_price.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_price.sql b/htdocs/install/mysql/tables/llx_product_price.sql index 665470239e7..11b2ac972cf 100755 --- a/htdocs/install/mysql/tables/llx_product_price.sql +++ b/htdocs/install/mysql/tables/llx_product_price.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_price_by_qty.key.sql b/htdocs/install/mysql/tables/llx_product_price_by_qty.key.sql index 57426b53d1b..b204dc0769f 100644 --- a/htdocs/install/mysql/tables/llx_product_price_by_qty.key.sql +++ b/htdocs/install/mysql/tables/llx_product_price_by_qty.key.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ @@ -23,4 +23,4 @@ ALTER TABLE llx_product_price_by_qty ADD UNIQUE INDEX uk_product_price_by_qty_le ALTER TABLE llx_product_price_by_qty ADD INDEX idx_product_price_by_qty_fk_product_price (fk_product_price); -ALTER TABLE llx_product_price_by_qty ADD CONSTRAINT fk_product_price_by_qty_fk_product_price FOREIGN KEY (fk_product_price) REFERENCES llx_product_price (rowid); \ No newline at end of file +ALTER TABLE llx_product_price_by_qty ADD CONSTRAINT fk_product_price_by_qty_fk_product_price FOREIGN KEY (fk_product_price) REFERENCES llx_product_price (rowid); diff --git a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql index 480b9239407..7cb8b327b4d 100644 --- a/htdocs/install/mysql/tables/llx_product_price_by_qty.sql +++ b/htdocs/install/mysql/tables/llx_product_price_by_qty.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- This table is used to defined price by qty when a line into llx_product_price -- is set with price_by_qty = 1 diff --git a/htdocs/install/mysql/tables/llx_product_pricerules.key.sql b/htdocs/install/mysql/tables/llx_product_pricerules.key.sql index 42b9289d26a..25ad889d8d2 100644 --- a/htdocs/install/mysql/tables/llx_product_pricerules.key.sql +++ b/htdocs/install/mysql/tables/llx_product_pricerules.key.sql @@ -12,8 +12,8 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== -ALTER TABLE llx_product_pricerules ADD CONSTRAINT unique_level UNIQUE (level); \ No newline at end of file +ALTER TABLE llx_product_pricerules ADD CONSTRAINT unique_level UNIQUE (level); diff --git a/htdocs/install/mysql/tables/llx_product_pricerules.sql b/htdocs/install/mysql/tables/llx_product_pricerules.sql index 3cf58c9585f..22d2b9926cf 100644 --- a/htdocs/install/mysql/tables/llx_product_pricerules.sql +++ b/htdocs/install/mysql/tables/llx_product_pricerules.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_product_stock.key.sql b/htdocs/install/mysql/tables/llx_product_stock.key.sql index 3cfb31cbd02..358a0c74f19 100644 --- a/htdocs/install/mysql/tables/llx_product_stock.key.sql +++ b/htdocs/install/mysql/tables/llx_product_stock.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_stock.sql b/htdocs/install/mysql/tables/llx_product_stock.sql index a2696a4bc4e..586c5b410c7 100644 --- a/htdocs/install/mysql/tables/llx_product_stock.sql +++ b/htdocs/install/mysql/tables/llx_product_stock.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql b/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql index 7b485ca26f6..b5d69defd9e 100644 --- a/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql +++ b/htdocs/install/mysql/tables/llx_product_stock_entrepot.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_projet.key.sql b/htdocs/install/mysql/tables/llx_projet.key.sql index b3a18f39b03..4b9dd008943 100644 --- a/htdocs/install/mysql/tables/llx_projet.key.sql +++ b/htdocs/install/mysql/tables/llx_projet.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_projet.sql b/htdocs/install/mysql/tables/llx_projet.sql index 792a9237693..940ee03bea2 100644 --- a/htdocs/install/mysql/tables/llx_projet.sql +++ b/htdocs/install/mysql/tables/llx_projet.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_projet_extrafields.key.sql index d756f96472b..86a60bb820d 100644 --- a/htdocs/install/mysql/tables/llx_projet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_projet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_extrafields.sql b/htdocs/install/mysql/tables/llx_projet_extrafields.sql index ae1689a56f1..8a96a715b05 100644 --- a/htdocs/install/mysql/tables/llx_projet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_projet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_task.key.sql b/htdocs/install/mysql/tables/llx_projet_task.key.sql index a64d8395b9f..d50361fd0f4 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.key.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_projet_task.sql b/htdocs/install/mysql/tables/llx_projet_task.sql index 1adc6c6b2b6..cc1088cf7a7 100644 --- a/htdocs/install/mysql/tables/llx_projet_task.sql +++ b/htdocs/install/mysql/tables/llx_projet_task.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_task_extrafields.key.sql b/htdocs/install/mysql/tables/llx_projet_task_extrafields.key.sql index 6ff72738530..346d8d2cb22 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql b/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql index 62831113c6a..256c9025dc0 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.key.sql b/htdocs/install/mysql/tables/llx_projet_task_time.key.sql index ad1433f8dca..5acb17bb712 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.key.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_projet_task_time.sql b/htdocs/install/mysql/tables/llx_projet_task_time.sql index 897364a90e1..e1c857af2c3 100644 --- a/htdocs/install/mysql/tables/llx_projet_task_time.sql +++ b/htdocs/install/mysql/tables/llx_projet_task_time.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_propal.key.sql b/htdocs/install/mysql/tables/llx_propal.key.sql index 85cd86b70e1..c47da982ab4 100644 --- a/htdocs/install/mysql/tables/llx_propal.key.sql +++ b/htdocs/install/mysql/tables/llx_propal.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_propal.sql b/htdocs/install/mysql/tables/llx_propal.sql index d8eee18629b..d21d9ef2d7e 100644 --- a/htdocs/install/mysql/tables/llx_propal.sql +++ b/htdocs/install/mysql/tables/llx_propal.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_propal_extrafields.key.sql b/htdocs/install/mysql/tables/llx_propal_extrafields.key.sql index 5c9cc922667..8759d7deb1e 100644 --- a/htdocs/install/mysql/tables/llx_propal_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_propal_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_propal_extrafields.sql b/htdocs/install/mysql/tables/llx_propal_extrafields.sql index c285df56dd7..f6ccb68b39b 100644 --- a/htdocs/install/mysql/tables/llx_propal_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_propal_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql index 7f29f4a4614..e081b97969f 100644 --- a/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql +++ b/htdocs/install/mysql/tables/llx_propal_merge_pdf_product.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . CREATE TABLE llx_propal_merge_pdf_product ( rowid integer NOT NULL auto_increment PRIMARY KEY, diff --git a/htdocs/install/mysql/tables/llx_propaldet.key.sql b/htdocs/install/mysql/tables/llx_propaldet.key.sql index f442ad36106..4ac8f034418 100644 --- a/htdocs/install/mysql/tables/llx_propaldet.key.sql +++ b/htdocs/install/mysql/tables/llx_propaldet.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_propaldet.sql b/htdocs/install/mysql/tables/llx_propaldet.sql index fdee7a5dcca..7156d90af2f 100644 --- a/htdocs/install/mysql/tables/llx_propaldet.sql +++ b/htdocs/install/mysql/tables/llx_propaldet.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== @@ -70,4 +70,4 @@ create table llx_propaldet -- 1 : frais de port -- 2 : ecotaxe -- 3 : produit/service propose en option --- \ No newline at end of file +-- diff --git a/htdocs/install/mysql/tables/llx_propaldet_extrafields.key.sql b/htdocs/install/mysql/tables/llx_propaldet_extrafields.key.sql index 0014a20d81d..1ab062a83cd 100644 --- a/htdocs/install/mysql/tables/llx_propaldet_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_propaldet_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql b/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql index 58883a84dbe..74986b1c641 100644 --- a/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_propaldet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_reception.key.sql b/htdocs/install/mysql/tables/llx_reception.key.sql index a107c2a7d12..b8390f1d9ec 100644 --- a/htdocs/install/mysql/tables/llx_reception.key.sql +++ b/htdocs/install/mysql/tables/llx_reception.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_reception.sql b/htdocs/install/mysql/tables/llx_reception.sql index 34565f7f29a..05ed6ca4604 100644 --- a/htdocs/install/mysql/tables/llx_reception.sql +++ b/htdocs/install/mysql/tables/llx_reception.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_reception_extrafields.key.sql b/htdocs/install/mysql/tables/llx_reception_extrafields.key.sql index f3a35acd8a3..9b5c6f5c466 100644 --- a/htdocs/install/mysql/tables/llx_reception_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_reception_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_reception_extrafields.sql b/htdocs/install/mysql/tables/llx_reception_extrafields.sql index 7a3126b2015..e2f83794a0b 100644 --- a/htdocs/install/mysql/tables/llx_reception_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_reception_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_resource.key.sql b/htdocs/install/mysql/tables/llx_resource.key.sql index d90f5c00f94..bc426f3aa49 100644 --- a/htdocs/install/mysql/tables/llx_resource.key.sql +++ b/htdocs/install/mysql/tables/llx_resource.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . ALTER TABLE llx_resource ADD UNIQUE INDEX uk_resource_ref (ref, entity); diff --git a/htdocs/install/mysql/tables/llx_resource.sql b/htdocs/install/mysql/tables/llx_resource.sql index 5da0872eb21..7dc709ad83a 100644 --- a/htdocs/install/mysql/tables/llx_resource.sql +++ b/htdocs/install/mysql/tables/llx_resource.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . CREATE TABLE llx_resource ( diff --git a/htdocs/install/mysql/tables/llx_resource_extrafields.key.sql b/htdocs/install/mysql/tables/llx_resource_extrafields.key.sql index af77b0c2474..d69755dacfd 100644 --- a/htdocs/install/mysql/tables/llx_resource_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_resource_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_resource_extrafields.sql b/htdocs/install/mysql/tables/llx_resource_extrafields.sql index 4bda4091de4..6e828258339 100644 --- a/htdocs/install/mysql/tables/llx_resource_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_resource_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_rights_def.key.sql b/htdocs/install/mysql/tables/llx_rights_def.key.sql index d68316c7273..fbd54e14514 100644 --- a/htdocs/install/mysql/tables/llx_rights_def.key.sql +++ b/htdocs/install/mysql/tables/llx_rights_def.key.sql @@ -12,9 +12,9 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== -ALTER TABLE llx_rights_def ADD PRIMARY KEY pk_rights_def (id, entity); \ No newline at end of file +ALTER TABLE llx_rights_def ADD PRIMARY KEY pk_rights_def (id, entity); diff --git a/htdocs/install/mysql/tables/llx_rights_def.sql b/htdocs/install/mysql/tables/llx_rights_def.sql index 3de223d1606..f9bbb57c2e2 100644 --- a/htdocs/install/mysql/tables/llx_rights_def.sql +++ b/htdocs/install/mysql/tables/llx_rights_def.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== @@ -35,4 +35,4 @@ create table llx_rights_def -- 1 : first company user -- 2 : second company user -- 3 : etc... --- \ No newline at end of file +-- diff --git a/htdocs/install/mysql/tables/llx_societe.key.sql b/htdocs/install/mysql/tables/llx_societe.key.sql index eee239566e6..29b713b608d 100644 --- a/htdocs/install/mysql/tables/llx_societe.key.sql +++ b/htdocs/install/mysql/tables/llx_societe.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe.sql b/htdocs/install/mysql/tables/llx_societe.sql index e7a948d67c2..4db88defc68 100644 --- a/htdocs/install/mysql/tables/llx_societe.sql +++ b/htdocs/install/mysql/tables/llx_societe.sql @@ -17,7 +17,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_account.key.sql b/htdocs/install/mysql/tables/llx_societe_account.key.sql index 3e0dc130554..e86c12aa306 100644 --- a/htdocs/install/mysql/tables/llx_societe_account.key.sql +++ b/htdocs/install/mysql/tables/llx_societe_account.key.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- BEGIN MODULEBUILDER INDEXES diff --git a/htdocs/install/mysql/tables/llx_societe_account.sql b/htdocs/install/mysql/tables/llx_societe_account.sql index b307613ba6e..605a3d85313 100644 --- a/htdocs/install/mysql/tables/llx_societe_account.sql +++ b/htdocs/install/mysql/tables/llx_societe_account.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. -- -- Table to store accounts of thirdparties on external websites (like on stripe field site = 'stripe') -- or on local website (fk_website). diff --git a/htdocs/install/mysql/tables/llx_societe_address.sql b/htdocs/install/mysql/tables/llx_societe_address.sql index 8ae2d07f389..626b0155519 100644 --- a/htdocs/install/mysql/tables/llx_societe_address.sql +++ b/htdocs/install/mysql/tables/llx_societe_address.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== @@ -34,4 +34,4 @@ create table llx_societe_address note text, -- fk_user_creat integer, fk_user_modif integer -)ENGINE=innodb; \ No newline at end of file +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_commerciaux.key.sql b/htdocs/install/mysql/tables/llx_societe_commerciaux.key.sql index df32671ba6a..300857fffc5 100644 --- a/htdocs/install/mysql/tables/llx_societe_commerciaux.key.sql +++ b/htdocs/install/mysql/tables/llx_societe_commerciaux.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_commerciaux.sql b/htdocs/install/mysql/tables/llx_societe_commerciaux.sql index 20083645638..d8f58825239 100644 --- a/htdocs/install/mysql/tables/llx_societe_commerciaux.sql +++ b/htdocs/install/mysql/tables/llx_societe_commerciaux.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_contacts.key.sql b/htdocs/install/mysql/tables/llx_societe_contacts.key.sql new file mode 100644 index 00000000000..2b2eae8b2ca --- /dev/null +++ b/htdocs/install/mysql/tables/llx_societe_contacts.key.sql @@ -0,0 +1,22 @@ +-- ======================================================================== +-- Copyright (C) 2019 Florian HENRY +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + +ALTER TABLE llx_societe_contacts ADD UNIQUE INDEX idx_societe_contacts_idx1 (entity, fk_soc, fk_c_type_contact, fk_socpeople); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_c_type_contact FOREIGN KEY (fk_c_type_contact) REFERENCES llx_c_type_contact(rowid); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_soc FOREIGN KEY (fk_soc) REFERENCES llx_societe(rowid); +ALTER TABLE llx_societe_contacts ADD CONSTRAINT fk_societe_contacts_fk_socpeople FOREIGN KEY (fk_socpeople) REFERENCES llx_socpeople(rowid); diff --git a/htdocs/install/mysql/tables/llx_societe_contacts.sql b/htdocs/install/mysql/tables/llx_societe_contacts.sql new file mode 100644 index 00000000000..31d82f3003d --- /dev/null +++ b/htdocs/install/mysql/tables/llx_societe_contacts.sql @@ -0,0 +1,30 @@ +-- ======================================================================== +-- Copyright (C) 2019 Florian HENRY +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + + +create table llx_societe_contacts +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, + date_creation datetime NOT NULL, + fk_soc integer NOT NULL, + fk_c_type_contact int NOT NULL, + fk_socpeople integer NOT NULL, + tms TIMESTAMP, + import_key VARCHAR(14) +)ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_societe_extrafields.key.sql b/htdocs/install/mysql/tables/llx_societe_extrafields.key.sql index 9d89beebd37..c017f4af877 100644 --- a/htdocs/install/mysql/tables/llx_societe_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_societe_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_extrafields.sql b/htdocs/install/mysql/tables/llx_societe_extrafields.sql index ed509a73977..e277db15821 100644 --- a/htdocs/install/mysql/tables/llx_societe_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_societe_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_log.sql b/htdocs/install/mysql/tables/llx_societe_log.sql index c32ec508aa6..91a7ea65087 100644 --- a/htdocs/install/mysql/tables/llx_societe_log.sql +++ b/htdocs/install/mysql/tables/llx_societe_log.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_prices.sql b/htdocs/install/mysql/tables/llx_societe_prices.sql index fc072b73502..2b88340e611 100644 --- a/htdocs/install/mysql/tables/llx_societe_prices.sql +++ b/htdocs/install/mysql/tables/llx_societe_prices.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_remise.sql b/htdocs/install/mysql/tables/llx_societe_remise.sql index a94ff35085e..a3a265cce5f 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Historique evolution de la remise relative des tiers diff --git a/htdocs/install/mysql/tables/llx_societe_remise_except.key.sql b/htdocs/install/mysql/tables/llx_societe_remise_except.key.sql index 525af592041..61dcd7b3df6 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_except.key.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_except.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Remises exceptionnelles diff --git a/htdocs/install/mysql/tables/llx_societe_remise_except.sql b/htdocs/install/mysql/tables/llx_societe_remise_except.sql index 151e33d7f1e..50cbfae51c1 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_except.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_except.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Remises exceptionnelles diff --git a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql index 1e3e3edd5fe..3786b16b76a 100644 --- a/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql +++ b/htdocs/install/mysql/tables/llx_societe_remise_supplier.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- -- Historique evolution de la remise relative des tiers diff --git a/htdocs/install/mysql/tables/llx_societe_rib.key.sql b/htdocs/install/mysql/tables/llx_societe_rib.key.sql index 2c4511b1a5a..0fccde0395c 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.key.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_societe_rib.sql b/htdocs/install/mysql/tables/llx_societe_rib.sql index adabd0ab35f..45084179908 100644 --- a/htdocs/install/mysql/tables/llx_societe_rib.sql +++ b/htdocs/install/mysql/tables/llx_societe_rib.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- Table with the payment modes of a thirdparty (BAN, Paypal, Card, ...) -- ============================================================================= diff --git a/htdocs/install/mysql/tables/llx_socpeople.key.sql b/htdocs/install/mysql/tables/llx_socpeople.key.sql index 1640b598f8e..4d2a453e0fa 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.key.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_socpeople.sql b/htdocs/install/mysql/tables/llx_socpeople.sql index 4ed401e39da..99338d4a206 100644 --- a/htdocs/install/mysql/tables/llx_socpeople.sql +++ b/htdocs/install/mysql/tables/llx_socpeople.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_socpeople_extrafields.key.sql b/htdocs/install/mysql/tables/llx_socpeople_extrafields.key.sql index 0fad0f223cc..c5d531058e3 100644 --- a/htdocs/install/mysql/tables/llx_socpeople_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_socpeople_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql b/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql index 43b662de7de..66220ce7e98 100644 --- a/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_socpeople_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.key.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.key.sql index 2300a20638a..e19d85642c0 100644 --- a/htdocs/install/mysql/tables/llx_stock_mouvement.key.sql +++ b/htdocs/install/mysql/tables/llx_stock_mouvement.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_stock_mouvement.sql b/htdocs/install/mysql/tables/llx_stock_mouvement.sql index 29f263bc520..397165e296c 100644 --- a/htdocs/install/mysql/tables/llx_stock_mouvement.sql +++ b/htdocs/install/mysql/tables/llx_stock_mouvement.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_subscription.key.sql b/htdocs/install/mysql/tables/llx_subscription.key.sql index bf84246e8f4..1f6b067975d 100644 --- a/htdocs/install/mysql/tables/llx_subscription.key.sql +++ b/htdocs/install/mysql/tables/llx_subscription.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_subscription.sql b/htdocs/install/mysql/tables/llx_subscription.sql index cb53d9405e9..85e2ae716ef 100644 --- a/htdocs/install/mysql/tables/llx_subscription.sql +++ b/htdocs/install/mysql/tables/llx_subscription.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal.sql b/htdocs/install/mysql/tables/llx_supplier_proposal.sql index 904c5f256a8..5e7393112d8 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ======================================================================== CREATE TABLE llx_supplier_proposal ( diff --git a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql index fdd12cbf317..a13c74d0d04 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposal_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ======================================================================== CREATE TABLE llx_supplier_proposal_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet.key.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet.key.sql index cb6064c61f2..7baa0a2e165 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet.key.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql index b735046a340..6990bf334e5 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ======================================================================== CREATE TABLE llx_supplier_proposaldet ( @@ -55,4 +55,4 @@ CREATE TABLE llx_supplier_proposaldet ( multicurrency_total_tva double(24,8) DEFAULT 0, multicurrency_total_ttc double(24,8) DEFAULT 0, fk_unit integer DEFAULT NULL -) ENGINE=innodb; \ No newline at end of file +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql index 7bf951225b8..0501aecc68b 100644 --- a/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_supplier_proposaldet_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- ======================================================================== CREATE TABLE llx_supplier_proposaldet_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_takepos_floor_tables.sql b/htdocs/install/mysql/tables/llx_takepos_floor_tables.sql index c8cae17b5a2..ebac627236b 100644 --- a/htdocs/install/mysql/tables/llx_takepos_floor_tables.sql +++ b/htdocs/install/mysql/tables/llx_takepos_floor_tables.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_takepos_floor_tables( diff --git a/htdocs/install/mysql/tables/llx_ticket.key.sql b/htdocs/install/mysql/tables/llx_ticket.key.sql index ed7bfdd0165..948eba45a83 100755 --- a/htdocs/install/mysql/tables/llx_ticket.key.sql +++ b/htdocs/install/mysql/tables/llx_ticket.key.sql @@ -12,6 +12,6 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . ALTER TABLE llx_ticket ADD UNIQUE uk_ticket_track_id (track_id); diff --git a/htdocs/install/mysql/tables/llx_ticket.sql b/htdocs/install/mysql/tables/llx_ticket.sql index e9c45d5e0ab..3f3cdf58cd9 100644 --- a/htdocs/install/mysql/tables/llx_ticket.sql +++ b/htdocs/install/mysql/tables/llx_ticket.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . CREATE TABLE llx_ticket ( diff --git a/htdocs/install/mysql/tables/llx_ticket_extrafields.key.sql b/htdocs/install/mysql/tables/llx_ticket_extrafields.key.sql index 3baba56d9d4..d503dbb155f 100644 --- a/htdocs/install/mysql/tables/llx_ticket_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_ticket_extrafields.key.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_ticket_extrafields.sql b/htdocs/install/mysql/tables/llx_ticket_extrafields.sql index 760253353bc..538da09692e 100644 --- a/htdocs/install/mysql/tables/llx_ticket_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_ticket_extrafields.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- diff --git a/htdocs/install/mysql/tables/llx_tva.sql b/htdocs/install/mysql/tables/llx_tva.sql index 56678f4ffa6..2804d410e7d 100644 --- a/htdocs/install/mysql/tables/llx_tva.sql +++ b/htdocs/install/mysql/tables/llx_tva.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_user.key.sql b/htdocs/install/mysql/tables/llx_user.key.sql index eaed60a3b0b..047a10f1e90 100644 --- a/htdocs/install/mysql/tables/llx_user.key.sql +++ b/htdocs/install/mysql/tables/llx_user.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user.sql b/htdocs/install/mysql/tables/llx_user.sql index ac29410873a..a5ff97a0e15 100644 --- a/htdocs/install/mysql/tables/llx_user.sql +++ b/htdocs/install/mysql/tables/llx_user.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- =========================================================================== create table llx_user diff --git a/htdocs/install/mysql/tables/llx_user_alert.sql b/htdocs/install/mysql/tables/llx_user_alert.sql index 81752f2698f..cded256de70 100644 --- a/htdocs/install/mysql/tables/llx_user_alert.sql +++ b/htdocs/install/mysql/tables/llx_user_alert.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_user_clicktodial.sql b/htdocs/install/mysql/tables/llx_user_clicktodial.sql index bdaf90e8ae9..e6b02be0cbc 100644 --- a/htdocs/install/mysql/tables/llx_user_clicktodial.sql +++ b/htdocs/install/mysql/tables/llx_user_clicktodial.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_employment.key.sql b/htdocs/install/mysql/tables/llx_user_employment.key.sql index fd0aa62567c..c741ba5a141 100644 --- a/htdocs/install/mysql/tables/llx_user_employment.key.sql +++ b/htdocs/install/mysql/tables/llx_user_employment.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_employment.sql b/htdocs/install/mysql/tables/llx_user_employment.sql index 80520ce3dd8..ff2a87028d4 100644 --- a/htdocs/install/mysql/tables/llx_user_employment.sql +++ b/htdocs/install/mysql/tables/llx_user_employment.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- This table can be used to store employee working contracts -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_extrafields.key.sql b/htdocs/install/mysql/tables/llx_user_extrafields.key.sql index 387934ba9be..92d5ce47f22 100644 --- a/htdocs/install/mysql/tables/llx_user_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_user_extrafields.key.sql @@ -15,7 +15,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_extrafields.sql b/htdocs/install/mysql/tables/llx_user_extrafields.sql index b3c47a0cf0d..b7ba9116630 100644 --- a/htdocs/install/mysql/tables/llx_user_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_user_extrafields.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_param.key.sql b/htdocs/install/mysql/tables/llx_user_param.key.sql index b37bd16f3f8..a2ad6de46a0 100644 --- a/htdocs/install/mysql/tables/llx_user_param.key.sql +++ b/htdocs/install/mysql/tables/llx_user_param.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_param.sql b/htdocs/install/mysql/tables/llx_user_param.sql index 7738cab93de..c72c1bda9eb 100644 --- a/htdocs/install/mysql/tables/llx_user_param.sql +++ b/htdocs/install/mysql/tables/llx_user_param.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_rib.sql b/htdocs/install/mysql/tables/llx_user_rib.sql index d6d397c5787..1349e77a77b 100644 --- a/htdocs/install/mysql/tables/llx_user_rib.sql +++ b/htdocs/install/mysql/tables/llx_user_rib.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================= diff --git a/htdocs/install/mysql/tables/llx_user_rights.key.sql b/htdocs/install/mysql/tables/llx_user_rights.key.sql index 51f95566651..05041e11021 100644 --- a/htdocs/install/mysql/tables/llx_user_rights.key.sql +++ b/htdocs/install/mysql/tables/llx_user_rights.key.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_user_rights.sql b/htdocs/install/mysql/tables/llx_user_rights.sql index 092243b2c46..f057fbee23a 100644 --- a/htdocs/install/mysql/tables/llx_user_rights.sql +++ b/htdocs/install/mysql/tables/llx_user_rights.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup.key.sql b/htdocs/install/mysql/tables/llx_usergroup.key.sql index c3ee77bd62e..083f6ef205c 100644 --- a/htdocs/install/mysql/tables/llx_usergroup.key.sql +++ b/htdocs/install/mysql/tables/llx_usergroup.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/mysql/tables/llx_usergroup.sql b/htdocs/install/mysql/tables/llx_usergroup.sql index cde18968d43..43bbba9dbb1 100644 --- a/htdocs/install/mysql/tables/llx_usergroup.sql +++ b/htdocs/install/mysql/tables/llx_usergroup.sql @@ -14,7 +14,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql b/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql index 378f4514539..6b73467018c 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql index eca555c4d78..e2e96f142d9 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_extrafields.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup_rights.key.sql b/htdocs/install/mysql/tables/llx_usergroup_rights.key.sql index 88da9c98875..db1d7a18315 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_rights.key.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_rights.key.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup_rights.sql b/htdocs/install/mysql/tables/llx_usergroup_rights.sql index a139dcc6317..63f36b03b0c 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_rights.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_rights.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup_user.key.sql b/htdocs/install/mysql/tables/llx_usergroup_user.key.sql index d05b45070d1..036a0dff289 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_user.key.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_user.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_usergroup_user.sql b/htdocs/install/mysql/tables/llx_usergroup_user.sql index 335cd58baac..29a8ae297dc 100644 --- a/htdocs/install/mysql/tables/llx_usergroup_user.sql +++ b/htdocs/install/mysql/tables/llx_usergroup_user.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_website.key.sql b/htdocs/install/mysql/tables/llx_website.key.sql index f3919997476..2d7e66b503c 100644 --- a/htdocs/install/mysql/tables/llx_website.key.sql +++ b/htdocs/install/mysql/tables/llx_website.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_website.sql b/htdocs/install/mysql/tables/llx_website.sql index 697e76b22a2..b5764565a34 100644 --- a/htdocs/install/mysql/tables/llx_website.sql +++ b/htdocs/install/mysql/tables/llx_website.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_website_extrafields.key.sql b/htdocs/install/mysql/tables/llx_website_extrafields.key.sql index 1963744b701..1804d5978e4 100644 --- a/htdocs/install/mysql/tables/llx_website_extrafields.key.sql +++ b/htdocs/install/mysql/tables/llx_website_extrafields.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =================================================================== diff --git a/htdocs/install/mysql/tables/llx_website_extrafields.sql b/htdocs/install/mysql/tables/llx_website_extrafields.sql index 7ca3b94c713..ff39e2c51c4 100644 --- a/htdocs/install/mysql/tables/llx_website_extrafields.sql +++ b/htdocs/install/mysql/tables/llx_website_extrafields.sql @@ -11,7 +11,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see http://www.gnu.org/licenses/. +-- along with this program. If not, see https://www.gnu.org/licenses/. CREATE TABLE llx_website_extrafields ( diff --git a/htdocs/install/mysql/tables/llx_website_page.key.sql b/htdocs/install/mysql/tables/llx_website_page.key.sql index 14488e588dc..ef97684fbbc 100644 --- a/htdocs/install/mysql/tables/llx_website_page.key.sql +++ b/htdocs/install/mysql/tables/llx_website_page.key.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- =========================================================================== diff --git a/htdocs/install/mysql/tables/llx_website_page.sql b/htdocs/install/mysql/tables/llx_website_page.sql index 6d32805dc3f..840e12e0141 100644 --- a/htdocs/install/mysql/tables/llx_website_page.sql +++ b/htdocs/install/mysql/tables/llx_website_page.sql @@ -12,7 +12,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ======================================================================== diff --git a/htdocs/install/mysql/tables/llx_zapier_hook.key.sql b/htdocs/install/mysql/tables/llx_zapier_hook.key.sql new file mode 100644 index 00000000000..4bce26ae0ea --- /dev/null +++ b/htdocs/install/mysql/tables/llx_zapier_hook.key.sql @@ -0,0 +1,22 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see http://www.gnu.org/licenses/. + + +--ALTER TABLE llx_zapier_hook ADD INDEX idx_fieldobject (fieldobject); + +--ALTER TABLE llx_zapier_hook ADD UNIQUE INDEX uk_zapier_hook_fieldxy(fieldx, fieldy); + +--ALTER TABLE llx_zapier_hook ADD CONSTRAINT llx_zapier_hook_fk_field FOREIGN KEY (fk_field) REFERENCES llx_zapier_myotherobject(rowid); + diff --git a/htdocs/install/mysql/tables/llx_zapier_hook.sql b/htdocs/install/mysql/tables/llx_zapier_hook.sql new file mode 100644 index 00000000000..27d56352bff --- /dev/null +++ b/htdocs/install/mysql/tables/llx_zapier_hook.sql @@ -0,0 +1,29 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- This program is free software: you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation, either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see http://www.gnu.org/licenses/. + + +CREATE TABLE llx_zapier_hook( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1 NOT NULL, + url varchar(255), + event varchar(255), + module varchar(128), + action varchar(128), + status integer, + date_creation DATETIME NOT NULL, + fk_user integer NOT NULL, + tms TIMESTAMP NOT NULL, + import_key varchar(14) +) ENGINE=innodb; diff --git a/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql new file mode 100644 index 00000000000..09fef4cc399 --- /dev/null +++ b/htdocs/install/mysql/tables/llx_zapier_hook_extrafields.sql @@ -0,0 +1,23 @@ +-- Copyright (C) ---Put here your own copyright and developer email--- +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see http://www.gnu.org/licenses/. + +create table llx_zapier_hook_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; + diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql index 0ad28341ea9..40628f93ac6 100644 --- a/htdocs/install/pgsql/functions/functions.sql +++ b/htdocs/install/pgsql/functions/functions.sql @@ -13,7 +13,7 @@ -- GNU General Public License for more details. -- -- You should have received a copy of the GNU General Public License --- along with this program. If not, see . +-- along with this program. If not, see . -- -- ============================================================================ diff --git a/htdocs/install/phpinfo.php b/htdocs/install/phpinfo.php index 895436c2069..fb5d604e8f5 100644 --- a/htdocs/install/phpinfo.php +++ b/htdocs/install/phpinfo.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/install/repair.php b/htdocs/install/repair.php index 95ad4d2d563..517b5843f30 100644 --- a/htdocs/install/repair.php +++ b/htdocs/install/repair.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/install/step1.php b/htdocs/install/step1.php index 508f60cfd9a..9f589de42b1 100644 --- a/htdocs/install/step1.php +++ b/htdocs/install/step1.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -80,6 +80,7 @@ if (@file_exists($forcedfile)) { // If forced install is enabled, replace the post values. These are empty because form fields are disabled. if ($force_install_noedit) { $main_dir = detect_dolibarr_main_document_root(); + if (!empty($argv[1])) $main_dir = $argv[1]; // override when executing the script in command line if (!empty($force_install_main_data_root)) { $main_data_dir = $force_install_main_data_root; } else { diff --git a/htdocs/install/step2.php b/htdocs/install/step2.php index 46c84a01351..7a4a3a92595 100644 --- a/htdocs/install/step2.php +++ b/htdocs/install/step2.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -64,6 +64,8 @@ if ($conffile == "/etc/dolibarr/conf.php") $forcedfile="/etc/dolibarr/install.fo if (@file_exists($forcedfile)) { $useforcedwizard = true; include_once $forcedfile; + // test for travis + if (!empty($argv[1]) && $argv[1] == "set") $action = "set"; } dolibarr_install_syslog("- step2: entering step2.php page"); diff --git a/htdocs/install/step4.php b/htdocs/install/step4.php index 342ec82d0fd..b8feb89d246 100644 --- a/htdocs/install/step4.php +++ b/htdocs/install/step4.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/install/step5.php b/htdocs/install/step5.php index 5bdaa9ca017..b1069618414 100644 --- a/htdocs/install/step5.php +++ b/htdocs/install/step5.php @@ -17,7 +17,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/install/upgrade.php b/htdocs/install/upgrade.php index 1e912545638..fb052bca77e 100644 --- a/htdocs/install/upgrade.php +++ b/htdocs/install/upgrade.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Upgrade scripts can be ran from command line with syntax: * diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 24d73da5485..3554df8f6bc 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -16,7 +16,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . * * Upgrade2 scripts can be ran from command line with syntax: * diff --git a/htdocs/langs/ar_SA/assets.lang b/htdocs/langs/ar_SA/assets.lang index ce6605de742..6c5867709d9 100644 --- a/htdocs/langs/ar_SA/assets.lang +++ b/htdocs/langs/ar_SA/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ar_SA/ticket.lang b/htdocs/langs/ar_SA/ticket.lang index 076ab0797a0..86b7893433f 100644 --- a/htdocs/langs/ar_SA/ticket.lang +++ b/htdocs/langs/ar_SA/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/bg_BG/assets.lang b/htdocs/langs/bg_BG/assets.lang index aabd6c6e46c..0b30dc5762a 100644 --- a/htdocs/langs/bg_BG/assets.lang +++ b/htdocs/langs/bg_BG/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/bg_BG/ticket.lang b/htdocs/langs/bg_BG/ticket.lang index 8a751a908cf..fc071253257 100644 --- a/htdocs/langs/bg_BG/ticket.lang +++ b/htdocs/langs/bg_BG/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/bn_BD/assets.lang b/htdocs/langs/bn_BD/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/bn_BD/assets.lang +++ b/htdocs/langs/bn_BD/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/bn_BD/ticket.lang b/htdocs/langs/bn_BD/ticket.lang index 70bd8220af0..ba5c6af8a1c 100644 --- a/htdocs/langs/bn_BD/ticket.lang +++ b/htdocs/langs/bn_BD/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/bs_BA/assets.lang b/htdocs/langs/bs_BA/assets.lang index cf5421f2ca6..1b2fe9c6aef 100644 --- a/htdocs/langs/bs_BA/assets.lang +++ b/htdocs/langs/bs_BA/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/bs_BA/ticket.lang b/htdocs/langs/bs_BA/ticket.lang index 0f8c71844e8..9f250c7c013 100644 --- a/htdocs/langs/bs_BA/ticket.lang +++ b/htdocs/langs/bs_BA/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ca_ES/assets.lang b/htdocs/langs/ca_ES/assets.lang index 80bec6cd140..5d9b4fd3896 100644 --- a/htdocs/langs/ca_ES/assets.lang +++ b/htdocs/langs/ca_ES/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ca_ES/ticket.lang b/htdocs/langs/ca_ES/ticket.lang index 6275b476511..71d80c3a6ec 100644 --- a/htdocs/langs/ca_ES/ticket.lang +++ b/htdocs/langs/ca_ES/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/cs_CZ/assets.lang b/htdocs/langs/cs_CZ/assets.lang index 6c782ebd9bc..05d59170d31 100644 --- a/htdocs/langs/cs_CZ/assets.lang +++ b/htdocs/langs/cs_CZ/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/cs_CZ/ticket.lang b/htdocs/langs/cs_CZ/ticket.lang index 54c48461b2e..08259f6dca2 100644 --- a/htdocs/langs/cs_CZ/ticket.lang +++ b/htdocs/langs/cs_CZ/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/da_DK/assets.lang b/htdocs/langs/da_DK/assets.lang index 3ac03fd3468..5077e866641 100644 --- a/htdocs/langs/da_DK/assets.lang +++ b/htdocs/langs/da_DK/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/da_DK/ticket.lang b/htdocs/langs/da_DK/ticket.lang index 2c7bb51194d..b4e65c72b45 100644 --- a/htdocs/langs/da_DK/ticket.lang +++ b/htdocs/langs/da_DK/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/de_DE/assets.lang b/htdocs/langs/de_DE/assets.lang index 95aa7c833db..02fb914fdfc 100644 --- a/htdocs/langs/de_DE/assets.lang +++ b/htdocs/langs/de_DE/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/de_DE/ticket.lang b/htdocs/langs/de_DE/ticket.lang index fbb2e98e2a8..9162cb27f53 100644 --- a/htdocs/langs/de_DE/ticket.lang +++ b/htdocs/langs/de_DE/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/el_GR/assets.lang b/htdocs/langs/el_GR/assets.lang index 15f7986f3ad..5a6b839608a 100644 --- a/htdocs/langs/el_GR/assets.lang +++ b/htdocs/langs/el_GR/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/el_GR/ticket.lang b/htdocs/langs/el_GR/ticket.lang index cbe58ac08cf..1293b461de9 100644 --- a/htdocs/langs/el_GR/ticket.lang +++ b/htdocs/langs/el_GR/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/en_US/accountancy.lang b/htdocs/langs/en_US/accountancy.lang index 8e44c378ba6..a76e79aa701 100644 --- a/htdocs/langs/en_US/accountancy.lang +++ b/htdocs/langs/en_US/accountancy.lang @@ -1,4 +1,5 @@ -# Dolibarr language file - en_US - Accounting Expert +# Dolibarr language file - en_US - Accountancy (Double entries) +Accountancy=Accountancy Accounting=Accounting ACCOUNTING_EXPORT_SEPARATORCSV=Column separator for export file ACCOUNTING_EXPORT_DATE=Date format for export file @@ -256,6 +257,7 @@ ListOfProductsWithoutAccountingAccount=List of products not bound to any account ChangeBinding=Change the binding Accounted=Accounted in ledger NotYetAccounted=Not yet accounted in ledger +ShowTutorial=Show Tutorial ## Admin ApplyMassCategories=Apply mass categories @@ -264,7 +266,7 @@ CategoryDeleted=Category for the accounting account has been removed AccountingJournals=Accounting journals AccountingJournal=Accounting journal NewAccountingJournal=New accounting journal -ShowAccoutingJournal=Show accounting journal +ShowAccountingJournal=Show accounting journal NatureOfJournal=Nature of Journal AccountingJournalType1=Miscellaneous operations AccountingJournalType2=Sales diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang index e530a8a47de..afce2e4fa34 100644 --- a/htdocs/langs/en_US/admin.lang +++ b/htdocs/langs/en_US/admin.lang @@ -526,7 +526,7 @@ Module50Desc=Management of Products Module51Name=Mass mailings Module51Desc=Mass paper mailing management Module52Name=Stocks -Module52Desc=Stock management (for products only) +Module52Desc=Stock management Module53Name=Services Module53Desc=Management of Services Module54Name=Contracts/Subscriptions @@ -1462,7 +1462,7 @@ LDAPFieldGroupid=Group id LDAPFieldGroupidExample=Exemple : gidnumber LDAPFieldUserid=User id LDAPFieldUseridExample=Exemple : uidnumber -LDAPFieldHomedirectory=Home directory prefix +LDAPFieldHomedirectory=Home directory LDAPFieldHomedirectoryExample=Exemple : homedirectory LDAPFieldHomedirectoryprefix=Home directory prefix LDAPSetupNotComplete=LDAP setup not complete (go on others tabs) @@ -1586,6 +1586,7 @@ FCKeditorForProductDetails=WYSIWIG creation/edition of products details lines fo FCKeditorForMailing= WYSIWIG creation/edition for mass eMailings (Tools->eMailing) FCKeditorForUserSignature=WYSIWIG creation/edition of user signature FCKeditorForMail=WYSIWIG creation/edition for all mail (except Tools->eMailing) +FCKeditorForTicket=WYSIWIG creation/edition for tickets ##### Stock ##### StockSetup=Stock module setup IfYouUsePointOfSaleCheckModule=If you use the Point of Sale module (POS) provided by default or an external module, this setup may be ignored by your POS module. Most POS modules are designed by default to create an invoice immediately and decrease stock irrespective of the options here. So if you need or not to have a stock decrease when registering a sale from your POS, check also your POS module setup. diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang index 30c2a3d4038..8ad19e06695 100644 --- a/htdocs/langs/en_US/agenda.lang +++ b/htdocs/langs/en_US/agenda.lang @@ -86,6 +86,10 @@ InvoiceDeleted=Invoice deleted PRODUCT_CREATEInDolibarr=Product %s created PRODUCT_MODIFYInDolibarr=Product %s modified PRODUCT_DELETEInDolibarr=Product %s deleted +HOLIDAY_CREATEInDolibarr=Request for leave %s created +HOLIDAY_MODIFYInDolibarr=Request for leave %s modified +HOLIDAY_VALIDATEDInDolibarr=Request for leave %s validated +HOLIDAY_DELETEInDolibarr=Request for leave %s deleted EXPENSE_REPORT_CREATEInDolibarr=Expense report %s created EXPENSE_REPORT_VALIDATEInDolibarr=Expense report %s validated EXPENSE_REPORT_APPROVEInDolibarr=Expense report %s approved diff --git a/htdocs/langs/en_US/assets.lang b/htdocs/langs/en_US/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/en_US/assets.lang +++ b/htdocs/langs/en_US/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/en_US/bookmarks.lang b/htdocs/langs/en_US/bookmarks.lang index 5330ab6e87c..87466cadcfa 100644 --- a/htdocs/langs/en_US/bookmarks.lang +++ b/htdocs/langs/en_US/bookmarks.lang @@ -18,3 +18,4 @@ SetHereATitleForLink=Set a name for the bookmark UseAnExternalHttpLinkOrRelativeDolibarrLink=Use an external/absolute link (https://URL) or an internal/relative link (/DOLIBARR_ROOT/htdocs/...) ChooseIfANewWindowMustBeOpenedOnClickOnBookmark=Choose if the linked page should open in the current tab or a new tab BookmarksManagement=Bookmarks management +BookmarksMenuShortCut=Ctrl + shift + m diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index b1ab8e41fbc..b7f7037c94d 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -19,6 +19,7 @@ BoxLastContacts=Latest contacts/addresses BoxLastMembers=Latest members BoxFicheInter=Latest interventions BoxCurrentAccounts=Open accounts balance +BoxTitleMemberNextBirthdays=Birthdays of this month (members) BoxTitleLastRssInfos=Latest %s news from %s BoxTitleLastProducts=Products/Services: last %s modified BoxTitleProductsAlertStock=Products: stock alert @@ -34,6 +35,7 @@ BoxTitleLastFicheInter=Latest %s modified interventions BoxTitleOldestUnpaidCustomerBills=Customer Invoices: oldest %s unpaid BoxTitleOldestUnpaidSupplierBills=Vendor Invoices: oldest %s unpaid BoxTitleCurrentAccounts=Open Accounts: balances +BoxTitleSupplierOrdersAwaitingReception=Supplier orders awaiting reception BoxTitleLastModifiedContacts=Contacts/Addresses: last %s modified BoxMyLastBookmarks=Bookmarks: latest %s BoxOldestExpiredServices=Oldest active expired services @@ -84,4 +86,11 @@ ForProposals=Proposals LastXMonthRolling=The latest %s month rolling ChooseBoxToAdd=Add widget to your dashboard BoxAdded=Widget was added in your dashboard -BoxTitleUserBirthdaysOfMonth=Birthdays of this month \ No newline at end of file +BoxTitleUserBirthdaysOfMonth=Birthdays of this month (users) +BoxLastManualEntries=Last manual entries in accountancy +BoxTitleLastManualEntries=%s latest manual entries +NoRecordedManualEntries=No manual entries record in accountancy +BoxSuspenseAccount=Count accountancy operation with suspense account +BoxTitleSuspenseAccount=Number of unallocated lines +NumberOfLinesInSuspenseAccount=Number of line in suspense account +SuspenseAccountNotDefined=Suspense account isn't defined diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 33ea50dfb0f..0516de208fc 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -75,3 +75,5 @@ DirectPayment=Direct payment DirectPaymentButton=Direct cash payment button InvoiceIsAlreadyValidated=Invoice is already validated NoLinesToBill=No lines to bill +CustomReceipt=Custom Receipt +ReceiptName=Receipt Name diff --git a/htdocs/langs/en_US/categories.lang b/htdocs/langs/en_US/categories.lang index 4e83b2f0620..d5a4ba16bf0 100644 --- a/htdocs/langs/en_US/categories.lang +++ b/htdocs/langs/en_US/categories.lang @@ -90,3 +90,4 @@ ShowCategory=Show tag/category ByDefaultInList=By default in list ChooseCategory=Choose category StocksCategoriesArea=Warehouses Categories Area +UseOrOperatorForCategories=Use or operator for categories \ No newline at end of file diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang index 532fbf14cb7..a4ab22d47c5 100644 --- a/htdocs/langs/en_US/companies.lang +++ b/htdocs/langs/en_US/companies.lang @@ -298,6 +298,7 @@ FromContactName=Name: NoContactDefinedForThirdParty=No contact defined for this third party NoContactDefined=No contact defined DefaultContact=Default contact/address +ContactByDefaultFor=Default contact/address for AddThirdParty=Create third party DeleteACompany=Delete a company PersonalInformations=Personal data diff --git a/htdocs/langs/en_US/exports.lang b/htdocs/langs/en_US/exports.lang index 2ee374ee670..691a1770ac8 100644 --- a/htdocs/langs/en_US/exports.lang +++ b/htdocs/langs/en_US/exports.lang @@ -113,7 +113,7 @@ ExportDateFilter=YYYY, YYYYMM, YYYYMMDD: filters by one year/month/day
    YYYY+Y ExportNumericFilter=NNNNN filters by one value
    NNNNN+NNNNN filters over a range of values
    < NNNNN filters by lower values
    > NNNNN filters by higher values ImportFromLine=Import starting from line number EndAtLineNb=End at line number -ImportFromToLine=Limit range (From - To) eg. to omit header line(s) +ImportFromToLine=Limit range (From - To). Eg. to omit header line(s). SetThisValueTo2ToExcludeFirstLine=For example, set this value to 3 to exclude the 2 first lines.
    If the header lines are NOT omitted, this will result in multiple errors in the Import Simulation. KeepEmptyToGoToEndOfFile=Keep this field empty to process all lines to the end of the file. SelectPrimaryColumnsForUpdateAttempt=Select column(s) to use as primary key for an UPDATE import diff --git a/htdocs/langs/en_US/install.lang b/htdocs/langs/en_US/install.lang index 2fe7dc8c038..3ef3532a08e 100644 --- a/htdocs/langs/en_US/install.lang +++ b/htdocs/langs/en_US/install.lang @@ -13,6 +13,7 @@ PHPSupportPOSTGETOk=This PHP supports variables POST and GET. PHPSupportPOSTGETKo=It's possible your PHP setup does not support variables POST and/or GET. Check the parameter variables_order in php.ini. PHPSupportGD=This PHP supports GD graphical functions. PHPSupportCurl=This PHP supports Curl. +PHPSupportCalendar=This PHP supports calendars extensions. PHPSupportUTF8=This PHP supports UTF8 functions. PHPSupportIntl=This PHP supports Intl functions. PHPMemoryOK=Your PHP max session memory is set to %s. This should be enough. @@ -21,6 +22,7 @@ Recheck=Click here for a more detailed test ErrorPHPDoesNotSupportSessions=Your PHP installation does not support sessions. This feature is required to allow Dolibarr to work. Check your PHP setup and permissions of the sessions directory. ErrorPHPDoesNotSupportGD=Your PHP installation does not support GD graphical functions. No graphs will be available. ErrorPHPDoesNotSupportCurl=Your PHP installation does not support Curl. +ErrorPHPDoesNotSupportCalendar=Your PHP installation does not support php calendar extensions. ErrorPHPDoesNotSupportUTF8=Your PHP installation does not support UTF8 functions. Dolibarr cannot work correctly. Resolve this before installing Dolibarr. ErrorPHPDoesNotSupportIntl=Your PHP installation does not support Intl functions. ErrorDirDoesNotExists=Directory %s does not exist. diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang index a69947dfd8c..04f45f8de4b 100644 --- a/htdocs/langs/en_US/main.lang +++ b/htdocs/langs/en_US/main.lang @@ -991,4 +991,17 @@ ToApprove=To approve GlobalOpenedElemView=Global view NoArticlesFoundForTheKeyword=No article found for the keyword '%s' NoArticlesFoundForTheCategory=No article found for the category -ToAcceptRefuse=To accept | refuse \ No newline at end of file +ToAcceptRefuse=To accept | refuse +ContactDefault_agenda=Event +ContactDefault_commande=Order +ContactDefault_contrat=Contract +ContactDefault_facture=Invoice +ContactDefault_fichinter=Intervention +ContactDefault_invoice_supplier=Supplier Invoice +ContactDefault_order_supplier=Supplier Order +ContactDefault_project=Project +ContactDefault_project_task=Task +ContactDefault_propal=Proposal +ContactDefault_supplier_proposal=Supplier Proposal +ContactDefault_ticketsup=Ticket +ContactAddedAutomatically=Contact added from contact thirdparty roles diff --git a/htdocs/langs/en_US/members.lang b/htdocs/langs/en_US/members.lang index 5886c598d52..dd0a5bf49e2 100644 --- a/htdocs/langs/en_US/members.lang +++ b/htdocs/langs/en_US/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Terminated member MemberStatusResiliatedShort=Terminated MembersStatusToValid=Draft members MembersStatusResiliated=Terminated members +MemberStatusNoSubscription=Validated (no subscription needed) +MemberStatusNoSubscriptionShort=Validated +SubscriptionNotNeeded=No subscription needed NewCotisation=New contribution PaymentSubscription=New contribution payment SubscriptionEndDate=Subscription's end date diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang index 96efb3be55f..29bb88a80a4 100644 --- a/htdocs/langs/en_US/mrp.lang +++ b/htdocs/langs/en_US/mrp.lang @@ -4,6 +4,7 @@ LatestBOMModified=Latest %s Bills of materials modified BillOfMaterials=Bill of Material BOMsSetup=Setup of module BOM ListOfBOMs=List of bills of material - BOM +ListOfManufacturingOrders=List of Manufacturing Orders NewBOM=New bill of material ProductBOMHelp=Product to create with this BOM BOMsNumberingModules=BOM numbering templates @@ -16,4 +17,8 @@ ValueOfMeansLoss=Value of 0.95 means an average of 5%% of loss during the produc DeleteBillOfMaterials=Delete Bill Of Materials ConfirmDeleteBillOfMaterials=Are you sure you want to delete this Bill Of Material? MenuMRP=Manufacturing Orders -NewMO=New Manufacturing Order \ No newline at end of file +NewMO=New Manufacturing Order +QtyToProduce=Qty to produce +DateStartPlannedMo=Date start planned +DateEndPlannedMo=Date end planned +KeepEmptyForAsap=Empty means 'As Soon As Possible' \ No newline at end of file diff --git a/htdocs/langs/en_US/orders.lang b/htdocs/langs/en_US/orders.lang index 25859ce11d8..a010a64b907 100644 --- a/htdocs/langs/en_US/orders.lang +++ b/htdocs/langs/en_US/orders.lang @@ -25,6 +25,8 @@ OrdersToBill=Sales orders delivered OrdersInProcess=Sales orders in process OrdersToProcess=Sales orders to process SuppliersOrdersToProcess=Purchase orders to process +SuppliersOrdersAwaitingReception=Purchase orders awaiting reception +AwaitingReception=Awaiting reception StatusOrderCanceledShort=Canceled StatusOrderDraftShort=Draft StatusOrderValidatedShort=Validated diff --git a/htdocs/langs/en_US/other.lang b/htdocs/langs/en_US/other.lang index b92e21d69b3..34590a924be 100644 --- a/htdocs/langs/en_US/other.lang +++ b/htdocs/langs/en_US/other.lang @@ -6,7 +6,7 @@ TMenuTools=Tools ToolsDesc=All tools not included in other menu entries are grouped here.
    All the tools can be accessed via the left menu. Birthday=Birthday BirthdayDate=Birthday date -DateToBirth=Date of birth +DateToBirth=Birth date BirthdayAlertOn=birthday alert active BirthdayAlertOff=birthday alert inactive TransKey=Translation of the key TransKey diff --git a/htdocs/langs/en_US/projects.lang b/htdocs/langs/en_US/projects.lang index 8d3297b6587..39cbe6ce6a9 100644 --- a/htdocs/langs/en_US/projects.lang +++ b/htdocs/langs/en_US/projects.lang @@ -86,8 +86,8 @@ WhichIamLinkedToProject=which I'm linked to project Time=Time ListOfTasks=List of tasks GoToListOfTimeConsumed=Go to list of time consumed -GoToListOfTasks=Go to list of tasks -GoToGanttView=Go to Gantt view +GoToListOfTasks=Show as list +GoToGanttView=show as Gantt GanttView=Gantt View ListProposalsAssociatedProject=List of the commercial proposals related to the project ListOrdersAssociatedProject=List of sales orders related to the project diff --git a/htdocs/langs/en_US/resource.lang b/htdocs/langs/en_US/resource.lang index 134cc4c87a3..c4953c460da 100644 --- a/htdocs/langs/en_US/resource.lang +++ b/htdocs/langs/en_US/resource.lang @@ -36,4 +36,4 @@ ResourceTypeCode=Resource type code ImportDataset_resource_1=Resources ErrorResourcesAlreadyInUse=Some resources are in use -ErrorResourceUseInEvent=%s use in %s event \ No newline at end of file +ErrorResourceUseInEvent=%s used in %s event \ No newline at end of file diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang index 70bd8220af0..14f06f8831f 100644 --- a/htdocs/langs/en_US/ticket.lang +++ b/htdocs/langs/en_US/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic @@ -137,6 +137,10 @@ NoUnreadTicketsFound=No unread ticket found TicketViewAllTickets=View all tickets TicketViewNonClosedOnly=View only open tickets TicketStatByStatus=Tickets by status +OrderByDateAsc=Sort by ascending date +OrderByDateDesc=Sort by descending date +ShowAsConversation=Show as conversation list +MessageListViewType=Show as table list # # Ticket card @@ -222,6 +226,8 @@ TicketConfirmChangeStatus=Confirm the status change: %s ? TicketLogStatusChanged=Status changed: %s to %s TicketNotNotifyTiersAtCreate=Not notify company at create Unread=Unread +TicketNotCreatedFromPublicInterface=Not available. Ticket was not created from public interface. +PublicInterfaceNotEnabled=Public interface was not enabled # # Logs diff --git a/htdocs/langs/en_US/users.lang b/htdocs/langs/en_US/users.lang index fb35cb5e112..8780e7d2c0d 100644 --- a/htdocs/langs/en_US/users.lang +++ b/htdocs/langs/en_US/users.lang @@ -109,4 +109,7 @@ UserLogoff=User logout UserLogged=User logged DateEmployment=Employment Start Date DateEmploymentEnd=Employment End Date -CantDisableYourself=You can't disable your own user record \ No newline at end of file +CantDisableYourself=You can't disable your own user record +ForceUserExpenseValidator=Force expense report validator +ForceUserHolidayValidator=Force leave request validator +ValidatorIsSupervisorByDefault=By default, the validator is the supervisor of the user. Keep empty to keep this behaviour. diff --git a/htdocs/langs/en_US/zapier.lang b/htdocs/langs/en_US/zapier.lang new file mode 100644 index 00000000000..07eb8460efa --- /dev/null +++ b/htdocs/langs/en_US/zapier.lang @@ -0,0 +1,28 @@ +# Copyright (C) 2019 Frédéric FRANCE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# Generic +# + +# Module label 'ModuleZapierForDolibarrName' +ModuleZapierForDolibarrName = Zapier for Dolibarr +# Module description 'ModuleZapierForDolibarrDesc' +ModuleZapierForDolibarrDesc = Zapier for Dolibarr module + +# +# Admin page +# +ZapierForDolibarrSetup = Setup of Zapier for Dolibarr \ No newline at end of file diff --git a/htdocs/langs/es_ES/assets.lang b/htdocs/langs/es_ES/assets.lang index c52575ee120..76c7e101a2f 100644 --- a/htdocs/langs/es_ES/assets.lang +++ b/htdocs/langs/es_ES/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/es_ES/ticket.lang b/htdocs/langs/es_ES/ticket.lang index 79d16337141..c835310d4fb 100644 --- a/htdocs/langs/es_ES/ticket.lang +++ b/htdocs/langs/es_ES/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/et_EE/assets.lang b/htdocs/langs/et_EE/assets.lang index 0c25eb8ba5a..6b8ae44daf5 100644 --- a/htdocs/langs/et_EE/assets.lang +++ b/htdocs/langs/et_EE/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/et_EE/ticket.lang b/htdocs/langs/et_EE/ticket.lang index d49566af741..3c3ebaefb75 100644 --- a/htdocs/langs/et_EE/ticket.lang +++ b/htdocs/langs/et_EE/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/eu_ES/assets.lang b/htdocs/langs/eu_ES/assets.lang index 752835160da..5bdb0b542f7 100644 --- a/htdocs/langs/eu_ES/assets.lang +++ b/htdocs/langs/eu_ES/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/eu_ES/ticket.lang b/htdocs/langs/eu_ES/ticket.lang index bb2b09de189..5cb20c2de4a 100644 --- a/htdocs/langs/eu_ES/ticket.lang +++ b/htdocs/langs/eu_ES/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fa_IR/assets.lang b/htdocs/langs/fa_IR/assets.lang index 313b9b4b171..245773b4fa6 100644 --- a/htdocs/langs/fa_IR/assets.lang +++ b/htdocs/langs/fa_IR/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fa_IR/ticket.lang b/htdocs/langs/fa_IR/ticket.lang index f42632e6a3f..33a0748926e 100644 --- a/htdocs/langs/fa_IR/ticket.lang +++ b/htdocs/langs/fa_IR/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fi_FI/assets.lang b/htdocs/langs/fi_FI/assets.lang index b71c2168799..3646f4159f1 100644 --- a/htdocs/langs/fi_FI/assets.lang +++ b/htdocs/langs/fi_FI/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fi_FI/ticket.lang b/htdocs/langs/fi_FI/ticket.lang index 75662ffe3fb..32509cdcae2 100644 --- a/htdocs/langs/fi_FI/ticket.lang +++ b/htdocs/langs/fi_FI/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang index 3d15d7fe3d4..8fa04de8b11 100644 --- a/htdocs/langs/fr_FR/admin.lang +++ b/htdocs/langs/fr_FR/admin.lang @@ -1586,6 +1586,7 @@ FCKeditorForProductDetails=Création/édition WYSIWIG des lignes détails produi FCKeditorForMailing= Création/édition WYSIWIG des emailings (Outils->Emailings) FCKeditorForUserSignature=Création/édition WYSIWIG de la signature des utilisateurs FCKeditorForMail=Création/édition WYSIWIG tous les emails (sauf Outils->Emailings) +FCKeditorForTicket=Création/édition WYSIWIG pour les tickets ##### Stock ##### StockSetup=Configuration du module Stock / Entrepôt IfYouUsePointOfSaleCheckModule=Si vous utilisez un module Point de Vente (module POS fourni par défaut ou un autre module externe), cette configuration peut être ignoré par votre module point de vente. La plupart de modules Point de Vente sont conçus pour créer immédiatement une facture et de réduire les stocks par défaut quelles que soient les options ici. Donc, si vous avez besoin ou non d'avoir une diminution du stock lors de l'enregistrement d'une vente dans votre Point de Vente, vérifiez également la configuration de votre module POS. diff --git a/htdocs/langs/fr_FR/assets.lang b/htdocs/langs/fr_FR/assets.lang index b277f033860..b3de8a0f525 100644 --- a/htdocs/langs/fr_FR/assets.lang +++ b/htdocs/langs/fr_FR/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fr_FR/members.lang b/htdocs/langs/fr_FR/members.lang index d70bb3139f0..06461e45acb 100644 --- a/htdocs/langs/fr_FR/members.lang +++ b/htdocs/langs/fr_FR/members.lang @@ -52,6 +52,9 @@ MemberStatusResiliated=Adhérent résilié MemberStatusResiliatedShort=Résilié MembersStatusToValid=Adhérents brouillons MembersStatusResiliated=Adhérents résiliés +MemberStatusNoSubscription=Validé (pas de souscription requise) +MemberStatusNoSubscriptionShort=Validé +SubscriptionNotNeeded=Pas de souscription requise NewCotisation=Nouvelle adhésion PaymentSubscription=Paiement cotisation SubscriptionEndDate=Date de fin adhésion diff --git a/htdocs/langs/fr_FR/ticket.lang b/htdocs/langs/fr_FR/ticket.lang index 52a8eb7804c..9154449ab20 100644 --- a/htdocs/langs/fr_FR/ticket.lang +++ b/htdocs/langs/fr_FR/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/fr_FR/zapier.lang b/htdocs/langs/fr_FR/zapier.lang new file mode 100644 index 00000000000..78103a55bae --- /dev/null +++ b/htdocs/langs/fr_FR/zapier.lang @@ -0,0 +1,48 @@ +# Copyright (C) 2019 Frédéric FRANCE +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# +# Générique +# + +# Module label 'ModuleZapierForDolibarrName' +ModuleZapierForDolibarrName = ZapierForDolibarr +# Module description 'ModuleZapierForDolibarrDesc' +ModuleZapierForDolibarrDesc = Description de ZapierForDolibarr + +# +# Page d'administration +# +ZapierForDolibarrSetup = Configuration du module ZapierForDolibarr +Settings = Réglages +ZapierForDolibarrSetupPage = Page de configuration du module ZapierForDolibarr + +# +# Page À propos +# +About = À propos +ZapierForDolibarrAbout = À propos de ZapierForDolibarr +ZapierForDolibarrAboutPage = Page à propos de ZapierForDolibarr + +# +# Page d'exemple +# +MyPageName = Nom de ma page + +# +# Box d'exemple +# +MyWidget = Mon widget +MyWidgetDescription = Description de mon widget diff --git a/htdocs/langs/he_IL/assets.lang b/htdocs/langs/he_IL/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/he_IL/assets.lang +++ b/htdocs/langs/he_IL/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/he_IL/ticket.lang b/htdocs/langs/he_IL/ticket.lang index f85c29de58b..65ac1773290 100644 --- a/htdocs/langs/he_IL/ticket.lang +++ b/htdocs/langs/he_IL/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/hr_HR/assets.lang b/htdocs/langs/hr_HR/assets.lang index d135dbe6340..e96c94bacc9 100644 --- a/htdocs/langs/hr_HR/assets.lang +++ b/htdocs/langs/hr_HR/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/hr_HR/ticket.lang b/htdocs/langs/hr_HR/ticket.lang index cdb66a82bfd..97079c07864 100644 --- a/htdocs/langs/hr_HR/ticket.lang +++ b/htdocs/langs/hr_HR/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/hu_HU/assets.lang b/htdocs/langs/hu_HU/assets.lang index 7adf2cb48e8..e564900e397 100644 --- a/htdocs/langs/hu_HU/assets.lang +++ b/htdocs/langs/hu_HU/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/hu_HU/ticket.lang b/htdocs/langs/hu_HU/ticket.lang index 527b8503b7e..cae854b5573 100644 --- a/htdocs/langs/hu_HU/ticket.lang +++ b/htdocs/langs/hu_HU/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/id_ID/assets.lang b/htdocs/langs/id_ID/assets.lang index 32bee196c1a..52e3e2548d9 100644 --- a/htdocs/langs/id_ID/assets.lang +++ b/htdocs/langs/id_ID/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/id_ID/ticket.lang b/htdocs/langs/id_ID/ticket.lang index 788b9134c9b..6f82c3963f5 100644 --- a/htdocs/langs/id_ID/ticket.lang +++ b/htdocs/langs/id_ID/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/is_IS/assets.lang b/htdocs/langs/is_IS/assets.lang index 130d70735c0..d44e81fe01b 100644 --- a/htdocs/langs/is_IS/assets.lang +++ b/htdocs/langs/is_IS/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/is_IS/ticket.lang b/htdocs/langs/is_IS/ticket.lang index 29b6c6c37fe..6336927d8aa 100644 --- a/htdocs/langs/is_IS/ticket.lang +++ b/htdocs/langs/is_IS/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/it_IT/assets.lang b/htdocs/langs/it_IT/assets.lang index 0452f24aa71..5a98e34f1ef 100644 --- a/htdocs/langs/it_IT/assets.lang +++ b/htdocs/langs/it_IT/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/it_IT/ticket.lang b/htdocs/langs/it_IT/ticket.lang index 2ffb9390e8d..a274333b0a6 100644 --- a/htdocs/langs/it_IT/ticket.lang +++ b/htdocs/langs/it_IT/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ja_JP/assets.lang b/htdocs/langs/ja_JP/assets.lang index ad1973599ce..1e340ada3ad 100644 --- a/htdocs/langs/ja_JP/assets.lang +++ b/htdocs/langs/ja_JP/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ja_JP/ticket.lang b/htdocs/langs/ja_JP/ticket.lang index 8f8b31d8b6e..a9179aeddf9 100644 --- a/htdocs/langs/ja_JP/ticket.lang +++ b/htdocs/langs/ja_JP/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ka_GE/assets.lang b/htdocs/langs/ka_GE/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/ka_GE/assets.lang +++ b/htdocs/langs/ka_GE/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ka_GE/ticket.lang b/htdocs/langs/ka_GE/ticket.lang index 70bd8220af0..ba5c6af8a1c 100644 --- a/htdocs/langs/ka_GE/ticket.lang +++ b/htdocs/langs/ka_GE/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/km_KH/assets.lang b/htdocs/langs/km_KH/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/km_KH/assets.lang +++ b/htdocs/langs/km_KH/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/km_KH/ticket.lang b/htdocs/langs/km_KH/ticket.lang index 70bd8220af0..ba5c6af8a1c 100644 --- a/htdocs/langs/km_KH/ticket.lang +++ b/htdocs/langs/km_KH/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/kn_IN/assets.lang b/htdocs/langs/kn_IN/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/kn_IN/assets.lang +++ b/htdocs/langs/kn_IN/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/kn_IN/ticket.lang b/htdocs/langs/kn_IN/ticket.lang index 6dfcff2dfc0..d31f8333749 100644 --- a/htdocs/langs/kn_IN/ticket.lang +++ b/htdocs/langs/kn_IN/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ko_KR/assets.lang b/htdocs/langs/ko_KR/assets.lang index dc87a0f5ba1..4fde0b08ee5 100644 --- a/htdocs/langs/ko_KR/assets.lang +++ b/htdocs/langs/ko_KR/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ko_KR/ticket.lang b/htdocs/langs/ko_KR/ticket.lang index 5faa86e3639..981f27957ae 100644 --- a/htdocs/langs/ko_KR/ticket.lang +++ b/htdocs/langs/ko_KR/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/lo_LA/assets.lang b/htdocs/langs/lo_LA/assets.lang index 9c830b2d6f5..272afe8d7df 100644 --- a/htdocs/langs/lo_LA/assets.lang +++ b/htdocs/langs/lo_LA/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/lo_LA/ticket.lang b/htdocs/langs/lo_LA/ticket.lang index 83dd007b945..98d05040551 100644 --- a/htdocs/langs/lo_LA/ticket.lang +++ b/htdocs/langs/lo_LA/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/lt_LT/assets.lang b/htdocs/langs/lt_LT/assets.lang index cc9432e473b..2bf643a144e 100644 --- a/htdocs/langs/lt_LT/assets.lang +++ b/htdocs/langs/lt_LT/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/lt_LT/ticket.lang b/htdocs/langs/lt_LT/ticket.lang index 3bf2103a5bc..462d206db25 100644 --- a/htdocs/langs/lt_LT/ticket.lang +++ b/htdocs/langs/lt_LT/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/lv_LV/assets.lang b/htdocs/langs/lv_LV/assets.lang index 7afddf85d74..7779c6b5ec0 100644 --- a/htdocs/langs/lv_LV/assets.lang +++ b/htdocs/langs/lv_LV/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/lv_LV/ticket.lang b/htdocs/langs/lv_LV/ticket.lang index 26c58fc430b..ddbc069328b 100644 --- a/htdocs/langs/lv_LV/ticket.lang +++ b/htdocs/langs/lv_LV/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/mk_MK/assets.lang b/htdocs/langs/mk_MK/assets.lang index f176248dd2f..a30c045ef00 100644 --- a/htdocs/langs/mk_MK/assets.lang +++ b/htdocs/langs/mk_MK/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/mk_MK/ticket.lang b/htdocs/langs/mk_MK/ticket.lang index 70d642eb81a..9b50acab3f0 100644 --- a/htdocs/langs/mk_MK/ticket.lang +++ b/htdocs/langs/mk_MK/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/mn_MN/assets.lang b/htdocs/langs/mn_MN/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/mn_MN/assets.lang +++ b/htdocs/langs/mn_MN/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/mn_MN/ticket.lang b/htdocs/langs/mn_MN/ticket.lang index 70bd8220af0..ba5c6af8a1c 100644 --- a/htdocs/langs/mn_MN/ticket.lang +++ b/htdocs/langs/mn_MN/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/nb_NO/assets.lang b/htdocs/langs/nb_NO/assets.lang index 605854eecbb..48b4d2125d9 100644 --- a/htdocs/langs/nb_NO/assets.lang +++ b/htdocs/langs/nb_NO/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/nb_NO/ticket.lang b/htdocs/langs/nb_NO/ticket.lang index 6d01d2600e6..7c87cab7f30 100644 --- a/htdocs/langs/nb_NO/ticket.lang +++ b/htdocs/langs/nb_NO/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/nl_NL/assets.lang b/htdocs/langs/nl_NL/assets.lang index 618b6e7145c..bef6a3b9594 100644 --- a/htdocs/langs/nl_NL/assets.lang +++ b/htdocs/langs/nl_NL/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/nl_NL/ticket.lang b/htdocs/langs/nl_NL/ticket.lang index 3536b2b44f3..37d78845adc 100644 --- a/htdocs/langs/nl_NL/ticket.lang +++ b/htdocs/langs/nl_NL/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/pl_PL/assets.lang b/htdocs/langs/pl_PL/assets.lang index 8be2ef49938..ac130eefb25 100644 --- a/htdocs/langs/pl_PL/assets.lang +++ b/htdocs/langs/pl_PL/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/pl_PL/ticket.lang b/htdocs/langs/pl_PL/ticket.lang index e7091051962..cf3b98ae1f6 100644 --- a/htdocs/langs/pl_PL/ticket.lang +++ b/htdocs/langs/pl_PL/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/pt_PT/assets.lang b/htdocs/langs/pt_PT/assets.lang index 532d05be6ac..94d9c9299a8 100644 --- a/htdocs/langs/pt_PT/assets.lang +++ b/htdocs/langs/pt_PT/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/pt_PT/ticket.lang b/htdocs/langs/pt_PT/ticket.lang index d265eb61736..5ea10438aa8 100644 --- a/htdocs/langs/pt_PT/ticket.lang +++ b/htdocs/langs/pt_PT/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ro_RO/assets.lang b/htdocs/langs/ro_RO/assets.lang index bfc95f0c3fd..ba06524ae10 100644 --- a/htdocs/langs/ro_RO/assets.lang +++ b/htdocs/langs/ro_RO/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ro_RO/ticket.lang b/htdocs/langs/ro_RO/ticket.lang index 15da15a7447..0f3584535ae 100644 --- a/htdocs/langs/ro_RO/ticket.lang +++ b/htdocs/langs/ro_RO/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ru_RU/assets.lang b/htdocs/langs/ru_RU/assets.lang index b678ee62be4..3856fe6c865 100644 --- a/htdocs/langs/ru_RU/assets.lang +++ b/htdocs/langs/ru_RU/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/ru_RU/ticket.lang b/htdocs/langs/ru_RU/ticket.lang index d35d7a79bb5..11dc7a9b757 100644 --- a/htdocs/langs/ru_RU/ticket.lang +++ b/htdocs/langs/ru_RU/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sk_SK/assets.lang b/htdocs/langs/sk_SK/assets.lang index 2003a7ff760..32677fb87e0 100644 --- a/htdocs/langs/sk_SK/assets.lang +++ b/htdocs/langs/sk_SK/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sk_SK/ticket.lang b/htdocs/langs/sk_SK/ticket.lang index 4040c41acaf..82d6064832a 100644 --- a/htdocs/langs/sk_SK/ticket.lang +++ b/htdocs/langs/sk_SK/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sl_SI/assets.lang b/htdocs/langs/sl_SI/assets.lang index cb242738d7b..95c43a6fa85 100644 --- a/htdocs/langs/sl_SI/assets.lang +++ b/htdocs/langs/sl_SI/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sl_SI/ticket.lang b/htdocs/langs/sl_SI/ticket.lang index 8e0f3c6b48b..4ffc74f5bf5 100644 --- a/htdocs/langs/sl_SI/ticket.lang +++ b/htdocs/langs/sl_SI/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sq_AL/assets.lang b/htdocs/langs/sq_AL/assets.lang index a49d09dab38..49b25e043b1 100644 --- a/htdocs/langs/sq_AL/assets.lang +++ b/htdocs/langs/sq_AL/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sq_AL/ticket.lang b/htdocs/langs/sq_AL/ticket.lang index 40753f2c9d1..1c285c67af6 100644 --- a/htdocs/langs/sq_AL/ticket.lang +++ b/htdocs/langs/sq_AL/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sv_SE/assets.lang b/htdocs/langs/sv_SE/assets.lang index ac4915f9a54..1d0fe632703 100644 --- a/htdocs/langs/sv_SE/assets.lang +++ b/htdocs/langs/sv_SE/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/sv_SE/ticket.lang b/htdocs/langs/sv_SE/ticket.lang index 62357b6ef3d..fa4e54227dd 100644 --- a/htdocs/langs/sv_SE/ticket.lang +++ b/htdocs/langs/sv_SE/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/th_TH/assets.lang b/htdocs/langs/th_TH/assets.lang index 42d81b57998..812e3126d7a 100644 --- a/htdocs/langs/th_TH/assets.lang +++ b/htdocs/langs/th_TH/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/th_TH/ticket.lang b/htdocs/langs/th_TH/ticket.lang index 4e3fcfd7f50..d87e2c8f3ba 100644 --- a/htdocs/langs/th_TH/ticket.lang +++ b/htdocs/langs/th_TH/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/tr_TR/assets.lang b/htdocs/langs/tr_TR/assets.lang index 4c5f9631093..b462a7dd8b2 100644 --- a/htdocs/langs/tr_TR/assets.lang +++ b/htdocs/langs/tr_TR/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/tr_TR/ticket.lang b/htdocs/langs/tr_TR/ticket.lang index debc0503324..d8e6eb1d459 100644 --- a/htdocs/langs/tr_TR/ticket.lang +++ b/htdocs/langs/tr_TR/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/uk_UA/assets.lang b/htdocs/langs/uk_UA/assets.lang index 53c0634cef9..ef04723c6c2 100644 --- a/htdocs/langs/uk_UA/assets.lang +++ b/htdocs/langs/uk_UA/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/uk_UA/ticket.lang b/htdocs/langs/uk_UA/ticket.lang index 4cb9b1058d4..504f7e05f94 100644 --- a/htdocs/langs/uk_UA/ticket.lang +++ b/htdocs/langs/uk_UA/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/vi_VN/assets.lang b/htdocs/langs/vi_VN/assets.lang index bfa00080bb4..9f8f1aa678c 100644 --- a/htdocs/langs/vi_VN/assets.lang +++ b/htdocs/langs/vi_VN/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/vi_VN/ticket.lang b/htdocs/langs/vi_VN/ticket.lang index 96f60ec3aad..f5487762380 100644 --- a/htdocs/langs/vi_VN/ticket.lang +++ b/htdocs/langs/vi_VN/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/zh_CN/assets.lang b/htdocs/langs/zh_CN/assets.lang index ad4a07dcfb7..400f1d46bc5 100644 --- a/htdocs/langs/zh_CN/assets.lang +++ b/htdocs/langs/zh_CN/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/zh_CN/ticket.lang b/htdocs/langs/zh_CN/ticket.lang index d71603d60a6..4caa36f7e48 100644 --- a/htdocs/langs/zh_CN/ticket.lang +++ b/htdocs/langs/zh_CN/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/zh_TW/assets.lang b/htdocs/langs/zh_TW/assets.lang index ba2740dc9bf..f4c2828ed26 100644 --- a/htdocs/langs/zh_TW/assets.lang +++ b/htdocs/langs/zh_TW/assets.lang @@ -11,7 +11,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/langs/zh_TW/ticket.lang b/htdocs/langs/zh_TW/ticket.lang index d66a492b573..0b86fd52122 100644 --- a/htdocs/langs/zh_TW/ticket.lang +++ b/htdocs/langs/zh_TW/ticket.lang @@ -12,7 +12,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . # # Generic diff --git a/htdocs/livraison/card.php b/htdocs/livraison/card.php index 9109247d462..fe3edc6fef4 100644 --- a/htdocs/livraison/card.php +++ b/htdocs/livraison/card.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -61,13 +61,12 @@ $result=restrictedArea($user, 'expedition', $id, 'livraison', 'livraison'); $object = new Livraison($db); $extrafields = new ExtraFields($db); -$extrafieldsline = new ExtraFields($db); // fetch optionals attributes and labels -$extralabels = $extrafields->fetch_name_optionals_label($object->table_element); +$extrafields->fetch_name_optionals_label($object->table_element); // fetch optionals attributes lines and labels -$extralabelslines=$extrafieldsline->fetch_name_optionals_label($object->table_element_line); +$extrafields->fetch_name_optionals_label($object->table_element_line); // Load object. Make an object->fetch include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once @@ -196,8 +195,7 @@ if ($action == 'update_extras') $object->oldcopy = dol_clone($object); // Fill array 'array_options' with data from update form - $extralabels = $extrafields->fetch_name_optionals_label($object->table_element); - $ret = $extrafields->setOptionalsFromPost($extralabels, $object, GETPOST('attribute', 'none')); + $ret = $extrafields->setOptionalsFromPost(null, $object, GETPOST('attribute', 'none')); if ($ret < 0) $error++; if (! $error) @@ -224,8 +222,8 @@ if ($action == 'update_extras_line') for ($i = 0; $i < $num; $i++) { // Extrafields - $extralabelsline = $extrafieldsline->fetch_name_optionals_label($object->table_element_line); - $array_options[$i] = $extrafieldsline->getOptionalsFromPost($extralabelsline, $i); + $extralabelsline = $extrafields->fetch_name_optionals_label($object->table_element_line); + $array_options[$i] = $extrafields->getOptionalsFromPost($extralabelsline, $i); // Unset extrafield if (is_array($extralabelsline)) { // Get extra fields @@ -398,7 +396,7 @@ else $morehtmlref .= '
    ' . $langs->trans('Project') . ' '; if (0) { // Do not change on shipment if ($action != 'classify') { - $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; } if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $expedition->id, $expedition->socid, $expedition->fk_project, 'projectid', 0, 0, 1, 1); @@ -496,7 +494,7 @@ else print $langs->trans('DateReceived'); print ''; - if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).''; + if ($action != 'editdate_livraison') print 'id.'">'.img_edit($langs->trans('SetDeliveryDate'), 1).''; print ''; print ''; if ($action == 'editdate_livraison') @@ -522,7 +520,7 @@ else print '
    '; print $langs->trans('IncotermLabel'); print ''; - if ($user->rights->expedition->livraison->creer) print ''.img_edit().''; + if ($user->rights->expedition->livraison->creer) print ''.img_edit().''; else print ' '; print '
    '; print ''; @@ -676,21 +674,20 @@ else print ""; // Display lines extrafields - if (is_array($extralabelslines) && count($extralabelslines) > 0) { + if (! empty($extrafields)) { $colspan = 2; $mode = ($object->statut == 0) ? 'edit' : 'view'; - $line = new LivraisonLigne($db); - $line->fetch_optionals($object->lines[$i]->id); + + $object->lines[$i]->fetch_optionals($object->lines[$i]->id); if ($action == 'create_delivery') { $srcLine = new ExpeditionLigne($db); - $expeditionLineExtrafields = new Extrafields($db); - $expeditionLineExtrafieldLabels = $expeditionLineExtrafields->fetch_name_optionals_label($srcLine->table_element); + + $extrafields->fetch_name_optionals_label($srcLine->table_element); $srcLine->fetch_optionals($expedition->lines[$i]->id); - $line->array_options = array_merge($line->array_options, $srcLine->array_options); + + $object->lines[$i]->array_options = array_merge($object->lines[$i]->array_options, $srcLine->array_options); } - print ''; - print $line->showOptionals($extrafieldsline, $mode, array('style' => 'class="oddeven"', 'colspan' => $colspan), $i); - print ''; + print $object->lines[$i]->showOptionals($extrafields, $mode, array('style' => 'class="oddeven"', 'colspan' => $colspan), $i); } } diff --git a/htdocs/livraison/class/livraison.class.php b/htdocs/livraison/class/livraison.class.php index afc1d89538c..f075eaadc20 100644 --- a/htdocs/livraison/class/livraison.class.php +++ b/htdocs/livraison/class/livraison.class.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/card.php b/htdocs/loan/card.php index 2ba29aef106..066399320d8 100644 --- a/htdocs/loan/card.php +++ b/htdocs/loan/card.php @@ -14,7 +14,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -453,7 +453,7 @@ if ($id > 0) if ($user->rights->loan->write) { if ($action != 'classify') - $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + $morehtmlref.='' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { //$morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref.='
    '; diff --git a/htdocs/loan/class/loan.class.php b/htdocs/loan/class/loan.class.php index f262805b3fe..c8e241186d2 100644 --- a/htdocs/loan/class/loan.class.php +++ b/htdocs/loan/class/loan.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/class/loanschedule.class.php b/htdocs/loan/class/loanschedule.class.php index e968daa69fe..c9a8fd9354e 100644 --- a/htdocs/loan/class/loanschedule.class.php +++ b/htdocs/loan/class/loanschedule.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/class/paymentloan.class.php b/htdocs/loan/class/paymentloan.class.php index b8b1794c6f8..c938fe92c80 100644 --- a/htdocs/loan/class/paymentloan.class.php +++ b/htdocs/loan/class/paymentloan.class.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/createschedule.php b/htdocs/loan/createschedule.php index 4fe644e5521..3871afe2cba 100644 --- a/htdocs/loan/createschedule.php +++ b/htdocs/loan/createschedule.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/document.php b/htdocs/loan/document.php index 7544e1913e8..0cbcec2f209 100644 --- a/htdocs/loan/document.php +++ b/htdocs/loan/document.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -98,7 +98,7 @@ if ($object->id) $morehtmlref .= '
    ' . $langs->trans('Project') . ' : '; if ($user->rights->loan->write) { //if ($action != 'classify') - // $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= ''; diff --git a/htdocs/loan/info.php b/htdocs/loan/info.php index a6f7b12a9de..b4fb8851ad0 100644 --- a/htdocs/loan/info.php +++ b/htdocs/loan/info.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -70,7 +70,7 @@ if (! empty($conf->projet->enabled)) { $morehtmlref .= '
    ' . $langs->trans('Project') . ' : '; if ($user->rights->loan->write) { //if ($action != 'classify') - // $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= ''; diff --git a/htdocs/loan/list.php b/htdocs/loan/list.php index 80d8645293b..7af7d55fb43 100644 --- a/htdocs/loan/list.php +++ b/htdocs/loan/list.php @@ -15,7 +15,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/note.php b/htdocs/loan/note.php index b0ec23316c7..4ddd7bdccee 100644 --- a/htdocs/loan/note.php +++ b/htdocs/loan/note.php @@ -18,7 +18,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -87,7 +87,7 @@ if ($id > 0) $morehtmlref .= '
    ' . $langs->trans('Project') . ' : '; if ($user->rights->loan->write) { //if ($action != 'classify') - // $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; + // $morehtmlref .= '' . img_edit($langs->transnoentitiesnoconv('SetProject')) . ' : '; if ($action == 'classify') { // $morehtmlref.=$form->form_project($_SERVER['PHP_SELF'] . '?id=' . $object->id, $object->socid, $object->fk_project, 'projectid', 0, 0, 1, 1); $morehtmlref .= ''; diff --git a/htdocs/loan/payment/card.php b/htdocs/loan/payment/card.php index 2a5d8c73e76..29b9df4bf70 100644 --- a/htdocs/loan/payment/card.php +++ b/htdocs/loan/payment/card.php @@ -12,7 +12,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/payment/payment.php b/htdocs/loan/payment/payment.php index 2b50e27ad9b..6742b0b1c04 100644 --- a/htdocs/loan/payment/payment.php +++ b/htdocs/loan/payment/payment.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/loan/schedule.php b/htdocs/loan/schedule.php index 1c9cb9d8c3f..dd0febdc634 100644 --- a/htdocs/loan/schedule.php +++ b/htdocs/loan/schedule.php @@ -13,7 +13,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/mailmanspip/class/mailmanspip.class.php b/htdocs/mailmanspip/class/mailmanspip.class.php index d80edaf725f..6a1967bccf9 100644 --- a/htdocs/mailmanspip/class/mailmanspip.class.php +++ b/htdocs/mailmanspip/class/mailmanspip.class.php @@ -19,7 +19,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index ce8b1d6027e..75c0190ddcd 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -23,7 +23,7 @@ * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License - * along with this program. If not, see . + * along with this program. If not, see . */ /** @@ -1228,7 +1228,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (! empty($conf->global->MAIN_FAVICON_URL)) $favicon=$conf->global->MAIN_FAVICON_URL; if (empty($conf->dol_use_jmobile)) print ''."\n"; // Not required into an Android webview //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; - //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; + //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; //if (empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) print ''."\n"; // Auto refresh page @@ -1284,12 +1284,8 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if (! defined('DISABLE_FONT_AWSOME')) { print ''."\n"; - print ''."\n"; - if (empty($conf->global->MAIN_DISABLE_FONT_AWESOME_5)) - { - print ''."\n"; - print ''."\n"; - } + print ''."\n"; + print ''."\n"; } print ''."\n"; @@ -1463,7 +1459,7 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr if ($conf->browser->layout == 'phone') $enablebrowsernotif=false; if ($enablebrowsernotif) { - print ''."\n"; + print ''."\n"; print ''."\n"; } } @@ -1606,6 +1602,10 @@ function top_menu($head, $title = '', $target = '', $disablejs = 0, $disablehead print '