diff --git a/README.md b/README.md index d396926..2b8ad89 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ ## TinyMCE Editor for OXID eShop CE by Marat Bedoev, bestlife AG https://github.com/vanilla-thunder/bla-tinymce -### module version 1.6.0 +### module version 2.0.0 TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL. More information here: http://www.tinymce.com/ diff --git a/copy_this/modules/bla/bla-tinymce/README.md b/copy_this/modules/bla/bla-tinymce/README.md index d396926..2b8ad89 100644 --- a/copy_this/modules/bla/bla-tinymce/README.md +++ b/copy_this/modules/bla/bla-tinymce/README.md @@ -1,7 +1,7 @@ ## TinyMCE Editor for OXID eShop CE by Marat Bedoev, bestlife AG https://github.com/vanilla-thunder/bla-tinymce -### module version 1.6.0 +### module version 2.0.0 TinyMCE is a platform independent web based Javascript HTML WYSIWYG editor control released as Open Source under LGPL. More information here: http://www.tinymce.com/ diff --git a/copy_this/modules/bla/bla-tinymce/application/controllers/admin/tinymcehelper.php b/copy_this/modules/bla/bla-tinymce/application/controllers/admin/tinymcehelper.php new file mode 100644 index 0000000..b86cb67 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/application/controllers/admin/tinymcehelper.php @@ -0,0 +1,65 @@ + + * + * Marat Bedoev + */ + +class tinymcehelper extends oxAdminView +{ + protected $_errors; + protected $_content; + + public function render() + { + $oOutput = oxRegistry::get("oxOutput"); + $oOutput->setCharset($this->getCharSet()); + $oOutput->setOutputFormat(oxOutput::OUTPUT_FORMAT_JSON); + $oOutput->sendHeaders(); + $oOutput->output('errors', $this->_errors); + $oOutput->output('content', $this->_content); + exit; + } + + public function search() + { + $cfg = oxRegistry::getConfig(); + + $what = $cfg->getRequestParameter("what"); + $where = $cfg->getRequestParameter("where"); + + $this->_content = $what . ' + '. $where; + } + + public function getCMS() + { + $oList = oxNew("oxlist"); + $oList->init("oxcontent"); + $oListObject = $oList->getBaseObject(); + $sViewName = $oListObject->getViewName(); + $sActiveSnippet = $oListObject->getSqlActiveSnippet(); + $sSQL = "SELECT OXID, OXLOADID, OXTITLE FROM {$sViewName} WHERE {$sActiveSnippet} AND {$sViewName}.oxfolder != 'CMSFOLDER_EMAILS'"; + + $aPages = oxDB::getDb()->getAssoc($sSQL); + $this->_content = $aPages; + } + + public function oxgetseourl() + { + $cfg = oxRegistry::getConfig(); + + $type = ($cfg->getRequestParameter("type") ? $cfg->getRequestParameter("type") : "oxcontent"); + $oxid = ($cfg->getRequestParameter("oxid") ? $cfg->getRequestParameter("oxid") : "oximpressum"); + } + +} diff --git a/copy_this/modules/bla/bla-tinymce/application/core/blatinymceoxviewconfig.php b/copy_this/modules/bla/bla-tinymce/application/core/blatinymceoxviewconfig.php new file mode 100644 index 0000000..5c6bafd --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/application/core/blatinymceoxviewconfig.php @@ -0,0 +1,238 @@ + + * + * Marat Bedoev + */ + +class blaTinyMceOxViewConfig extends blaTinyMceOxViewConfig_parent +{ + public function loadTinyMce() + { + $cfg = oxRegistry::getConfig(); + $blEnabled = in_array($this->getActiveClassName(), $cfg->getConfigParam("aTinyMCE_classes")); + $blPlainCms = in_array($cfg->getActiveView()->getViewDataElement("edit")->oxcontents__oxloadid->value, $cfg->getConfigParam("aTinyMCE_plaincms")); + $blFilemanager = $cfg->getConfigParam("blTinyMCE_filemanager"); + + if (!$blEnabled) return; + if ($blPlainCms) return oxRegistry::getLang()->translateString("BLA_TINYMCE_PLAINCMS"); + + // processing editor config & other stuff + $sLang = oxRegistry::getLang()->getLanguageAbbr(oxRegistry::getLang()->getTplLanguage()); + // array to assign shops lang abbreviations to lang file names of tinymce: shopLangAbbreviation => fileName (without .js ) + $aLang = array( + "cs" => "cs", + "da" => "da", + "de" => "de", + "fr" => "fr_FR", + "it" => "it", + "nl" => "nl", + "ru" => "ru" + ); + + // default config + $aDefaultConfig = array( + 'selector' => '"textarea:not(.mceNoEditor)"', + 'language' => '"' . ( in_array($sLang, $aLang) ? $aLang[$sLang] : 'en' ) . '"', + //'spellchecker_language' => '"' . (in_array($sLang, $aLang) ? $aLang[$sLang] : 'en') . '"', + 'nowrap' => 'false', + 'entity_encoding' => '"raw"', // http://www.tinymce.com/wiki.php/Configuration:entity_encoding + 'height' => 300, + 'menubar' => 'false', + 'document_base_url' => '"' . $this->getBaseDir() . '"', // http://www.tinymce.com/wiki.php/Configuration:document_base_url + 'relative_urls' => 'false', // http://www.tinymce.com/wiki.php/Configuration:relative_urls + 'plugin_preview_width' => 'window.innerWidth', + 'plugin_preview_height' => 'window.innerHeight-90', + 'code_dialog_width' => 'window.innerWidth-50', + 'code_dialog_height' => 'window.innerHeight-130', + 'image_advtab' => 'true', + 'imagetools_toolbar' => '"rotateleft rotateright | flipv fliph | editimage imageoptions"', + 'moxiemanager_fullscreen' => 'true', + 'insertdatetime_formats' => '[ "%d.%m.%Y", "%H:%M" ]', + 'nonbreaking_force_tab' => 'true', // http://www.tinymce.com/wiki.php/Plugin:nonbreaking + 'autoresize_max_height' => '400', + 'filemanager_access_key' => '"' . md5($_SERVER['HTTP_HOST']) . '"', + 'tinymcehelper' => '"' . $this->getSelfActionLink() . 'renderPartial=1"' + ); + if($blFilemanager) $aDefaultConfig['external_filemanager_path'] = '"../modules/bla/bla-tinymce/fileman/"'; + if($blFilemanager) $aDefaultConfig['filemanager_access_key'] = '"' . md5($_SERVER['HTTP_HOST']) . '"'; + if($blFilemanager) $oUS = oxRegistry::get("oxUtilsServer"); + if($blFilemanager) $oUS->setOxCookie("filemanagerkey", md5($_SERVER['HTTP_HOST'].$oUS->getOxCookie("admin_sid"))); + + //merging with onfig override + $aConfig = ( $aOverrideConfig = $this->_getTinyCustConfig() ) ? array_merge($aDefaultConfig, $aOverrideConfig) : $aDefaultConfig; + + + // default plugins and their buttons + $aDefaultPlugins = array( + 'advlist' => '', // '' = plugin has no buttons + 'anchor' => 'anchor', + 'autolink' => '', + 'autoresize' => '', + 'charmap' => 'charmap', + 'code' => 'code', + 'colorpicker' => '', + 'hr' => 'hr', + 'image' => 'image', + 'imagetools' => '', + 'insertdatetime' => 'insertdatetime', + 'link' => 'link unlink', + 'lists' => '', + 'media' => 'media', + 'nonbreaking' => 'nonbreaking', + 'pagebreak' => 'pagebreak', + 'paste' => 'pastetext', + 'preview' => 'preview', + 'searchreplace' => 'searchreplace', + 'table' => 'table', + 'textcolor' => 'forecolor backcolor', + 'visualblocks' => '', + //'visualchars' => 'visualchars', + 'wordcount' => '', + 'oxfullscreen' => 'fullscreen', //custom fullscreen plugin + //'oxgetseourl' => 'yolo' //custom seo url plugin // wip + ); + + // plugins for newsletter emails + if ($this->getActiveClassName() == "newsletter_main") { + $aDefaultPlugins["legacyoutput"] = false; + $aDefaultPlugins["fullpage"] = "fullpage"; + } + + // override for active plugins + $aOverridePlugins = $cfg->getConfigParam("aTinyMCE_plugins"); + $aPlugins = ( empty( $aOverridePlugins ) || !is_array($aOverridePlugins) ) ? $aDefaultPlugins : array_merge($aDefaultPlugins, $aOverridePlugins); + $aPlugins = array_filter($aPlugins, function ( $value ) { + return $value !== false; + }); + + // array keys von $aPlugins enthalten aktive plugins + $aConfig['plugins'] = '"' . implode(' ', array_keys($aPlugins)) . '"'; + + // external plugins + $aConfig['external_plugins'] = '{ "oxfullscreen":"' . $this->getModuleUrl('bla-tinymce', 'plugins/oxfullscreen/plugin.js') . '" '; + if ($blFilemanager) $aConfig['external_plugins'] .= ',"roxy":"' . $this->getModuleUrl('bla-tinymce', 'plugins/roxy/plugin.js') . '" '; + //$aConfig['external_plugins'] .= ',"oxgetseourl":"' . $this->getModuleUrl('bla-tinymce', 'plugins/oxgetseourl/plugin.js') . '" '; + + if ($aExtPlugins = $this->_getTinyExtPlugins()) { + foreach ($aExtPlugins AS $plugin => $file) { + $aConfig['external_plugins'] .= ', "' . $plugin . '": "' . $file . '" '; + } + } + $aConfig['external_plugins'] .= ' }'; + + // default toolbar buttons + $aDefaultButtons = array( + "undo redo", + "cut copy paste", + "bold italic underline strikethrough", + "alignleft aligncenter alignright alignjustify", + "bullist numlist", + "outdent indent", + "blockquote", + "subscript", + "superscript", + "formatselect", + "removeformat", + "fontselect", + "fontsizeselect", + "subscript superscript" + ); + $aOverrideButtons = oxRegistry::getConfig()->getConfigParam("aTinyMCE_buttons"); + $aButtons = ( empty( $aOverrideButtons ) || !is_array($aOverrideButtons) ) ? $aDefaultButtons : $aOverrideButtons; + + // plugin buttons + $aPluginButtons = array_filter($aPlugins); + + // zusätzliche buttons + $aCustomButtons = $this->_getTinyToolbarControls(); + + $aButtons = array_merge(array_filter($aButtons), array_filter($aPluginButtons), array_filter($aCustomButtons)); + $aConfig['toolbar'] = '"' . implode(" | ", $aButtons) . '"'; + + + // compile the whole config stuff + $sConfig = ''; + foreach ($aConfig AS $param => $value) { + $sConfig .= "$param: $value, "; + } + + // add init script + $sInit = 'tinymce.init({ ' . $sConfig . ' });'; + + $sCopyLongDescFromTinyMCE = 'function copyLongDescFromTinyMCE(sIdent) +{ + var editor = tinymce.get("editor_"+sIdent); + if (editor && editor.isHidden() !== true) + { + console.log("copy content from tinymce"); + var content = editor.getContent().replace(/\[{([^\]]*?)}\]/g, function(m) { return m.replace(/>/g, ">").replace(/</g, "<").replace(/&/g, "&") }); + document.getElementsByName("editval[" + sIdent + "]").item(0).value = content; + return true; + } + return false; +} + +var origCopyLongDesc = copyLongDesc; +copyLongDesc = function(sIdent) +{ + if ( copyLongDescFromTinyMCE( sIdent ) ) return; + console.log("tinymce disabled, copy content from regular textarea"); + origCopyLongDesc( sIdent ); +}'; + + // adding scripts to template + $smarty = oxRegistry::get("oxUtilsView")->getSmarty(); + $sSufix = ( $smarty->_tpl_vars["__oxid_include_dynamic"] ) ? '_dynamic' : ''; + + $aScript = (array)$cfg->getGlobalParameter('scripts' . $sSufix); + $aScript[] = $sCopyLongDescFromTinyMCE; + $aScript[] = $sInit; + $cfg->setGlobalParameter('scripts' . $sSufix, $aScript); + + $aInclude = (array)$cfg->getGlobalParameter('includes' . $sSufix); + $aInclude[3][] = $this->getModuleUrl('bla-tinymce', 'tinymce/tinymce.min.js'); + //$aInclude[3][] = 'https://code.jquery.com/jquery-2.2.4.min.js'; + $cfg->setGlobalParameter('includes' . $sSufix, $aInclude); + + return '
  • '; + // javascript:tinymce.execCommand(\'mceToggleEditor\',false,\'editor1\'); + } + + protected function _getTinyToolbarControls() + { + $aControls = ( method_exists(get_parent_class(__CLASS__), __FUNCTION__) ) ? parent::_getTinyToolbarControls() : array(); + return $aControls; + } + + protected function _getTinyExtPlugins() + { + $aPlugins = oxRegistry::getConfig()->getConfigParam("aTinyMCE_external_plugins"); + if (method_exists(get_parent_class(__CLASS__), __FUNCTION__)) { + $aPlugins = array_merge(parent::_getTinyExtPlugins(), $aPlugins); + } + return $aPlugins; + } + + protected function _getTinyCustConfig() + { + $aConfig = oxRegistry::getConfig()->getConfigParam("aTinyMCE_config"); + if (method_exists(get_parent_class(__CLASS__), __FUNCTION__)) { + $aConfig = array_merge(parent::_getTinyCustConfig(), $aConfig); + } + return $aConfig; + } +} diff --git a/copy_this/modules/bla/bla-tinymce/application/core/security.inc.php b/copy_this/modules/bla/bla-tinymce/application/core/security.inc.php new file mode 100644 index 0000000..2743a9a --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/application/core/security.inc.php @@ -0,0 +1,25 @@ + + */ + +function checkAccess($action) +{ + //if(!session_id()) die("Access Denied!"); + //if(!session_id()) session_start(); + //if(isset($_GET['akey'])) $_SESSION['akey'] = strip_tags(preg_replace( "/[^a-zA-Z0-9\._-]/", '', $_GET['akey'])); + if($_COOKIE['filemanagerkey'] !== md5($_SERVER['HTTP_HOST'].$_COOKIE['admin_sid'])) die('Access Denied!!'); +} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/application/views/admin/de/module_options.php b/copy_this/modules/bla/bla-tinymce/application/views/admin/de/module_options.php index 996c473..cad1d09 100644 --- a/copy_this/modules/bla/bla-tinymce/application/views/admin/de/module_options.php +++ b/copy_this/modules/bla/bla-tinymce/application/views/admin/de/module_options.php @@ -17,21 +17,22 @@ */ $sLangName = 'Deutsch'; -$aLang = array( - 'charset' => 'UTF-8', - 'SHOP_MODULE_GROUP_tinyMceMain' => 'Moduleinstellungen', - 'SHOP_MODULE_aTinyMCE_classes' => '

    Liste der Backend-Klassen, wo TinyMCE angezeigt werden soll

    ', - 'HELP_SHOP_MODULE_aTinyMCE_classes' => 'für die Benutzung von TinyMCE in eigenen Admin Views muss hier die entsprechende View Klasse eingetragen werden, dann werden für jedes textarea je ein Editor erzeugt', - 'SHOP_MODULE_aTinyMCE_plaincms' => '

    plaintext CMS Seiten

    bei CMS Seiten mit diesen Idents wird kein Editor geladen. Z.B: Plaintext Emails, Email Betreffzeilen, etc', - - 'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Einstellungen & Plugins', - 'SHOP_MODULE_aTinyMCE_config_override' => '

    eigene Editor Konfiguration (?)

    z.B. für externe Plugins oder um standard Parameter zu überschreiben
    parameter => "wert" (mit Anführungszeichen, falls erforderlich!)', - 'SHOP_MODULE_aTinyMCE_buttons' => '

    Toolbar Buttons (?)

    es betrifft nur die Buttons (Toolbar controls) unter dem ersten Punkt: "core" und buttons für eigene / externe plugins.
    Buttons von standard Plugins werden über Plugins-Konfiguration automatisch hinzugefügt bzw. entfernt.
    Standardwerte finden Sie in dem Hilfe-Popup', - 'HELP_SHOP_MODULE_aTinyMCE_buttons' => "", - 'SHOP_MODULE_aTinyMCE_plugins' => '

    aktive Editor Plugins (?)

    jeweils ein Plugin pro Zeile.
    Standardwerte finden Sie in dem Hilfe-Popup', - 'HELP_SHOP_MODULE_aTinyMCE_plugins' => "", - - 'SHOP_MODULE_aTinyMCE_external_plugins' => '

    externe Plugins (?)


    Eingabeformat:
    Pluginname => Pfad/zur/Datei.js', - 'hdi_tinymce_plaincms' => 'TinyMCE ist für diese Seite deaktiviert, weil sie keine HTML Formatierung enthalten darf ' - +$aLang = array( + 'charset' => 'UTF-8', + 'BLA_TINYMCE_TOGGLE' => 'TinyMCE zeigen/verstecken', + 'BLA_TINYMCE_PLAINCMS' => 'TinyMCE wurde für diese Seite deaktiviert, weil sie keine HTML Formatierung enthalten darf ', + 'SHOP_MODULE_GROUP_tinyMceMain' => 'Moduleinstellungen', + 'SHOP_MODULE_blTinyMCE_filemanager' => 'Dateimanager aktivieren', + 'HELP_SHOP_MODULE_blTinyMCE_filemanager' => 'Ist diese Option aktiv, können Bilder hochgeladen werden. Der Speicherort ist: out/pictures/wysiwigpro/', + 'SHOP_MODULE_aTinyMCE_classes' => '

    TinyMCE für folgende Backend-Seiten laden:

    ', + 'HELP_SHOP_MODULE_aTinyMCE_classes' => 'für die Benutzung von TinyMCE in eigenen Admin Views muss hier die entsprechende View Klasse eingetragen werden, dann werden für jedes textarea je ein Editor erzeugt', + 'SHOP_MODULE_aTinyMCE_plaincms' => '

    plaintext CMS Seiten

    Für diese CMS Seiten wird TinyMCE deaktiviert.', + 'HELP_SHOP_MODULE_aTinyMCE_plaincms' => 'Einige CMS Seiten dürfen keine HTML Tags enthalten, z.B: Plaintext Emails, Email Betreffzeilen, SEO Beschreibung, etc.', + 'SHOP_MODULE_aTinyMCE_extjs' => '

    Externe JS Abhängigkeiten

    ', + 'HELP_SHOP_MODULE_aTinyMCE_extjs' => 'Komplette URL mit http:// bzw https:// falls der Shop über HTTPS läuft.', + 'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Einstellungen & Plugins', + 'SHOP_MODULE_aTinyMCE_config' => '

    eigene TinyMCE Konfiguration (?)

    hier können Parameter für externe Plugins hinterlegt oder auch standard Werte überschreiben werden
    parameter => "wert" (mit Anführungszeichen, falls erforderlich!)', + 'SHOP_MODULE_aTinyMCE_plugins' => '

    TinyMCE Plugins aktivieren/überschreiben (?)

    Plugin hinzufügen: plugin => "plugin buttons"
    Plugin ohne Buttons: plugin => ""
    Plugin entfernen: plugin => false', + 'SHOP_MODULE_aTinyMCE_external_plugins' => '

    externe Plugins (?)

    Eingabeformat:
    Pluginname => Pfad/zur/Datei.js | plugin buttons', + 'SHOP_MODULE_aTinyMCE_buttons' => '

    Toolbar Buttons überschreiben (?)

    es betrifft nur Buttons (Toolbar controls) unter dem ersten Punkt: "core" + Buttons für externe Plugins
    Standard Buttons:' . "" ); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/application/views/admin/en/module_options.php b/copy_this/modules/bla/bla-tinymce/application/views/admin/en/module_options.php index 3bddc7c..75fc52a 100644 --- a/copy_this/modules/bla/bla-tinymce/application/views/admin/en/module_options.php +++ b/copy_this/modules/bla/bla-tinymce/application/views/admin/en/module_options.php @@ -17,22 +17,22 @@ */ $sLangName = 'English'; -$aLang = array( - 'charset' => 'UTF-8', - 'SHOP_MODULE_GROUP_tinyMceMain' => 'module settings', - 'SHOP_MODULE_aTinyMCE_classes' => '

    Enable TinyMCE For This Backend Views

    ', - 'HELP_SHOP_MODULE_aTinyMCE_classes' => 'if you want to use TinyMCE for your custom views, add here the view\'s class name, then textareas should become editor instances', - 'SHOP_MODULE_aTinyMCE_plaincms' => '

    Plain Text CMS pages

    TinyMCE will not apper for this cms pages. e.g: Plaintext Emails, Email subjects, etc', - - 'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Settings & Plugins', - 'SHOP_MODULE_aTinyMCE_config_override' => '

    Custom Editor Configuration (?)

    e.g. for external plugins or to overwrite default configuration
    parameter => "value" (with quotes, if required!)', - 'SHOP_MODULE_aTinyMCE_buttons' => '

    Toolbar Buttons (?)

    '. - 'only for core toolbar controls and buttons for custom and external plugins!
    Buttons for standard plugins will be displayd if the plugin is active.
    See the help popup for the default value of this setting', - 'HELP_SHOP_MODULE_aTinyMCE_buttons' => "", - 'SHOP_MODULE_aTinyMCE_plugins' => '

    Active Editor Plugins (?)

    enter here the default plugins you want to be enabled
    See the help popup for the default value of this setting', - 'HELP_SHOP_MODULE_aTinyMCE_plugins' => "", - - 'SHOP_MODULE_aTinyMCE_external_plugins' => '

    External Plugins (?)

    pluginname => plugin_path/or/url/plugin.js', - - 'hdi_tinymce_plaincms' => 'TinyMCE was deactivated from this page because it may not contain HTML code' +$aLang = array( + 'charset' => 'UTF-8', + 'BLA_TINYMCE_TOGGLE' => 'toggle TinyMCE', + 'BLA_TINYMCE_PLAINCMS' => 'TinyMCE was disabled for this page because it may not contain HTML code', + 'SHOP_MODULE_GROUP_tinyMceMain' => 'module settings', + 'SHOP_MODULE_blTinyMCE_filemanager' => 'enable filemanager', + 'HELP_SHOP_MODULE_blTinyMCE_filemanager' => 'When enabled, you can upload pictures into this directory: out/pictures/wysiwigpro/', + 'SHOP_MODULE_aTinyMCE_classes' => '

    Enable TinyMCE for following backend pages:

    ', + 'HELP_SHOP_MODULE_aTinyMCE_classes' => 'if you want to use TinyMCE for your custom views/controllers, you need to enter their class names here.', + 'SHOP_MODULE_aTinyMCE_plaincms' => '

    Plain Text CMS pages

    TinyMCE will not be loaded for these cms pages. e.g: Plain text Emails, Email subjects, etc.', + 'HELP_SHOP_MODULE_aTinyMCE_plaincms' => 'some cms pages may not contain HTML tags, because the are used as plain text emails. email subjects or SEO description', + 'SHOP_MODULE_aTinyMCE_extjs' => '

    external JS dependencies

    (e.g. for plugins)', + 'HELP_SHOP_MODULE_aTinyMCE_extjs' => 'full URL with http:// or https:// if your shop runs with HTTPS.', + 'SHOP_MODULE_GROUP_tinyMceSettings' => 'TinyMCE Settings & Plugins', + 'SHOP_MODULE_aTinyMCE_config' => '

    custom TinyMCE configuration (?)

    here you can add custom config params for external plugins or overwrite default params
    param => "value" (with quotes, if required!)', + 'SHOP_MODULE_aTinyMCE_plugins' => '

    enable/overwrite TinyMCE Plugins (?)

    add plugin: plugin => "plugin buttons"
    add plugin without buttons: plugin => ""
    disable plugin: plugin => false', + 'SHOP_MODULE_aTinyMCE_external_plugins' => '

    externa� plugins (?)

    example:
    pluginname => path/to/file.js | plugin buttons', + 'SHOP_MODULE_aTinyMCE_buttons' => '

    Toolbar Buttons (?)

    only for core toolbar controls and buttons for custom and external plugins!
    default buttons:' . "" ); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/application/views/admin/tinymcehelper.tpl b/copy_this/modules/bla/bla-tinymce/application/views/admin/tinymcehelper.tpl new file mode 100644 index 0000000..8db0d1b --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/application/views/admin/tinymcehelper.tpl @@ -0,0 +1 @@ +[{$content}] \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/LICENSE.txt b/copy_this/modules/bla/bla-tinymce/fileman/LICENSE.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +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/copy_this/modules/bla/bla-tinymce/fileman/Uploads/Images/DSC_2987.jpg b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/Images/DSC_2987.jpg new file mode 100644 index 0000000..41f5517 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/Images/DSC_2987.jpg differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/Uploads/Images/DSC_5744.jpg b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/Images/DSC_5744.jpg new file mode 100644 index 0000000..61eb24e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/Images/DSC_5744.jpg differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/Uploads/LICENSE.txt b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/LICENSE.txt new file mode 100644 index 0000000..94a9ed0 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/LICENSE.txt @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + 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 . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + Copyright (C) + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +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/copy_this/modules/bla/bla-tinymce/fileman/Uploads/roxy-fileman-logo.gif b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/roxy-fileman-logo.gif new file mode 100644 index 0000000..5f60558 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/Uploads/roxy-fileman-logo.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/conf.json b/copy_this/modules/bla/bla-tinymce/fileman/conf.json new file mode 100644 index 0000000..eb62838 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/conf.json @@ -0,0 +1,35 @@ +{ +"FILES_ROOT": "/out/pictures/wysiwigpro", +"RETURN_URL_PREFIX": "", +"SESSION_PATH_KEY": "", +"THUMBS_VIEW_WIDTH": "140", +"THUMBS_VIEW_HEIGHT": "120", +"PREVIEW_THUMB_WIDTH": "100", +"PREVIEW_THUMB_HEIGHT":"100", +"MAX_IMAGE_WIDTH": "1000", +"MAX_IMAGE_HEIGHT": "1000", +"INTEGRATION": "tinymce4", +"DIRLIST": "php/dirtree.php", +"CREATEDIR": "php/createdir.php", +"DELETEDIR": "php/deletedir.php", +"MOVEDIR": "php/movedir.php", +"COPYDIR": "php/copydir.php", +"RENAMEDIR": "php/renamedir.php", +"FILESLIST": "php/fileslist.php", +"UPLOAD": "php/upload.php", +"DOWNLOAD": "php/download.php", +"DOWNLOADDIR": "php/downloaddir.php", +"DELETEFILE": "php/deletefile.php", +"MOVEFILE": "php/movefile.php", +"COPYFILE": "php/copyfile.php", +"RENAMEFILE": "php/renamefile.php", +"GENERATETHUMB": "php/thumb.php", +"DEFAULTVIEW": "list", +"FORBIDDEN_UPLOADS": "zip js jsp jsb mhtml mht xhtml xht php phtml php3 php4 php5 phps shtml jhtml pl sh py cgi exe application gadget hta cpl msc jar vb jse ws wsf wsc wsh ps1 ps2 psc1 psc2 msh msh1 msh2 inf reg scf msp scr dll msi vbs bat com pif cmd vxd cpl htpasswd htaccess", +"ALLOWED_UPLOADS": "", +"FILEPERMISSIONS": "0644", +"DIRPERMISSIONS": "0755", +"LANG": "auto", +"DATEFORMAT": "dd/MM/yyyy HH:mm", +"OPEN_LAST_DIR": "yes" +} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/animated-overlay.gif b/copy_this/modules/bla/bla-tinymce/fileman/css/images/animated-overlay.gif new file mode 100644 index 0000000..d441f75 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/animated-overlay.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_flat_0_aaaaaa_40x100.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 0000000..e1a114b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_flat_75_ffffff_40x100.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 0000000..399d1ba Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_55_fbf9ee_1x400.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 0000000..9267153 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_65_ffffff_1x400.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 0000000..12902e2 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_75_dadada_1x400.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 0000000..c6af090 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_75_e6e6e6_1x400.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 0000000..7e2dc85 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_95_fef1ec_1x400.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 0000000..be40bcf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 0000000..57d294c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_222222_256x240.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_222222_256x240.png new file mode 100644 index 0000000..c1cb117 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_222222_256x240.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_2e83ff_256x240.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 0000000..84b601b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_2e83ff_256x240.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_454545_256x240.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_454545_256x240.png new file mode 100644 index 0000000..b6db1ac Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_454545_256x240.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_888888_256x240.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_888888_256x240.png new file mode 100644 index 0000000..feea0e2 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_888888_256x240.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_cd0a0a_256x240.png b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 0000000..ed5b6b0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/css/images/ui-icons_cd0a0a_256x240.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/jquery-ui-1.10.4.custom.css b/copy_this/modules/bla/bla-tinymce/fileman/css/jquery-ui-1.10.4.custom.css new file mode 100644 index 0000000..4827019 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/css/jquery-ui-1.10.4.custom.css @@ -0,0 +1,733 @@ +/*! jQuery UI - v1.10.4 - 2014-01-21 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.button.css, jquery.ui.dialog.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { + display: none; +} +.ui-helper-hidden-accessible { + border: 0; + clip: rect(0 0 0 0); + height: 1px; + margin: -1px; + overflow: hidden; + padding: 0; + position: absolute; + width: 1px; +} +.ui-helper-reset { + margin: 0; + padding: 0; + border: 0; + outline: 0; + line-height: 1.3; + text-decoration: none; + font-size: 100%; + list-style: none; +} +.ui-helper-clearfix:before, +.ui-helper-clearfix:after { + content: ""; + display: table; + border-collapse: collapse; +} +.ui-helper-clearfix:after { + clear: both; +} +.ui-helper-clearfix { + min-height: 0; /* support: IE7 */ +} +.ui-helper-zfix { + width: 100%; + height: 100%; + top: 0; + left: 0; + position: absolute; + opacity: 0; + filter:Alpha(Opacity=0); +} + +.ui-front { + z-index: 100; +} + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { + cursor: default !important; +} + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + display: block; + text-indent: -99999px; + overflow: hidden; + background-repeat: no-repeat; +} + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; +} +.ui-resizable { + position: relative; +} +.ui-resizable-handle { + position: absolute; + font-size: 0.1px; + display: block; +} +.ui-resizable-disabled .ui-resizable-handle, +.ui-resizable-autohide .ui-resizable-handle { + display: none; +} +.ui-resizable-n { + cursor: n-resize; + height: 7px; + width: 100%; + top: -5px; + left: 0; +} +.ui-resizable-s { + cursor: s-resize; + height: 7px; + width: 100%; + bottom: -5px; + left: 0; +} +.ui-resizable-e { + cursor: e-resize; + width: 7px; + right: -5px; + top: 0; + height: 100%; +} +.ui-resizable-w { + cursor: w-resize; + width: 7px; + left: -5px; + top: 0; + height: 100%; +} +.ui-resizable-se { + cursor: se-resize; + width: 12px; + height: 12px; + right: 1px; + bottom: 1px; +} +.ui-resizable-sw { + cursor: sw-resize; + width: 9px; + height: 9px; + left: -5px; + bottom: -5px; +} +.ui-resizable-nw { + cursor: nw-resize; + width: 9px; + height: 9px; + left: -5px; + top: -5px; +} +.ui-resizable-ne { + cursor: ne-resize; + width: 9px; + height: 9px; + right: -5px; + top: -5px; +} +.ui-selectable-helper { + position: absolute; + z-index: 100; + border: 1px dotted black; +} +.ui-button { + display: inline-block; + position: relative; + padding: 0; + line-height: normal; + margin-right: .1em; + cursor: pointer; + vertical-align: middle; + text-align: center; + overflow: visible; /* removes extra width in IE */ +} +.ui-button, +.ui-button:link, +.ui-button:visited, +.ui-button:hover, +.ui-button:active { + text-decoration: none; +} +/* to make room for the icon, a width needs to be set here */ +.ui-button-icon-only { + width: 2.2em; +} +/* button elements seem to need a little more width */ +button.ui-button-icon-only { + width: 2.4em; +} +.ui-button-icons-only { + width: 3.4em; +} +button.ui-button-icons-only { + width: 3.7em; +} + +/* button text element */ +.ui-button .ui-button-text { + display: block; + line-height: normal; +} +.ui-button-text-only .ui-button-text { + padding: .4em 1em; +} +.ui-button-icon-only .ui-button-text, +.ui-button-icons-only .ui-button-text { + padding: .4em; + text-indent: -9999999px; +} +.ui-button-text-icon-primary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 1em .4em 2.1em; +} +.ui-button-text-icon-secondary .ui-button-text, +.ui-button-text-icons .ui-button-text { + padding: .4em 2.1em .4em 1em; +} +.ui-button-text-icons .ui-button-text { + padding-left: 2.1em; + padding-right: 2.1em; +} +/* no icon support for input elements, provide padding by default */ +input.ui-button { + padding: .4em 1em; +} + +/* button icon element(s) */ +.ui-button-icon-only .ui-icon, +.ui-button-text-icon-primary .ui-icon, +.ui-button-text-icon-secondary .ui-icon, +.ui-button-text-icons .ui-icon, +.ui-button-icons-only .ui-icon { + position: absolute; + top: 50%; + margin-top: -8px; +} +.ui-button-icon-only .ui-icon { + left: 50%; + margin-left: -8px; +} +.ui-button-text-icon-primary .ui-button-icon-primary, +.ui-button-text-icons .ui-button-icon-primary, +.ui-button-icons-only .ui-button-icon-primary { + left: .5em; +} +.ui-button-text-icon-secondary .ui-button-icon-secondary, +.ui-button-text-icons .ui-button-icon-secondary, +.ui-button-icons-only .ui-button-icon-secondary { + right: .5em; +} + +/* button sets */ +.ui-buttonset { + margin-right: 7px; +} +.ui-buttonset .ui-button { + margin-left: 0; + margin-right: -.3em; +} + +/* workarounds */ +/* reset extra padding in Firefox, see h5bp.com/l */ +input.ui-button::-moz-focus-inner, +button.ui-button::-moz-focus-inner { + border: 0; + padding: 0; +} +.ui-dialog { + overflow: hidden; + position: absolute; + top: 0; + left: 0; + padding: .2em; + outline: 0; +} +.ui-dialog .ui-dialog-titlebar { + padding: .4em 1em; + position: relative; +} +.ui-dialog .ui-dialog-title { + float: left; + margin: .1em 0; + white-space: nowrap; + width: 90%; + overflow: hidden; + text-overflow: ellipsis; +} +.ui-dialog .ui-dialog-titlebar-close { + position: absolute; + right: .3em; + top: 50%; + width: 20px; + margin: -10px 0 0 0; + padding: 1px; + height: 20px; +} +.ui-dialog .ui-dialog-content { + position: relative; + border: 0; + padding: .5em 1em; + background: none; + overflow: auto; +} +.ui-dialog .ui-dialog-buttonpane { + text-align: left; + border-width: 1px 0 0 0; + background-image: none; + margin-top: .5em; + padding: .3em 1em .5em .4em; +} +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { + float: right; +} +.ui-dialog .ui-dialog-buttonpane button { + margin: .5em .4em .5em 0; + cursor: pointer; +} +.ui-dialog .ui-resizable-se { + width: 12px; + height: 12px; + right: -5px; + bottom: -5px; + background-position: 16px 16px; +} +.ui-draggable .ui-dialog-titlebar { + cursor: move; +} +.ui-tooltip { + padding: 8px; + position: absolute; + z-index: 9999; + max-width: 300px; + -webkit-box-shadow: 0 0 5px #aaa; + box-shadow: 0 0 5px #aaa; +} +body .ui-tooltip { + border-width: 2px; +} + +/* Component containers +----------------------------------*/ +.ui-widget { + font-family: Verdana,Arial,sans-serif; + font-size: 1.1em; +} +.ui-widget .ui-widget { + font-size: 1em; +} +.ui-widget input, +.ui-widget select, +.ui-widget textarea, +.ui-widget button { + font-family: Verdana,Arial,sans-serif; + font-size: 1em; +} +.ui-widget-content { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x; + color: #222222; +} +.ui-widget-content a { + color: #222222; +} +.ui-widget-header { + border: 1px solid #aaaaaa; + background: #cccccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x; + color: #222222; + font-weight: bold; +} +.ui-widget-header a { + color: #222222; +} + +/* Interaction states +----------------------------------*/ +.ui-state-default, +.ui-widget-content .ui-state-default, +.ui-widget-header .ui-state-default { + border: 1px solid #d3d3d3; + background: #e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #555555; +} +.ui-state-default a, +.ui-state-default a:link, +.ui-state-default a:visited { + color: #555555; + text-decoration: none; +} +.ui-state-hover, +.ui-widget-content .ui-state-hover, +.ui-widget-header .ui-state-hover, +.ui-state-focus, +.ui-widget-content .ui-state-focus, +.ui-widget-header .ui-state-focus { + border: 1px solid #999999; + background: #dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-hover a, +.ui-state-hover a:hover, +.ui-state-hover a:link, +.ui-state-hover a:visited, +.ui-state-focus a, +.ui-state-focus a:hover, +.ui-state-focus a:link, +.ui-state-focus a:visited { + color: #212121; + text-decoration: none; +} +.ui-state-active, +.ui-widget-content .ui-state-active, +.ui-widget-header .ui-state-active { + border: 1px solid #aaaaaa; + background: #ffffff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x; + font-weight: normal; + color: #212121; +} +.ui-state-active a, +.ui-state-active a:link, +.ui-state-active a:visited { + color: #212121; + text-decoration: none; +} + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, +.ui-widget-content .ui-state-highlight, +.ui-widget-header .ui-state-highlight { + border: 1px solid #fcefa1; + background: #fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x; + color: #363636; +} +.ui-state-highlight a, +.ui-widget-content .ui-state-highlight a, +.ui-widget-header .ui-state-highlight a { + color: #363636; +} +.ui-state-error, +.ui-widget-content .ui-state-error, +.ui-widget-header .ui-state-error { + border: 1px solid #cd0a0a; + background: #fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; + color: #cd0a0a; +} +.ui-state-error a, +.ui-widget-content .ui-state-error a, +.ui-widget-header .ui-state-error a { + color: #cd0a0a; +} +.ui-state-error-text, +.ui-widget-content .ui-state-error-text, +.ui-widget-header .ui-state-error-text { + color: #cd0a0a; +} +.ui-priority-primary, +.ui-widget-content .ui-priority-primary, +.ui-widget-header .ui-priority-primary { + font-weight: bold; +} +.ui-priority-secondary, +.ui-widget-content .ui-priority-secondary, +.ui-widget-header .ui-priority-secondary { + opacity: .7; + filter:Alpha(Opacity=70); + font-weight: normal; +} +.ui-state-disabled, +.ui-widget-content .ui-state-disabled, +.ui-widget-header .ui-state-disabled { + opacity: .35; + filter:Alpha(Opacity=35); + background-image: none; +} +.ui-state-disabled .ui-icon { + filter:Alpha(Opacity=35); /* For IE8 - See #6059 */ +} + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { + width: 16px; + height: 16px; +} +.ui-icon, +.ui-widget-content .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-widget-header .ui-icon { + background-image: url(images/ui-icons_222222_256x240.png); +} +.ui-state-default .ui-icon { + background-image: url(images/ui-icons_888888_256x240.png); +} +.ui-state-hover .ui-icon, +.ui-state-focus .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-active .ui-icon { + background-image: url(images/ui-icons_454545_256x240.png); +} +.ui-state-highlight .ui-icon { + background-image: url(images/ui-icons_2e83ff_256x240.png); +} +.ui-state-error .ui-icon, +.ui-state-error-text .ui-icon { + background-image: url(images/ui-icons_cd0a0a_256x240.png); +} + +/* positioning */ +.ui-icon-blank { background-position: 16px 16px; } +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-on { background-position: -96px -144px; } +.ui-icon-radio-off { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, +.ui-corner-top, +.ui-corner-left, +.ui-corner-tl { + border-top-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-top, +.ui-corner-right, +.ui-corner-tr { + border-top-right-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-left, +.ui-corner-bl { + border-bottom-left-radius: 4px; +} +.ui-corner-all, +.ui-corner-bottom, +.ui-corner-right, +.ui-corner-br { + border-bottom-right-radius: 4px; +} + +/* Overlays */ +.ui-widget-overlay { + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); +} +.ui-widget-shadow { + margin: -8px 0 0 -8px; + padding: 8px; + background: #aaaaaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; + opacity: .3; + filter: Alpha(Opacity=30); + border-radius: 8px; +} diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/jquery-ui-1.10.4.custom.min.css b/copy_this/modules/bla/bla-tinymce/fileman/css/jquery-ui-1.10.4.custom.min.css new file mode 100644 index 0000000..0418dfd --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/css/jquery-ui-1.10.4.custom.min.css @@ -0,0 +1,7 @@ +/*! jQuery UI - v1.10.4 - 2014-01-21 +* http://jqueryui.com +* Includes: jquery.ui.core.css, jquery.ui.resizable.css, jquery.ui.selectable.css, jquery.ui.button.css, jquery.ui.dialog.css, jquery.ui.tooltip.css, jquery.ui.theme.css +* To view and modify this theme, visit http://jqueryui.com/themeroller/?ffDefault=Verdana%2CArial%2Csans-serif&fwDefault=normal&fsDefault=1.1em&cornerRadius=4px&bgColorHeader=cccccc&bgTextureHeader=highlight_soft&bgImgOpacityHeader=75&borderColorHeader=aaaaaa&fcHeader=222222&iconColorHeader=222222&bgColorContent=ffffff&bgTextureContent=flat&bgImgOpacityContent=75&borderColorContent=aaaaaa&fcContent=222222&iconColorContent=222222&bgColorDefault=e6e6e6&bgTextureDefault=glass&bgImgOpacityDefault=75&borderColorDefault=d3d3d3&fcDefault=555555&iconColorDefault=888888&bgColorHover=dadada&bgTextureHover=glass&bgImgOpacityHover=75&borderColorHover=999999&fcHover=212121&iconColorHover=454545&bgColorActive=ffffff&bgTextureActive=glass&bgImgOpacityActive=65&borderColorActive=aaaaaa&fcActive=212121&iconColorActive=454545&bgColorHighlight=fbf9ee&bgTextureHighlight=glass&bgImgOpacityHighlight=55&borderColorHighlight=fcefa1&fcHighlight=363636&iconColorHighlight=2e83ff&bgColorError=fef1ec&bgTextureError=glass&bgImgOpacityError=95&borderColorError=cd0a0a&fcError=cd0a0a&iconColorError=cd0a0a&bgColorOverlay=aaaaaa&bgTextureOverlay=flat&bgImgOpacityOverlay=0&opacityOverlay=30&bgColorShadow=aaaaaa&bgTextureShadow=flat&bgImgOpacityShadow=0&opacityShadow=30&thicknessShadow=8px&offsetTopShadow=-8px&offsetLeftShadow=-8px&cornerRadiusShadow=8px +* Copyright 2014 jQuery Foundation and other contributors; Licensed MIT */ + +.ui-helper-hidden{display:none}.ui-helper-hidden-accessible{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px}.ui-helper-reset{margin:0;padding:0;border:0;outline:0;line-height:1.3;text-decoration:none;font-size:100%;list-style:none}.ui-helper-clearfix:before,.ui-helper-clearfix:after{content:"";display:table;border-collapse:collapse}.ui-helper-clearfix:after{clear:both}.ui-helper-clearfix{min-height:0}.ui-helper-zfix{width:100%;height:100%;top:0;left:0;position:absolute;opacity:0;filter:Alpha(Opacity=0)}.ui-front{z-index:100}.ui-state-disabled{cursor:default!important}.ui-icon{display:block;text-indent:-99999px;overflow:hidden;background-repeat:no-repeat}.ui-widget-overlay{position:fixed;top:0;left:0;width:100%;height:100%}.ui-resizable{position:relative}.ui-resizable-handle{position:absolute;font-size:0.1px;display:block}.ui-resizable-disabled .ui-resizable-handle,.ui-resizable-autohide .ui-resizable-handle{display:none}.ui-resizable-n{cursor:n-resize;height:7px;width:100%;top:-5px;left:0}.ui-resizable-s{cursor:s-resize;height:7px;width:100%;bottom:-5px;left:0}.ui-resizable-e{cursor:e-resize;width:7px;right:-5px;top:0;height:100%}.ui-resizable-w{cursor:w-resize;width:7px;left:-5px;top:0;height:100%}.ui-resizable-se{cursor:se-resize;width:12px;height:12px;right:1px;bottom:1px}.ui-resizable-sw{cursor:sw-resize;width:9px;height:9px;left:-5px;bottom:-5px}.ui-resizable-nw{cursor:nw-resize;width:9px;height:9px;left:-5px;top:-5px}.ui-resizable-ne{cursor:ne-resize;width:9px;height:9px;right:-5px;top:-5px}.ui-selectable-helper{position:absolute;z-index:100;border:1px dotted black}.ui-button{display:inline-block;position:relative;padding:0;line-height:normal;margin-right:.1em;cursor:pointer;vertical-align:middle;text-align:center;overflow:visible}.ui-button,.ui-button:link,.ui-button:visited,.ui-button:hover,.ui-button:active{text-decoration:none}.ui-button-icon-only{width:2.2em}button.ui-button-icon-only{width:2.4em}.ui-button-icons-only{width:3.4em}button.ui-button-icons-only{width:3.7em}.ui-button .ui-button-text{display:block;line-height:normal}.ui-button-text-only .ui-button-text{padding:.4em 1em}.ui-button-icon-only .ui-button-text,.ui-button-icons-only .ui-button-text{padding:.4em;text-indent:-9999999px}.ui-button-text-icon-primary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 1em .4em 2.1em}.ui-button-text-icon-secondary .ui-button-text,.ui-button-text-icons .ui-button-text{padding:.4em 2.1em .4em 1em}.ui-button-text-icons .ui-button-text{padding-left:2.1em;padding-right:2.1em}input.ui-button{padding:.4em 1em}.ui-button-icon-only .ui-icon,.ui-button-text-icon-primary .ui-icon,.ui-button-text-icon-secondary .ui-icon,.ui-button-text-icons .ui-icon,.ui-button-icons-only .ui-icon{position:absolute;top:50%;margin-top:-8px}.ui-button-icon-only .ui-icon{left:50%;margin-left:-8px}.ui-button-text-icon-primary .ui-button-icon-primary,.ui-button-text-icons .ui-button-icon-primary,.ui-button-icons-only .ui-button-icon-primary{left:.5em}.ui-button-text-icon-secondary .ui-button-icon-secondary,.ui-button-text-icons .ui-button-icon-secondary,.ui-button-icons-only .ui-button-icon-secondary{right:.5em}.ui-buttonset{margin-right:7px}.ui-buttonset .ui-button{margin-left:0;margin-right:-.3em}input.ui-button::-moz-focus-inner,button.ui-button::-moz-focus-inner{border:0;padding:0}.ui-dialog{overflow:hidden;position:absolute;top:0;left:0;padding:.2em;outline:0}.ui-dialog .ui-dialog-titlebar{padding:.4em 1em;position:relative}.ui-dialog .ui-dialog-title{float:left;margin:.1em 0;white-space:nowrap;width:90%;overflow:hidden;text-overflow:ellipsis}.ui-dialog .ui-dialog-titlebar-close{position:absolute;right:.3em;top:50%;width:20px;margin:-10px 0 0 0;padding:1px;height:20px}.ui-dialog .ui-dialog-content{position:relative;border:0;padding:.5em 1em;background:none;overflow:auto}.ui-dialog .ui-dialog-buttonpane{text-align:left;border-width:1px 0 0 0;background-image:none;margin-top:.5em;padding:.3em 1em .5em .4em}.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset{float:right}.ui-dialog .ui-dialog-buttonpane button{margin:.5em .4em .5em 0;cursor:pointer}.ui-dialog .ui-resizable-se{width:12px;height:12px;right:-5px;bottom:-5px;background-position:16px 16px}.ui-draggable .ui-dialog-titlebar{cursor:move}.ui-tooltip{padding:8px;position:absolute;z-index:9999;max-width:300px;-webkit-box-shadow:0 0 5px #aaa;box-shadow:0 0 5px #aaa}body .ui-tooltip{border-width:2px}.ui-widget{font-family:Verdana,Arial,sans-serif;font-size:1.1em}.ui-widget .ui-widget{font-size:1em}.ui-widget input,.ui-widget select,.ui-widget textarea,.ui-widget button{font-family:Verdana,Arial,sans-serif;font-size:1em}.ui-widget-content{border:1px solid #aaa;background:#fff url(images/ui-bg_flat_75_ffffff_40x100.png) 50% 50% repeat-x;color:#222}.ui-widget-content a{color:#222}.ui-widget-header{border:1px solid #aaa;background:#ccc url(images/ui-bg_highlight-soft_75_cccccc_1x100.png) 50% 50% repeat-x;color:#222;font-weight:bold}.ui-widget-header a{color:#222}.ui-state-default,.ui-widget-content .ui-state-default,.ui-widget-header .ui-state-default{border:1px solid #d3d3d3;background:#e6e6e6 url(images/ui-bg_glass_75_e6e6e6_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#555}.ui-state-default a,.ui-state-default a:link,.ui-state-default a:visited{color:#555;text-decoration:none}.ui-state-hover,.ui-widget-content .ui-state-hover,.ui-widget-header .ui-state-hover,.ui-state-focus,.ui-widget-content .ui-state-focus,.ui-widget-header .ui-state-focus{border:1px solid #999;background:#dadada url(images/ui-bg_glass_75_dadada_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-hover a,.ui-state-hover a:hover,.ui-state-hover a:link,.ui-state-hover a:visited,.ui-state-focus a,.ui-state-focus a:hover,.ui-state-focus a:link,.ui-state-focus a:visited{color:#212121;text-decoration:none}.ui-state-active,.ui-widget-content .ui-state-active,.ui-widget-header .ui-state-active{border:1px solid #aaa;background:#fff url(images/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;font-weight:normal;color:#212121}.ui-state-active a,.ui-state-active a:link,.ui-state-active a:visited{color:#212121;text-decoration:none}.ui-state-highlight,.ui-widget-content .ui-state-highlight,.ui-widget-header .ui-state-highlight{border:1px solid #fcefa1;background:#fbf9ee url(images/ui-bg_glass_55_fbf9ee_1x400.png) 50% 50% repeat-x;color:#363636}.ui-state-highlight a,.ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a{color:#363636}.ui-state-error,.ui-widget-content .ui-state-error,.ui-widget-header .ui-state-error{border:1px solid #cd0a0a;background:#fef1ec url(images/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x;color:#cd0a0a}.ui-state-error a,.ui-widget-content .ui-state-error a,.ui-widget-header .ui-state-error a{color:#cd0a0a}.ui-state-error-text,.ui-widget-content .ui-state-error-text,.ui-widget-header .ui-state-error-text{color:#cd0a0a}.ui-priority-primary,.ui-widget-content .ui-priority-primary,.ui-widget-header .ui-priority-primary{font-weight:bold}.ui-priority-secondary,.ui-widget-content .ui-priority-secondary,.ui-widget-header .ui-priority-secondary{opacity:.7;filter:Alpha(Opacity=70);font-weight:normal}.ui-state-disabled,.ui-widget-content .ui-state-disabled,.ui-widget-header .ui-state-disabled{opacity:.35;filter:Alpha(Opacity=35);background-image:none}.ui-state-disabled .ui-icon{filter:Alpha(Opacity=35)}.ui-icon{width:16px;height:16px}.ui-icon,.ui-widget-content .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-widget-header .ui-icon{background-image:url(images/ui-icons_222222_256x240.png)}.ui-state-default .ui-icon{background-image:url(images/ui-icons_888888_256x240.png)}.ui-state-hover .ui-icon,.ui-state-focus .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-active .ui-icon{background-image:url(images/ui-icons_454545_256x240.png)}.ui-state-highlight .ui-icon{background-image:url(images/ui-icons_2e83ff_256x240.png)}.ui-state-error .ui-icon,.ui-state-error-text .ui-icon{background-image:url(images/ui-icons_cd0a0a_256x240.png)}.ui-icon-blank{background-position:16px 16px}.ui-icon-carat-1-n{background-position:0 0}.ui-icon-carat-1-ne{background-position:-16px 0}.ui-icon-carat-1-e{background-position:-32px 0}.ui-icon-carat-1-se{background-position:-48px 0}.ui-icon-carat-1-s{background-position:-64px 0}.ui-icon-carat-1-sw{background-position:-80px 0}.ui-icon-carat-1-w{background-position:-96px 0}.ui-icon-carat-1-nw{background-position:-112px 0}.ui-icon-carat-2-n-s{background-position:-128px 0}.ui-icon-carat-2-e-w{background-position:-144px 0}.ui-icon-triangle-1-n{background-position:0 -16px}.ui-icon-triangle-1-ne{background-position:-16px -16px}.ui-icon-triangle-1-e{background-position:-32px -16px}.ui-icon-triangle-1-se{background-position:-48px -16px}.ui-icon-triangle-1-s{background-position:-64px -16px}.ui-icon-triangle-1-sw{background-position:-80px -16px}.ui-icon-triangle-1-w{background-position:-96px -16px}.ui-icon-triangle-1-nw{background-position:-112px -16px}.ui-icon-triangle-2-n-s{background-position:-128px -16px}.ui-icon-triangle-2-e-w{background-position:-144px -16px}.ui-icon-arrow-1-n{background-position:0 -32px}.ui-icon-arrow-1-ne{background-position:-16px -32px}.ui-icon-arrow-1-e{background-position:-32px -32px}.ui-icon-arrow-1-se{background-position:-48px -32px}.ui-icon-arrow-1-s{background-position:-64px -32px}.ui-icon-arrow-1-sw{background-position:-80px -32px}.ui-icon-arrow-1-w{background-position:-96px -32px}.ui-icon-arrow-1-nw{background-position:-112px -32px}.ui-icon-arrow-2-n-s{background-position:-128px -32px}.ui-icon-arrow-2-ne-sw{background-position:-144px -32px}.ui-icon-arrow-2-e-w{background-position:-160px -32px}.ui-icon-arrow-2-se-nw{background-position:-176px -32px}.ui-icon-arrowstop-1-n{background-position:-192px -32px}.ui-icon-arrowstop-1-e{background-position:-208px -32px}.ui-icon-arrowstop-1-s{background-position:-224px -32px}.ui-icon-arrowstop-1-w{background-position:-240px -32px}.ui-icon-arrowthick-1-n{background-position:0 -48px}.ui-icon-arrowthick-1-ne{background-position:-16px -48px}.ui-icon-arrowthick-1-e{background-position:-32px -48px}.ui-icon-arrowthick-1-se{background-position:-48px -48px}.ui-icon-arrowthick-1-s{background-position:-64px -48px}.ui-icon-arrowthick-1-sw{background-position:-80px -48px}.ui-icon-arrowthick-1-w{background-position:-96px -48px}.ui-icon-arrowthick-1-nw{background-position:-112px -48px}.ui-icon-arrowthick-2-n-s{background-position:-128px -48px}.ui-icon-arrowthick-2-ne-sw{background-position:-144px -48px}.ui-icon-arrowthick-2-e-w{background-position:-160px -48px}.ui-icon-arrowthick-2-se-nw{background-position:-176px -48px}.ui-icon-arrowthickstop-1-n{background-position:-192px -48px}.ui-icon-arrowthickstop-1-e{background-position:-208px -48px}.ui-icon-arrowthickstop-1-s{background-position:-224px -48px}.ui-icon-arrowthickstop-1-w{background-position:-240px -48px}.ui-icon-arrowreturnthick-1-w{background-position:0 -64px}.ui-icon-arrowreturnthick-1-n{background-position:-16px -64px}.ui-icon-arrowreturnthick-1-e{background-position:-32px -64px}.ui-icon-arrowreturnthick-1-s{background-position:-48px -64px}.ui-icon-arrowreturn-1-w{background-position:-64px -64px}.ui-icon-arrowreturn-1-n{background-position:-80px -64px}.ui-icon-arrowreturn-1-e{background-position:-96px -64px}.ui-icon-arrowreturn-1-s{background-position:-112px -64px}.ui-icon-arrowrefresh-1-w{background-position:-128px -64px}.ui-icon-arrowrefresh-1-n{background-position:-144px -64px}.ui-icon-arrowrefresh-1-e{background-position:-160px -64px}.ui-icon-arrowrefresh-1-s{background-position:-176px -64px}.ui-icon-arrow-4{background-position:0 -80px}.ui-icon-arrow-4-diag{background-position:-16px -80px}.ui-icon-extlink{background-position:-32px -80px}.ui-icon-newwin{background-position:-48px -80px}.ui-icon-refresh{background-position:-64px -80px}.ui-icon-shuffle{background-position:-80px -80px}.ui-icon-transfer-e-w{background-position:-96px -80px}.ui-icon-transferthick-e-w{background-position:-112px -80px}.ui-icon-folder-collapsed{background-position:0 -96px}.ui-icon-folder-open{background-position:-16px -96px}.ui-icon-document{background-position:-32px -96px}.ui-icon-document-b{background-position:-48px -96px}.ui-icon-note{background-position:-64px -96px}.ui-icon-mail-closed{background-position:-80px -96px}.ui-icon-mail-open{background-position:-96px -96px}.ui-icon-suitcase{background-position:-112px -96px}.ui-icon-comment{background-position:-128px -96px}.ui-icon-person{background-position:-144px -96px}.ui-icon-print{background-position:-160px -96px}.ui-icon-trash{background-position:-176px -96px}.ui-icon-locked{background-position:-192px -96px}.ui-icon-unlocked{background-position:-208px -96px}.ui-icon-bookmark{background-position:-224px -96px}.ui-icon-tag{background-position:-240px -96px}.ui-icon-home{background-position:0 -112px}.ui-icon-flag{background-position:-16px -112px}.ui-icon-calendar{background-position:-32px -112px}.ui-icon-cart{background-position:-48px -112px}.ui-icon-pencil{background-position:-64px -112px}.ui-icon-clock{background-position:-80px -112px}.ui-icon-disk{background-position:-96px -112px}.ui-icon-calculator{background-position:-112px -112px}.ui-icon-zoomin{background-position:-128px -112px}.ui-icon-zoomout{background-position:-144px -112px}.ui-icon-search{background-position:-160px -112px}.ui-icon-wrench{background-position:-176px -112px}.ui-icon-gear{background-position:-192px -112px}.ui-icon-heart{background-position:-208px -112px}.ui-icon-star{background-position:-224px -112px}.ui-icon-link{background-position:-240px -112px}.ui-icon-cancel{background-position:0 -128px}.ui-icon-plus{background-position:-16px -128px}.ui-icon-plusthick{background-position:-32px -128px}.ui-icon-minus{background-position:-48px -128px}.ui-icon-minusthick{background-position:-64px -128px}.ui-icon-close{background-position:-80px -128px}.ui-icon-closethick{background-position:-96px -128px}.ui-icon-key{background-position:-112px -128px}.ui-icon-lightbulb{background-position:-128px -128px}.ui-icon-scissors{background-position:-144px -128px}.ui-icon-clipboard{background-position:-160px -128px}.ui-icon-copy{background-position:-176px -128px}.ui-icon-contact{background-position:-192px -128px}.ui-icon-image{background-position:-208px -128px}.ui-icon-video{background-position:-224px -128px}.ui-icon-script{background-position:-240px -128px}.ui-icon-alert{background-position:0 -144px}.ui-icon-info{background-position:-16px -144px}.ui-icon-notice{background-position:-32px -144px}.ui-icon-help{background-position:-48px -144px}.ui-icon-check{background-position:-64px -144px}.ui-icon-bullet{background-position:-80px -144px}.ui-icon-radio-on{background-position:-96px -144px}.ui-icon-radio-off{background-position:-112px -144px}.ui-icon-pin-w{background-position:-128px -144px}.ui-icon-pin-s{background-position:-144px -144px}.ui-icon-play{background-position:0 -160px}.ui-icon-pause{background-position:-16px -160px}.ui-icon-seek-next{background-position:-32px -160px}.ui-icon-seek-prev{background-position:-48px -160px}.ui-icon-seek-end{background-position:-64px -160px}.ui-icon-seek-start{background-position:-80px -160px}.ui-icon-seek-first{background-position:-80px -160px}.ui-icon-stop{background-position:-96px -160px}.ui-icon-eject{background-position:-112px -160px}.ui-icon-volume-off{background-position:-128px -160px}.ui-icon-volume-on{background-position:-144px -160px}.ui-icon-power{background-position:0 -176px}.ui-icon-signal-diag{background-position:-16px -176px}.ui-icon-signal{background-position:-32px -176px}.ui-icon-battery-0{background-position:-48px -176px}.ui-icon-battery-1{background-position:-64px -176px}.ui-icon-battery-2{background-position:-80px -176px}.ui-icon-battery-3{background-position:-96px -176px}.ui-icon-circle-plus{background-position:0 -192px}.ui-icon-circle-minus{background-position:-16px -192px}.ui-icon-circle-close{background-position:-32px -192px}.ui-icon-circle-triangle-e{background-position:-48px -192px}.ui-icon-circle-triangle-s{background-position:-64px -192px}.ui-icon-circle-triangle-w{background-position:-80px -192px}.ui-icon-circle-triangle-n{background-position:-96px -192px}.ui-icon-circle-arrow-e{background-position:-112px -192px}.ui-icon-circle-arrow-s{background-position:-128px -192px}.ui-icon-circle-arrow-w{background-position:-144px -192px}.ui-icon-circle-arrow-n{background-position:-160px -192px}.ui-icon-circle-zoomin{background-position:-176px -192px}.ui-icon-circle-zoomout{background-position:-192px -192px}.ui-icon-circle-check{background-position:-208px -192px}.ui-icon-circlesmall-plus{background-position:0 -208px}.ui-icon-circlesmall-minus{background-position:-16px -208px}.ui-icon-circlesmall-close{background-position:-32px -208px}.ui-icon-squaresmall-plus{background-position:-48px -208px}.ui-icon-squaresmall-minus{background-position:-64px -208px}.ui-icon-squaresmall-close{background-position:-80px -208px}.ui-icon-grip-dotted-vertical{background-position:0 -224px}.ui-icon-grip-dotted-horizontal{background-position:-16px -224px}.ui-icon-grip-solid-vertical{background-position:-32px -224px}.ui-icon-grip-solid-horizontal{background-position:-48px -224px}.ui-icon-gripsmall-diagonal-se{background-position:-64px -224px}.ui-icon-grip-diagonal-se{background-position:-80px -224px}.ui-corner-all,.ui-corner-top,.ui-corner-left,.ui-corner-tl{border-top-left-radius:4px}.ui-corner-all,.ui-corner-top,.ui-corner-right,.ui-corner-tr{border-top-right-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-left,.ui-corner-bl{border-bottom-left-radius:4px}.ui-corner-all,.ui-corner-bottom,.ui-corner-right,.ui-corner-br{border-bottom-right-radius:4px}.ui-widget-overlay{background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30)}.ui-widget-shadow{margin:-8px 0 0 -8px;padding:8px;background:#aaa url(images/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x;opacity:.3;filter:Alpha(Opacity=30);border-radius:8px} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/main.css b/copy_this/modules/bla/bla-tinymce/fileman/css/main.css new file mode 100644 index 0000000..0355f7a --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/css/main.css @@ -0,0 +1,308 @@ +/* + RoxyFileman - web based file manager. Ready to use with CKEditor, TinyMCE. + Can be easily integrated with any other WYSIWYG editor or CMS. + + Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved. + For licensing, see LICENSE.txt or http://RoxyFileman.com/license + + 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. + + 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 . + + Contact: Lyubomir Arsov, liubo (at) web-lobby.com +*/ +body{ + font-family: Verdana; + font-size: 11px; + padding:0; + margin:0; + background:#FFF; + height:100%; + width:100%; +} +a{text-decoration:none;color:#DD7700;} +ul{ + list-style:none; + margin:0; + padding:0; +} +#wraper{ + width:100%; + height:100%; +} +#wraper,#dlgNewDir,#dlgFileProp,#dlgAddFile,#menuDir, +#menuFile,#pnlRenameFile,#pnlLoadingDirs, +#pnlDirName,#pnlLoading,#pnlEmptyDir, +#pnlSearchNoFiles,#pnlFileProp, #pnlDirList ul{ + display:none; +} +.contextMenu a:hover, +#pnlFileList .selected,#pnlFileList .selected:hover, +#menuFile a:hover{ + background-color: #000099 !important; + color:#FFF; +} +#pnlDirList .selected,#pnlDirList div.selected:hover{background-color: #DFD !important;} +.dialog input{width:97%;} +.filesize{font-weight:bold;margin-top:4px;display:inline-block;} +.pnlDragFile,.pnlDragDir{ + background:#FFF; + opacity:0.8; + float:left; + width:auto !important; +} +#pnlStatus{ + padding:5px; +} +.scrollPane{ + height:400px; + overflow: auto; +} +.bottomLine{background:#DDD;border-top:1px solid #CCC;} +.pale{opacity:0.5;} +/* Search and order fields */ +#txtSearch,#ddlOrder{ + border:1px solid #CCC; + border-radius:3px; +} +#txtSearch{ + padding:0 22px 0 3px; + background:url(../images/sprite.png) no-repeat 87px -314px; + width:80px; + height:20px; +} +input[type=text]::-ms-clear { display: none; } +/* END OF Search and order fields */ + +/* Directory tree */ +.pnlDirs{ + width:260px; + overflow:auto; + border-right:1px solid #DDD; +} +#pnlDirList{margin-left:4px;} +#pnlDirList ul{padding:0 0 0 20px;} +#pnlDirList .dir{ + line-height:30px; + float:left; + margin-right:5px; +} +#pnlDirList .dirPlus{ + float:left; + margin: 3px 3px 0 0; +} +#pnlDirList li,#pnlDirList div{ + float:left; + clear:both; + width:98%; +} +#pnlDirList div{padding:3px;cursor:pointer;} +#pnlLoadingDirs{margin-left:5px;} +/* END OF Directory tree */ + +/* File list */ +.pnlFiles{padding-left:4px;} +#pnlFileList .icon{float:left;margin-right:3px;} +#pnlFileList li{float:left;padding:3px;clear:both;width:98%;cursor:pointer;} +#pnlFileList li:hover,#pnlDirList li div:hover{background:#FFFFCC !important;} +#pnlFileList .size{float:right;margin-left:20px;} +#pnlFileList .time{float:right;margin-left:15px;width:130px;} +.imgPreview{max-width:300px;} +/* END OF File list */ + +/* Context menus */ +.contextMenu{ + position:absolute; + background-color:#DDD; + border:1px solid #BBB; + min-width:100px; + font-weight: bold; + z-index:1000 !important; +} +.contextMenu a{ + background-repeat:no-repeat; + background-position: 4px 6px; + padding: 5px 25px 5px 20px; + display:block; + color:#000; + text-decoration:none; +} +hr{margin:0;color:#AAA;} +/* END OF Context menus */ + +/* Buttons */ +.actions{padding:3px 0 10px 5px;} +.actions input{ + background-repeat:no-repeat; + background-position: 3px center; + padding:0 3px 0 18px; + height:22px; + font-size: 11px; + border:1px solid #CCC; + background-color: #EEE; + border-radius:3px; + margin-bottom: 3px; +} +.actions input[type=button]:hover,.actions input.selected{background-color: #DFD;cursor:pointer;} +#btnAddDir{background-image:url(../images/sprite.png);background-position: 4px -213px;} +#mnuCreateDir{background-image:url(../images/sprite.png);background-position: 4px -210px;} +#mnuDownloadDir{background-image:url(../images/sprite.png);background-position: 4px 7px;} +#btnDeleteDir{background-image:url(../images/sprite.png);background-position: 4px -237px;} +#mnuDeleteDir{background-image:url(../images/sprite.png);background-position: 4px -235px;} +#btnAddFile{background-image:url(../images/sprite.png);background-position: 4px -81px;} +#btnDeleteFile{background-image:url(../images/sprite.png);background-position: 4px -104px;} +#mnuDeleteFile{background-image:url(../images/sprite.png);background-position: 4px -102px;} +#btnDeleteFile{margin-right:15px;} +#btnDownloadFile{background-image:url(../images/sprite.png);background-position: 4px -128px;} +#mnuDownload{background-image:url(../images/sprite.png);background-position: 4px -126px;} +#btnPreviewFile{background-image:url(../images/sprite.png);background-position: 4px -285px;} +#mnuPreview{background-image:url(../images/sprite.png);background-position: 4px -283px;} +#btnSelectFile{background-image:url(../images/sprite.png);background-position: 4px -399px;} +#mnuSelectFile{background-image:url(../images/sprite.png);background-position: 4px -397px;} +#btnThumbView{background-image:url(../images/sprite.png);background-position: center -447px;} +#btnListView{background-image:url(../images/sprite.png);background-position: center -483px;} +#btnRenameFile,#btnRenameDir{background-image:url(../images/sprite.png);background-position: 4px 4px;} +#mnuRenameDir,#mnuRenameFile{background-image:url(../images/sprite.png);background-position: 4px 7px;} +#mnuDirCut,#mnuFileCut{background-image:url(../images/sprite.png);background-position: 4px -47px;} +#mnuDirCopy,#mnuFileCopy{background-image:url(../images/sprite.png);background-position: 4px -20px;} +#mnuDirPaste,#mnuFilePaste{background-image:url(../images/sprite.png);background-position: 4px -370px;} + +/* END OF Buttons */ +/* File list views */ +ul#pnlFileList.thumbView li{ + /* + width:140px; + height: 140px; + */ + float:left !important; + clear:none; + margin:0 6px 6px 0; + overflow:hidden; + padding:10px; + text-align:center; + vertical-align:middle; + border: 1px solid #EEE; + border-radius: 5px; + position:relative; + background:#EEE; +} +ul#pnlFileList.thumbView .name,ul#pnlFileList.thumbView .time{display:none;} +ul#pnlFileList.thumbView .icon{ + clear:both; + float:none; + margin:0 !important; + text-align:center; + vertical-align:middle; + background-position:center center; + background-repeat:no-repeat; + /* + width:140px; + height:120px; + */ +} +ul#pnlFileList.thumbView .size{ + display:block !important; + width:95% !important; + position:absolute; + bottom:5px; + margin:0; +} +/* END OF File list views */ +#fileUploads{width:100%;} +.uploadFilesList{ + width:100%; + height:300px; + overflow:auto; +} +#uploadResult{ + +} +div.ui-tooltip { + max-width: 90%; +} +/* Upload dialog */ +.uploadFilesList{ + font-size: 11px; +} +.fileUpload{ + margin: 8px 0 0 0; + position: relative; + border:1px solid #EEE; +} +.fileUpload .error{font-weight:bold;} +.fileName{ + z-index:2; + line-height: 20px; + height:20px; + overflow: hidden; + padding:0 13px 0 5px; +} +.progressPercent{z-index:2;} +.stripes{ + background: url('../images/stripes.gif') repeat-x; + -moz-opacity: 0.40; + -khtml-opacity: 0.40; + opacity: 0.40; + -ms-filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=40); + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=40); + filter: alpha(opacity=40); + width:100%; + height:100%; + z-index:-1; + position: relative; +} +.uploadProgress{ + position: absolute; + width:0; + height:100%; + top:0; + left:0; + z-index:-1; + background: #d3edff; + background: -moz-linear-gradient(top, #d3edff 0%, #cbebff 47%, #a1dbff 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#d3edff), color-stop(47%,#cbebff), color-stop(100%,#a1dbff)); + background: -webkit-linear-gradient(top, #d3edff 0%,#cbebff 47%,#a1dbff 100%); + background: -o-linear-gradient(top, #d3edff 0%,#cbebff 47%,#a1dbff 100%); + background: -ms-linear-gradient(top, #d3edff 0%,#cbebff 47%,#a1dbff 100%); + background: linear-gradient(to bottom, #d3edff 0%,#cbebff 47%,#a1dbff 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#d3edff', endColorstr='#a1dbff',GradientType=0 ); +} +.uploadError{ + background: #ff8787; + background: -moz-linear-gradient(top, #ff8787 0%, #ffa3a3 45%, #ff5e5e 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#ff8787), color-stop(45%,#ffa3a3), color-stop(100%,#ff5e5e)); + background: -webkit-linear-gradient(top, #ff8787 0%,#ffa3a3 45%,#ff5e5e 100%); + background: -o-linear-gradient(top, #ff8787 0%,#ffa3a3 45%,#ff5e5e 100%); + background: -ms-linear-gradient(top, #ff8787 0%,#ffa3a3 45%,#ff5e5e 100%); + background: linear-gradient(to bottom, #ff8787 0%,#ffa3a3 45%,#ff5e5e 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ff8787', endColorstr='#ff5e5e',GradientType=0 ); +} +.uploadComplete{ + background: #dbff87; + background: -moz-linear-gradient(top, #dbff87 0%, #e0f49c 45%, #bddd49 100%); + background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#dbff87), color-stop(45%,#e0f49c), color-stop(100%,#bddd49)); + background: -webkit-linear-gradient(top, #dbff87 0%,#e0f49c 45%,#bddd49 100%); + background: -o-linear-gradient(top, #dbff87 0%,#e0f49c 45%,#bddd49 100%); + background: -ms-linear-gradient(top, #dbff87 0%,#e0f49c 45%,#bddd49 100%); + background: linear-gradient(to bottom, #dbff87 0%,#e0f49c 45%,#bddd49 100%); + filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#dbff87', endColorstr='#bddd49',GradientType=0 ); +} +.uploadError .stripes,.uploadComplete .stripes{display:none;} +.removeUpload{ + background:url(../images/sprite.png) no-repeat 6px -421px; + position:absolute; + right:0; + top:0; + height: 100%; + width:20px; + cursor:pointer; +} +/* END OF Upload dialog */ \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/css/main.min.css b/copy_this/modules/bla/bla-tinymce/fileman/css/main.min.css new file mode 100644 index 0000000..98c23d2 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/css/main.min.css @@ -0,0 +1 @@ +body{font-family:Verdana;font-size:11px;padding:0;margin:0;background:#FFF;height:100%;width:100%}a{text-decoration:none;color:#d70}ul{list-style:none;margin:0;padding:0}#wraper{width:100%;height:100%}#wraper,#dlgNewDir,#dlgFileProp,#dlgAddFile,#menuDir,#menuFile,#pnlRenameFile,#pnlLoadingDirs,#pnlDirName,#pnlLoading,#pnlEmptyDir,#pnlSearchNoFiles,#pnlFileProp,#pnlDirList ul{display:none}.contextMenu a:hover,#pnlFileList .selected,#pnlFileList .selected:hover,#menuFile a:hover{background-color:#009!important;color:#FFF}#pnlDirList .selected,#pnlDirList div.selected:hover{background-color:#DFD!important}.dialog input{width:97%}.filesize{font-weight:bold;margin-top:4px;display:inline-block}.pnlDragFile,.pnlDragDir{background:#FFF;opacity:.8;float:left;width:auto!important}#pnlStatus{padding:5px}.scrollPane{height:400px;overflow:auto}.bottomLine{background:#DDD;border-top:1px solid #CCC}.pale{opacity:.5}#txtSearch,#ddlOrder{border:1px solid #CCC;border-radius:3px}#txtSearch{padding:0 22px 0 3px;background:url(../images/sprite.png) no-repeat 87px -314px;width:80px;height:20px}input[type=text]::-ms-clear{display:none}.pnlDirs{width:260px;overflow:auto;border-right:1px solid #DDD}#pnlDirList{margin-left:4px}#pnlDirList ul{padding:0 0 0 20px}#pnlDirList .dir{line-height:30px;float:left;margin-right:5px}#pnlDirList .dirPlus{float:left;margin:3px 3px 0 0}#pnlDirList li,#pnlDirList div{float:left;clear:both;width:98%}#pnlDirList div{padding:3px;cursor:pointer}#pnlLoadingDirs{margin-left:5px}.pnlFiles{padding-left:4px}#pnlFileList .icon{float:left;margin-right:3px}#pnlFileList li{float:left;padding:3px;clear:both;width:98%;cursor:pointer}#pnlFileList li:hover,#pnlDirList li div:hover{background:#ffc!important}#pnlFileList .size{float:right;margin-left:20px}#pnlFileList .time{float:right;margin-left:15px;width:130px}.imgPreview{max-width:300px}.contextMenu{position:absolute;background-color:#DDD;border:1px solid #BBB;min-width:100px;font-weight:bold;z-index:1000!important}.contextMenu a{background-repeat:no-repeat;background-position:4px 6px;padding:5px 25px 5px 20px;display:block;color:#000;text-decoration:none}hr{margin:0;color:#AAA}.actions{padding:3px 0 10px 5px}.actions input{background-repeat:no-repeat;background-position:3px center;padding:0 3px 0 18px;height:22px;font-size:11px;border:1px solid #CCC;background-color:#EEE;border-radius:3px;margin-bottom:3px}.actions input[type=button]:hover,.actions input.selected{background-color:#DFD;cursor:pointer}#btnAddDir{background-image:url(../images/sprite.png);background-position:4px -213px}#mnuCreateDir{background-image:url(../images/sprite.png);background-position:4px -210px}#mnuDownloadDir{background-image:url(../images/sprite.png);background-position:4px 7px}#btnDeleteDir{background-image:url(../images/sprite.png);background-position:4px -237px}#mnuDeleteDir{background-image:url(../images/sprite.png);background-position:4px -235px}#btnAddFile{background-image:url(../images/sprite.png);background-position:4px -81px}#btnDeleteFile{background-image:url(../images/sprite.png);background-position:4px -104px}#mnuDeleteFile{background-image:url(../images/sprite.png);background-position:4px -102px}#btnDeleteFile{margin-right:15px}#btnDownloadFile{background-image:url(../images/sprite.png);background-position:4px -128px}#mnuDownload{background-image:url(../images/sprite.png);background-position:4px -126px}#btnPreviewFile{background-image:url(../images/sprite.png);background-position:4px -285px}#mnuPreview{background-image:url(../images/sprite.png);background-position:4px -283px}#btnSelectFile{background-image:url(../images/sprite.png);background-position:4px -399px}#mnuSelectFile{background-image:url(../images/sprite.png);background-position:4px -397px}#btnThumbView{background-image:url(../images/sprite.png);background-position:center -447px}#btnListView{background-image:url(../images/sprite.png);background-position:center -483px}#btnRenameFile,#btnRenameDir{background-image:url(../images/sprite.png);background-position:4px 4px}#mnuRenameDir,#mnuRenameFile{background-image:url(../images/sprite.png);background-position:4px 7px}#mnuDirCut,#mnuFileCut{background-image:url(../images/sprite.png);background-position:4px -47px}#mnuDirCopy,#mnuFileCopy{background-image:url(../images/sprite.png);background-position:4px -20px}#mnuDirPaste,#mnuFilePaste{background-image:url(../images/sprite.png);background-position:4px -370px}ul#pnlFileList.thumbView li{float:left!important;clear:none;margin:0 6px 6px 0;overflow:hidden;padding:10px;text-align:center;vertical-align:middle;border:1px solid #EEE;border-radius:5px;position:relative;background:#EEE}ul#pnlFileList.thumbView .name,ul#pnlFileList.thumbView .time{display:none}ul#pnlFileList.thumbView .icon{clear:both;float:none;margin:0!important;text-align:center;vertical-align:middle;background-position:center center;background-repeat:no-repeat}ul#pnlFileList.thumbView .size{display:block!important;width:95%!important;position:absolute;bottom:5px;margin:0}#fileUploads{width:100%}.uploadFilesList{width:100%;height:300px;overflow:auto}div.ui-tooltip{max-width:90%}.uploadFilesList{font-size:11px}.fileUpload{margin:8px 0 0 0;position:relative;border:1px solid #EEE}.fileUpload .error{font-weight:bold}.fileName{z-index:2;line-height:20px;height:20px;overflow:hidden;padding:0 13px 0 5px}.progressPercent{z-index:2}.stripes{background:url('../images/stripes.gif') repeat-x;-moz-opacity:.40;-khtml-opacity:.40;opacity:.40;-ms-filter:alpha(opacity=40);filter:alpha(opacity=40);filter:alpha(opacity=40);width:100%;height:100%;z-index:-1;position:relative}.uploadProgress{position:absolute;width:0;height:100%;top:0;left:0;z-index:-1;background:#d3edff;background:-moz-linear-gradient(top,#d3edff 0,#cbebff 47%,#a1dbff 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#d3edff),color-stop(47%,#cbebff),color-stop(100%,#a1dbff));background:-webkit-linear-gradient(top,#d3edff 0,#cbebff 47%,#a1dbff 100%);background:-o-linear-gradient(top,#d3edff 0,#cbebff 47%,#a1dbff 100%);background:-ms-linear-gradient(top,#d3edff 0,#cbebff 47%,#a1dbff 100%);background:linear-gradient(to bottom,#d3edff 0,#cbebff 47%,#a1dbff 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#d3edff',endColorstr='#a1dbff',GradientType=0)}.uploadError{background:#ff8787;background:-moz-linear-gradient(top,#ff8787 0,#ffa3a3 45%,#ff5e5e 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#ff8787),color-stop(45%,#ffa3a3),color-stop(100%,#ff5e5e));background:-webkit-linear-gradient(top,#ff8787 0,#ffa3a3 45%,#ff5e5e 100%);background:-o-linear-gradient(top,#ff8787 0,#ffa3a3 45%,#ff5e5e 100%);background:-ms-linear-gradient(top,#ff8787 0,#ffa3a3 45%,#ff5e5e 100%);background:linear-gradient(to bottom,#ff8787 0,#ffa3a3 45%,#ff5e5e 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff8787',endColorstr='#ff5e5e',GradientType=0)}.uploadComplete{background:#dbff87;background:-moz-linear-gradient(top,#dbff87 0,#e0f49c 45%,#bddd49 100%);background:-webkit-gradient(linear,left top,left bottom,color-stop(0%,#dbff87),color-stop(45%,#e0f49c),color-stop(100%,#bddd49));background:-webkit-linear-gradient(top,#dbff87 0,#e0f49c 45%,#bddd49 100%);background:-o-linear-gradient(top,#dbff87 0,#e0f49c 45%,#bddd49 100%);background:-ms-linear-gradient(top,#dbff87 0,#e0f49c 45%,#bddd49 100%);background:linear-gradient(to bottom,#dbff87 0,#e0f49c 45%,#bddd49 100%);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#dbff87',endColorstr='#bddd49',GradientType=0)}.uploadError .stripes,.uploadComplete .stripes{display:none}.removeUpload{background:url(../images/sprite.png) no-repeat 6px -421px;position:absolute;right:0;top:0;height:100%;width:20px;cursor:pointer} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/dev.html b/copy_this/modules/bla/bla-tinymce/fileman/dev.html new file mode 100644 index 0000000..7239b61 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/dev.html @@ -0,0 +1,153 @@ + + + + + +Roxy file manager + + + + + + + + + + + + + + + + + + + + + + + +
    +
    + + + +
    +
    + Loading directories...
    + +
    +
    +
      +
      +
      + + +
      + + + + + + +
      + Order by: +    + +    + +
      +
      +
      +
      + Loading files...
      + +
      +
      + This folder is empty +
      +
      + No files found +
      +
        +
        +
        +
        +    © 2013 - RoxyFileman + +
        Status bar
        +
        + + + +
        +
        + +

        + +
        +
        +
        +
        +
        +
        +
        + + +
        +
        + +
        +
        +
        + +
        + + + diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/action-folder-paste.png b/copy_this/modules/bla/bla-tinymce/fileman/images/action-folder-paste.png new file mode 100644 index 0000000..438a639 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/action-folder-paste.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/action-folder-rename.png b/copy_this/modules/bla/bla-tinymce/fileman/images/action-folder-rename.png new file mode 100644 index 0000000..34ec676 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/action-folder-rename.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/arrow_down.png b/copy_this/modules/bla/bla-tinymce/fileman/images/arrow_down.png new file mode 100644 index 0000000..691f6e0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/arrow_down.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/arrow_up.png b/copy_this/modules/bla/bla-tinymce/fileman/images/arrow_up.png new file mode 100644 index 0000000..30d005f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/arrow_up.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/blank.gif b/copy_this/modules/bla/bla-tinymce/fileman/images/blank.gif new file mode 100644 index 0000000..3a46969 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/blank.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/copy.png b/copy_this/modules/bla/bla-tinymce/fileman/images/copy.png new file mode 100644 index 0000000..249dcc5 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/copy.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/cut.png b/copy_this/modules/bla/bla-tinymce/fileman/images/cut.png new file mode 100644 index 0000000..d2576bd Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/cut.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/dir-minus.png b/copy_this/modules/bla/bla-tinymce/fileman/images/dir-minus.png new file mode 100644 index 0000000..61b95f8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/dir-minus.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/dir-plus.png b/copy_this/modules/bla/bla-tinymce/fileman/images/dir-plus.png new file mode 100644 index 0000000..2f08324 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/dir-plus.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/file-add.png b/copy_this/modules/bla/bla-tinymce/fileman/images/file-add.png new file mode 100644 index 0000000..4fb28bf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/file-add.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/file-delete.png b/copy_this/modules/bla/bla-tinymce/fileman/images/file-delete.png new file mode 100644 index 0000000..dd1c0a4 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/file-delete.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/file-download.png b/copy_this/modules/bla/bla-tinymce/fileman/images/file-download.png new file mode 100644 index 0000000..e01eabb Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/file-download.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/file-duplicate.png b/copy_this/modules/bla/bla-tinymce/fileman/images/file-duplicate.png new file mode 100644 index 0000000..34106e0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/file-duplicate.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/file-upload.png b/copy_this/modules/bla/bla-tinymce/fileman/images/file-upload.png new file mode 100644 index 0000000..2119894 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/file-upload.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_3gp.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_3gp.png new file mode 100644 index 0000000..35a05dd Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_3gp.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_7z.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_7z.png new file mode 100644 index 0000000..5ed205b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_7z.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ace.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ace.png new file mode 100644 index 0000000..799604d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ace.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ai.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ai.png new file mode 100644 index 0000000..078057f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ai.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_aif.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_aif.png new file mode 100644 index 0000000..02ba441 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_aif.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_aiff.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_aiff.png new file mode 100644 index 0000000..45f6c27 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_aiff.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_amr.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_amr.png new file mode 100644 index 0000000..4c30c8c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_amr.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_asf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_asf.png new file mode 100644 index 0000000..f65286f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_asf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_asx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_asx.png new file mode 100644 index 0000000..9ac440b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_asx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bat.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bat.png new file mode 100644 index 0000000..ba72c7f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bat.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bin.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bin.png new file mode 100644 index 0000000..adc7af3 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bin.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bmp.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bmp.png new file mode 100644 index 0000000..485cde8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bmp.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bup.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bup.png new file mode 100644 index 0000000..5e25354 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_bup.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cab.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cab.png new file mode 100644 index 0000000..0e19a97 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cab.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cbr.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cbr.png new file mode 100644 index 0000000..37d886a Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cbr.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cda.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cda.png new file mode 100644 index 0000000..c50b751 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cda.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cdl.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cdl.png new file mode 100644 index 0000000..cb57905 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cdl.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cdr.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cdr.png new file mode 100644 index 0000000..d6def9e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_cdr.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_chm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_chm.png new file mode 100644 index 0000000..7a99361 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_chm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dat.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dat.png new file mode 100644 index 0000000..9567f6a Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dat.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_divx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_divx.png new file mode 100644 index 0000000..99cb983 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_divx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dll.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dll.png new file mode 100644 index 0000000..7ac35c9 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dll.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dmg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dmg.png new file mode 100644 index 0000000..a2c644b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dmg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_doc.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_doc.png new file mode 100644 index 0000000..8738d2e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_doc.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dss.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dss.png new file mode 100644 index 0000000..d51df3c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dss.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dvf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dvf.png new file mode 100644 index 0000000..62bbb95 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dvf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dwg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dwg.png new file mode 100644 index 0000000..0199681 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_dwg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_eml.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_eml.png new file mode 100644 index 0000000..6c973fc Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_eml.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_eps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_eps.png new file mode 100644 index 0000000..009582c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_eps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_exe.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_exe.png new file mode 100644 index 0000000..c9cec75 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_exe.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_fla.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_fla.png new file mode 100644 index 0000000..648b1d0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_fla.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_flv.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_flv.png new file mode 100644 index 0000000..ccc1eb7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_flv.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_gif.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_gif.png new file mode 100644 index 0000000..b1aa6c3 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_gif.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_gz.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_gz.png new file mode 100644 index 0000000..d4517e1 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_gz.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_hqx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_hqx.png new file mode 100644 index 0000000..ae7cc06 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_hqx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_htm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_htm.png new file mode 100644 index 0000000..061ff46 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_htm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_html.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_html.png new file mode 100644 index 0000000..d86548c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_html.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ifo.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ifo.png new file mode 100644 index 0000000..89b0166 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ifo.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_indd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_indd.png new file mode 100644 index 0000000..0cbaadc Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_indd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_iso.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_iso.png new file mode 100644 index 0000000..e8df06d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_iso.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jar.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jar.png new file mode 100644 index 0000000..383aea4 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jar.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jpeg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jpeg.png new file mode 100644 index 0000000..68e38ab Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jpeg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jpg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jpg.png new file mode 100644 index 0000000..39be818 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_jpg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_lnk.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_lnk.png new file mode 100644 index 0000000..2b05f43 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_lnk.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_log.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_log.png new file mode 100644 index 0000000..bc99e85 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_log.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4a.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4a.png new file mode 100644 index 0000000..d7c86c3 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4a.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4b.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4b.png new file mode 100644 index 0000000..8a73d4e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4b.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4p.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4p.png new file mode 100644 index 0000000..f9d90b9 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4p.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4v.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4v.png new file mode 100644 index 0000000..c7b0b1f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_m4v.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mcd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mcd.png new file mode 100644 index 0000000..c268b87 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mcd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mdb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mdb.png new file mode 100644 index 0000000..7b7b836 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mdb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mid.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mid.png new file mode 100644 index 0000000..4d3e482 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mid.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mov.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mov.png new file mode 100644 index 0000000..6a91865 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mov.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp2.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp2.png new file mode 100644 index 0000000..bbc5f04 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp2.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp3.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp3.png new file mode 100644 index 0000000..137afab Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp3.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp4.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp4.png new file mode 100644 index 0000000..caa154c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mp4.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mpeg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mpeg.png new file mode 100644 index 0000000..81994a2 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mpeg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mpg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mpg.png new file mode 100644 index 0000000..948b643 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mpg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_msi.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_msi.png new file mode 100644 index 0000000..97a8a3b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_msi.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mswmm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mswmm.png new file mode 100644 index 0000000..d70aaa7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_mswmm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ogg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ogg.png new file mode 100644 index 0000000..a6b55f6 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ogg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pdf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pdf.png new file mode 100644 index 0000000..04423b4 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pdf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_png.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_png.png new file mode 100644 index 0000000..76230d3 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_png.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pps.png new file mode 100644 index 0000000..44a2d2c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ps.png new file mode 100644 index 0000000..0e4b20a Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_psd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_psd.png new file mode 100644 index 0000000..b98ff86 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_psd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pst.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pst.png new file mode 100644 index 0000000..4f5f61f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pst.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ptb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ptb.png new file mode 100644 index 0000000..a3568dd Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ptb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pub.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pub.png new file mode 100644 index 0000000..4a71c01 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_pub.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qbb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qbb.png new file mode 100644 index 0000000..24fc0ae Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qbb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qbw.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qbw.png new file mode 100644 index 0000000..162b0fb Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qbw.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qxd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qxd.png new file mode 100644 index 0000000..f5e46cf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_qxd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ram.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ram.png new file mode 100644 index 0000000..a55ba84 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ram.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rar.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rar.png new file mode 100644 index 0000000..934f182 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rar.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rm.png new file mode 100644 index 0000000..639e180 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rmvb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rmvb.png new file mode 100644 index 0000000..362ffdf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rmvb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rtf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rtf.png new file mode 100644 index 0000000..cae2c95 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_rtf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sea.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sea.png new file mode 100644 index 0000000..d9906e2 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sea.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ses.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ses.png new file mode 100644 index 0000000..b62459b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ses.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sit.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sit.png new file mode 100644 index 0000000..629270d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sit.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sitx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sitx.png new file mode 100644 index 0000000..4c7a085 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_sitx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ss.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ss.png new file mode 100644 index 0000000..a3a1dbc Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ss.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_swf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_swf.png new file mode 100644 index 0000000..3de3713 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_swf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tgz.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tgz.png new file mode 100644 index 0000000..b896b27 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tgz.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_thm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_thm.png new file mode 100644 index 0000000..0f6bbae Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_thm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tif.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tif.png new file mode 100644 index 0000000..c7d4da8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tif.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tmp.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tmp.png new file mode 100644 index 0000000..75e014e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_tmp.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_torrent.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_torrent.png new file mode 100644 index 0000000..6e8003c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_torrent.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ttf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ttf.png new file mode 100644 index 0000000..dda399e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_ttf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_txt.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_txt.png new file mode 100644 index 0000000..1e7c12f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_txt.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_vcd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_vcd.png new file mode 100644 index 0000000..d066ecb Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_vcd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_vob.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_vob.png new file mode 100644 index 0000000..2de5bed Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_vob.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wav.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wav.png new file mode 100644 index 0000000..a8d7b14 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wav.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wma.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wma.png new file mode 100644 index 0000000..e699f0b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wma.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wmv.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wmv.png new file mode 100644 index 0000000..98001f5 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wmv.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wps.png new file mode 100644 index 0000000..0e7cbc0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_wps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_xls.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_xls.png new file mode 100644 index 0000000..4a394e5 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_xls.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_xpi.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_xpi.png new file mode 100644 index 0000000..4ff58d7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_xpi.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_zip.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_zip.png new file mode 100644 index 0000000..3b1b54f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/file_extension_zip.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/unknown.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/unknown.png new file mode 100644 index 0000000..098859c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/big/unknown.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_3gp.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_3gp.png new file mode 100644 index 0000000..4065bdf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_3gp.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_7z.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_7z.png new file mode 100644 index 0000000..81e33eb Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_7z.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ace.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ace.png new file mode 100644 index 0000000..912abbd Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ace.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ai.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ai.png new file mode 100644 index 0000000..7623460 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ai.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_aif.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_aif.png new file mode 100644 index 0000000..9edd1c0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_aif.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_aiff.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_aiff.png new file mode 100644 index 0000000..6bd4ab7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_aiff.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_amr.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_amr.png new file mode 100644 index 0000000..9fa5935 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_amr.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_asf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_asf.png new file mode 100644 index 0000000..2ff894e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_asf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_asx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_asx.png new file mode 100644 index 0000000..28f610a Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_asx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_avi.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_avi.png new file mode 100644 index 0000000..4065bdf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_avi.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bat.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bat.png new file mode 100644 index 0000000..1edba76 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bat.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bin.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bin.png new file mode 100644 index 0000000..4c5411e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bin.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bmp.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bmp.png new file mode 100644 index 0000000..42aa002 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bmp.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bup.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bup.png new file mode 100644 index 0000000..ce04201 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_bup.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cab.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cab.png new file mode 100644 index 0000000..74aef83 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cab.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cbr.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cbr.png new file mode 100644 index 0000000..9b79766 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cbr.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cda.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cda.png new file mode 100644 index 0000000..e904544 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cda.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cdl.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cdl.png new file mode 100644 index 0000000..e52bc64 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cdl.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cdr.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cdr.png new file mode 100644 index 0000000..277b23d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_cdr.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_chm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_chm.png new file mode 100644 index 0000000..3d7b07c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_chm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dat.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dat.png new file mode 100644 index 0000000..758a0e1 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dat.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_divx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_divx.png new file mode 100644 index 0000000..204c9d0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_divx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dll.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dll.png new file mode 100644 index 0000000..49111a9 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dll.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dmg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dmg.png new file mode 100644 index 0000000..d8d6a81 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dmg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_doc.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_doc.png new file mode 100644 index 0000000..dfd46f9 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_doc.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dss.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dss.png new file mode 100644 index 0000000..4752a95 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dss.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dvf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dvf.png new file mode 100644 index 0000000..27e4c23 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dvf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dwg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dwg.png new file mode 100644 index 0000000..9dd4c90 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_dwg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_eml.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_eml.png new file mode 100644 index 0000000..e6f3174 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_eml.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_eps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_eps.png new file mode 100644 index 0000000..919089b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_eps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_exe.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_exe.png new file mode 100644 index 0000000..09bbde7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_exe.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_fla.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_fla.png new file mode 100644 index 0000000..81f80e9 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_fla.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_flv.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_flv.png new file mode 100644 index 0000000..043623c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_flv.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_gif.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_gif.png new file mode 100644 index 0000000..efa8206 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_gif.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_gz.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_gz.png new file mode 100644 index 0000000..f391025 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_gz.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_hqx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_hqx.png new file mode 100644 index 0000000..e1fe0be Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_hqx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_htm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_htm.png new file mode 100644 index 0000000..bcd6f0e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_htm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_html.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_html.png new file mode 100644 index 0000000..a78b68e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_html.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ifo.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ifo.png new file mode 100644 index 0000000..541c14e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ifo.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_indd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_indd.png new file mode 100644 index 0000000..812e3c0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_indd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_iso.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_iso.png new file mode 100644 index 0000000..f1e060e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_iso.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jar.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jar.png new file mode 100644 index 0000000..f77a21c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jar.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jpeg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jpeg.png new file mode 100644 index 0000000..a69dff9 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jpeg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jpg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jpg.png new file mode 100644 index 0000000..6ec08d7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_jpg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_lnk.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_lnk.png new file mode 100644 index 0000000..8306dbb Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_lnk.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_log.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_log.png new file mode 100644 index 0000000..ae294cf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_log.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4a.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4a.png new file mode 100644 index 0000000..9518f75 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4a.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4b.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4b.png new file mode 100644 index 0000000..f0888c7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4b.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4p.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4p.png new file mode 100644 index 0000000..a7d8904 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4p.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4v.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4v.png new file mode 100644 index 0000000..cf0f2cf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_m4v.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mcd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mcd.png new file mode 100644 index 0000000..403ecad Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mcd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mdb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mdb.png new file mode 100644 index 0000000..a74b16d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mdb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mid.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mid.png new file mode 100644 index 0000000..07887a0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mid.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mkv.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mkv.png new file mode 100644 index 0000000..4065bdf Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mkv.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mov.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mov.png new file mode 100644 index 0000000..75075c7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mov.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp2.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp2.png new file mode 100644 index 0000000..704a347 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp2.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp3.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp3.png new file mode 100644 index 0000000..d2624de Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp3.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp4.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp4.png new file mode 100644 index 0000000..ecc3d28 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mp4.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mpeg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mpeg.png new file mode 100644 index 0000000..6518619 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mpeg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mpg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mpg.png new file mode 100644 index 0000000..d01440f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mpg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_msi.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_msi.png new file mode 100644 index 0000000..3f53d37 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_msi.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mswmm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mswmm.png new file mode 100644 index 0000000..f8c4fc8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_mswmm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ogg.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ogg.png new file mode 100644 index 0000000..874915f Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ogg.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pdf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pdf.png new file mode 100644 index 0000000..ef52e6a Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pdf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_png.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_png.png new file mode 100644 index 0000000..812e3c0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_png.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pps.png new file mode 100644 index 0000000..3964c49 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ps.png new file mode 100644 index 0000000..9bd9e03 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_psd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_psd.png new file mode 100644 index 0000000..d3f6ec5 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_psd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pst.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pst.png new file mode 100644 index 0000000..5da647e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pst.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ptb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ptb.png new file mode 100644 index 0000000..8250def Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ptb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pub.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pub.png new file mode 100644 index 0000000..806b8ba Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_pub.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qbb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qbb.png new file mode 100644 index 0000000..5e4d56b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qbb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qbw.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qbw.png new file mode 100644 index 0000000..7e20ff0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qbw.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qxd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qxd.png new file mode 100644 index 0000000..577f6ef Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_qxd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ram.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ram.png new file mode 100644 index 0000000..18a73cd Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ram.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rar.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rar.png new file mode 100644 index 0000000..6a94dd8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rar.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rm.png new file mode 100644 index 0000000..ca0983b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rmvb.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rmvb.png new file mode 100644 index 0000000..9c533a0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rmvb.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rtf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rtf.png new file mode 100644 index 0000000..a7efed7 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_rtf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sea.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sea.png new file mode 100644 index 0000000..03f87f8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sea.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ses.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ses.png new file mode 100644 index 0000000..a856386 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ses.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sit.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sit.png new file mode 100644 index 0000000..98206fc Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sit.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sitx.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sitx.png new file mode 100644 index 0000000..3c3bb4c Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_sitx.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ss.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ss.png new file mode 100644 index 0000000..7d056d0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ss.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_swf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_swf.png new file mode 100644 index 0000000..5650971 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_swf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tgz.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tgz.png new file mode 100644 index 0000000..5253aab Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tgz.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_thm.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_thm.png new file mode 100644 index 0000000..b3acbb1 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_thm.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tif.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tif.png new file mode 100644 index 0000000..a284f79 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tif.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tmp.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tmp.png new file mode 100644 index 0000000..80c165b Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_tmp.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_torrent.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_torrent.png new file mode 100644 index 0000000..09de7ab Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_torrent.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ttf.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ttf.png new file mode 100644 index 0000000..51a0bbb Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_ttf.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_txt.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_txt.png new file mode 100644 index 0000000..e3bed85 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_txt.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_vcd.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_vcd.png new file mode 100644 index 0000000..5380d08 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_vcd.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_vob.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_vob.png new file mode 100644 index 0000000..5a5dde8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_vob.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wav.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wav.png new file mode 100644 index 0000000..6897534 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wav.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wma.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wma.png new file mode 100644 index 0000000..63f5d34 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wma.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wmv.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wmv.png new file mode 100644 index 0000000..4017f86 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wmv.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wps.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wps.png new file mode 100644 index 0000000..69154a0 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_wps.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_xls.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_xls.png new file mode 100644 index 0000000..a5cb228 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_xls.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_xpi.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_xpi.png new file mode 100644 index 0000000..dea5e19 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_xpi.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_zip.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_zip.png new file mode 100644 index 0000000..f0756cd Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/file_extension_zip.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/unknown.png b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/unknown.png new file mode 100644 index 0000000..3ea3d5d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/filetypes/unknown.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/find.png b/copy_this/modules/bla/bla-tinymce/fileman/images/find.png new file mode 100644 index 0000000..1d6f4f1 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/find.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/folder-add.png b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-add.png new file mode 100644 index 0000000..537184e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-add.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/folder-delete.png b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-delete.png new file mode 100644 index 0000000..ae49649 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-delete.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/folder-download.png b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-download.png new file mode 100644 index 0000000..e307dec Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-download.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/folder-green.png b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-green.png new file mode 100644 index 0000000..cee10d3 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-green.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/folder-opened.png b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-opened.png new file mode 100644 index 0000000..2a5ce8e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/folder-opened.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/folder.png b/copy_this/modules/bla/bla-tinymce/fileman/images/folder.png new file mode 100644 index 0000000..31265a4 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/folder.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/loading-dir.gif b/copy_this/modules/bla/bla-tinymce/fileman/images/loading-dir.gif new file mode 100644 index 0000000..bf510da Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/loading-dir.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/loading.gif b/copy_this/modules/bla/bla-tinymce/fileman/images/loading.gif new file mode 100644 index 0000000..f5ca885 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/loading.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/paste.png b/copy_this/modules/bla/bla-tinymce/fileman/images/paste.png new file mode 100644 index 0000000..468189e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/paste.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/preview.png b/copy_this/modules/bla/bla-tinymce/fileman/images/preview.png new file mode 100644 index 0000000..ef29588 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/preview.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/remove-upload - Copy.png b/copy_this/modules/bla/bla-tinymce/fileman/images/remove-upload - Copy.png new file mode 100644 index 0000000..a93bdf8 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/remove-upload - Copy.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/remove-upload.png b/copy_this/modules/bla/bla-tinymce/fileman/images/remove-upload.png new file mode 100644 index 0000000..c2818dc Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/remove-upload.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/rename.png b/copy_this/modules/bla/bla-tinymce/fileman/images/rename.png new file mode 100644 index 0000000..34ec676 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/rename.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/search.png b/copy_this/modules/bla/bla-tinymce/fileman/images/search.png new file mode 100644 index 0000000..b81b18d Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/search.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/select.png b/copy_this/modules/bla/bla-tinymce/fileman/images/select.png new file mode 100644 index 0000000..dc951d4 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/select.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/sprite.png b/copy_this/modules/bla/bla-tinymce/fileman/images/sprite.png new file mode 100644 index 0000000..6dc12de Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/sprite.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/stripes-reverse.gif b/copy_this/modules/bla/bla-tinymce/fileman/images/stripes-reverse.gif new file mode 100644 index 0000000..a306381 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/stripes-reverse.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/stripes.gif b/copy_this/modules/bla/bla-tinymce/fileman/images/stripes.gif new file mode 100644 index 0000000..7d01053 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/stripes.gif differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/upload-big.png b/copy_this/modules/bla/bla-tinymce/fileman/images/upload-big.png new file mode 100644 index 0000000..777056e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/upload-big.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/view-list.png b/copy_this/modules/bla/bla-tinymce/fileman/images/view-list.png new file mode 100644 index 0000000..8a08b52 Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/view-list.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/images/view-tile.png b/copy_this/modules/bla/bla-tinymce/fileman/images/view-tile.png new file mode 100644 index 0000000..4a0c64e Binary files /dev/null and b/copy_this/modules/bla/bla-tinymce/fileman/images/view-tile.png differ diff --git a/copy_this/modules/bla/bla-tinymce/fileman/index.html b/copy_this/modules/bla/bla-tinymce/fileman/index.html new file mode 100644 index 0000000..9d1fe43 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/index.html @@ -0,0 +1,147 @@ + + + + + +Roxy file manager + + + + + + + + + + + + + + + + + + +
        +
        + + + +
        +
        + Loading directories...
        + +
        +
        +
          +
          +
          + + +
          + + + + + + +
          + Order by: +    + +    + +
          +
          +
          +
          + Loading files...
          + +
          +
          + This folder is empty +
          +
          + No files found +
          +
            +
            +
            +
            +    © 2013 - RoxyFileman + +
            Status bar
            +
            + + + +
            +
            + +

            + +
            +
            +
            +
            +
            +
            +
            + + +
            +
            + +
            +
            +
            + +
            + + + \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/js/custom.js b/copy_this/modules/bla/bla-tinymce/fileman/js/custom.js new file mode 100644 index 0000000..366bf70 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/js/custom.js @@ -0,0 +1,45 @@ +/* + RoxyFileman - web based file manager. Ready to use with CKEditor, TinyMCE. + Can be easily integrated with any other WYSIWYG editor or CMS. + + Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved. + For licensing, see LICENSE.txt or http://RoxyFileman.com/license + + 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. + + 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 . + + Contact: Lyubomir Arsov, liubo (at) web-lobby.com +*/ +function FileSelected(file){ + /** + * file is an object containing following properties: + * + * fullPath - path to the file - absolute from your site root + * path - directory in which the file is located - absolute from your site root + * size - size of the file in bytes + * time - timestamo of last modification + * name - file name + * ext - file extension + * width - if the file is image, this will be the width of the original image, 0 otherwise + * height - if the file is image, this will be the height of the original image, 0 otherwise + * + */ + alert('"' + file.fullPath + "\" selected.\n To integrate with CKEditor or TinyMCE change INTEGRATION setting in conf.json. For more details see the Installation instructions at http://www.roxyfileman.com/install."); +} +function GetSelectedValue(){ + /** + * This function is called to retrieve selected value when custom integration is used. + * Url parameter selected will override this value. + */ + + return ""; +} diff --git a/copy_this/modules/bla/bla-tinymce/fileman/js/directory.js b/copy_this/modules/bla/bla-tinymce/fileman/js/directory.js new file mode 100644 index 0000000..bb9bf4b --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/js/directory.js @@ -0,0 +1,538 @@ +/* + RoxyFileman - web based file manager. Ready to use with CKEditor, TinyMCE. + Can be easily integrated with any other WYSIWYG editor or CMS. + + Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved. + For licensing, see LICENSE.txt or http://RoxyFileman.com/license + + 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. + + 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 . + + Contact: Lyubomir Arsov, liubo (at) web-lobby.com +*/ +function Directory(fullPath, numDirs, numFiles){ + if(!fullPath) fullPath = ''; + this.fullPath = fullPath; + this.name = RoxyUtils.GetFilename(fullPath); + if(!this.name) + this.name = 'My files'; + this.path = RoxyUtils.GetPath(fullPath); + this.dirs = (numDirs?numDirs:0); + this.files = (numFiles?numFiles:0); + this.filesList = new Array(); + + this.Show = function(){ + var html = this.GetHtml(); + var el = null; + el = $('li[data-path="'+this.path+'"]'); + if(el.length == 0) + el = $('#pnlDirList'); + else{ + if(el.children('ul').length == 0) + el.append('
              '); + el = el.children('ul'); + } + if(el){ + el.append(html); + this.SetEvents(); + } + }; + this.SetEvents = function(){ + var el = this.GetElement(); + if(RoxyFilemanConf.MOVEDIR){ + el.draggable({helper:makeDragDir,start:startDragDir,cursorAt: { left: 10 ,top:10},delay:200}); + } + el = el.children('div'); + el.click(function(e){ + selectDir(this); + }); + + el.bind('contextmenu', function(e) { + e.stopPropagation(); + e.preventDefault(); + closeMenus('file'); + selectDir(this); + var t = e.pageY - $('#menuDir').height(); + if(t < 0) + t = 0; + $('#menuDir').css({ + top: t+'px', + left: e.pageX+'px' + }).show(); + + return false; + }); + + el.droppable({drop:moveObject,over:dragFileOver,out:dragFileOut}); + el = el.children('.dirPlus'); + el.click(function(e){ + e.stopPropagation(); + var d = Directory.Parse($(this).closest('li').attr('data-path')); + d.Expand(); + }); + }; + this.GetHtml = function(){ + var html = '
            • '; + html += '
              '; + html += ''+this.name+' ('+this.files+')
              '; + html += '
            • '; + + return html; + }; + this.SetStatusBar = function(){ + $('#pnlStatus').html(this.files+' '+(this.files == 1?t('file'):t('files'))); + }; + this.SetSelectedFile = function(path){ + if(path){ + var f = File.Parse(path); + if(f){ + selectFile(f.GetElement()); + } + } + }; + this.Select = function(selectedFile){ + var el = this.GetElement(); + el.children('div').addClass('selected'); + $('#pnlDirList li[data-path!="'+this.fullPath+'"] > div').removeClass('selected'); + el.children('img.dir').prop('src', 'images/folder.png'); + this.SetStatusBar(); + var p = this.GetParent(); + while(p){ + p.Expand(true); + p = p.GetParent(); + } + this.Expand(true); + this.ListFiles(true, selectedFile); + setLastDir(this.fullPath); + }; + this.GetElement = function(){ + return $('li[data-path="'+this.fullPath+'"]'); + }; + this.IsExpanded = function(){ + var el = this.GetElement().children('ul'); + return (el && el.is(":visible")); + }; + this.IsListed = function(){ + if($('#hdDir').val() == this.fullPath) + return true; + return false; + }; + this.GetExpanded = function(el){ + var ret = new Array(); + if(!el) + el = $('#pnlDirList'); + el.children('li').each(function(){ + var path = $(this).attr('data-path'); + var d = new Directory(path); + if(d){ + if(d.IsExpanded() && path) + ret.push(path); + ret = ret.concat(d.GetExpanded(d.GetElement().children('ul'))); + } + }); + + return ret; + }; + this.RestoreExpanded = function(expandedDirs){ + for(i = 0; i < expandedDirs.length; i++){ + var d = Directory.Parse(expandedDirs[i]); + if(d) + d.Expand(true); + } + }; + this.GetParent = function(){ + return Directory.Parse(this.path); + }; + this.SetOpened = function(){ + var li = this.GetElement(); + if(li.find('li').length < 1) + li.children('div').children('.dirPlus').prop('src', 'images/blank.gif'); + else if(this.IsExpanded()) + li.children('div').children('.dirPlus').prop('src', 'images/dir-minus.png'); + else + li.children('div').children('.dirPlus').prop('src', 'images/dir-plus.png'); + }; + this.Update = function(newPath){ + var el = this.GetElement(); + if(newPath){ + this.fullPath = newPath; + this.name = RoxyUtils.GetFilename(newPath); + if(!this.name) + this.name = 'My files'; + this.path = RoxyUtils.GetPath(newPath); + } + el.attr('data-path', this.fullPath); + el.attr('data-dirs', this.dirs); + el.attr('data-files', this.files); + el.children('div').children('.name').html(this.name+' ('+this.files+')'); + this.SetOpened(); + }; + this.LoadAll = function(selectedDir){ + var expanded = this.GetExpanded(); + var dirListURL = RoxyFilemanConf.DIRLIST; + if(!dirListURL){ + alert(t('E_ActionDisabled')); + return; + } + $('#pnlLoadingDirs').show(); + $('#pnlDirList').hide(); + dirListURL = RoxyUtils.AddParam(dirListURL, 'type', RoxyUtils.GetUrlParam('type')); + + var dir = this; + $.ajax({ + url: dirListURL, + type:'POST', + dataType: 'json', + async: false, + cache: false, + success: function(dirs){ + $('#pnlDirList').children('li').remove(); + for(i = 0; i < dirs.length; i++){ + var d = new Directory(dirs[i].p, dirs[i].d, dirs[i].f); + d.Show(); + } + $('#pnlLoadingDirs').hide(); + $('#pnlDirList').show(); + dir.RestoreExpanded(expanded); + var d = Directory.Parse(selectedDir); + if(d) + d.Select(); + }, + error: function(data){ + $('#pnlLoadingDirs').hide(); + $('#pnlDirList').show(); + alert(t('E_LoadingAjax')+' '+RoxyFilemanConf.DIRLIST); + } + }); + }; + this.Expand = function(show){ + var li = this.GetElement(); + var el = li.children('ul'); + if(this.IsExpanded() && !show) + el.hide(); + else + el.show(); + + this.SetOpened(); + }; + this.Create = function(newName){ + if(!newName) + return false; + else if(!RoxyFilemanConf.CREATEDIR){ + alert(t('E_ActionDisabled')); + return; + } + var url = RoxyUtils.AddParam(RoxyFilemanConf.CREATEDIR, 'd', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newName); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {d: this.fullPath, n: newName}, + dataType: 'json', + async:false, + cache: false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + item.LoadAll(RoxyUtils.MakePath(item.fullPath, newName)); + ret = true; + } + else{ + alert(data.msg); + } + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+item.name); + } + }); + return ret; + }; + this.Delete = function(){ + if(!RoxyFilemanConf.DELETEDIR){ + alert(t('E_ActionDisabled')); + return; + } + var url = RoxyUtils.AddParam(RoxyFilemanConf.DELETEDIR, 'd', this.fullPath); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {d: this.fullPath}, + dataType: 'json', + async:false, + cache: false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + var parent = item.GetParent(); + parent.dirs--; + parent.Update(); + parent.Select(); + item.GetElement().remove(); + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+item.name); + } + }); + return ret; + }; + this.Rename = function(newName){ + if(!newName) + return false; + else if(!RoxyFilemanConf.RENAMEDIR){ + alert(t('E_ActionDisabled')); + return; + } + var url = RoxyUtils.AddParam(RoxyFilemanConf.RENAMEDIR, 'd', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newName); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {d: this.fullPath, n: newName}, + dataType: 'json', + async:false, + cache: false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + var newPath = RoxyUtils.MakePath(item.path, newName); + item.Update(newPath); + item.Select(); + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+item.name); + } + }); + return ret; + }; + this.Copy = function(newPath){ + if(!RoxyFilemanConf.COPYDIR){ + alert(t('E_ActionDisabled')); + return; + } + var url = RoxyUtils.AddParam(RoxyFilemanConf.COPYDIR, 'd', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newPath); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {d: this.fullPath, n: newPath}, + dataType: 'json', + async:false, + cache: false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + var d = Directory.Parse(newPath); + if(d){ + d.LoadAll(d.fullPath); + } + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+url); + } + }); + return ret; + }; + this.Move = function(newPath){ + if(!newPath) + return false; + else if(!RoxyFilemanConf.MOVEDIR){ + alert(t('E_ActionDisabled')); + return; + } + var url = RoxyUtils.AddParam(RoxyFilemanConf.MOVEDIR, 'd', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newPath); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {d: this.fullPath, n: newPath}, + dataType: 'json', + async:false, + cache: false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + item.LoadAll(RoxyUtils.MakePath(newPath, item.name)); + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+item.name); + } + }); + return ret; + }; + this.ListFiles = function(refresh, selectedFile){ + $('#pnlLoading').show(); + $('#pnlEmptyDir').hide(); + $('#pnlFileList').hide(); + $('#pnlSearchNoFiles').hide(); + this.LoadFiles(refresh, selectedFile); + }; + this.FilesLoaded = function(filesList, selectedFile){ + filesList = this.SortFiles(filesList); + $('#pnlFileList').html(''); + for(i = 0; i < filesList.length; i++){ + var f = filesList[i]; + f.Show(); + } + $('#hdDir').val(this.fullPath); + $('#pnlLoading').hide(); + if($('#pnlFileList').children('li').length == 0) + $('#pnlEmptyDir').show(); + this.files = $('#pnlFileList').children('li').length; + this.Update(); + this.SetStatusBar(); + filterFiles(); + switchView(); + $('#pnlFileList').show(); + this.SetSelectedFile(selectedFile); + }; + this.LoadFiles = function(refresh, selectedFile){ + if(!RoxyFilemanConf.FILESLIST){ + alert(t('E_ActionDisabled')); + return; + } + var ret = new Array(); + var fileURL = RoxyFilemanConf.FILESLIST; + fileURL = RoxyUtils.AddParam(fileURL, 'd', this.fullPath); + fileURL = RoxyUtils.AddParam(fileURL, 'type', RoxyUtils.GetUrlParam('type')); + var item = this; + if(!this.IsListed() || refresh){ + + $.ajax({ + url: fileURL, + type: 'POST', + data: {d: this.fullPath, type: RoxyUtils.GetUrlParam('type')}, + dataType: 'json', + async:true, + cache: false, + success: function(files){ + for(i = 0; i < files.length; i++){ + ret.push(new File(files[i].p, files[i].s, files[i].t, files[i].w, files[i].h)); + } + item.FilesLoaded(ret, selectedFile); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+fileURL); + } + }); + } + else{ + $('#pnlFileList li').each(function(){ + ret.push(new File($(this).attr('data-path'), $(this).attr('data-size'), $(this).attr('data-time'), $(this).attr('data-w'), $(this).attr('data-h'))); + }); + item.FilesLoaded(ret, selectedFile); + } + + return ret; + }; + + this.SortByName = function(files, order){ + files.sort(function(a, b){ + var x = (order == 'desc'?0:2) + a = a.name.toLowerCase(); + b = b.name.toLowerCase(); + if(a > b) + return -1 + x; + else if(a < b) + return 1 - x; + else + return 0; + }); + + return files; + }; + this.SortBySize = function(files, order){ + files.sort(function(a, b){ + var x = (order == 'desc'?0:2) + a = parseInt(a.size); + b = parseInt(b.size); + if(a > b) + return -1 + x; + else if(a < b) + return 1 - x; + else + return 0; + }); + + return files; + }; + this.SortByTime = function(files, order){ + files.sort(function(a, b){ + var x = (order == 'desc'?0:2) + a = parseInt(a.time); + b = parseInt(b.time); + if(a > b) + return -1 + x; + else if(a < b) + return 1 - x; + else + return 0; + }); + + return files; + }; + this.SortFiles = function(files){ + var order = $('#ddlOrder').val(); + if(!order) + order = 'name'; + + switch(order){ + case 'size': + files = this.SortBySize(files, 'asc'); + break; + case 'size_desc': + files = this.SortBySize(files, 'desc'); + break; + case 'time': + files = this.SortByTime(files, 'asc'); + break; + case 'time_desc': + files = this.SortByTime(files, 'desc'); + break; + case 'name_desc': + files = this.SortByName(files, 'desc'); + break; + default: + files = this.SortByName(files, 'asc'); + } + + return files; + }; +} +Directory.Parse = function(path){ + var ret = false; + var li = $('#pnlDirList').find('li[data-path="'+path+'"]'); + if(li.length > 0) + ret = new Directory(li.attr('data-path'), li.attr('data-dirs'), li.attr('data-files')); + + return ret; +}; diff --git a/copy_this/modules/bla/bla-tinymce/fileman/js/file.js b/copy_this/modules/bla/bla-tinymce/fileman/js/file.js new file mode 100644 index 0000000..337faca --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/js/file.js @@ -0,0 +1,230 @@ +/* + RoxyFileman - web based file manager. Ready to use with CKEditor, TinyMCE. + Can be easily integrated with any other WYSIWYG editor or CMS. + + Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved. + For licensing, see LICENSE.txt or http://RoxyFileman.com/license + + 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. + + 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 . + + Contact: Lyubomir Arsov, liubo (at) web-lobby.com +*/ +function File(filePath, fileSize, modTime, w, h){ + this.fullPath = filePath; + this.type = RoxyUtils.GetFileType(filePath); + this.name = RoxyUtils.GetFilename(filePath); + this.ext = RoxyUtils.GetFileExt(filePath); + this.path = RoxyUtils.GetPath(filePath); + this.icon = RoxyUtils.GetFileIcon(filePath); + this.bigIcon = this.icon.replace('filetypes', 'filetypes/big'); + this.image = filePath; + this.size = (fileSize?fileSize:RoxyUtils.GetFileSize(filePath)); + this.time = modTime; + this.width = (w? w: 0); + this.height = (h? h: 0); + this.Show = function(){ + html = '
            • '; + html += ''; + html += ''+RoxyUtils.FormatDate(new Date(this.time * 1000))+''; + html += ''+this.name+''; + html += ''+RoxyUtils.FormatFileSize(this.size)+''; + html += '
            • '; + $('#pnlFileList').append(html); + var li = $("#pnlFileList li:last"); + if(RoxyFilemanConf.MOVEFILE){ + li.draggable({helper:makeDragFile,start:startDragFile,cursorAt: { left: 10 ,top:10},delay:200}); + } + li.click(function(e){ + selectFile(this); + }); + li.dblclick(function(e){ + selectFile(this); + setFile(); + }); + li.tooltip({show:{delay:700},track: true, content:tooltipContent}); + + li.bind('contextmenu', function(e) { + e.stopPropagation(); + e.preventDefault(); + closeMenus('dir'); + selectFile(this); + $(this).tooltip('close'); + var t = e.pageY - $('#menuFile').height(); + if(t < 0) + t = 0; + $('#menuFile').css({ + top: t+'px', + left: e.pageX+'px' + }).show(); + + return false; + }); + }; + this.GetElement = function(){ + return $('li[data-path="'+this.fullPath+'"]'); + }; + this.IsImage = function(){ + var ret = false; + if(this.type == 'image') + ret = true; + return ret; + }; + this.Delete = function(){ + if(!RoxyFilemanConf.DELETEFILE){ + alert(t('E_ActionDisabled')); + return; + } + var deleteUrl = RoxyUtils.AddParam(RoxyFilemanConf.DELETEFILE, 'f', this.fullPath); + var item = this; + $.ajax({ + url: deleteUrl, + type: 'POST', + data: {f: this.fullPath}, + dataType: 'json', + async:false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + $('li[data-path="'+item.fullPath+'"]').remove(); + var d = Directory.Parse(item.path); + if(d){ + d.files--; + d.Update(); + d.SetStatusBar(); + } + } + else{ + alert(data.msg); + } + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+deleteUrl); + } + }); + }; + this.Rename = function(newName){ + if(!RoxyFilemanConf.RENAMEFILE){ + alert(t('E_ActionDisabled')); + return false; + } + if(!newName) + return false; + var url = RoxyUtils.AddParam(RoxyFilemanConf.RENAMEFILE, 'f', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newName); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {f: this.fullPath, n: newName}, + dataType: 'json', + async:false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + var newPath = RoxyUtils.MakePath(this.path, newName); + $('li[data-path="'+item.fullPath+'"] .icon').attr('src', RoxyUtils.GetFileIcon(newName)); + $('li[data-path="'+item.fullPath+'"] .name').text(newName); + $('li[data-path="'+newPath+'"]').attr('data-path', newPath); + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+url); + } + }); + return ret; + }; + this.Copy = function(newPath){ + if(!RoxyFilemanConf.COPYFILE){ + alert(t('E_ActionDisabled')); + return; + } + var url = RoxyUtils.AddParam(RoxyFilemanConf.COPYFILE, 'f', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newPath); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {f: this.fullPath, n: newPath}, + dataType: 'json', + async:false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + var d = Directory.Parse(newPath); + if(d){ + d.files++; + d.Update(); + d.SetStatusBar(); + d.ListFiles(true); + } + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+url); + } + }); + return ret; + }; + this.Move = function(newPath){ + if(!RoxyFilemanConf.MOVEFILE){ + alert(t('E_ActionDisabled')); + return; + } + newFullPath = RoxyUtils.MakePath(newPath, this.name); + var url = RoxyUtils.AddParam(RoxyFilemanConf.MOVEFILE, 'f', this.fullPath); + url = RoxyUtils.AddParam(url, 'n', newFullPath); + var item = this; + var ret = false; + $.ajax({ + url: url, + type: 'POST', + data: {f: this.fullPath, n: newFullPath}, + dataType: 'json', + async:false, + success: function(data){ + if(data.res.toLowerCase() == 'ok'){ + $('li[data-path="'+item.fullPath+'"]').remove(); + var d = Directory.Parse(item.path); + if(d){ + d.files--; + d.Update(); + d.SetStatusBar(); + d = Directory.Parse(newPath); + d.files++; + d.Update(); + } + ret = true; + } + if(data.msg) + alert(data.msg); + }, + error: function(data){ + alert(t('E_LoadingAjax')+' '+url); + } + }); + return ret; + }; +} +File.Parse = function(path){ + var ret = false; + var li = $('#pnlFileList').find('li[data-path="'+path+'"]'); + if(li.length > 0) + ret = new File(li.attr('data-path'), li.attr('data-size'), li.attr('data-time'), li.attr('data-w'), li.attr('data-h')); + + return ret; +}; \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/fileman/js/filetypes.js b/copy_this/modules/bla/bla-tinymce/fileman/js/filetypes.js new file mode 100644 index 0000000..8a4a61a --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/js/filetypes.js @@ -0,0 +1,123 @@ +/* + RoxyFileman - web based file manager. Ready to use with CKEditor, TinyMCE. + Can be easily integrated with any other WYSIWYG editor or CMS. + + Copyright (C) 2013, RoxyFileman.com - Lyubomir Arsov. All rights reserved. + For licensing, see LICENSE.txt or http://RoxyFileman.com/license + + 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. + + 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 . + + Contact: Lyubomir Arsov, liubo (at) web-lobby.com +*/ +var fileTypeIcons = new Object(); +fileTypeIcons['3gp'] = 'file_extension_3gp.png'; +fileTypeIcons['7z'] = 'file_extension_7z.png'; +fileTypeIcons['ace'] = 'file_extension_ace.png'; +fileTypeIcons['ai'] = 'file_extension_ai.png'; +fileTypeIcons['aif'] = 'file_extension_aif.png'; +fileTypeIcons['aiff'] = 'file_extension_aiff.png'; +fileTypeIcons['amr'] = 'file_extension_amr.png'; +fileTypeIcons['asf'] = 'file_extension_asf.png'; +fileTypeIcons['asx'] = 'file_extension_asx.png'; +fileTypeIcons['avi'] = 'file_extension_avi.png'; +fileTypeIcons['bat'] = 'file_extension_bat.png'; +fileTypeIcons['bin'] = 'file_extension_bin.png'; +fileTypeIcons['bmp'] = 'file_extension_bmp.png'; +fileTypeIcons['bup'] = 'file_extension_bup.png'; +fileTypeIcons['cab'] = 'file_extension_cab.png'; +fileTypeIcons['cbr'] = 'file_extension_cbr.png'; +fileTypeIcons['cda'] = 'file_extension_cda.png'; +fileTypeIcons['cdl'] = 'file_extension_cdl.png'; +fileTypeIcons['cdr'] = 'file_extension_cdr.png'; +fileTypeIcons['chm'] = 'file_extension_chm.png'; +fileTypeIcons['dat'] = 'file_extension_dat.png'; +fileTypeIcons['divx'] = 'file_extension_divx.png'; +fileTypeIcons['dll'] = 'file_extension_dll.png'; +fileTypeIcons['dmg'] = 'file_extension_dmg.png'; +fileTypeIcons['doc'] = 'file_extension_doc.png'; +fileTypeIcons['dss'] = 'file_extension_dss.png'; +fileTypeIcons['dvf'] = 'file_extension_dvf.png'; +fileTypeIcons['dwg'] = 'file_extension_dwg.png'; +fileTypeIcons['eml'] = 'file_extension_eml.png'; +fileTypeIcons['eps'] = 'file_extension_eps.png'; +fileTypeIcons['exe'] = 'file_extension_exe.png'; +fileTypeIcons['fla'] = 'file_extension_fla.png'; +fileTypeIcons['flv'] = 'file_extension_flv.png'; +fileTypeIcons['gif'] = 'file_extension_gif.png'; +fileTypeIcons['gz'] = 'file_extension_gz.png'; +fileTypeIcons['hqx'] = 'file_extension_hqx.png'; +fileTypeIcons['htm'] = 'file_extension_htm.png'; +fileTypeIcons['html'] = 'file_extension_html.png'; +fileTypeIcons['ifo'] = 'file_extension_ifo.png'; +fileTypeIcons['indd'] = 'file_extension_indd.png'; +fileTypeIcons['iso'] = 'file_extension_iso.png'; +fileTypeIcons['jar'] = 'file_extension_jar.png'; +fileTypeIcons['jpeg'] = 'file_extension_jpeg.png'; +fileTypeIcons['jpg'] = 'file_extension_jpg.png'; +fileTypeIcons['lnk'] = 'file_extension_lnk.png'; +fileTypeIcons['log'] = 'file_extension_log.png'; +fileTypeIcons['m4a'] = 'file_extension_m4a.png'; +fileTypeIcons['m4b'] = 'file_extension_m4b.png'; +fileTypeIcons['m4p'] = 'file_extension_m4p.png'; +fileTypeIcons['m4v'] = 'file_extension_m4v.png'; +fileTypeIcons['mcd'] = 'file_extension_mcd.png'; +fileTypeIcons['mdb'] = 'file_extension_mdb.png'; +fileTypeIcons['mid'] = 'file_extension_mid.png'; +fileTypeIcons['mkv'] = 'file_extension_mkv.png'; +fileTypeIcons['mov'] = 'file_extension_mov.png'; +fileTypeIcons['mp2'] = 'file_extension_mp2.png'; +fileTypeIcons['mp3'] = 'file_extension_mp3.png'; +fileTypeIcons['mp4'] = 'file_extension_mp4.png'; +fileTypeIcons['mpeg'] = 'file_extension_mpeg.png'; +fileTypeIcons['mpg'] = 'file_extension_mpg.png'; +fileTypeIcons['msi'] = 'file_extension_msi.png'; +fileTypeIcons['mswmm'] = 'file_extension_mswmm.png'; +fileTypeIcons['ogg'] = 'file_extension_ogg.png'; +fileTypeIcons['pdf'] = 'file_extension_pdf.png'; +fileTypeIcons['png'] = 'file_extension_png.png'; +fileTypeIcons['pps'] = 'file_extension_pps.png'; +fileTypeIcons['ps'] = 'file_extension_ps.png'; +fileTypeIcons['psd'] = 'file_extension_psd.png'; +fileTypeIcons['pst'] = 'file_extension_pst.png'; +fileTypeIcons['ptb'] = 'file_extension_ptb.png'; +fileTypeIcons['pub'] = 'file_extension_pub.png'; +fileTypeIcons['qbb'] = 'file_extension_qbb.png'; +fileTypeIcons['qbw'] = 'file_extension_qbw.png'; +fileTypeIcons['qxd'] = 'file_extension_qxd.png'; +fileTypeIcons['ram'] = 'file_extension_ram.png'; +fileTypeIcons['rar'] = 'file_extension_rar.png'; +fileTypeIcons['rm'] = 'file_extension_rm.png'; +fileTypeIcons['rmvb'] = 'file_extension_rmvb.png'; +fileTypeIcons['rtf'] = 'file_extension_rtf.png'; +fileTypeIcons['sea'] = 'file_extension_sea.png'; +fileTypeIcons['ses'] = 'file_extension_ses.png'; +fileTypeIcons['sit'] = 'file_extension_sit.png'; +fileTypeIcons['sitx'] = 'file_extension_sitx.png'; +fileTypeIcons['ss'] = 'file_extension_ss.png'; +fileTypeIcons['swf'] = 'file_extension_swf.png'; +fileTypeIcons['tgz'] = 'file_extension_tgz.png'; +fileTypeIcons['thm'] = 'file_extension_thm.png'; +fileTypeIcons['tif'] = 'file_extension_tif.png'; +fileTypeIcons['tmp'] = 'file_extension_tmp.png'; +fileTypeIcons['torrent'] = 'file_extension_torrent.png'; +fileTypeIcons['ttf'] = 'file_extension_ttf.png'; +fileTypeIcons['txt'] = 'file_extension_txt.png'; +fileTypeIcons['vcd'] = 'file_extension_vcd.png'; +fileTypeIcons['vob'] = 'file_extension_vob.png'; +fileTypeIcons['wav'] = 'file_extension_wav.png'; +fileTypeIcons['wma'] = 'file_extension_wma.png'; +fileTypeIcons['wmv'] = 'file_extension_wmv.png'; +fileTypeIcons['wps'] = 'file_extension_wps.png'; +fileTypeIcons['xls'] = 'file_extension_xls.png'; +fileTypeIcons['xpi'] = 'file_extension_xpi.png'; +fileTypeIcons['zip'] = 'file_extension_zip.png'; diff --git a/copy_this/modules/bla/bla-tinymce/fileman/js/jquery-1.10.2.min.js b/copy_this/modules/bla/bla-tinymce/fileman/js/jquery-1.10.2.min.js new file mode 100644 index 0000000..da41706 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/fileman/js/jquery-1.10.2.min.js @@ -0,0 +1,6 @@ +/*! jQuery v1.10.2 | (c) 2005, 2013 jQuery Foundation, Inc. | jquery.org/license +//@ sourceMappingURL=jquery-1.10.2.min.map +*/ +(function(e,t){var n,r,i=typeof t,o=e.location,a=e.document,s=a.documentElement,l=e.jQuery,u=e.$,c={},p=[],f="1.10.2",d=p.concat,h=p.push,g=p.slice,m=p.indexOf,y=c.toString,v=c.hasOwnProperty,b=f.trim,x=function(e,t){return new x.fn.init(e,t,r)},w=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,T=/\S+/g,C=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,N=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,k=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,E=/^[\],:{}\s]*$/,S=/(?:^|:|,)(?:\s*\[)+/g,A=/\\(?:["\\\/bfnrt]|u[\da-fA-F]{4})/g,j=/"[^"\\\r\n]*"|true|false|null|-?(?:\d+\.|)\d+(?:[eE][+-]?\d+|)/g,D=/^-ms-/,L=/-([\da-z])/gi,H=function(e,t){return t.toUpperCase()},q=function(e){(a.addEventListener||"load"===e.type||"complete"===a.readyState)&&(_(),x.ready())},_=function(){a.addEventListener?(a.removeEventListener("DOMContentLoaded",q,!1),e.removeEventListener("load",q,!1)):(a.detachEvent("onreadystatechange",q),e.detachEvent("onload",q))};x.fn=x.prototype={jquery:f,constructor:x,init:function(e,n,r){var i,o;if(!e)return this;if("string"==typeof e){if(i="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(e):this.constructor(n).find(e);if(i[1]){if(n=n instanceof x?n[0]:n,x.merge(this,x.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:a,!0)),k.test(i[1])&&x.isPlainObject(n))for(i in n)x.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}if(o=a.getElementById(i[2]),o&&o.parentNode){if(o.id!==i[2])return r.find(e);this.length=1,this[0]=o}return this.context=a,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):x.isFunction(e)?r.ready(e):(e.selector!==t&&(this.selector=e.selector,this.context=e.context),x.makeArray(e,this))},selector:"",length:0,toArray:function(){return g.call(this)},get:function(e){return null==e?this.toArray():0>e?this[this.length+e]:this[e]},pushStack:function(e){var t=x.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e,t){return x.each(this,e,t)},ready:function(e){return x.ready.promise().done(e),this},slice:function(){return this.pushStack(g.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},map:function(e){return this.pushStack(x.map(this,function(t,n){return e.call(t,n,t)}))},end:function(){return this.prevObject||this.constructor(null)},push:h,sort:[].sort,splice:[].splice},x.fn.init.prototype=x.fn,x.extend=x.fn.extend=function(){var e,n,r,i,o,a,s=arguments[0]||{},l=1,u=arguments.length,c=!1;for("boolean"==typeof s&&(c=s,s=arguments[1]||{},l=2),"object"==typeof s||x.isFunction(s)||(s={}),u===l&&(s=this,--l);u>l;l++)if(null!=(o=arguments[l]))for(i in o)e=s[i],r=o[i],s!==r&&(c&&r&&(x.isPlainObject(r)||(n=x.isArray(r)))?(n?(n=!1,a=e&&x.isArray(e)?e:[]):a=e&&x.isPlainObject(e)?e:{},s[i]=x.extend(c,a,r)):r!==t&&(s[i]=r));return s},x.extend({expando:"jQuery"+(f+Math.random()).replace(/\D/g,""),noConflict:function(t){return e.$===x&&(e.$=u),t&&e.jQuery===x&&(e.jQuery=l),x},isReady:!1,readyWait:1,holdReady:function(e){e?x.readyWait++:x.ready(!0)},ready:function(e){if(e===!0?!--x.readyWait:!x.isReady){if(!a.body)return setTimeout(x.ready);x.isReady=!0,e!==!0&&--x.readyWait>0||(n.resolveWith(a,[x]),x.fn.trigger&&x(a).trigger("ready").off("ready"))}},isFunction:function(e){return"function"===x.type(e)},isArray:Array.isArray||function(e){return"array"===x.type(e)},isWindow:function(e){return null!=e&&e==e.window},isNumeric:function(e){return!isNaN(parseFloat(e))&&isFinite(e)},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?c[y.call(e)]||"object":typeof e},isPlainObject:function(e){var n;if(!e||"object"!==x.type(e)||e.nodeType||x.isWindow(e))return!1;try{if(e.constructor&&!v.call(e,"constructor")&&!v.call(e.constructor.prototype,"isPrototypeOf"))return!1}catch(r){return!1}if(x.support.ownLast)for(n in e)return v.call(e,n);for(n in e);return n===t||v.call(e,n)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},error:function(e){throw Error(e)},parseHTML:function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||a;var r=k.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=x.buildFragment([e],t,i),i&&x(i).remove(),x.merge([],r.childNodes))},parseJSON:function(n){return e.JSON&&e.JSON.parse?e.JSON.parse(n):null===n?n:"string"==typeof n&&(n=x.trim(n),n&&E.test(n.replace(A,"@").replace(j,"]").replace(S,"")))?Function("return "+n)():(x.error("Invalid JSON: "+n),t)},parseXML:function(n){var r,i;if(!n||"string"!=typeof n)return null;try{e.DOMParser?(i=new DOMParser,r=i.parseFromString(n,"text/xml")):(r=new ActiveXObject("Microsoft.XMLDOM"),r.async="false",r.loadXML(n))}catch(o){r=t}return r&&r.documentElement&&!r.getElementsByTagName("parsererror").length||x.error("Invalid XML: "+n),r},noop:function(){},globalEval:function(t){t&&x.trim(t)&&(e.execScript||function(t){e.eval.call(e,t)})(t)},camelCase:function(e){return e.replace(D,"ms-").replace(L,H)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t,n){var r,i=0,o=e.length,a=M(e);if(n){if(a){for(;o>i;i++)if(r=t.apply(e[i],n),r===!1)break}else for(i in e)if(r=t.apply(e[i],n),r===!1)break}else if(a){for(;o>i;i++)if(r=t.call(e[i],i,e[i]),r===!1)break}else for(i in e)if(r=t.call(e[i],i,e[i]),r===!1)break;return e},trim:b&&!b.call("\ufeff\u00a0")?function(e){return null==e?"":b.call(e)}:function(e){return null==e?"":(e+"").replace(C,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(M(Object(e))?x.merge(n,"string"==typeof e?[e]:e):h.call(n,e)),n},inArray:function(e,t,n){var r;if(t){if(m)return m.call(t,e,n);for(r=t.length,n=n?0>n?Math.max(0,r+n):n:0;r>n;n++)if(n in t&&t[n]===e)return n}return-1},merge:function(e,n){var r=n.length,i=e.length,o=0;if("number"==typeof r)for(;r>o;o++)e[i++]=n[o];else while(n[o]!==t)e[i++]=n[o++];return e.length=i,e},grep:function(e,t,n){var r,i=[],o=0,a=e.length;for(n=!!n;a>o;o++)r=!!t(e[o],o),n!==r&&i.push(e[o]);return i},map:function(e,t,n){var r,i=0,o=e.length,a=M(e),s=[];if(a)for(;o>i;i++)r=t(e[i],i,n),null!=r&&(s[s.length]=r);else for(i in e)r=t(e[i],i,n),null!=r&&(s[s.length]=r);return d.apply([],s)},guid:1,proxy:function(e,n){var r,i,o;return"string"==typeof n&&(o=e[n],n=e,e=o),x.isFunction(e)?(r=g.call(arguments,2),i=function(){return e.apply(n||this,r.concat(g.call(arguments)))},i.guid=e.guid=e.guid||x.guid++,i):t},access:function(e,n,r,i,o,a,s){var l=0,u=e.length,c=null==r;if("object"===x.type(r)){o=!0;for(l in r)x.access(e,n,l,r[l],!0,a,s)}else if(i!==t&&(o=!0,x.isFunction(i)||(s=!0),c&&(s?(n.call(e,i),n=null):(c=n,n=function(e,t,n){return c.call(x(e),n)})),n))for(;u>l;l++)n(e[l],r,s?i:i.call(e[l],l,n(e[l],r)));return o?e:c?n.call(e):u?n(e[0],r):a},now:function(){return(new Date).getTime()},swap:function(e,t,n,r){var i,o,a={};for(o in t)a[o]=e.style[o],e.style[o]=t[o];i=n.apply(e,r||[]);for(o in t)e.style[o]=a[o];return i}}),x.ready.promise=function(t){if(!n)if(n=x.Deferred(),"complete"===a.readyState)setTimeout(x.ready);else if(a.addEventListener)a.addEventListener("DOMContentLoaded",q,!1),e.addEventListener("load",q,!1);else{a.attachEvent("onreadystatechange",q),e.attachEvent("onload",q);var r=!1;try{r=null==e.frameElement&&a.documentElement}catch(i){}r&&r.doScroll&&function o(){if(!x.isReady){try{r.doScroll("left")}catch(e){return setTimeout(o,50)}_(),x.ready()}}()}return n.promise(t)},x.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(e,t){c["[object "+t+"]"]=t.toLowerCase()});function M(e){var t=e.length,n=x.type(e);return x.isWindow(e)?!1:1===e.nodeType&&t?!0:"array"===n||"function"!==n&&(0===t||"number"==typeof t&&t>0&&t-1 in e)}r=x(a),function(e,t){var n,r,i,o,a,s,l,u,c,p,f,d,h,g,m,y,v,b="sizzle"+-new Date,w=e.document,T=0,C=0,N=st(),k=st(),E=st(),S=!1,A=function(e,t){return e===t?(S=!0,0):0},j=typeof t,D=1<<31,L={}.hasOwnProperty,H=[],q=H.pop,_=H.push,M=H.push,O=H.slice,F=H.indexOf||function(e){var t=0,n=this.length;for(;n>t;t++)if(this[t]===e)return t;return-1},B="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",P="[\\x20\\t\\r\\n\\f]",R="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",W=R.replace("w","w#"),$="\\["+P+"*("+R+")"+P+"*(?:([*^$|!~]?=)"+P+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+W+")|)|)"+P+"*\\]",I=":("+R+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+$.replace(3,8)+")*)|.*)\\)|)",z=RegExp("^"+P+"+|((?:^|[^\\\\])(?:\\\\.)*)"+P+"+$","g"),X=RegExp("^"+P+"*,"+P+"*"),U=RegExp("^"+P+"*([>+~]|"+P+")"+P+"*"),V=RegExp(P+"*[+~]"),Y=RegExp("="+P+"*([^\\]'\"]*)"+P+"*\\]","g"),J=RegExp(I),G=RegExp("^"+W+"$"),Q={ID:RegExp("^#("+R+")"),CLASS:RegExp("^\\.("+R+")"),TAG:RegExp("^("+R.replace("w","w*")+")"),ATTR:RegExp("^"+$),PSEUDO:RegExp("^"+I),CHILD:RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+P+"*(even|odd|(([+-]|)(\\d*)n|)"+P+"*(?:([+-]|)"+P+"*(\\d+)|))"+P+"*\\)|)","i"),bool:RegExp("^(?:"+B+")$","i"),needsContext:RegExp("^"+P+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+P+"*((?:-\\d)?\\d*)"+P+"*\\)|)(?=[^-]|$)","i")},K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,et=/^(?:input|select|textarea|button)$/i,tt=/^h\d$/i,nt=/'|\\/g,rt=RegExp("\\\\([\\da-f]{1,6}"+P+"?|("+P+")|.)","ig"),it=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{M.apply(H=O.call(w.childNodes),w.childNodes),H[w.childNodes.length].nodeType}catch(ot){M={apply:H.length?function(e,t){_.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function at(e,t,n,i){var o,a,s,l,u,c,d,m,y,x;if((t?t.ownerDocument||t:w)!==f&&p(t),t=t||f,n=n||[],!e||"string"!=typeof e)return n;if(1!==(l=t.nodeType)&&9!==l)return[];if(h&&!i){if(o=Z.exec(e))if(s=o[1]){if(9===l){if(a=t.getElementById(s),!a||!a.parentNode)return n;if(a.id===s)return n.push(a),n}else if(t.ownerDocument&&(a=t.ownerDocument.getElementById(s))&&v(t,a)&&a.id===s)return n.push(a),n}else{if(o[2])return M.apply(n,t.getElementsByTagName(e)),n;if((s=o[3])&&r.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(s)),n}if(r.qsa&&(!g||!g.test(e))){if(m=d=b,y=t,x=9===l&&e,1===l&&"object"!==t.nodeName.toLowerCase()){c=mt(e),(d=t.getAttribute("id"))?m=d.replace(nt,"\\$&"):t.setAttribute("id",m),m="[id='"+m+"'] ",u=c.length;while(u--)c[u]=m+yt(c[u]);y=V.test(e)&&t.parentNode||t,x=c.join(",")}if(x)try{return M.apply(n,y.querySelectorAll(x)),n}catch(T){}finally{d||t.removeAttribute("id")}}}return kt(e.replace(z,"$1"),t,n,i)}function st(){var e=[];function t(n,r){return e.push(n+=" ")>o.cacheLength&&delete t[e.shift()],t[n]=r}return t}function lt(e){return e[b]=!0,e}function ut(e){var t=f.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function ct(e,t){var n=e.split("|"),r=e.length;while(r--)o.attrHandle[n[r]]=t}function pt(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||D)-(~e.sourceIndex||D);if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function ft(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function dt(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function ht(e){return lt(function(t){return t=+t,lt(function(n,r){var i,o=e([],n.length,t),a=o.length;while(a--)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}s=at.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},r=at.support={},p=at.setDocument=function(e){var n=e?e.ownerDocument||e:w,i=n.defaultView;return n!==f&&9===n.nodeType&&n.documentElement?(f=n,d=n.documentElement,h=!s(n),i&&i.attachEvent&&i!==i.top&&i.attachEvent("onbeforeunload",function(){p()}),r.attributes=ut(function(e){return e.className="i",!e.getAttribute("className")}),r.getElementsByTagName=ut(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),r.getElementsByClassName=ut(function(e){return e.innerHTML="
              ",e.firstChild.className="i",2===e.getElementsByClassName("i").length}),r.getById=ut(function(e){return d.appendChild(e).id=b,!n.getElementsByName||!n.getElementsByName(b).length}),r.getById?(o.find.ID=function(e,t){if(typeof t.getElementById!==j&&h){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){return e.getAttribute("id")===t}}):(delete o.find.ID,o.filter.ID=function(e){var t=e.replace(rt,it);return function(e){var n=typeof e.getAttributeNode!==j&&e.getAttributeNode("id");return n&&n.value===t}}),o.find.TAG=r.getElementsByTagName?function(e,n){return typeof n.getElementsByTagName!==j?n.getElementsByTagName(e):t}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},o.find.CLASS=r.getElementsByClassName&&function(e,n){return typeof n.getElementsByClassName!==j&&h?n.getElementsByClassName(e):t},m=[],g=[],(r.qsa=K.test(n.querySelectorAll))&&(ut(function(e){e.innerHTML="",e.querySelectorAll("[selected]").length||g.push("\\["+P+"*(?:value|"+B+")"),e.querySelectorAll(":checked").length||g.push(":checked")}),ut(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("t",""),e.querySelectorAll("[t^='']").length&&g.push("[*^$]="+P+"*(?:''|\"\")"),e.querySelectorAll(":enabled").length||g.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),g.push(",.*:")})),(r.matchesSelector=K.test(y=d.webkitMatchesSelector||d.mozMatchesSelector||d.oMatchesSelector||d.msMatchesSelector))&&ut(function(e){r.disconnectedMatch=y.call(e,"div"),y.call(e,"[s!='']:x"),m.push("!=",I)}),g=g.length&&RegExp(g.join("|")),m=m.length&&RegExp(m.join("|")),v=K.test(d.contains)||d.compareDocumentPosition?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},A=d.compareDocumentPosition?function(e,t){if(e===t)return S=!0,0;var i=t.compareDocumentPosition&&e.compareDocumentPosition&&e.compareDocumentPosition(t);return i?1&i||!r.sortDetached&&t.compareDocumentPosition(e)===i?e===n||v(w,e)?-1:t===n||v(w,t)?1:c?F.call(c,e)-F.call(c,t):0:4&i?-1:1:e.compareDocumentPosition?-1:1}:function(e,t){var r,i=0,o=e.parentNode,a=t.parentNode,s=[e],l=[t];if(e===t)return S=!0,0;if(!o||!a)return e===n?-1:t===n?1:o?-1:a?1:c?F.call(c,e)-F.call(c,t):0;if(o===a)return pt(e,t);r=e;while(r=r.parentNode)s.unshift(r);r=t;while(r=r.parentNode)l.unshift(r);while(s[i]===l[i])i++;return i?pt(s[i],l[i]):s[i]===w?-1:l[i]===w?1:0},n):f},at.matches=function(e,t){return at(e,null,null,t)},at.matchesSelector=function(e,t){if((e.ownerDocument||e)!==f&&p(e),t=t.replace(Y,"='$1']"),!(!r.matchesSelector||!h||m&&m.test(t)||g&&g.test(t)))try{var n=y.call(e,t);if(n||r.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(i){}return at(t,f,null,[e]).length>0},at.contains=function(e,t){return(e.ownerDocument||e)!==f&&p(e),v(e,t)},at.attr=function(e,n){(e.ownerDocument||e)!==f&&p(e);var i=o.attrHandle[n.toLowerCase()],a=i&&L.call(o.attrHandle,n.toLowerCase())?i(e,n,!h):t;return a===t?r.attributes||!h?e.getAttribute(n):(a=e.getAttributeNode(n))&&a.specified?a.value:null:a},at.error=function(e){throw Error("Syntax error, unrecognized expression: "+e)},at.uniqueSort=function(e){var t,n=[],i=0,o=0;if(S=!r.detectDuplicates,c=!r.sortStable&&e.slice(0),e.sort(A),S){while(t=e[o++])t===e[o]&&(i=n.push(o));while(i--)e.splice(n[i],1)}return e},a=at.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r];r++)n+=a(t);return n},o=at.selectors={cacheLength:50,createPseudo:lt,match:Q,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(rt,it),e[3]=(e[4]||e[5]||"").replace(rt,it),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||at.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&at.error(e[0]),e},PSEUDO:function(e){var n,r=!e[5]&&e[2];return Q.CHILD.test(e[0])?null:(e[3]&&e[4]!==t?e[2]=e[4]:r&&J.test(r)&&(n=mt(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(e[0]=e[0].slice(0,n),e[2]=r.slice(0,n)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(rt,it).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=N[e+" "];return t||(t=RegExp("(^|"+P+")"+e+"("+P+"|$)"))&&N(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==j&&e.getAttribute("class")||"")})},ATTR:function(e,t,n){return function(r){var i=at.attr(r,e);return null==i?"!="===t:t?(i+="","="===t?i===n:"!="===t?i!==n:"^="===t?n&&0===i.indexOf(n):"*="===t?n&&i.indexOf(n)>-1:"$="===t?n&&i.slice(-n.length)===n:"~="===t?(" "+i+" ").indexOf(n)>-1:"|="===t?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var u,c,p,f,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!l&&!s;if(m){if(o){while(g){p=t;while(p=p[g])if(s?p.nodeName.toLowerCase()===y:1===p.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){c=m[b]||(m[b]={}),u=c[e]||[],d=u[0]===T&&u[1],f=u[0]===T&&u[2],p=d&&m.childNodes[d];while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if(1===p.nodeType&&++f&&p===t){c[e]=[T,d,f];break}}else if(v&&(u=(t[b]||(t[b]={}))[e])&&u[0]===T)f=u[1];else while(p=++d&&p&&p[g]||(f=d=0)||h.pop())if((s?p.nodeName.toLowerCase()===y:1===p.nodeType)&&++f&&(v&&((p[b]||(p[b]={}))[e]=[T,f]),p===t))break;return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(e,t){var n,r=o.pseudos[e]||o.setFilters[e.toLowerCase()]||at.error("unsupported pseudo: "+e);return r[b]?r(t):r.length>1?(n=[e,e,"",t],o.setFilters.hasOwnProperty(e.toLowerCase())?lt(function(e,n){var i,o=r(e,t),a=o.length;while(a--)i=F.call(e,o[a]),e[i]=!(n[i]=o[a])}):function(e){return r(e,0,n)}):r}},pseudos:{not:lt(function(e){var t=[],n=[],r=l(e.replace(z,"$1"));return r[b]?lt(function(e,t,n,i){var o,a=r(e,null,i,[]),s=e.length;while(s--)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:lt(function(e){return function(t){return at(e,t).length>0}}),contains:lt(function(e){return function(t){return(t.textContent||t.innerText||a(t)).indexOf(e)>-1}}),lang:lt(function(e){return G.test(e||"")||at.error("unsupported lang: "+e),e=e.replace(rt,it).toLowerCase(),function(t){var n;do if(n=h?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===d},focus:function(e){return e===f.activeElement&&(!f.hasFocus||f.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!o.pseudos.empty(e)},header:function(e){return tt.test(e.nodeName)},input:function(e){return et.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:ht(function(){return[0]}),last:ht(function(e,t){return[t-1]}),eq:ht(function(e,t,n){return[0>n?n+t:n]}),even:ht(function(e,t){var n=0;for(;t>n;n+=2)e.push(n);return e}),odd:ht(function(e,t){var n=1;for(;t>n;n+=2)e.push(n);return e}),lt:ht(function(e,t,n){var r=0>n?n+t:n;for(;--r>=0;)e.push(r);return e}),gt:ht(function(e,t,n){var r=0>n?n+t:n;for(;t>++r;)e.push(r);return e})}},o.pseudos.nth=o.pseudos.eq;for(n in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})o.pseudos[n]=ft(n);for(n in{submit:!0,reset:!0})o.pseudos[n]=dt(n);function gt(){}gt.prototype=o.filters=o.pseudos,o.setFilters=new gt;function mt(e,t){var n,r,i,a,s,l,u,c=k[e+" "];if(c)return t?0:c.slice(0);s=e,l=[],u=o.preFilter;while(s){(!n||(r=X.exec(s)))&&(r&&(s=s.slice(r[0].length)||s),l.push(i=[])),n=!1,(r=U.exec(s))&&(n=r.shift(),i.push({value:n,type:r[0].replace(z," ")}),s=s.slice(n.length));for(a in o.filter)!(r=Q[a].exec(s))||u[a]&&!(r=u[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),s=s.slice(n.length));if(!n)break}return t?s.length:s?at.error(e):k(e,l).slice(0)}function yt(e){var t=0,n=e.length,r="";for(;n>t;t++)r+=e[t].value;return r}function vt(e,t,n){var r=t.dir,o=n&&"parentNode"===r,a=C++;return t.first?function(t,n,i){while(t=t[r])if(1===t.nodeType||o)return e(t,n,i)}:function(t,n,s){var l,u,c,p=T+" "+a;if(s){while(t=t[r])if((1===t.nodeType||o)&&e(t,n,s))return!0}else while(t=t[r])if(1===t.nodeType||o)if(c=t[b]||(t[b]={}),(u=c[r])&&u[0]===p){if((l=u[1])===!0||l===i)return l===!0}else if(u=c[r]=[p],u[1]=e(t,n,s)||i,u[1]===!0)return!0}}function bt(e){return e.length>1?function(t,n,r){var i=e.length;while(i--)if(!e[i](t,n,r))return!1;return!0}:e[0]}function xt(e,t,n,r,i){var o,a=[],s=0,l=e.length,u=null!=t;for(;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),u&&t.push(s));return a}function wt(e,t,n,r,i,o){return r&&!r[b]&&(r=wt(r)),i&&!i[b]&&(i=wt(i,o)),lt(function(o,a,s,l){var u,c,p,f=[],d=[],h=a.length,g=o||Nt(t||"*",s.nodeType?[s]:s,[]),m=!e||!o&&t?g:xt(g,f,e,s,l),y=n?i||(o?e:h||r)?[]:a:m;if(n&&n(m,y,s,l),r){u=xt(y,d),r(u,[],s,l),c=u.length;while(c--)(p=u[c])&&(y[d[c]]=!(m[d[c]]=p))}if(o){if(i||e){if(i){u=[],c=y.length;while(c--)(p=y[c])&&u.push(m[c]=p);i(null,y=[],u,l)}c=y.length;while(c--)(p=y[c])&&(u=i?F.call(o,p):f[c])>-1&&(o[u]=!(a[u]=p))}}else y=xt(y===a?y.splice(h,y.length):y),i?i(null,a,y,l):M.apply(a,y)})}function Tt(e){var t,n,r,i=e.length,a=o.relative[e[0].type],s=a||o.relative[" "],l=a?1:0,c=vt(function(e){return e===t},s,!0),p=vt(function(e){return F.call(t,e)>-1},s,!0),f=[function(e,n,r){return!a&&(r||n!==u)||((t=n).nodeType?c(e,n,r):p(e,n,r))}];for(;i>l;l++)if(n=o.relative[e[l].type])f=[vt(bt(f),n)];else{if(n=o.filter[e[l].type].apply(null,e[l].matches),n[b]){for(r=++l;i>r;r++)if(o.relative[e[r].type])break;return wt(l>1&&bt(f),l>1&&yt(e.slice(0,l-1).concat({value:" "===e[l-2].type?"*":""})).replace(z,"$1"),n,r>l&&Tt(e.slice(l,r)),i>r&&Tt(e=e.slice(r)),i>r&&yt(e))}f.push(n)}return bt(f)}function Ct(e,t){var n=0,r=t.length>0,a=e.length>0,s=function(s,l,c,p,d){var h,g,m,y=[],v=0,b="0",x=s&&[],w=null!=d,C=u,N=s||a&&o.find.TAG("*",d&&l.parentNode||l),k=T+=null==C?1:Math.random()||.1;for(w&&(u=l!==f&&l,i=n);null!=(h=N[b]);b++){if(a&&h){g=0;while(m=e[g++])if(m(h,l,c)){p.push(h);break}w&&(T=k,i=++n)}r&&((h=!m&&h)&&v--,s&&x.push(h))}if(v+=b,r&&b!==v){g=0;while(m=t[g++])m(x,y,l,c);if(s){if(v>0)while(b--)x[b]||y[b]||(y[b]=q.call(p));y=xt(y)}M.apply(p,y),w&&!s&&y.length>0&&v+t.length>1&&at.uniqueSort(p)}return w&&(T=k,u=C),x};return r?lt(s):s}l=at.compile=function(e,t){var n,r=[],i=[],o=E[e+" "];if(!o){t||(t=mt(e)),n=t.length;while(n--)o=Tt(t[n]),o[b]?r.push(o):i.push(o);o=E(e,Ct(i,r))}return o};function Nt(e,t,n){var r=0,i=t.length;for(;i>r;r++)at(e,t[r],n);return n}function kt(e,t,n,i){var a,s,u,c,p,f=mt(e);if(!i&&1===f.length){if(s=f[0]=f[0].slice(0),s.length>2&&"ID"===(u=s[0]).type&&r.getById&&9===t.nodeType&&h&&o.relative[s[1].type]){if(t=(o.find.ID(u.matches[0].replace(rt,it),t)||[])[0],!t)return n;e=e.slice(s.shift().value.length)}a=Q.needsContext.test(e)?0:s.length;while(a--){if(u=s[a],o.relative[c=u.type])break;if((p=o.find[c])&&(i=p(u.matches[0].replace(rt,it),V.test(s[0].type)&&t.parentNode||t))){if(s.splice(a,1),e=i.length&&yt(s),!e)return M.apply(n,i),n;break}}}return l(e,f)(i,t,!h,n,V.test(e)),n}r.sortStable=b.split("").sort(A).join("")===b,r.detectDuplicates=S,p(),r.sortDetached=ut(function(e){return 1&e.compareDocumentPosition(f.createElement("div"))}),ut(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||ct("type|href|height|width",function(e,n,r){return r?t:e.getAttribute(n,"type"===n.toLowerCase()?1:2)}),r.attributes&&ut(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||ct("value",function(e,n,r){return r||"input"!==e.nodeName.toLowerCase()?t:e.defaultValue}),ut(function(e){return null==e.getAttribute("disabled")})||ct(B,function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&i.specified?i.value:e[n]===!0?n.toLowerCase():null}),x.find=at,x.expr=at.selectors,x.expr[":"]=x.expr.pseudos,x.unique=at.uniqueSort,x.text=at.getText,x.isXMLDoc=at.isXML,x.contains=at.contains}(e);var O={};function F(e){var t=O[e]={};return x.each(e.match(T)||[],function(e,n){t[n]=!0}),t}x.Callbacks=function(e){e="string"==typeof e?O[e]||F(e):x.extend({},e);var n,r,i,o,a,s,l=[],u=!e.once&&[],c=function(t){for(r=e.memory&&t,i=!0,a=s||0,s=0,o=l.length,n=!0;l&&o>a;a++)if(l[a].apply(t[0],t[1])===!1&&e.stopOnFalse){r=!1;break}n=!1,l&&(u?u.length&&c(u.shift()):r?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;(function i(t){x.each(t,function(t,n){var r=x.type(n);"function"===r?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==r&&i(n)})})(arguments),n?o=l.length:r&&(s=t,c(r))}return this},remove:function(){return l&&x.each(arguments,function(e,t){var r;while((r=x.inArray(t,l,r))>-1)l.splice(r,1),n&&(o>=r&&o--,a>=r&&a--)}),this},has:function(e){return e?x.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],o=0,this},disable:function(){return l=u=r=t,this},disabled:function(){return!l},lock:function(){return u=t,r||p.disable(),this},locked:function(){return!u},fireWith:function(e,t){return!l||i&&!u||(t=t||[],t=[e,t.slice?t.slice():t],n?u.push(t):c(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!i}};return p},x.extend({Deferred:function(e){var t=[["resolve","done",x.Callbacks("once memory"),"resolved"],["reject","fail",x.Callbacks("once memory"),"rejected"],["notify","progress",x.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return x.Deferred(function(n){x.each(t,function(t,o){var a=o[0],s=x.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&x.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?x.extend(e,r):r}},i={};return r.pipe=r.then,x.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t=0,n=g.call(arguments),r=n.length,i=1!==r||e&&x.isFunction(e.promise)?r:0,o=1===i?e:x.Deferred(),a=function(e,t,n){return function(r){t[e]=this,n[e]=arguments.length>1?g.call(arguments):r,n===s?o.notifyWith(t,n):--i||o.resolveWith(t,n)}},s,l,u;if(r>1)for(s=Array(r),l=Array(r),u=Array(r);r>t;t++)n[t]&&x.isFunction(n[t].promise)?n[t].promise().done(a(t,u,n)).fail(o.reject).progress(a(t,l,s)):--i;return i||o.resolveWith(u,n),o.promise()}}),x.support=function(t){var n,r,o,s,l,u,c,p,f,d=a.createElement("div");if(d.setAttribute("className","t"),d.innerHTML="
              a",n=d.getElementsByTagName("*")||[],r=d.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;s=a.createElement("select"),u=s.appendChild(a.createElement("option")),o=d.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==d.className,t.leadingWhitespace=3===d.firstChild.nodeType,t.tbody=!d.getElementsByTagName("tbody").length,t.htmlSerialize=!!d.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!o.value,t.optSelected=u.selected,t.enctype=!!a.createElement("form").enctype,t.html5Clone="<:nav>"!==a.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,o.checked=!0,t.noCloneChecked=o.cloneNode(!0).checked,s.disabled=!0,t.optDisabled=!u.disabled;try{delete d.test}catch(h){t.deleteExpando=!1}o=a.createElement("input"),o.setAttribute("value",""),t.input=""===o.getAttribute("value"),o.value="t",o.setAttribute("type","radio"),t.radioValue="t"===o.value,o.setAttribute("checked","t"),o.setAttribute("name","t"),l=a.createDocumentFragment(),l.appendChild(o),t.appendChecked=o.checked,t.checkClone=l.cloneNode(!0).cloneNode(!0).lastChild.checked,d.attachEvent&&(d.attachEvent("onclick",function(){t.noCloneEvent=!1}),d.cloneNode(!0).click());for(f in{submit:!0,change:!0,focusin:!0})d.setAttribute(c="on"+f,"t"),t[f+"Bubbles"]=c in e||d.attributes[c].expando===!1;d.style.backgroundClip="content-box",d.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===d.style.backgroundClip;for(f in x(t))break;return t.ownLast="0"!==f,x(function(){var n,r,o,s="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",l=a.getElementsByTagName("body")[0];l&&(n=a.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",l.appendChild(n).appendChild(d),d.innerHTML="
              t
              ",o=d.getElementsByTagName("td"),o[0].style.cssText="padding:0;margin:0;border:0;display:none",p=0===o[0].offsetHeight,o[0].style.display="",o[1].style.display="none",t.reliableHiddenOffsets=p&&0===o[0].offsetHeight,d.innerHTML="",d.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",x.swap(l,null!=l.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===d.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(d,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(d,null)||{width:"4px"}).width,r=d.appendChild(a.createElement("div")),r.style.cssText=d.style.cssText=s,r.style.marginRight=r.style.width="0",d.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof d.style.zoom!==i&&(d.innerHTML="",d.style.cssText=s+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===d.offsetWidth,d.style.display="block",d.innerHTML="
              ",d.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==d.offsetWidth,t.inlineBlockNeedsLayout&&(l.style.zoom=1)),l.removeChild(n),n=d=o=r=null)}),n=s=l=u=r=o=null,t +}({});var B=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,P=/([A-Z])/g;function R(e,n,r,i){if(x.acceptData(e)){var o,a,s=x.expando,l=e.nodeType,u=l?x.cache:e,c=l?e[s]:e[s]&&s;if(c&&u[c]&&(i||u[c].data)||r!==t||"string"!=typeof n)return c||(c=l?e[s]=p.pop()||x.guid++:s),u[c]||(u[c]=l?{}:{toJSON:x.noop}),("object"==typeof n||"function"==typeof n)&&(i?u[c]=x.extend(u[c],n):u[c].data=x.extend(u[c].data,n)),a=u[c],i||(a.data||(a.data={}),a=a.data),r!==t&&(a[x.camelCase(n)]=r),"string"==typeof n?(o=a[n],null==o&&(o=a[x.camelCase(n)])):o=a,o}}function W(e,t,n){if(x.acceptData(e)){var r,i,o=e.nodeType,a=o?x.cache:e,s=o?e[x.expando]:x.expando;if(a[s]){if(t&&(r=n?a[s]:a[s].data)){x.isArray(t)?t=t.concat(x.map(t,x.camelCase)):t in r?t=[t]:(t=x.camelCase(t),t=t in r?[t]:t.split(" ")),i=t.length;while(i--)delete r[t[i]];if(n?!I(r):!x.isEmptyObject(r))return}(n||(delete a[s].data,I(a[s])))&&(o?x.cleanData([e],!0):x.support.deleteExpando||a!=a.window?delete a[s]:a[s]=null)}}}x.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?x.cache[e[x.expando]]:e[x.expando],!!e&&!I(e)},data:function(e,t,n){return R(e,t,n)},removeData:function(e,t){return W(e,t)},_data:function(e,t,n){return R(e,t,n,!0)},_removeData:function(e,t){return W(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&x.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),x.fn.extend({data:function(e,n){var r,i,o=null,a=0,s=this[0];if(e===t){if(this.length&&(o=x.data(s),1===s.nodeType&&!x._data(s,"parsedAttrs"))){for(r=s.attributes;r.length>a;a++)i=r[a].name,0===i.indexOf("data-")&&(i=x.camelCase(i.slice(5)),$(s,i,o[i]));x._data(s,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){x.data(this,e)}):arguments.length>1?this.each(function(){x.data(this,e,n)}):s?$(s,e,x.data(s,e)):null},removeData:function(e){return this.each(function(){x.removeData(this,e)})}});function $(e,n,r){if(r===t&&1===e.nodeType){var i="data-"+n.replace(P,"-$1").toLowerCase();if(r=e.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:B.test(r)?x.parseJSON(r):r}catch(o){}x.data(e,n,r)}else r=t}return r}function I(e){var t;for(t in e)if(("data"!==t||!x.isEmptyObject(e[t]))&&"toJSON"!==t)return!1;return!0}x.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=x._data(e,n),r&&(!i||x.isArray(r)?i=x._data(e,n,x.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=x.queue(e,t),r=n.length,i=n.shift(),o=x._queueHooks(e,t),a=function(){x.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return x._data(e,n)||x._data(e,n,{empty:x.Callbacks("once memory").add(function(){x._removeData(e,t+"queue"),x._removeData(e,n)})})}}),x.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?x.queue(this[0],e):n===t?this:this.each(function(){var t=x.queue(this,e,n);x._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&x.dequeue(this,e)})},dequeue:function(e){return this.each(function(){x.dequeue(this,e)})},delay:function(e,t){return e=x.fx?x.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=x.Deferred(),a=this,s=this.length,l=function(){--i||o.resolveWith(a,[a])};"string"!=typeof e&&(n=e,e=t),e=e||"fx";while(s--)r=x._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(l));return l(),o.promise(n)}});var z,X,U=/[\t\r\n\f]/g,V=/\r/g,Y=/^(?:input|select|textarea|button|object)$/i,J=/^(?:a|area)$/i,G=/^(?:checked|selected)$/i,Q=x.support.getSetAttribute,K=x.support.input;x.fn.extend({attr:function(e,t){return x.access(this,x.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){x.removeAttr(this,e)})},prop:function(e,t){return x.access(this,x.prop,e,t,arguments.length>1)},removeProp:function(e){return e=x.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,l="string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).addClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):" ")){o=0;while(i=t[o++])0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=x.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,l=0===arguments.length||"string"==typeof e&&e;if(x.isFunction(e))return this.each(function(t){x(this).removeClass(e.call(this,t,this.className))});if(l)for(t=(e||"").match(T)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(U," "):"")){o=0;while(i=t[o++])while(r.indexOf(" "+i+" ")>=0)r=r.replace(" "+i+" "," ");n.className=e?x.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):x.isFunction(e)?this.each(function(n){x(this).toggleClass(e.call(this,n,this.className,t),t)}):this.each(function(){if("string"===n){var t,r=0,o=x(this),a=e.match(T)||[];while(t=a[r++])o.hasClass(t)?o.removeClass(t):o.addClass(t)}else(n===i||"boolean"===n)&&(this.className&&x._data(this,"__className__",this.className),this.className=this.className||e===!1?"":x._data(this,"__className__")||"")})},hasClass:function(e){var t=" "+e+" ",n=0,r=this.length;for(;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(U," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];{if(arguments.length)return i=x.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,x(this).val()):e,null==o?o="":"number"==typeof o?o+="":x.isArray(o)&&(o=x.map(o,function(e){return null==e?"":e+""})),r=x.valHooks[this.type]||x.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))});if(o)return r=x.valHooks[o.type]||x.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(V,""):null==n?"":n)}}}),x.extend({valHooks:{option:{get:function(e){var t=x.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,l=0>i?s:o?i:0;for(;s>l;l++)if(n=r[l],!(!n.selected&&l!==i||(x.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&x.nodeName(n.parentNode,"optgroup"))){if(t=x(n).val(),o)return t;a.push(t)}return a},set:function(e,t){var n,r,i=e.options,o=x.makeArray(t),a=i.length;while(a--)r=i[a],(r.selected=x.inArray(x(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return typeof e.getAttribute===i?x.prop(e,n,r):(1===s&&x.isXMLDoc(e)||(n=n.toLowerCase(),o=x.attrHooks[n]||(x.expr.match.bool.test(n)?X:z)),r===t?o&&"get"in o&&null!==(a=o.get(e,n))?a:(a=x.find.attr(e,n),null==a?t:a):null!==r?o&&"set"in o&&(a=o.set(e,r,n))!==t?a:(e.setAttribute(n,r+""),r):(x.removeAttr(e,n),t))},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(T);if(o&&1===e.nodeType)while(n=o[i++])r=x.propFix[n]||n,x.expr.match.bool.test(n)?K&&Q||!G.test(n)?e[r]=!1:e[x.camelCase("default-"+n)]=e[r]=!1:x.attr(e,n,""),e.removeAttribute(Q?n:r)},attrHooks:{type:{set:function(e,t){if(!x.support.radioValue&&"radio"===t&&x.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;if(e&&3!==s&&8!==s&&2!==s)return a=1!==s||!x.isXMLDoc(e),a&&(n=x.propFix[n]||n,o=x.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]},propHooks:{tabIndex:{get:function(e){var t=x.find.attr(e,"tabindex");return t?parseInt(t,10):Y.test(e.nodeName)||J.test(e.nodeName)&&e.href?0:-1}}}}),X={set:function(e,t,n){return t===!1?x.removeAttr(e,n):K&&Q||!G.test(n)?e.setAttribute(!Q&&x.propFix[n]||n,n):e[x.camelCase("default-"+n)]=e[n]=!0,n}},x.each(x.expr.match.bool.source.match(/\w+/g),function(e,n){var r=x.expr.attrHandle[n]||x.find.attr;x.expr.attrHandle[n]=K&&Q||!G.test(n)?function(e,n,i){var o=x.expr.attrHandle[n],a=i?t:(x.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return x.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[x.camelCase("default-"+n)]?n.toLowerCase():null}}),K&&Q||(x.attrHooks.value={set:function(e,n,r){return x.nodeName(e,"input")?(e.defaultValue=n,t):z&&z.set(e,n,r)}}),Q||(z={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},x.expr.attrHandle.id=x.expr.attrHandle.name=x.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},x.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:z.set},x.attrHooks.contenteditable={set:function(e,t,n){z.set(e,""===t?!1:t,n)}},x.each(["width","height"],function(e,n){x.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),x.support.hrefNormalized||x.each(["href","src"],function(e,t){x.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),x.support.style||(x.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),x.support.optSelected||(x.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),x.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){x.propFix[this.toLowerCase()]=this}),x.support.enctype||(x.propFix.enctype="encoding"),x.each(["radio","checkbox"],function(){x.valHooks[this]={set:function(e,n){return x.isArray(n)?e.checked=x.inArray(x(e).val(),n)>=0:t}},x.support.checkOn||(x.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Z=/^(?:input|select|textarea)$/i,et=/^key/,tt=/^(?:mouse|contextmenu)|click/,nt=/^(?:focusinfocus|focusoutblur)$/,rt=/^([^.]*)(?:\.(.+)|)$/;function it(){return!0}function ot(){return!1}function at(){try{return a.activeElement}catch(e){}}x.event={global:{},add:function(e,n,r,o,a){var s,l,u,c,p,f,d,h,g,m,y,v=x._data(e);if(v){r.handler&&(c=r,r=c.handler,a=c.selector),r.guid||(r.guid=x.guid++),(l=v.events)||(l=v.events={}),(f=v.handle)||(f=v.handle=function(e){return typeof x===i||e&&x.event.triggered===e.type?t:x.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(T)||[""],u=n.length;while(u--)s=rt.exec(n[u])||[],g=y=s[1],m=(s[2]||"").split(".").sort(),g&&(p=x.event.special[g]||{},g=(a?p.delegateType:p.bindType)||g,p=x.event.special[g]||{},d=x.extend({type:g,origType:y,data:o,handler:r,guid:r.guid,selector:a,needsContext:a&&x.expr.match.needsContext.test(a),namespace:m.join(".")},c),(h=l[g])||(h=l[g]=[],h.delegateCount=0,p.setup&&p.setup.call(e,o,m,f)!==!1||(e.addEventListener?e.addEventListener(g,f,!1):e.attachEvent&&e.attachEvent("on"+g,f))),p.add&&(p.add.call(e,d),d.handler.guid||(d.handler.guid=r.guid)),a?h.splice(h.delegateCount++,0,d):h.push(d),x.event.global[g]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,l,u,c,p,f,d,h,g,m=x.hasData(e)&&x._data(e);if(m&&(c=m.events)){t=(t||"").match(T)||[""],u=t.length;while(u--)if(s=rt.exec(t[u])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){p=x.event.special[d]||{},d=(r?p.delegateType:p.bindType)||d,f=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),l=o=f.length;while(o--)a=f[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(f.splice(o,1),a.selector&&f.delegateCount--,p.remove&&p.remove.call(e,a));l&&!f.length&&(p.teardown&&p.teardown.call(e,h,m.handle)!==!1||x.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)x.event.remove(e,d+t[u],n,r,!0);x.isEmptyObject(c)&&(delete m.handle,x._removeData(e,"events"))}},trigger:function(n,r,i,o){var s,l,u,c,p,f,d,h=[i||a],g=v.call(n,"type")?n.type:n,m=v.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||a,3!==i.nodeType&&8!==i.nodeType&&!nt.test(g+x.event.triggered)&&(g.indexOf(".")>=0&&(m=g.split("."),g=m.shift(),m.sort()),l=0>g.indexOf(":")&&"on"+g,n=n[x.expando]?n:new x.Event(g,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:x.makeArray(r,[n]),p=x.event.special[g]||{},o||!p.trigger||p.trigger.apply(i,r)!==!1)){if(!o&&!p.noBubble&&!x.isWindow(i)){for(c=p.delegateType||g,nt.test(c+g)||(u=u.parentNode);u;u=u.parentNode)h.push(u),f=u;f===(i.ownerDocument||a)&&h.push(f.defaultView||f.parentWindow||e)}d=0;while((u=h[d++])&&!n.isPropagationStopped())n.type=d>1?c:p.bindType||g,s=(x._data(u,"events")||{})[n.type]&&x._data(u,"handle"),s&&s.apply(u,r),s=l&&u[l],s&&x.acceptData(u)&&s.apply&&s.apply(u,r)===!1&&n.preventDefault();if(n.type=g,!o&&!n.isDefaultPrevented()&&(!p._default||p._default.apply(h.pop(),r)===!1)&&x.acceptData(i)&&l&&i[g]&&!x.isWindow(i)){f=i[l],f&&(i[l]=null),x.event.triggered=g;try{i[g]()}catch(y){}x.event.triggered=t,f&&(i[l]=f)}return n.result}},dispatch:function(e){e=x.event.fix(e);var n,r,i,o,a,s=[],l=g.call(arguments),u=(x._data(this,"events")||{})[e.type]||[],c=x.event.special[e.type]||{};if(l[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){s=x.event.handlers.call(this,e,u),n=0;while((o=s[n++])&&!e.isPropagationStopped()){e.currentTarget=o.elem,a=0;while((i=o.handlers[a++])&&!e.isImmediatePropagationStopped())(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((x.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,l),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()))}return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],l=n.delegateCount,u=e.target;if(l&&u.nodeType&&(!e.button||"click"!==e.type))for(;u!=this;u=u.parentNode||this)if(1===u.nodeType&&(u.disabled!==!0||"click"!==e.type)){for(o=[],a=0;l>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?x(r,this).index(u)>=0:x.find(r,this,null,[u]).length),o[r]&&o.push(i);o.length&&s.push({elem:u,handlers:o})}return n.length>l&&s.push({elem:this,handlers:n.slice(l)}),s},fix:function(e){if(e[x.expando])return e;var t,n,r,i=e.type,o=e,s=this.fixHooks[i];s||(this.fixHooks[i]=s=tt.test(i)?this.mouseHooks:et.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,e=new x.Event(o),t=r.length;while(t--)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||a),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,s.filter?s.filter(e,o):e},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,s=n.button,l=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||a,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&l&&(e.relatedTarget=l===e.target?n.toElement:l),e.which||s===t||(e.which=1&s?1:2&s?3:4&s?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==at()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===at()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return x.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return x.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=x.extend(new x.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?x.event.trigger(i,null,t):x.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},x.removeEvent=a.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===i&&(e[r]=null),e.detachEvent(r,n))},x.Event=function(e,n){return this instanceof x.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?it:ot):this.type=e,n&&x.extend(this,n),this.timeStamp=e&&e.timeStamp||x.now(),this[x.expando]=!0,t):new x.Event(e,n)},x.Event.prototype={isDefaultPrevented:ot,isPropagationStopped:ot,isImmediatePropagationStopped:ot,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=it,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=it,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=it,this.stopPropagation()}},x.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){x.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!x.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),x.support.submitBubbles||(x.event.special.submit={setup:function(){return x.nodeName(this,"form")?!1:(x.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=x.nodeName(n,"input")||x.nodeName(n,"button")?n.form:t;r&&!x._data(r,"submitBubbles")&&(x.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),x._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&x.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return x.nodeName(this,"form")?!1:(x.event.remove(this,"._submit"),t)}}),x.support.changeBubbles||(x.event.special.change={setup:function(){return Z.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(x.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),x.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),x.event.simulate("change",this,e,!0)})),!1):(x.event.add(this,"beforeactivate._change",function(e){var t=e.target;Z.test(t.nodeName)&&!x._data(t,"changeBubbles")&&(x.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||x.event.simulate("change",this.parentNode,e,!0)}),x._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return x.event.remove(this,"._change"),!Z.test(this.nodeName)}}),x.support.focusinBubbles||x.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){x.event.simulate(t,e.target,x.event.fix(e),!0)};x.event.special[t]={setup:function(){0===n++&&a.addEventListener(e,r,!0)},teardown:function(){0===--n&&a.removeEventListener(e,r,!0)}}}),x.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=ot;else if(!i)return this;return 1===o&&(s=i,i=function(e){return x().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=x.guid++)),this.each(function(){x.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,x(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=ot),this.each(function(){x.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){x.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?x.event.trigger(e,n,r,!0):t}});var st=/^.[^:#\[\.,]*$/,lt=/^(?:parents|prev(?:Until|All))/,ut=x.expr.match.needsContext,ct={children:!0,contents:!0,next:!0,prev:!0};x.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(x(e).filter(function(){for(t=0;i>t;t++)if(x.contains(r[t],this))return!0}));for(t=0;i>t;t++)x.find(e,r[t],n);return n=this.pushStack(i>1?x.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=x(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(x.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(ft(this,e||[],!0))},filter:function(e){return this.pushStack(ft(this,e||[],!1))},is:function(e){return!!ft(this,"string"==typeof e&&ut.test(e)?x(e):e||[],!1).length},closest:function(e,t){var n,r=0,i=this.length,o=[],a=ut.test(e)||"string"!=typeof e?x(e,t||this.context):0;for(;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&x.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?x.unique(o):o)},index:function(e){return e?"string"==typeof e?x.inArray(this[0],x(e)):x.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?x(e,t):x.makeArray(e&&e.nodeType?[e]:e),r=x.merge(this.get(),n);return this.pushStack(x.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}});function pt(e,t){do e=e[t];while(e&&1!==e.nodeType);return e}x.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return x.dir(e,"parentNode")},parentsUntil:function(e,t,n){return x.dir(e,"parentNode",n)},next:function(e){return pt(e,"nextSibling")},prev:function(e){return pt(e,"previousSibling")},nextAll:function(e){return x.dir(e,"nextSibling")},prevAll:function(e){return x.dir(e,"previousSibling")},nextUntil:function(e,t,n){return x.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return x.dir(e,"previousSibling",n)},siblings:function(e){return x.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return x.sibling(e.firstChild)},contents:function(e){return x.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:x.merge([],e.childNodes)}},function(e,t){x.fn[e]=function(n,r){var i=x.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=x.filter(r,i)),this.length>1&&(ct[e]||(i=x.unique(i)),lt.test(e)&&(i=i.reverse())),this.pushStack(i)}}),x.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?x.find.matchesSelector(r,e)?[r]:[]:x.find.matches(e,x.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){var i=[],o=e[n];while(o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!x(o).is(r)))1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){var n=[];for(;e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});function ft(e,t,n){if(x.isFunction(t))return x.grep(e,function(e,r){return!!t.call(e,r,e)!==n});if(t.nodeType)return x.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(st.test(t))return x.filter(t,e,n);t=x.filter(t,e)}return x.grep(e,function(e){return x.inArray(e,t)>=0!==n})}function dt(e){var t=ht.split("|"),n=e.createDocumentFragment();if(n.createElement)while(t.length)n.createElement(t.pop());return n}var ht="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",gt=/ jQuery\d+="(?:null|\d+)"/g,mt=RegExp("<(?:"+ht+")[\\s/>]","i"),yt=/^\s+/,vt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bt=/<([\w:]+)/,xt=/\s*$/g,At={option:[1,""],legend:[1,"
              ","
              "],area:[1,"",""],param:[1,"",""],thead:[1,"","
              "],tr:[2,"","
              "],col:[2,"","
              "],td:[3,"","
              "],_default:x.support.htmlSerialize?[0,"",""]:[1,"X
              ","
              "]},jt=dt(a),Dt=jt.appendChild(a.createElement("div"));At.optgroup=At.option,At.tbody=At.tfoot=At.colgroup=At.caption=At.thead,At.th=At.td,x.fn.extend({text:function(e){return x.access(this,function(e){return e===t?x.text(this):this.empty().append((this[0]&&this[0].ownerDocument||a).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=Lt(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){var n,r=e?x.filter(e,this):this,i=0;for(;null!=(n=r[i]);i++)t||1!==n.nodeType||x.cleanData(Ft(n)),n.parentNode&&(t&&x.contains(n.ownerDocument,n)&&_t(Ft(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){var e,t=0;for(;null!=(e=this[t]);t++){1===e.nodeType&&x.cleanData(Ft(e,!1));while(e.firstChild)e.removeChild(e.firstChild);e.options&&x.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return x.clone(this,e,t)})},html:function(e){return x.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(gt,""):t;if(!("string"!=typeof e||Tt.test(e)||!x.support.htmlSerialize&&mt.test(e)||!x.support.leadingWhitespace&&yt.test(e)||At[(bt.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(vt,"<$1>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(x.cleanData(Ft(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=x.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),x(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=d.apply([],e);var r,i,o,a,s,l,u=0,c=this.length,p=this,f=c-1,h=e[0],g=x.isFunction(h);if(g||!(1>=c||"string"!=typeof h||x.support.checkClone)&&Nt.test(h))return this.each(function(r){var i=p.eq(r);g&&(e[0]=h.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(l=x.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=l.firstChild,1===l.childNodes.length&&(l=r),r)){for(a=x.map(Ft(l,"script"),Ht),o=a.length;c>u;u++)i=l,u!==f&&(i=x.clone(i,!0,!0),o&&x.merge(a,Ft(i,"script"))),t.call(this[u],i,u);if(o)for(s=a[a.length-1].ownerDocument,x.map(a,qt),u=0;o>u;u++)i=a[u],kt.test(i.type||"")&&!x._data(i,"globalEval")&&x.contains(s,i)&&(i.src?x._evalUrl(i.src):x.globalEval((i.text||i.textContent||i.innerHTML||"").replace(St,"")));l=r=null}return this}});function Lt(e,t){return x.nodeName(e,"table")&&x.nodeName(1===t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function Ht(e){return e.type=(null!==x.find.attr(e,"type"))+"/"+e.type,e}function qt(e){var t=Et.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function _t(e,t){var n,r=0;for(;null!=(n=e[r]);r++)x._data(n,"globalEval",!t||x._data(t[r],"globalEval"))}function Mt(e,t){if(1===t.nodeType&&x.hasData(e)){var n,r,i,o=x._data(e),a=x._data(t,o),s=o.events;if(s){delete a.handle,a.events={};for(n in s)for(r=0,i=s[n].length;i>r;r++)x.event.add(t,n,s[n][r])}a.data&&(a.data=x.extend({},a.data))}}function Ot(e,t){var n,r,i;if(1===t.nodeType){if(n=t.nodeName.toLowerCase(),!x.support.noCloneEvent&&t[x.expando]){i=x._data(t);for(r in i.events)x.removeEvent(t,r,i.handle);t.removeAttribute(x.expando)}"script"===n&&t.text!==e.text?(Ht(t).text=e.text,qt(t)):"object"===n?(t.parentNode&&(t.outerHTML=e.outerHTML),x.support.html5Clone&&e.innerHTML&&!x.trim(t.innerHTML)&&(t.innerHTML=e.innerHTML)):"input"===n&&Ct.test(e.type)?(t.defaultChecked=t.checked=e.checked,t.value!==e.value&&(t.value=e.value)):"option"===n?t.defaultSelected=t.selected=e.defaultSelected:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}}x.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){x.fn[e]=function(e){var n,r=0,i=[],o=x(e),a=o.length-1;for(;a>=r;r++)n=r===a?this:this.clone(!0),x(o[r])[t](n),h.apply(i,n.get());return this.pushStack(i)}});function Ft(e,n){var r,o,a=0,s=typeof e.getElementsByTagName!==i?e.getElementsByTagName(n||"*"):typeof e.querySelectorAll!==i?e.querySelectorAll(n||"*"):t;if(!s)for(s=[],r=e.childNodes||e;null!=(o=r[a]);a++)!n||x.nodeName(o,n)?s.push(o):x.merge(s,Ft(o,n));return n===t||n&&x.nodeName(e,n)?x.merge([e],s):s}function Bt(e){Ct.test(e.type)&&(e.defaultChecked=e.checked)}x.extend({clone:function(e,t,n){var r,i,o,a,s,l=x.contains(e.ownerDocument,e);if(x.support.html5Clone||x.isXMLDoc(e)||!mt.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(Dt.innerHTML=e.outerHTML,Dt.removeChild(o=Dt.firstChild)),!(x.support.noCloneEvent&&x.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||x.isXMLDoc(e)))for(r=Ft(o),s=Ft(e),a=0;null!=(i=s[a]);++a)r[a]&&Ot(i,r[a]);if(t)if(n)for(s=s||Ft(e),r=r||Ft(o),a=0;null!=(i=s[a]);a++)Mt(i,r[a]);else Mt(e,o);return r=Ft(o,"script"),r.length>0&&_t(r,!l&&Ft(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){var i,o,a,s,l,u,c,p=e.length,f=dt(t),d=[],h=0;for(;p>h;h++)if(o=e[h],o||0===o)if("object"===x.type(o))x.merge(d,o.nodeType?[o]:o);else if(wt.test(o)){s=s||f.appendChild(t.createElement("div")),l=(bt.exec(o)||["",""])[1].toLowerCase(),c=At[l]||At._default,s.innerHTML=c[1]+o.replace(vt,"<$1>")+c[2],i=c[0];while(i--)s=s.lastChild;if(!x.support.leadingWhitespace&&yt.test(o)&&d.push(t.createTextNode(yt.exec(o)[0])),!x.support.tbody){o="table"!==l||xt.test(o)?""!==c[1]||xt.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;while(i--)x.nodeName(u=o.childNodes[i],"tbody")&&!u.childNodes.length&&o.removeChild(u)}x.merge(d,s.childNodes),s.textContent="";while(s.firstChild)s.removeChild(s.firstChild);s=f.lastChild}else d.push(t.createTextNode(o));s&&f.removeChild(s),x.support.appendChecked||x.grep(Ft(d,"input"),Bt),h=0;while(o=d[h++])if((!r||-1===x.inArray(o,r))&&(a=x.contains(o.ownerDocument,o),s=Ft(f.appendChild(o),"script"),a&&_t(s),n)){i=0;while(o=s[i++])kt.test(o.type||"")&&n.push(o)}return s=null,f},cleanData:function(e,t){var n,r,o,a,s=0,l=x.expando,u=x.cache,c=x.support.deleteExpando,f=x.event.special;for(;null!=(n=e[s]);s++)if((t||x.acceptData(n))&&(o=n[l],a=o&&u[o])){if(a.events)for(r in a.events)f[r]?x.event.remove(n,r):x.removeEvent(n,r,a.handle); +u[o]&&(delete u[o],c?delete n[l]:typeof n.removeAttribute!==i?n.removeAttribute(l):n[l]=null,p.push(o))}},_evalUrl:function(e){return x.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),x.fn.extend({wrapAll:function(e){if(x.isFunction(e))return this.each(function(t){x(this).wrapAll(e.call(this,t))});if(this[0]){var t=x(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){var e=this;while(e.firstChild&&1===e.firstChild.nodeType)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return x.isFunction(e)?this.each(function(t){x(this).wrapInner(e.call(this,t))}):this.each(function(){var t=x(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=x.isFunction(e);return this.each(function(n){x(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){x.nodeName(this,"body")||x(this).replaceWith(this.childNodes)}).end()}});var Pt,Rt,Wt,$t=/alpha\([^)]*\)/i,It=/opacity\s*=\s*([^)]*)/,zt=/^(top|right|bottom|left)$/,Xt=/^(none|table(?!-c[ea]).+)/,Ut=/^margin/,Vt=RegExp("^("+w+")(.*)$","i"),Yt=RegExp("^("+w+")(?!px)[a-z%]+$","i"),Jt=RegExp("^([+-])=("+w+")","i"),Gt={BODY:"block"},Qt={position:"absolute",visibility:"hidden",display:"block"},Kt={letterSpacing:0,fontWeight:400},Zt=["Top","Right","Bottom","Left"],en=["Webkit","O","Moz","ms"];function tn(e,t){if(t in e)return t;var n=t.charAt(0).toUpperCase()+t.slice(1),r=t,i=en.length;while(i--)if(t=en[i]+n,t in e)return t;return r}function nn(e,t){return e=t||e,"none"===x.css(e,"display")||!x.contains(e.ownerDocument,e)}function rn(e,t){var n,r,i,o=[],a=0,s=e.length;for(;s>a;a++)r=e[a],r.style&&(o[a]=x._data(r,"olddisplay"),n=r.style.display,t?(o[a]||"none"!==n||(r.style.display=""),""===r.style.display&&nn(r)&&(o[a]=x._data(r,"olddisplay",ln(r.nodeName)))):o[a]||(i=nn(r),(n&&"none"!==n||!i)&&x._data(r,"olddisplay",i?n:x.css(r,"display"))));for(a=0;s>a;a++)r=e[a],r.style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?o[a]||"":"none"));return e}x.fn.extend({css:function(e,n){return x.access(this,function(e,n,r){var i,o,a={},s=0;if(x.isArray(n)){for(o=Rt(e),i=n.length;i>s;s++)a[n[s]]=x.css(e,n[s],!1,o);return a}return r!==t?x.style(e,n,r):x.css(e,n)},e,n,arguments.length>1)},show:function(){return rn(this,!0)},hide:function(){return rn(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){nn(this)?x(this).show():x(this).hide()})}}),x.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Wt(e,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":x.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,l=x.camelCase(n),u=e.style;if(n=x.cssProps[l]||(x.cssProps[l]=tn(u,l)),s=x.cssHooks[n]||x.cssHooks[l],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:u[n];if(a=typeof r,"string"===a&&(o=Jt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(x.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||x.cssNumber[l]||(r+="px"),x.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(u[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{u[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,l=x.camelCase(n);return n=x.cssProps[l]||(x.cssProps[l]=tn(e.style,l)),s=x.cssHooks[n]||x.cssHooks[l],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=Wt(e,n,i)),"normal"===a&&n in Kt&&(a=Kt[n]),""===r||r?(o=parseFloat(a),r===!0||x.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(Rt=function(t){return e.getComputedStyle(t,null)},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s.getPropertyValue(n)||s[n]:t,u=e.style;return s&&(""!==l||x.contains(e.ownerDocument,e)||(l=x.style(e,n)),Yt.test(l)&&Ut.test(n)&&(i=u.width,o=u.minWidth,a=u.maxWidth,u.minWidth=u.maxWidth=u.width=l,l=s.width,u.width=i,u.minWidth=o,u.maxWidth=a)),l}):a.documentElement.currentStyle&&(Rt=function(e){return e.currentStyle},Wt=function(e,n,r){var i,o,a,s=r||Rt(e),l=s?s[n]:t,u=e.style;return null==l&&u&&u[n]&&(l=u[n]),Yt.test(l)&&!zt.test(n)&&(i=u.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),u.left="fontSize"===n?"1em":l,l=u.pixelLeft+"px",u.left=i,a&&(o.left=a)),""===l?"auto":l});function on(e,t,n){var r=Vt.exec(t);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):t}function an(e,t,n,r,i){var o=n===(r?"border":"content")?4:"width"===t?1:0,a=0;for(;4>o;o+=2)"margin"===n&&(a+=x.css(e,n+Zt[o],!0,i)),r?("content"===n&&(a-=x.css(e,"padding"+Zt[o],!0,i)),"margin"!==n&&(a-=x.css(e,"border"+Zt[o]+"Width",!0,i))):(a+=x.css(e,"padding"+Zt[o],!0,i),"padding"!==n&&(a+=x.css(e,"border"+Zt[o]+"Width",!0,i)));return a}function sn(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,o=Rt(e),a=x.support.boxSizing&&"border-box"===x.css(e,"boxSizing",!1,o);if(0>=i||null==i){if(i=Wt(e,t,o),(0>i||null==i)&&(i=e.style[t]),Yt.test(i))return i;r=a&&(x.support.boxSizingReliable||i===e.style[t]),i=parseFloat(i)||0}return i+an(e,t,n||(a?"border":"content"),r,o)+"px"}function ln(e){var t=a,n=Gt[e];return n||(n=un(e,t),"none"!==n&&n||(Pt=(Pt||x("':"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),("iframe"==a||"object"==a||"embed"==a||"video"==a||"audio"==a)&&(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){c.comment(a)},cdata:function(a){c.cdata(a)},text:function(a,b){c.text(a,b)},start:function(a,b,d){if("script"!=a&&"noscript"!=a){for(var e=0;e=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}var l=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$1"},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:425,h:350,url:"//www.youtube.com/embed/$2"},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc"},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0"},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"'}],m=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b,c){for(var e,f,g,h,i,j,k,l,m=b.length;m--;)if(f=b[m],f.parent&&("script"!=f.name||(l=d(f.attr("src"))))){for(g=new tinymce.html.Node("img",1),g.shortEnded=!0,l&&(l.width&&f.attr("width",l.width.toString()),l.height&&f.attr("height",l.height.toString())),j=f.attributes,e=j.length;e--;)h=j[e].name,i=j[e].value,"width"!==h&&"height"!==h&&"style"!==h&&(("data"==h||"src"==h)&&(i=a.convertURL(i,h)),g.attr("data-mce-p-"+h,i));k=f.firstChild&&f.firstChild.value,k&&(g.attr("data-mce-html",escape(k)),g.firstChild=null),g.attr({width:f.attr("width")||"300",height:f.attr("height")||("audio"==c?"30":"150"),style:f.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),f.replace(g)}}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k=a.length;k--;)if(c=a[k],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&d.attr({width:c.attr("width"),height:c.attr("height")}),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var l=f[e].name;0===l.indexOf("data-mce-p-")&&d.attr(l.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");("audio"==b||"script"==b)&&a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object=video]","img[data-mce-object=iframe]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0})}); \ No newline at end of file +tinymce.PluginManager.add("media",function(a,b){function c(a){return a=a.toLowerCase(),-1!=a.indexOf(".mp3")?"audio/mpeg":-1!=a.indexOf(".wav")?"audio/wav":-1!=a.indexOf(".mp4")?"video/mp4":-1!=a.indexOf(".webm")?"video/webm":-1!=a.indexOf(".ogg")?"video/ogg":-1!=a.indexOf(".swf")?"application/x-shockwave-flash":""}function d(b){var c=a.settings.media_scripts;if(c)for(var d=0;d=0;e--)b[d]==c[e]&&c.splice(e,1);a.selection.select(c[0]),a.nodeChanged()}})}function f(){var b=a.selection.getNode();return b.getAttribute("data-mce-object")?a.selection.getContent():void 0}function g(e){var f="";if(!e.source1&&(tinymce.extend(e,h(e.embed)),!e.source1))return"";if(e.source2||(e.source2=""),e.poster||(e.poster=""),e.source1=a.convertURL(e.source1,"source"),e.source2=a.convertURL(e.source2,"source"),e.source1mime=c(e.source1),e.source2mime=c(e.source2),e.poster=a.convertURL(e.poster,"poster"),e.flashPlayerUrl=a.convertURL(b+"/moxieplayer.swf","movie"),tinymce.each(o,function(a){var b,c,d;if(b=a.regex.exec(e.source1)){for(d=a.url,c=0;b[c];c++)d=d.replace("$"+c,function(){return b[c]});e.source1=d,e.type=a.type,e.allowFullscreen=a.allowFullscreen,e.width=e.width||a.w,e.height=e.height||a.h}}),e.embed)f=k(e.embed,e,!0);else{var g=d(e.source1);if(g&&(e.type="script",e.width=g.width,e.height=g.height),e.width=e.width||300,e.height=e.height||150,tinymce.each(e,function(b,c){e[c]=a.dom.encode(b)}),"iframe"==e.type){var i=e.allowFullscreen?' allowFullscreen="1"':"";f+='"}else"application/x-shockwave-flash"==e.source1mime?(f+='',e.poster&&(f+=''),f+=""):-1!=e.source1mime.indexOf("audio")?a.settings.audio_template_callback?f=a.settings.audio_template_callback(e):f+='":"script"==e.type?f+='':f=a.settings.video_template_callback?a.settings.video_template_callback(e):'"}return f}function h(a){var b={};return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!0,special:"script,noscript",start:function(a,c){if(b.source1||"param"!=a||(b.source1=c.map.movie),"iframe"!=a&&"object"!=a&&"embed"!=a&&"video"!=a&&"audio"!=a||(b.type||(b.type=a),b=tinymce.extend(c.map,b)),"script"==a){var e=d(c.map.src);if(!e)return;b={type:"script",source1:c.map.src,width:e.width,height:e.height}}"source"==a&&(b.source1?b.source2||(b.source2=c.map.src):b.source1=c.map.src),"img"!=a||b.poster||(b.poster=c.map.src)}}).parse(a),b.source1=b.source1||b.src||b.data,b.source2=b.source2||"",b.poster=b.poster||"",b}function i(b){return b.getAttribute("data-mce-object")?h(a.serializer.serialize(b,{selection:!0})):{}}function j(b){if(a.settings.media_filter_html===!1)return b;var c,d=new tinymce.html.Writer;return new tinymce.html.SaxParser({validate:!1,allow_conditional_comments:!1,special:"script,noscript",comment:function(a){d.comment(a)},cdata:function(a){d.cdata(a)},text:function(a,b){d.text(a,b)},start:function(b,e,f){if(c=!0,"script"!=b&&"noscript"!=b){for(var g=0;g=g&&(d(h,{src:b["source"+g],type:b["source"+g+"mime"]}),!b["source"+g]))return;break;case"img":if(!b.poster)return;e=!0}f.start(a,h,i)},end:function(a){if("video"==a&&c)for(var h=1;2>=h;h++)if(b["source"+h]){var i=[];i.map={},h>g&&(d(i,{src:b["source"+h],type:b["source"+h+"mime"]}),f.start("source",i,!0))}if(b.poster&&"object"==a&&c&&!e){var j=[];j.map={},d(j,{src:b.poster,width:b.width,height:b.height}),f.start("img",j,!0)}f.end(a)}},new tinymce.html.Schema({})).parse(a),f.getContent()}function l(b,c){var d,e,f,g,h;for(f=b.attributes,g=f.length;g--;)d=f[g].name,e=f[g].value,"width"!==d&&"height"!==d&&"style"!==d&&("data"!=d&&"src"!=d||(e=a.convertURL(e,d)),c.attr("data-mce-p-"+d,e));h=b.firstChild&&b.firstChild.value,h&&(c.attr("data-mce-html",escape(h)),c.firstChild=null)}function m(a){var b,c=a.name;return b=new tinymce.html.Node("img",1),b.shortEnded=!0,l(a,b),b.attr({width:a.attr("width")||"300",height:a.attr("height")||("audio"==c?"30":"150"),style:a.attr("style"),src:tinymce.Env.transparentSrc,"data-mce-object":c,"class":"mce-object mce-object-"+c}),b}function n(a){var b,c,d,e=a.name;return b=new tinymce.html.Node("span",1),b.attr({contentEditable:"false",style:a.attr("style"),"data-mce-object":e,"class":"mce-preview-object mce-object-"+e}),l(a,b),c=new tinymce.html.Node(e,1),c.attr({src:a.attr("src"),allowfullscreen:a.attr("allowfullscreen"),width:a.attr("width")||"300",height:a.attr("height")||("audio"==e?"30":"150"),frameborder:"0"}),d=new tinymce.html.Node("span",1),d.attr("class","mce-shim"),b.append(c),b.append(d),b}var o=[{regex:/youtu\.be\/([\w\-.]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)/,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$2",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\-_]+(?:\?.+)?)/i,type:"iframe",w:560,h:314,url:"//www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowfullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"//player.vimeo.com/video/$2?title=0&byline=0",allowfullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'//maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"//www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],p=tinymce.Env.ie&&tinymce.Env.ie<=8?"onChange":"onInput";a.on("ResolveName",function(a){var b;1==a.target.nodeType&&(b=a.target.getAttribute("data-mce-object"))&&(a.name=b)}),a.on("preInit",function(){var b=a.schema.getSpecialElements();tinymce.each("video audio iframe object".split(" "),function(a){b[a]=new RegExp("]*>","gi")});var c=a.schema.getBoolAttrs();tinymce.each("webkitallowfullscreen mozallowfullscreen allowfullscreen".split(" "),function(a){c[a]={}}),a.parser.addNodeFilter("iframe,video,audio,object,embed,script",function(b){for(var c,e,f,g=b.length;g--;)c=b[g],c.parent&&(c.parent.attr("data-mce-object")||("script"!=c.name||(f=d(c.attr("src"))))&&(f&&(f.width&&c.attr("width",f.width.toString()),f.height&&c.attr("height",f.height.toString())),e="iframe"==c.name&&a.settings.media_live_embeds!==!1&&tinymce.Env.ceFalse?n(c):m(c),c.replace(e)))}),a.serializer.addAttributeFilter("data-mce-object",function(a,b){for(var c,d,e,f,g,h,i,k,l=a.length;l--;)if(c=a[l],c.parent){for(i=c.attr(b),d=new tinymce.html.Node(i,1),"audio"!=i&&"script"!=i&&(k=c.attr("class"),k&&-1!==k.indexOf("mce-preview-object")?d.attr({width:c.firstChild.attr("width"),height:c.firstChild.attr("height")}):d.attr({width:c.attr("width"),height:c.attr("height")})),d.attr({style:c.attr("style")}),f=c.attributes,e=f.length;e--;){var m=f[e].name;0===m.indexOf("data-mce-p-")&&d.attr(m.substr(11),f[e].value)}"script"==i&&d.attr("type","text/javascript"),g=c.attr("data-mce-html"),g&&(h=new tinymce.html.Node("#text",3),h.raw=!0,h.value=j(unescape(g)),d.append(h)),c.replace(d)}})}),a.on("click keyup",function(){var b=a.selection.getNode();b&&a.dom.hasClass(b,"mce-preview-object")&&a.dom.getAttrib(b,"data-mce-selected")&&b.setAttribute("data-mce-selected","2")}),a.on("ObjectSelected",function(a){var b=a.target.getAttribute("data-mce-object");"audio"!=b&&"script"!=b||a.preventDefault()}),a.on("objectResized",function(a){var b,c=a.target;c.getAttribute("data-mce-object")&&(b=c.getAttribute("data-mce-html"),b&&(b=unescape(b),c.setAttribute("data-mce-html",escape(k(b,{width:a.width,height:a.height})))))}),a.addButton("media",{tooltip:"Insert/edit video",onclick:e,stateSelector:["img[data-mce-object]","span[data-mce-object]"]}),a.addMenuItem("media",{icon:"media",text:"Insert/edit video",onclick:e,context:"insert",prependToContext:!0}),a.on("setContent",function(){a.$("span.mce-preview-object").each(function(b,c){var d=a.$(c);0===d.find("span.mce-shim",c).length&&d.append('')})}),a.addCommand("mceMedia",e),this.showDialog=e}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/noneditable/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/noneditable/plugin.min.js index 747bed9..49e9d5a 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/noneditable/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/noneditable/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("noneditable",function(a){function b(a){var b;if(1===a.nodeType){if(b=a.getAttribute(k),b&&"inherit"!==b)return b;if(b=a.contentEditable,"inherit"!==b)return b}return null}function c(a){for(var c;a;){if(c=b(a))return"false"===c?a:null;a=a.parentNode}}function d(){function d(a){for(;a;){if(a.id===n)return a;a=a.parentNode}}function e(a){var b;if(a)for(b=new i(a,a),a=b.current();a;a=b.next())if(3===a.nodeType)return a}function f(c,d){var e,f;return"false"===b(c)&&k.isBlock(c)?void m.select(c):(f=k.createRng(),"true"===b(c)&&(c.firstChild||c.appendChild(a.getDoc().createTextNode("\xa0")),c=c.firstChild,d=!0),e=k.create("span",{id:n,"data-mce-bogus":!0},o),d?c.parentNode.insertBefore(e,c):k.insertAfter(e,c),f.setStart(e.firstChild,1),f.collapse(!0),m.setRng(f),e)}function g(a){var b,c,d;if(a)b=m.getRng(!0),b.setStartBefore(a),b.setEndBefore(a),c=e(a),c&&c.nodeValue.charAt(0)==o&&(c=c.deleteData(0,1)),k.remove(a,!0),m.setRng(b);else for(;(a=k.get(n))&&a!==d;)c=e(a),c&&c.nodeValue.charAt(0)==o&&(c=c.deleteData(0,1)),k.remove(a,!0),d=a}function h(){function a(a,c){var d,e,f,g,h;if(d=j.startContainer,e=j.startOffset,3==d.nodeType){if(h=d.nodeValue.length,e>0&&h>e||(c?e==h:0===e))return}else{if(!(e0?e-1:e;d=d.childNodes[k],d.hasChildNodes()&&(d=d.firstChild)}for(f=new i(d,a);g=f[c?"prev":"next"]();){if(3===g.nodeType&&g.nodeValue.length>0)return;if("true"===b(g))return g}return a}var d,e,h,j,k;g(),h=m.isCollapsed(),d=c(m.getStart()),e=c(m.getEnd()),(d||e)&&(j=m.getRng(!0),h?(d=d||e,(k=a(d,!0))?f(k,!0):(k=a(d,!1))?f(k,!1):m.select(d)):(j=m.getRng(!0),d&&j.setStartBefore(d),e&&j.setEndAfter(e),m.setRng(j)))}function j(e){function f(a,b){for(;a=a[b?"previousSibling":"nextSibling"];)if(3!==a.nodeType||a.nodeValue.length>0)return a}function j(a,b){m.select(a),m.collapse(b)}function n(e){function f(a){for(var b=j;b;){if(b===a)return;b=b.parentNode}k.remove(a),h()}function g(){var d,g,h=a.schema.getNonEmptyElements();for(g=new tinymce.dom.TreeWalker(j,a.getBody());(d=e?g.prev():g.next())&&!h[d.nodeName.toLowerCase()]&&!(3===d.nodeType&&tinymce.trim(d.nodeValue).length>0);)if("false"===b(d))return f(d),!0;return c(d)?!0:!1}var i,j,l,n;if(m.isCollapsed()){if(i=m.getRng(!0),j=i.startContainer,l=i.startOffset,j=d(j)||j,n=c(j))return f(n),!1;if(3==j.nodeType&&(e?l>0:ls||s>124)&&s!=l.DELETE&&s!=l.BACKSPACE){if((tinymce.isMac?e.metaKey:e.ctrlKey)&&(67==s||88==s||86==s))return;if(e.preventDefault(),u)if(a.dom.isBlock(o)){var w=v?o.previousSibling:o.nextSibling;if(!w||w&&"false"===b(w)){var x=k.create("p",null," ");x.className="mceTmpParagraph";var y=v?o:w;y&&y.parentNode?y.parentNode.insertBefore(x,y):w||v||o.parentNode.appendChild(x),w=x}var z=new i(w,w),A=v?z.prev():z.next();j(A,!v)}else j(o,v)}else if(u||s==l.BACKSPACE||s==l.DELETE){if(p=d(q)){if(s==l.LEFT||s==l.BACKSPACE)if(o=f(p,!0),o&&"false"===b(o)){if(e.preventDefault(),s!=l.LEFT)return void k.remove(o);j(o,!0)}else g(p);if(s==l.RIGHT||s==l.DELETE)if(o=f(p,!0),o&&"false"===b(o)){if(e.preventDefault(),s!=l.RIGHT)return void k.remove(o);j(o,!1)}else g(p)}else{if(u&&t&&-1!==t.className.indexOf("mceTmpParagraph")&&t[v?"previousSibling":"nextSibling"]){var B=t[v?"previousSibling":"nextSibling"];" "===t.innerHTML||""===t.innerHTML||" "===t.innerHTML?k.remove(t):t.className=t.className.replace("mceTmpParagraph",""),j(B,!v)}var C=m.getRng(!0),D=C.endContainer;if(k.isBlock(D)&&k.isBlock(D.nextSibling)&&1==C.endOffset&&s==l.DELETE&&(o=c(D.nextSibling)),o&&(s==l.DELETE||s==l.BACKSPACE)&&k.isBlock(o))return e.preventDefault(),void k.remove(o)}if((s==l.BACKSPACE||s==l.DELETE)&&!n(s==l.BACKSPACE))return e.preventDefault(),!1}}var k=a.dom,m=a.selection,n="mce_noneditablecaret",o="\ufeff";a.on("mousedown",function(c){var d=a.selection.getNode();d&&-1!==d.className.indexOf("mceTmpParagraph")&&d!==c.target&&(" "===d.innerHTML||""===d.innerHTML||" "===d.innerHTML?k.remove(d):d.className=d.className.replace("mceTmpParagraph","")),"false"===b(d)&&d==c.target&&h()}),a.on("mouseup",h),a.on("keydown",j)}function e(b){var c=h.length,d=b.content,e=tinymce.trim(g);if("raw"!=b.format){for(;c--;)d=d.replace(h[c],function(b){var c=arguments,f=c[c.length-2];return f>0&&'"'==d.charAt(f-1)?b:''+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+""});b.content=d}}var f,g,h,i=tinymce.dom.TreeWalker,j="contenteditable",k="data-mce-"+j,l=tinymce.util.VK;f=" "+tinymce.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",g=" "+tinymce.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ",h=a.getParam("noneditable_regexp"),h&&!h.length&&(h=[h]),a.on("PreInit",function(){d(),h&&a.on("BeforeSetContent",e),a.parser.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)c=a[d],b=" "+c.attr("class")+" ",-1!==b.indexOf(f)?c.attr(k,"true"):-1!==b.indexOf(g)&&c.attr(k,"false")}),a.serializer.addAttributeFilter(k,function(a){for(var b,c=a.length;c--;)b=a[c],h&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):(b.attr(j,null),b.attr(k,null))}),a.parser.addAttributeFilter(j,function(a){for(var b,c=a.length;c--;)b=a[c],b.attr(k,b.attr(j)),b.attr(j,null)})}),a.on("drop",function(a){c(a.target)&&a.preventDefault()})}); \ No newline at end of file +tinymce.PluginManager.add("noneditable",function(a){function b(a){return function(b){return-1!==(" "+b.attr("class")+" ").indexOf(a)}}function c(b){function c(b){var c=arguments,d=c[c.length-2];return d>0&&'"'==g.charAt(d-1)?b:''+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+""}var d=f.length,g=b.content,h=tinymce.trim(e);if("raw"!=b.format){for(;d--;)g=g.replace(f[d],c);b.content=g}}var d,e,f,g="contenteditable";d=" "+tinymce.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",e=" "+tinymce.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var h=b(d),i=b(e);f=a.getParam("noneditable_regexp"),f&&!f.length&&(f=[f]),a.on("PreInit",function(){f&&a.on("BeforeSetContent",c),a.parser.addAttributeFilter("class",function(a){for(var b,c=a.length;c--;)b=a[c],h(b)?b.attr(g,"true"):i(b)&&b.attr(g,"false")}),a.serializer.addAttributeFilter(g,function(a){for(var b,c=a.length;c--;)b=a[c],(h(b)||i(b))&&(f&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):b.attr(g,null))})})}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/pagebreak/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/pagebreak/plugin.min.js index 65f26bd..2a69eba 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/pagebreak/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/pagebreak/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("pagebreak",function(a){var b="mce-pagebreak",c=a.getParam("pagebreak_separator",""),d=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),e='';a.addCommand("mcePageBreak",function(){a.insertContent(a.settings.pagebreak_split_block?"

              "+e+"

              ":e)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(c){"IMG"==c.target.nodeName&&a.dom.hasClass(c.target,b)&&(c.name="pagebreak")}),a.on("click",function(c){c=c.target,"IMG"===c.nodeName&&a.dom.hasClass(c,b)&&a.selection.select(c)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(d,e)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var d,e,f=b.length;f--;)if(d=b[f],e=d.attr("class"),e&&-1!==e.indexOf("mce-pagebreak")){var g=d.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=c,g.raw=!0,d.remove();continue}d.type=3,d.value=c,d.raw=!0}})})}); \ No newline at end of file +tinymce.PluginManager.add("pagebreak",function(a){var b="mce-pagebreak",c=a.getParam("pagebreak_separator",""),d=new RegExp(c.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),e='';a.addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("

              "+e+"

              "):a.insertContent(e)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(c){"IMG"==c.target.nodeName&&a.dom.hasClass(c.target,b)&&(c.name="pagebreak")}),a.on("click",function(c){c=c.target,"IMG"===c.nodeName&&a.dom.hasClass(c,b)&&a.selection.select(c)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(d,e)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var d,e,f=b.length;f--;)if(d=b[f],e=d.attr("class"),e&&-1!==e.indexOf("mce-pagebreak")){var g=d.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=c,g.raw=!0,d.remove();continue}d.type=3,d.value=c,d.raw=!0}})})}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/paste/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/paste/plugin.min.js index 607722f..207f84d 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/paste/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/paste/plugin.min.js @@ -1 +1 @@ -!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f/g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/|/g,[/( ?)\u00a0<\/span>( ?)/g,b],/
              $/i])}return{filter:d,innerText:e,trimHtml:f}}),d("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils"],function(a,b,c,d){return function(e){function f(a){var b,c=e.dom;if(b=e.fire("BeforePastePreProcess",{content:a}),b=e.fire("PastePreProcess",b),a=b.content,!b.isDefaultPrevented()){if(e.hasEventListeners("PastePostProcess")&&!b.isDefaultPrevented()){var d=c.add(e.getBody(),"div",{style:"display:none"},a);b=e.fire("PastePostProcess",{node:d}),c.remove(d),a=b.node.innerHTML}b.isDefaultPrevented()||e.insertContent(a,{merge:e.settings.paste_merge_formats!==!1,data:{paste:!0}})}}function g(a){a=e.dom.encode(a).replace(/\r\n/g,"\n");var b,c=e.dom.getParent(e.selection.getStart(),e.dom.isBlock),g=e.settings.forced_root_block;g&&(b=e.dom.createHTML(g,e.settings.forced_root_block_attrs),b=b.substr(0,b.length-3)+">"),c&&/^(PRE|DIV)$/.test(c.nodeName)||!g?a=d.filter(a,[[/\n/g,"
              "]]):(a=d.filter(a,[[/\n\n/g,"

              "+b],[/^(.*<\/p>)(

              )$/,b+"$1"],[/\n/g,"
              "]]),-1!=a.indexOf("

              ")&&(a=b+a)),f(a)}function h(){function b(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[t.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=e.dom,f=e.getBody(),g=e.dom.getViewPort(e.getWin()),h=g.y,i=20;if(t=e.selection.getRng(),e.inline&&(c=e.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),t.getClientRects){var j=b(t);if(j)i=h+(j.top-d.getPos(f).y);else{i=h;var k=t.startContainer;k&&(3==k.nodeType&&k.parentNode!=f&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||f).y))}}s=d.add(e.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},y),(a.ie||a.gecko)&&d.setStyle(s,"left","rtl"==d.getStyle(f,"direction",!0)?65535:-65535),d.bind(s,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),s.focus(),e.selection.select(s,!0)}function i(){if(s){for(var a;a=e.dom.get("mcepastebin");)e.dom.remove(a),e.dom.unbind(a);t&&e.selection.setRng(t)}s=t=null}function j(){var a,b,c,d,f="";for(a=e.dom.select("div[id=mcepastebin]"),b=0;b0&&-1==c.indexOf(z)&&(b["text/plain"]=c)}if(a.types)for(var d=0;d')}var g,h,i,j=!1;if(c)for(g=0;g0}function q(a){return c.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function r(){e.on("keydown",function(b){function c(a){q(a)&&!a.isDefaultPrevented()&&i()}if(q(b)&&!b.isDefaultPrevented()){if(u=b.shiftKey&&86==b.keyCode,u&&a.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(b.stopImmediatePropagation(),w=(new Date).getTime(),a.ie&&u)return b.preventDefault(),void e.fire("paste",{ieFake:!0});i(),h(),e.once("keyup",c),e.once("paste",function(){e.off("keyup",c)})}}),e.on("paste",function(b){var c=(new Date).getTime(),k=l(b),o=(new Date).getTime()-c,q=(new Date).getTime()-w-o<1e3,r="text"==v.pasteFormat||u;return u=!1,b.isDefaultPrevented()||n(b)?void i():m(b)?void i():(q||b.preventDefault(),!a.ie||q&&!b.ieFake||(h(),e.dom.bind(s,"paste",function(a){a.stopPropagation()}),e.getDoc().execCommand("Paste",!1,null),k["text/html"]=j()),void setTimeout(function(){var a;return p(k,"text/html")?a=k["text/html"]:(a=j(),a==y&&(r=!0)),a=d.trimHtml(a),s&&s.firstChild&&"mcepastebin"===s.firstChild.id&&(r=!0),i(),a.length||(r=!0),r&&(a=p(k,"text/plain")&&-1==a.indexOf("

              ")?k["text/plain"]:d.innerText(a)),a==y?void(q||e.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(r?g(a):f(a))},0))}),e.on("dragstart dragend",function(a){x="dragstart"==a.type}),e.on("drop",function(a){var b=o(a);if(!a.isDefaultPrevented()&&!x&&!m(a,b)&&b&&e.settings.paste_filter_drop!==!1){var c=k(a.dataTransfer),h=c["mce-internal"]||c["text/html"]||c["text/plain"];h&&(a.preventDefault(),e.undoManager.transact(function(){c["mce-internal"]&&e.execCommand("Delete"),e.selection.setRng(b),h=d.trimHtml(h),c["text/html"]?f(h):g(h)}))}}),e.on("dragover dragend",function(a){e.settings.paste_data_images&&a.preventDefault()})}var s,t,u,v=this,w=0,x=!1,y="%MCEPASTEBIN%",z="data:text/mce-internal,";v.pasteHtml=f,v.pasteText=g,e.on("preInit",function(){r(),e.parser.addNodeFilter("img",function(b,c,d){function f(a){return a.data&&a.data.paste===!0}function g(b){b.attr("data-mce-object")||k===a.transparentSrc||b.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!e.settings.paste_data_images&&f(d))for(var j=b.length;j--;){var k=b[j].attributes.map.src;k&&(h(k)?g(b[j]):!e.settings.allow_html_data_urls&&i(k)&&g(b[j]))}})})}}),d("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(a,b,c,d,e,f){function g(a){return/h?g&&(g=g.parent.parent):(j=g,g=null)),g&&g.name==b?g.append(a):(j=j||g,g=new e(b,1),f>1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/
              /gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&-1!=c.indexOf("#_msocom_"))b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({},s).serialize(u)}})}return j.isWordContent=g,j}),d("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(a,b,c,d){return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:
               [\\s\\r\\n]+|
              )*(<\\/?("+f.join("|")+")[^>]*>)(?:
               [\\s\\r\\n]+|
              )*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/

              /g,"

              "],[/
              /g," "],[/

              /g,"
              "]])}function h(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(e,"span"),i={};if("none"===b)return c+g;for(var j=0;j]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}a.webkit&&f(h),a.ie&&f(g)}}),d("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(a,b,c,d){var e;a.add("paste",function(a){function f(){"text"==g.pasteFormat?(this.active(!1),g.pasteFormat="html"):(g.pasteFormat="text",this.active(!0),e||(a.windowManager.alert("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off."),e=!0))}var g,h=this,i=a.settings;h.clipboard=g=new b(a),h.quirks=new d(a),h.wordFilter=new c(a),a.settings.paste_as_text&&(h.clipboard.pasteFormat="text"),i.paste_preprocess&&a.on("PastePreProcess",function(a){i.paste_preprocess.call(h,h,a)}),i.paste_postprocess&&a.on("PastePostProcess",function(a){i.paste_postprocess.call(h,h,a)}),a.addCommand("mceInsertClipboardContent",function(a,b){b.content&&h.clipboard.pasteHtml(b.content),b.text&&h.clipboard.pasteText(b.text)}),a.paste_block_drop&&a.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),a.settings.paste_data_images||a.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),a.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:f,active:"text"==h.clipboard.pasteFormat}),a.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:g.pasteFormat,onclick:f})})}),f(["tinymce/pasteplugin/Utils"])}(this); \ No newline at end of file +!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f/g]),f(h.parse(e)),i}function f(a){function b(a,b,c){return b||c?"\xa0":" "}return a=d(a,[/^[\s\S]*]*>\s*|\s*<\/body[^>]*>[\s\S]*$/g,/|/g,[/( ?)\u00a0<\/span>( ?)/g,b],/
              /g,/
              $/i])}function g(a){var b=0;return function(){return a+b++}}return{filter:d,innerText:e,trimHtml:f,createIdGenerator:g}}),d("tinymce/pasteplugin/SmartPaste",["tinymce/util/Tools"],function(a){var b=function(a){return/^https?:\/\/[\w\?\-\/+=.&%]+$/i.test(a)},c=function(a){return b(a)&&/.(gif|jpe?g|png)$/.test(a)},d=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.insertContent('')}),!0},e=function(a,b,c){return a.undoManager.extra(function(){c(a,b)},function(){a.execCommand("mceInsertLink",!1,b)}),!0},f=function(a,c,d){return a.selection.isCollapsed()===!1&&b(c)?e(a,c,d):!1},g=function(a,b,e){return c(b)?d(a,b,e):!1},h=function(a,b){return a.insertContent(b,{merge:a.settings.paste_merge_formats!==!1,paste:!0}),!0},i=function(b,c){a.each([f,g,h],function(a){return a(b,c,h)!==!0})},j=function(a,b){a.settings.smart_paste===!1?h(a,b):i(a,b)};return{isImageUrl:c,isAbsoluteUrl:b,insertContent:j}}),d("tinymce/pasteplugin/Clipboard",["tinymce/Env","tinymce/dom/RangeUtils","tinymce/util/VK","tinymce/pasteplugin/Utils","tinymce/pasteplugin/SmartPaste","tinymce/util/Delay"],function(a,b,c,d,e,f){return function(g){function h(a){var b,c=g.dom;if(b=g.fire("BeforePastePreProcess",{content:a}),b=g.fire("PastePreProcess",b),a=b.content,!b.isDefaultPrevented()){if(g.hasEventListeners("PastePostProcess")&&!b.isDefaultPrevented()){var d=c.add(g.getBody(),"div",{style:"display:none"},a);b=g.fire("PastePostProcess",{node:d}),c.remove(d),a=b.node.innerHTML}b.isDefaultPrevented()||e.insertContent(g,a)}}function i(a){a=g.dom.encode(a).replace(/\r\n/g,"\n");var b,c=g.dom.getParent(g.selection.getStart(),g.dom.isBlock),e=g.settings.forced_root_block;e&&(b=g.dom.createHTML(e,g.settings.forced_root_block_attrs),b=b.substr(0,b.length-3)+">"),c&&/^(PRE|DIV)$/.test(c.nodeName)||!e?a=d.filter(a,[[/\n/g,"
              "]]):(a=d.filter(a,[[/\n\n/g,"

              "+b],[/^(.*<\/p>)(

              )$/,b+"$1"],[/\n/g,"
              "]]),-1!=a.indexOf("

              ")&&(a=b+a)),h(a)}function j(){function b(a){var b,c,e,f=a.startContainer;if(b=a.getClientRects(),b.length)return b[0];if(a.collapsed&&1==f.nodeType){for(e=f.childNodes[z.startOffset];e&&3==e.nodeType&&!e.data.length;)e=e.nextSibling;if(e)return"BR"==e.tagName&&(c=d.doc.createTextNode("\ufeff"),e.parentNode.insertBefore(c,e),a=d.createRng(),a.setStartBefore(c),a.setEndAfter(c),b=a.getClientRects(),d.remove(c)),b.length?b[0]:void 0}}var c,d=g.dom,e=g.getBody(),f=g.dom.getViewPort(g.getWin()),h=f.y,i=20;if(z=g.selection.getRng(),g.inline&&(c=g.selection.getScrollContainer(),c&&c.scrollTop>0&&(h=c.scrollTop)),z.getClientRects){var j=b(z);if(j)i=h+(j.top-d.getPos(e).y);else{i=h;var k=z.startContainer;k&&(3==k.nodeType&&k.parentNode!=e&&(k=k.parentNode),1==k.nodeType&&(i=d.getPos(k,c||e).y))}}y=d.add(g.getBody(),"div",{id:"mcepastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: absolute; top: "+i+"px;width: 10px; height: 10px; overflow: hidden; opacity: 0"},E),(a.ie||a.gecko)&&d.setStyle(y,"left","rtl"==d.getStyle(e,"direction",!0)?65535:-65535),d.bind(y,"beforedeactivate focusin focusout",function(a){a.stopPropagation()}),y.focus(),g.selection.select(y,!0)}function k(){if(y){for(var a;a=g.dom.get("mcepastebin");)g.dom.remove(a),g.dom.unbind(a);z&&g.selection.setRng(z)}y=z=null}function l(){var a,b,c,d,e="";for(a=g.dom.select("div[id=mcepastebin]"),b=0;b0&&-1==c.indexOf(F)&&(b["text/plain"]=c)}if(a.types)for(var d=0;d')}else h('')}function s(a,b){function c(c){var d,e,f,g=!1;if(c)for(d=0;d0}function w(a){return c.metaKeyPressed(a)&&86==a.keyCode||a.shiftKey&&45==a.keyCode}function x(){function b(a,b,c){var e;return v(a,"text/html")?e=a["text/html"]:(e=l(),e==E&&(c=!0)),e=d.trimHtml(e),y&&y.firstChild&&"mcepastebin"===y.firstChild.id&&(c=!0),k(),e.length||(c=!0),c&&(e=v(a,"text/plain")&&-1==e.indexOf("

              ")?a["text/plain"]:d.innerText(e)),e==E?void(b||g.windowManager.alert("Please use Ctrl+V/Cmd+V keyboard shortcuts to paste contents.")):void(c?i(e):h(e))}function c(a){return 0===a["text/plain"].indexOf("file://")}g.on("keydown",function(b){function c(a){w(a)&&!a.isDefaultPrevented()&&k()}if(w(b)&&!b.isDefaultPrevented()){if(A=b.shiftKey&&86==b.keyCode,A&&a.webkit&&-1!=navigator.userAgent.indexOf("Version/"))return;if(b.stopImmediatePropagation(),C=(new Date).getTime(),a.ie&&A)return b.preventDefault(),void g.fire("paste",{ieFake:!0});k(),j(),g.once("keyup",c),g.once("paste",function(){g.off("keyup",c)})}});var e=function(){return z||g.selection.getRng()};g.on("paste",function(c){var d=(new Date).getTime(),h=n(c),i=(new Date).getTime()-d,m=(new Date).getTime()-C-i<1e3,p="text"==B.pasteFormat||A;return A=!1,c.isDefaultPrevented()||t(c)?void k():!o(h)&&s(c,e())?void k():(m||c.preventDefault(),!a.ie||m&&!c.ieFake||(j(),g.dom.bind(y,"paste",function(a){a.stopPropagation()}),g.getDoc().execCommand("Paste",!1,null),h["text/html"]=l()),void(v(h,"text/html")?(c.preventDefault(),b(h,m,p)):f.setEditorTimeout(g,function(){b(h,m,p)},0)))}),g.on("dragstart dragend",function(a){D="dragstart"==a.type}),g.on("drop",function(a){var b,e;if(e=u(a),!a.isDefaultPrevented()&&!D&&(b=m(a.dataTransfer),(o(b)&&!c(b)||!s(a,e))&&e&&g.settings.paste_filter_drop!==!1)){var j=b["mce-internal"]||b["text/html"]||b["text/plain"];j&&(a.preventDefault(),f.setEditorTimeout(g,function(){g.undoManager.transact(function(){b["mce-internal"]&&g.execCommand("Delete"),g.selection.setRng(e),j=d.trimHtml(j),b["text/html"]?h(j):i(j)})}))}}),g.on("dragover dragend",function(a){g.settings.paste_data_images&&a.preventDefault()})}var y,z,A,B=this,C=0,D=!1,E="%MCEPASTEBIN%",F="data:text/mce-internal,",G=d.createIdGenerator("mceclip");B.pasteHtml=h,B.pasteText=i,B.pasteImageData=s,g.on("preInit",function(){x(),g.parser.addNodeFilter("img",function(b,c,d){function e(a){return a.data&&a.data.paste===!0}function f(b){b.attr("data-mce-object")||k===a.transparentSrc||b.remove()}function h(a){return 0===a.indexOf("webkit-fake-url")}function i(a){return 0===a.indexOf("data:")}if(!g.settings.paste_data_images&&e(d))for(var j=b.length;j--;){var k=b[j].attributes.map.src;k&&(h(k)?f(b[j]):!g.settings.allow_html_data_urls&&i(k)&&f(b[j]))}})})}}),d("tinymce/pasteplugin/WordFilter",["tinymce/util/Tools","tinymce/html/DomParser","tinymce/html/Schema","tinymce/html/Serializer","tinymce/html/Node","tinymce/pasteplugin/Utils"],function(a,b,c,d,e,f){function g(a){return/h?g&&(g=g.parent.parent):(j=g,g=null)),g&&g.name==b?g.append(a):(j=j||g,g=new e(b,1),f>1&&g.attr("start",""+f),a.wrap(g)),a.name="li",h>k&&j&&j.lastChild.append(g),k=h,d(a),c(a,/^\u00a0+/),c(a,/^\s*([\u2022\u00b7\u00a7\u25CF]|\w+\.)/),c(a,/^\u00a0+/)}for(var g,j,k=1,l=[],m=a.firstChild;"undefined"!=typeof m&&null!==m;)if(l.push(m),m=m.walk(),null!==m)for(;"undefined"!=typeof m&&m.parent!==a;)m=m.walk();for(var n=0;n]+id="?docs-internal-[^>]*>/gi,""),q=q.replace(/
              /gi,""),o=k.paste_retain_style_properties,o&&(p=a.makeMap(o.split(/[, ]/))),k.paste_enable_default_filters!==!1&&g(l.content)){l.wordContent=!0,q=f.filter(q,[//gi,/<(!|script[^>]*>.*?<\/script(?=[>\s])|\/?(\?xml(:\w+)?|img|meta|link|style|\w:\w+)(?=[\s\/>]))[^>]*>/gi,[/<(\/?)s>/gi,"<$1strike>"],[/ /gi,"\xa0"],[/([\s\u00a0]*)<\/span>/gi,function(a,b){return b.length>0?b.replace(/./," ").slice(Math.floor(b.length/2)).split("").join("\xa0"):""}]]);var r=k.paste_word_valid_elements;r||(r="-strong/b,-em/i,-u,-span,-p,-ol,-ul,-li,-h1,-h2,-h3,-h4,-h5,-h6,-p/div,-a[href|name],sub,sup,strike,br,del,table[width],tr,td[colspan|rowspan|width],th[colspan|rowspan|width],thead,tfoot,tbody");var s=new c({valid_elements:r,valid_children:"-li[p]"});a.each(s.elements,function(a){a.attributes["class"]||(a.attributes["class"]={},a.attributesOrder.push("class")),a.attributes.style||(a.attributes.style={},a.attributesOrder.push("style"))});var t=new b({},s);t.addAttributeFilter("style",function(a){for(var b,c=a.length;c--;)b=a[c],b.attr("style",n(b,b.attr("style"))),"span"==b.name&&b.parent&&!b.attributes.length&&b.unwrap()}),t.addAttributeFilter("class",function(a){for(var b,c,d=a.length;d--;)b=a[d],c=b.attr("class"),/^(MsoCommentReference|MsoCommentText|msoDel)$/i.test(c)&&b.remove(),b.attr("class",null)}),t.addNodeFilter("del",function(a){for(var b=a.length;b--;)a[b].remove()}),t.addNodeFilter("a",function(a){for(var b,c,d,e=a.length;e--;)if(b=a[e],c=b.attr("href"),d=b.attr("name"),c&&-1!=c.indexOf("#_msocom_"))b.remove();else if(c&&0===c.indexOf("file://")&&(c=c.split("#")[1],c&&(c="#"+c)),c||d){if(d&&!/^_?(?:toc|edn|ftn)/i.test(d)){b.unwrap();continue}b.attr({href:c,name:d})}else b.unwrap()});var u=t.parse(q);k.paste_convert_word_fake_lists!==!1&&m(u),l.content=new d({validate:k.validate},s).serialize(u)}})}return j.isWordContent=g,j}),d("tinymce/pasteplugin/Quirks",["tinymce/Env","tinymce/util/Tools","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Utils"],function(a,b,c,d){return function(e){function f(a){e.on("BeforePastePreProcess",function(b){b.content=a(b.content)})}function g(a){if(!c.isWordContent(a))return a;var f=[];b.each(e.schema.getBlockElements(),function(a,b){f.push(b)});var g=new RegExp("(?:
               [\\s\\r\\n]+|
              )*(<\\/?("+f.join("|")+")[^>]*>)(?:
               [\\s\\r\\n]+|
              )*","g");return a=d.filter(a,[[g,"$1"]]),a=d.filter(a,[[/

              /g,"

              "],[/
              /g," "],[/

              /g,"
              "]])}function h(a){if(c.isWordContent(a))return a;var b=e.settings.paste_webkit_styles;if(e.settings.paste_remove_styles_if_webkit===!1||"all"==b)return a;if(b&&(b=b.split(/[, ]/)),b){var d=e.dom,f=e.selection.getNode();a=a.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,function(a,c,e,g){var h=d.parseStyle(e,"span"),i={};if("none"===b)return c+g;for(var j=0;j]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return a=a.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,function(a,b,c,d){return b+' style="'+c+'"'+d})}a.webkit&&f(h),a.ie&&f(g)}}),d("tinymce/pasteplugin/Plugin",["tinymce/PluginManager","tinymce/pasteplugin/Clipboard","tinymce/pasteplugin/WordFilter","tinymce/pasteplugin/Quirks"],function(a,b,c,d){var e;a.add("paste",function(a){function f(){return e||a.settings.paste_plaintext_inform===!1}function g(){if("text"==h.pasteFormat)this.active(!1),h.pasteFormat="html",a.fire("PastePlainTextToggle",{state:!1});else if(h.pasteFormat="text",this.active(!0),!f()){var b=a.translate("Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.");a.notificationManager.open({text:b,type:"info"}),e=!0,a.fire("PastePlainTextToggle",{state:!0})}a.focus()}var h,i=this,j=a.settings;i.clipboard=h=new b(a),i.quirks=new d(a),i.wordFilter=new c(a),a.settings.paste_as_text&&(i.clipboard.pasteFormat="text"),j.paste_preprocess&&a.on("PastePreProcess",function(a){j.paste_preprocess.call(i,i,a)}),j.paste_postprocess&&a.on("PastePostProcess",function(a){j.paste_postprocess.call(i,i,a)}),a.addCommand("mceInsertClipboardContent",function(a,b){b.content&&i.clipboard.pasteHtml(b.content),b.text&&i.clipboard.pasteText(b.text)}),a.settings.paste_block_drop&&a.on("dragend dragover draggesture dragdrop drop drag",function(a){a.preventDefault(),a.stopPropagation()}),a.settings.paste_data_images||a.on("drop",function(a){var b=a.dataTransfer;b&&b.files&&b.files.length>0&&a.preventDefault()}),a.addButton("pastetext",{icon:"pastetext",tooltip:"Paste as text",onclick:g,active:"text"==i.clipboard.pasteFormat}),a.addMenuItem("pastetext",{text:"Paste as text",selectable:!0,active:h.pasteFormat,onclick:g})})}),f(["tinymce/pasteplugin/Utils"])}(this); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/preview/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/preview/plugin.min.js index 10e57e2..02ec266 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/preview/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/preview/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("preview",function(a){var b=a.settings,c=!tinymce.Env.ie;a.addCommand("mcePreview",function(){a.windowManager.open({title:"Preview",width:parseInt(a.getParam("plugin_preview_width","650"),10),height:parseInt(a.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var d,e="";e+='',tinymce.each(a.contentCSS,function(b){e+=''});var f=b.body_id||"tinymce";-1!=f.indexOf("=")&&(f=a.getParam("body_id","","hash"),f=f[a.id]||f);var g=b.body_class||"";-1!=g.indexOf("=")&&(g=a.getParam("body_class","","hash"),g=g[a.id]||"");var h=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(d=""+e+'"+a.getContent()+"",c)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(d);else{var i=this.getEl("body").firstChild.contentWindow.document;i.open(),i.write(d),i.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); \ No newline at end of file +tinymce.PluginManager.add("preview",function(a){var b=a.settings,c=!tinymce.Env.ie;a.addCommand("mcePreview",function(){a.windowManager.open({title:"Preview",width:parseInt(a.getParam("plugin_preview_width","650"),10),height:parseInt(a.getParam("plugin_preview_height","500"),10),html:'",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var d,e="";e+='',tinymce.each(a.contentCSS,function(b){e+=''});var f=b.body_id||"tinymce";-1!=f.indexOf("=")&&(f=a.getParam("body_id","","hash"),f=f[a.id]||f);var g=b.body_class||"";-1!=g.indexOf("=")&&(g=a.getParam("body_class","","hash"),g=g[a.id]||"");var h=' ',i=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(d=""+e+'"+a.getContent()+h+"",c)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(d);else{var j=this.getEl("body").firstChild.contentWindow.document;j.open(),j.write(d),j.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/save/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/save/plugin.min.js index 298404b..bbe0ec4 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/save/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/save/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("save",function(a){function b(){var b;return b=tinymce.DOM.getParent(a.id,"form"),!a.getParam("save_enablewhendirty",!0)||a.isDirty()?(tinymce.triggerSave(),a.getParam("save_onsavecallback")?void(a.execCallback("save_onsavecallback",a)&&(a.startContent=tinymce.trim(a.getContent({format:"raw"})),a.nodeChanged())):void(b?(a.isNotDirty=!0,(!b.onsubmit||b.onsubmit())&&("function"==typeof b.submit?b.submit():a.windowManager.alert("Error: Form submit field collision.")),a.nodeChanged()):a.windowManager.alert("Error: No form element found."))):void 0}function c(){var b=tinymce.trim(a.startContent);return a.getParam("save_oncancelcallback")?void a.execCallback("save_oncancelcallback",a):(a.setContent(b),a.undoManager.clear(),void a.nodeChanged())}function d(){var b=this;a.on("nodeChange",function(){b.disabled(a.getParam("save_enablewhendirty",!0)&&!a.isDirty())})}a.addCommand("mceSave",b),a.addCommand("mceCancel",c),a.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:d}),a.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:d}),a.addShortcut("Meta+S","","mceSave")}); \ No newline at end of file +tinymce.PluginManager.add("save",function(a){function b(){var b;return b=tinymce.DOM.getParent(a.id,"form"),!a.getParam("save_enablewhendirty",!0)||a.isDirty()?(tinymce.triggerSave(),a.getParam("save_onsavecallback")?(a.execCallback("save_onsavecallback",a),void a.nodeChanged()):void(b?(a.setDirty(!1),b.onsubmit&&!b.onsubmit()||("function"==typeof b.submit?b.submit():c(a.translate("Error: Form submit field collision."))),a.nodeChanged()):c(a.translate("Error: No form element found.")))):void 0}function c(b){a.notificationManager.open({text:b,type:"error"})}function d(){var b=tinymce.trim(a.startContent);return a.getParam("save_oncancelcallback")?void a.execCallback("save_oncancelcallback",a):(a.setContent(b),a.undoManager.clear(),void a.nodeChanged())}function e(){var b=this;a.on("nodeChange dirty",function(){b.disabled(a.getParam("save_enablewhendirty",!0)&&!a.isDirty())})}a.addCommand("mceSave",b),a.addCommand("mceCancel",d),a.addButton("save",{icon:"save",text:"Save",cmd:"mceSave",disabled:!0,onPostRender:e}),a.addButton("cancel",{text:"Cancel",icon:!1,cmd:"mceCancel",disabled:!0,onPostRender:e}),a.addShortcut("Meta+S","","mceSave")}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/searchreplace/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/searchreplace/plugin.min.js index 02e52c7..3c40122 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/searchreplace/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/searchreplace/plugin.min.js @@ -1 +1 @@ -!function(){function a(a,b,c,d,e){function f(a,b){if(b=b||0,!a[0])throw"findAndReplaceDOMText cannot handle zero-length matches";var c=a.index;if(b>0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function g(a){var b;if(3===a.nodeType)return a.data;if(n[a.nodeName]&&!m[a.nodeName])return"";if(b="",(m[a.nodeName]||o[a.nodeName])&&(b+="\n"),a=a.firstChild)do b+=g(a);while(a=a.nextSibling);return b}function h(a,b,c){var d,e,f,g,h=[],i=0,j=a,k=b.shift(),l=0;a:for(;;){if((m[j.nodeName]||o[j.nodeName])&&i++,3===j.nodeType&&(!e&&j.length+i>=k[1]?(e=j,g=k[1]-i):d&&h.push(j),!d&&j.length+i>k[0]&&(d=j,f=k[0]-i),i+=j.length),d&&e){if(j=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:h,match:k[2],matchIndex:l}),i-=e.length-g,d=null,e=null,h=[],k=b.shift(),l++,!k)break}else{if((!n[j.nodeName]||m[j.nodeName])&&j.firstChild){j=j.firstChild;continue}if(j.nextSibling){j=j.nextSibling;continue}}for(;;){if(j.nextSibling){j=j.nextSibling;break}if(j.parentNode===a)break a;j=j.parentNode}}}function i(a){var b;if("function"!=typeof a){var c=a.nodeType?a:l.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(l.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=l.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndexn;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var j,k,l,m,n,o,p=[],q=0;if(l=b.ownerDocument,m=e.getBlockElements(),n=e.getWhiteSpaceElements(),o=e.getShortEndedElements(),k=g(b)){if(a.global)for(;j=a.exec(k);)p.push(f(j,d));else j=k.match(a),p.push(f(j,d));return p.length&&(q=p.length,h(b,p,i(c))),q}}function b(b){function c(){function a(){e.statusbar.find("#next").disabled(!g(k+1).length),e.statusbar.find("#prev").disabled(!g(k-1).length)}function c(){tinymce.ui.MessageBox.alert("Could not find the specified string.",function(){e.find("#find")[0].focus()})}var d={},e=tinymce.ui.Factory.create({type:"window",layout:"flex",pack:"center",align:"center",onClose:function(){b.focus(),j.done()},onSubmit:function(b){var f,h,i,l;return b.preventDefault(),h=e.find("#case").checked(),l=e.find("#words").checked(),i=e.find("#find").value(),i.length?d.text==i&&d.caseState==h&&d.wholeWord==l?0===g(k+1).length?void c():(j.next(),void a()):(f=j.find(i,h,l),f||c(),e.statusbar.items().slice(1).disabled(0===f),a(),void(d={text:i,caseState:h,wholeWord:l})):(j.done(!1),void e.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){e.submit()}},{text:"Replace",disabled:!0,onclick:function(){j.replace(e.find("#replace").value())||(e.statusbar.items().slice(1).disabled(!0),k=-1,d={})}},{text:"Replace all",disabled:!0,onclick:function(){j.replace(e.find("#replace").value(),!0,!0),e.statusbar.items().slice(1).disabled(!0),d={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){j.prev(),a()}},{text:"Next",name:"next",disabled:!0,onclick:function(){j.next(),a()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:b.selection.getNode().src},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}}).renderTo().reflow()}function d(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function e(c){var d,e;return e=b.dom.create("span",{"data-mce-bogus":1}),e.className="mce-match-marker",d=b.getBody(),j.done(!1),a(c,d,e,!1,b.schema)}function f(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function g(a){var c,e=[];if(c=tinymce.toArray(b.getBody().getElementsByTagName("span")),c.length)for(var f=0;fk&&l[h].setAttribute("data-mce-index",o-1)}return b.undoManager.add(),k=q,c?(p=g(q+1).length>0,j.next()):(p=g(q-1).length>0,j.prev()),!e&&p},j.done=function(a){var c,e,g,h;for(e=tinymce.toArray(b.getBody().getElementsByTagName("span")),c=0;c0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function h(b){var c;if(3===b.nodeType)return b.data;if(o[b.nodeName]&&!n[b.nodeName])return"";if(c="",a(b))return"\n";if((n[b.nodeName]||p[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=h(b);while(b=b.nextSibling);return c}function i(b,c,d){var e,f,g,h,i=[],j=0,k=b,l=c.shift(),m=0;a:for(;;){if((n[k.nodeName]||p[k.nodeName]||a(k))&&j++,3===k.nodeType&&(!f&&k.length+j>=l[1]?(f=k,h=l[1]-j):e&&i.push(k),!e&&k.length+j>l[0]&&(e=k,g=l[0]-j),j+=k.length),e&&f){if(k=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:i,match:l[2],matchIndex:m}),j-=f.length-h,e=null,f=null,i=[],l=c.shift(),m++,!l)break}else if(o[k.nodeName]&&!n[k.nodeName]||!k.firstChild){if(k.nextSibling){k=k.nextSibling;continue}}else if(!a(k)){k=k.firstChild;continue}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===b)break a;k=k.parentNode}}}function j(a){var b;if("function"!=typeof a){var c=a.nodeType?a:m.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(m.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=m.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndexn;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),l.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(k,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}var k,l,m,n,o,p,q=[],r=0;if(m=c.ownerDocument,n=f.getBlockElements(),o=f.getWhiteSpaceElements(),p=f.getShortEndedElements(),l=h(c)){if(b.global)for(;k=b.exec(l);)q.push(g(k,e));else k=l.match(b),q.push(g(k,e));return q.length&&(r=q.length,i(c,q,j(d))),r}}function c(a){function c(){function b(){f.statusbar.find("#next").disabled(!g(l+1).length),f.statusbar.find("#prev").disabled(!g(l-1).length)}function c(){a.windowManager.alert("Could not find the specified string.",function(){f.find("#find")[0].focus()})}var d,e={};d=tinymce.trim(a.selection.getContent({format:"text"}));var f=a.windowManager.open({layout:"flex",pack:"center",align:"center",onClose:function(){a.focus(),k.done()},onSubmit:function(a){var d,h,i,j;return a.preventDefault(),h=f.find("#case").checked(),j=f.find("#words").checked(),i=f.find("#find").value(),i.length?e.text==i&&e.caseState==h&&e.wholeWord==j?0===g(l+1).length?void c():(k.next(),void b()):(d=k.find(i,h,j),d||c(),f.statusbar.items().slice(1).disabled(0===d),b(),void(e={text:i,caseState:h,wholeWord:j})):(k.done(!1),void f.statusbar.items().slice(1).disabled(!0))},buttons:[{text:"Find",subtype:"primary",onclick:function(){f.submit()}},{text:"Replace",disabled:!0,onclick:function(){k.replace(f.find("#replace").value())||(f.statusbar.items().slice(1).disabled(!0),l=-1,e={})}},{text:"Replace all",disabled:!0,onclick:function(){k.replace(f.find("#replace").value(),!0,!0),f.statusbar.items().slice(1).disabled(!0),e={}}},{type:"spacer",flex:1},{text:"Prev",name:"prev",disabled:!0,onclick:function(){k.prev(),b()}},{text:"Next",name:"next",disabled:!0,onclick:function(){k.next(),b()}}],title:"Find and replace",items:{type:"form",padding:20,labelGap:30,spacing:10,items:[{type:"textbox",name:"find",size:40,label:"Find",value:d},{type:"textbox",name:"replace",size:40,label:"Replace with"},{type:"checkbox",name:"case",text:"Match case",label:" "},{type:"checkbox",name:"words",text:"Whole words",label:" "}]}})}function d(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function e(c){var d,e;return e=a.dom.create("span",{"data-mce-bogus":1}),e.className="mce-match-marker",d=a.getBody(),k.done(!1),b(c,d,e,!1,a.schema)}function f(a){var b=a.parentNode;a.firstChild&&b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function g(b){var c,e=[];if(c=tinymce.toArray(a.getBody().getElementsByTagName("span")),c.length)for(var f=0;f0}var k=this,l=-1;k.init=function(a){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:c,separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:c}),a.addCommand("SearchReplace",c),a.shortcuts.add("Meta+F","",c)},k.find=function(a,b,c){a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),a=c?"\\b"+a+"\\b":a;var d=e(new RegExp(a,b?"g":"gi"));return d&&(l=-1,l=h(!0)),d},k.next=function(){var a=h(!0);-1!==a&&(l=a)},k.prev=function(){var a=h(!1);-1!==a&&(l=a)},k.replace=function(b,c,e){var h,m,n,o,p,q,r=l;for(c=c!==!1,n=a.getBody(),m=tinymce.grep(tinymce.toArray(n.getElementsByTagName("span")),j),h=0;hl&&m[h].setAttribute("data-mce-index",p-1)}return a.undoManager.add(),l=r,c?(q=g(r+1).length>0,k.next()):(q=g(r-1).length>0,k.prev()),!e&&q},k.done=function(b){var c,e,g,h;for(e=tinymce.toArray(a.getBody().getElementsByTagName("span")),c=0;c=h.end?(e=k,g=h.end-j):d&&i.push(k),!d&&k.length+j>h.start&&(d=k,f=h.start-j),j+=k.length),d&&e){if(k=c({startNode:d,startNodeIndex:f,endNode:e,endNodeIndex:g,innerNodes:i,match:h.text,matchIndex:l}),j-=e.length-g,d=null,e=null,i=[],h=b.shift(),l++,!h)break}else{if((!x[k.nodeName]||w[k.nodeName])&&k.firstChild){k=k.firstChild;continue}if(k.nextSibling){k=k.nextSibling;continue}}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===a)break a;k=k.parentNode}}}function f(a){function b(b,c){var d=z[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(A.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=A.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndexn;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function g(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function h(b){var c=a.getElementsByTagName("*"),d=[];b="number"==typeof b?""+b:null;for(var e=0;eb&&a(z[b],b)!==!1;b++);return this}function l(b){return z.length&&e(a,z,f(b)),this}function m(a,b){if(v&&a.global)for(;u=a.exec(v);)z.push(c(u,b));return this}function n(a){var b,c=h(a?i(a):null);for(b=c.length;b--;)g(c[b]);return this}function o(a){return z[a.getAttribute("data-mce-index")]}function p(a){return h(i(a))[0]}function q(a,b,c){return z.push({start:a,end:a+b,text:v.substr(a,b),data:c}),this}function r(a){var c=h(i(a)),d=b.dom.createRng();return d.setStartBefore(c[0]),d.setEndAfter(c[c.length-1]),d}function s(a,c){var d=r(a);return d.deleteContents(),c.length>0&&d.insertNode(b.dom.doc.createTextNode(c)),d}function t(){return z.splice(0,z.length),n(),this}var u,v,w,x,y,z=[],A=b.dom;return w=b.schema.getBlockElements(),x=b.schema.getWhiteSpaceElements(),y=b.schema.getShortEndedElements(),v=d(a),{text:v,matches:z,each:k,filter:j,reset:t,matchFromElement:o,elementFromMatch:p,find:m,add:q,wrap:l,unwrap:n,replace:s,rangeFromMatch:r,indexOf:i}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(b,i){function j(){return E.textMatcher||(E.textMatcher=new a(b.getBody(),b)),E.textMatcher}function k(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function l(a){for(var b in a)return!1;return!0}function m(a,f){var g=[],h=A[a];c.each(h,function(a){g.push({text:a,onclick:function(){b.insertContent(b.dom.encode(a)),b.dom.remove(f),r()}})}),g.push({text:"-"}),D&&g.push({text:"Add to Dictionary",onclick:function(){s(a,f)}}),g.push.apply(g,[{text:"Ignore",onclick:function(){t(a,f)}},{text:"Ignore all",onclick:function(){t(a,f,!0)}}]),C=new d({items:g,context:"contextmenu",onautohide:function(a){-1!=a.target.className.indexOf("spellchecker")&&a.preventDefault()},onhide:function(){C.remove(),C=null}}),C.renderTo(document.body);var i=e.DOM.getPos(b.getContentAreaContainer()),j=b.dom.getPos(f[0]),k=b.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),i.x+=j.x,i.y+=j.y,C.moveTo(i.x,i.y+f[0].offsetHeight)}function n(){return b.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function o(a,b,d,e){var j={method:a},k="";"spellcheck"==a&&(j.text=b,j.lang=F.spellchecker_language),"addToDictionary"==a&&(j.word=b),c.each(j,function(a,b){k&&(k+="&"),k+=b+"="+encodeURIComponent(a)}),f.send({url:new g(i).toAbsolute(F.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:k,success:function(a){a=h.parse(a),a?a.error?e(a.error):d(a):e("Sever response wasn't proper JSON.")},error:function(a,b){e("Spellchecker request error: "+b.status)}})}function p(a,b,c,d){var e=F.spellchecker_callback||o;e.call(E,a,b,c,d)}function q(){function a(a){b.windowManager.alert(a),b.setProgressState(!1),u()}return B?void u():(u(),b.setProgressState(!0),p("spellcheck",j().text,y,a),void b.focus())}function r(){b.dom.select("span.mce-spellchecker-word").length||u()}function s(a,c){b.setProgressState(!0),p("addToDictionary",a,function(){b.setProgressState(!1),b.dom.remove(c,!0),r()},function(a){b.windowManager.alert(a),b.setProgressState(!1)})}function t(a,d,e){b.selection.collapse(),e?c.each(b.dom.select("span.mce-spellchecker-word"),function(c){c.getAttribute("data-mce-word")==a&&b.dom.remove(c,!0)}):b.dom.remove(d,!0),r()}function u(){j().reset(),E.textMatcher=null,B&&(B=!1,b.fire("SpellcheckEnd"))}function v(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function w(a){var d,e=[];if(d=c.toArray(b.getBody().getElementsByTagName("span")),d.length)for(var f=0;f0){var e=b.dom.createRng();e.setStartBefore(d[0]),e.setEndAfter(d[d.length-1]),b.selection.setRng(e),m(c.getAttribute("data-mce-word"),d)}}}),b.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:q,selectable:!0,onPostRender:function(){var a=this;a.active(B),b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}});var H={tooltip:"Spellcheck",onclick:q,onPostRender:function(){var a=this;b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}};z.length>1&&(H.type="splitbutton",H.menu=z,H.onshow=x,H.onselect=function(a){F.spellchecker_language=a.control.settings.data}),b.addButton("spellchecker",H),b.addCommand("mceSpellCheck",q),b.on("remove",function(){C&&(C.remove(),C=null)}),b.on("change",r),this.getTextMatcher=j,this.getWordCharPattern=n,this.markErrors=y,this.getLanguage=function(){return F.spellchecker_language},F.spellchecker_language=F.spellchecker_language||F.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this); \ No newline at end of file +!function(a,b){"use strict";function c(a,b){for(var c,d=[],f=0;f=i.end?(f=l,h=i.end-k):e&&j.push(l),!e&&l.length+k>i.start&&(e=l,g=i.start-k),k+=l.length),e&&f){if(l=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:j,match:i.text,matchIndex:m}),k-=f.length-h,e=null,f=null,j=[],i=c.shift(),m++,!i)break}else if(y[l.nodeName]&&!x[l.nodeName]||!l.firstChild){if(l.nextSibling){l=l.nextSibling;continue}}else if(!a(l)){l=l.firstChild;continue}for(;;){if(l.nextSibling){l=l.nextSibling;break}if(l.parentNode===b)break a;l=l.parentNode}}}function g(a){function b(b,c){var d=A[c];d.stencil||(d.stencil=a(d));var e=d.stencil.cloneNode(!1);return e.setAttribute("data-mce-index",c),b&&e.appendChild(B.doc.createTextNode(b)),e}return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex,i=B.doc;if(f===g){var j=f;e=j.parentNode,a.startNodeIndex>0&&(c=i.createTextNode(j.data.substring(0,a.startNodeIndex)),e.insertBefore(c,j));var k=b(a.match,h);return e.insertBefore(k,j),a.endNodeIndexn;++n){var p=a.innerNodes[n],q=b(p.data,h);p.parentNode.replaceChild(q,p),m.push(q)}var r=b(g.data.substring(0,a.endNodeIndex),h);return e=f.parentNode,e.insertBefore(c,f),e.insertBefore(l,f),e.removeChild(f),e=g.parentNode,e.insertBefore(r,g),e.insertBefore(d,g),e.removeChild(g),r}}function h(a){var b=a.parentNode;b.insertBefore(a.firstChild,a),a.parentNode.removeChild(a)}function i(a){var c=b.getElementsByTagName("*"),d=[];a="number"==typeof a?""+a:null;for(var e=0;eb&&a(A[b],b)!==!1;b++);return this}function m(a){return A.length&&f(b,A,g(a)),this}function n(a,b){if(w&&a.global)for(;v=a.exec(w);)A.push(d(v,b));return this}function o(a){var b,c=i(a?j(a):null);for(b=c.length;b--;)h(c[b]);return this}function p(a){return A[a.getAttribute("data-mce-index")]}function q(a){return i(j(a))[0]}function r(a,b,c){return A.push({start:a,end:a+b,text:w.substr(a,b),data:c}),this}function s(a){var b=i(j(a)),d=c.dom.createRng();return d.setStartBefore(b[0]),d.setEndAfter(b[b.length-1]),d}function t(a,b){var d=s(a);return d.deleteContents(),b.length>0&&d.insertNode(c.dom.doc.createTextNode(b)),d}function u(){return A.splice(0,A.length),o(),this}var v,w,x,y,z,A=[],B=c.dom;return x=c.schema.getBlockElements(),y=c.schema.getWhiteSpaceElements(),z=c.schema.getShortEndedElements(),w=e(b),{text:w,matches:A,each:l,filter:k,reset:u,matchFromElement:p,elementFromMatch:q,find:n,add:r,wrap:m,unwrap:o,replace:t,rangeFromMatch:s,indexOf:j}}}),d("tinymce/spellcheckerplugin/Plugin",["tinymce/spellcheckerplugin/DomTextMatcher","tinymce/PluginManager","tinymce/util/Tools","tinymce/ui/Menu","tinymce/dom/DOMUtils","tinymce/util/XHR","tinymce/util/URI","tinymce/util/JSON"],function(a,b,c,d,e,f,g,h){b.add("spellchecker",function(b,i){function j(){return E.textMatcher||(E.textMatcher=new a(b.getBody(),b)),E.textMatcher}function k(a,b){var d=[];return c.each(b,function(a){d.push({selectable:!0,text:a.name,data:a.value})}),d}function l(a){for(var b in a)return!1;return!0}function m(a,f){var g=[],h=A[a];c.each(h,function(a){g.push({text:a,onclick:function(){b.insertContent(b.dom.encode(a)),b.dom.remove(f),r()}})}),g.push({text:"-"}),D&&g.push({text:"Add to Dictionary",onclick:function(){s(a,f)}}),g.push.apply(g,[{text:"Ignore",onclick:function(){t(a,f)}},{text:"Ignore all",onclick:function(){t(a,f,!0)}}]),C=new d({items:g,context:"contextmenu",onautohide:function(a){-1!=a.target.className.indexOf("spellchecker")&&a.preventDefault()},onhide:function(){C.remove(),C=null}}),C.renderTo(document.body);var i=e.DOM.getPos(b.getContentAreaContainer()),j=b.dom.getPos(f[0]),k=b.dom.getRoot();"BODY"==k.nodeName?(j.x-=k.ownerDocument.documentElement.scrollLeft||k.scrollLeft,j.y-=k.ownerDocument.documentElement.scrollTop||k.scrollTop):(j.x-=k.scrollLeft,j.y-=k.scrollTop),i.x+=j.x,i.y+=j.y,C.moveTo(i.x,i.y+f[0].offsetHeight)}function n(){return b.getParam("spellchecker_wordchar_pattern")||new RegExp('[^\\s!"#$%&()*+,-./:;<=>?@[\\]^_{|}`\xa7\xa9\xab\xae\xb1\xb6\xb7\xb8\xbb\xbc\xbd\xbe\xbf\xd7\xf7\xa4\u201d\u201c\u201e\xa0\u2002\u2003\u2009]+',"g")}function o(a,d,e,j){var k={method:a,lang:F.spellchecker_language},l="";k["addToDictionary"==a?"word":"text"]=d,c.each(k,function(a,b){l&&(l+="&"),l+=b+"="+encodeURIComponent(a)}),f.send({url:new g(i).toAbsolute(F.spellchecker_rpc_url),type:"post",content_type:"application/x-www-form-urlencoded",data:l,success:function(a){if(a=h.parse(a))a.error?j(a.error):e(a);else{var c=b.translate("Server response wasn't proper JSON.");j(c)}},error:function(){var a=b.translate("The spelling service was not found: (")+F.spellchecker_rpc_url+b.translate(")");j(a)}})}function p(a,b,c,d){var e=F.spellchecker_callback||o;e.call(E,a,b,c,d)}function q(){function a(a){b.notificationManager.open({text:a,type:"error"}),b.setProgressState(!1),u()}u()||(b.setProgressState(!0),p("spellcheck",j().text,y,a),b.focus())}function r(){b.dom.select("span.mce-spellchecker-word").length||u()}function s(a,c){b.setProgressState(!0),p("addToDictionary",a,function(){b.setProgressState(!1),b.dom.remove(c,!0),r()},function(a){b.notificationManager.open({text:a,type:"error"}),b.setProgressState(!1)})}function t(a,d,e){b.selection.collapse(),e?c.each(b.dom.select("span.mce-spellchecker-word"),function(c){c.getAttribute("data-mce-word")==a&&b.dom.remove(c,!0)}):b.dom.remove(d,!0),r()}function u(){return j().reset(),E.textMatcher=null,B?(B=!1,b.fire("SpellcheckEnd"),!0):void 0}function v(a){var b=a.getAttribute("data-mce-index");return"number"==typeof b?""+b:b}function w(a){var d,e=[];if(d=c.toArray(b.getBody().getElementsByTagName("span")),d.length)for(var f=0;f0){var e=b.dom.createRng();e.setStartBefore(d[0]),e.setEndAfter(d[d.length-1]),b.selection.setRng(e),m(c.getAttribute("data-mce-word"),d)}}}),b.addMenuItem("spellchecker",{text:"Spellcheck",context:"tools",onclick:q,selectable:!0,onPostRender:function(){var a=this;a.active(B),b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}});var H={tooltip:"Spellcheck",onclick:q,onPostRender:function(){var a=this;b.on("SpellcheckStart SpellcheckEnd",function(){a.active(B)})}};z.length>1&&(H.type="splitbutton",H.menu=z,H.onshow=x,H.onselect=function(a){F.spellchecker_language=a.control.settings.data}),b.addButton("spellchecker",H),b.addCommand("mceSpellCheck",q),b.on("remove",function(){C&&(C.remove(),C=null)}),b.on("change",r),this.getTextMatcher=j,this.getWordCharPattern=n,this.markErrors=y,this.getLanguage=function(){return F.spellchecker_language},F.spellchecker_language=F.spellchecker_language||F.language||"en"})}),f(["tinymce/spellcheckerplugin/DomTextMatcher"])}(this); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/tabfocus/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/tabfocus/plugin.min.js index 4fb883e..df420ac 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/tabfocus/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/tabfocus/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():window.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})}); \ No newline at end of file +tinymce.PluginManager.add("tabfocus",function(a){function b(a){9!==a.keyCode||a.ctrlKey||a.altKey||a.metaKey||a.preventDefault()}function c(b){function c(c){function f(a){return"BODY"===a.nodeName||"hidden"!=a.type&&"none"!=a.style.display&&"hidden"!=a.style.visibility&&f(a.parentNode)}function i(a){return/INPUT|TEXTAREA|BUTTON/.test(a.tagName)&&tinymce.get(b.id)&&-1!=a.tabIndex&&f(a)}if(h=d.select(":input:enabled,*[tabindex]:not(iframe)"),e(h,function(b,c){return b.id==a.id?(g=c,!1):void 0}),c>0){for(j=g+1;j=0;j--)if(i(h[j]))return h[j];return null}var g,h,i,j;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(i=f(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==i.length&&(i[1]=i[0],i[0]=":prev"),h=b.shiftKey?":prev"==i[0]?c(-1):d.get(i[0]):":next"==i[1]?c(1):d.get(i[1]))){var k=tinymce.get(h.id||h.name);h.id&&k?k.focus():tinymce.util.Delay.setTimeout(function(){tinymce.Env.webkit||window.focus(),h.focus()},10),b.preventDefault()}}var d=tinymce.DOM,e=tinymce.each,f=tinymce.explode;a.on("init",function(){a.inline&&tinymce.DOM.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",b),tinymce.Env.gecko?a.on("keypress keydown",c):a.on("keydown",c)})}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/table/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/table/plugin.min.js index 68877e8..019acc5 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/table/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/table/plugin.min.js @@ -1 +1,2 @@ -!function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g10)&&(b.innerHTML='
              ')}return{getSpanVal:b,paddCell:c}}),d("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils"],function(a,c,d){var e=a.each,f=d.getSpanVal;return function(g,h){function i(){var a=0;G=[],H=0,e(["thead","tbody","tfoot"],function(b){var c=M.select("> "+b+" tr",h);e(c,function(c,d){d+=a,e(M.select("> td, > th",c),function(a,c){var e,g,h,i;if(G[d])for(;G[d][c];)c++;for(h=f(a,"rowspan"),i=f(a,"colspan"),g=d;d+h>g;g++)for(G[g]||(G[g]=[]),e=c;c+i>e;e++)G[g][e]={part:b,real:g==d&&e==c,elm:a,rowspan:h,colspan:i};H=Math.max(H,c+1)})}),a+=c.length})}function j(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function k(a,b){var c;return c=G[b],c?c[a]:void 0}function l(a,b,c){a&&(c=parseInt(c,10),1===c?a.removeAttribute(b,1):a.setAttribute(b,c,1))}function m(a){return a&&(M.hasClass(a.elm,"mce-item-selected")||a==K)}function n(){var a=[];return e(h.rows,function(b){e(b.cells,function(c){return M.hasClass(c,"mce-item-selected")||K&&c==K.elm?(a.push(b),!1):void 0})}),a}function o(){var a=M.createRng();a.setStartAfter(h),a.setEndAfter(h),L.setRng(a),M.remove(h)}function p(b){var f,h={};return g.settings.table_clone_elements!==!1&&(h=a.makeMap((g.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(b,function(a){var d;return 3==a.nodeType?(e(M.getParents(a.parentNode,null,b).reverse(),function(a){h[a.nodeName]&&(a=j(a,!1),f?d&&d.appendChild(a):f=d=a,d=a)}),d&&(d.innerHTML=c.ie?" ":'
              '),!1):void 0},"childNodes"),b=j(b,!1),l(b,"rowSpan",1),l(b,"colSpan",1),f?b.appendChild(f):d.paddCell(b),b}function q(){var a,b=M.createRng();return e(M.select("tr",h),function(a){0===a.cells.length&&M.remove(a)}),0===M.select("tr",h).length?(b.setStartBefore(h),b.setEndBefore(h),L.setRng(b),void M.remove(h)):(e(M.select("thead,tbody,tfoot",h),function(a){0===a.rows.length&&M.remove(a)}),i(),void(I&&(a=G[Math.min(G.length-1,I.y)],a&&(L.select(a[Math.min(a.length-1,I.x)].elm,!0),L.collapse(!0)))))}function r(a,b,c,d){var e,f,g,h,i;for(e=G[b][a].elm.parentNode,g=1;c>=g;g++)if(e=M.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=G[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)M.insertAfter(p(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(p(e.cells[0]),e.cells[0])}}function s(){e(G,function(a,b){e(a,function(a,c){var d,e,g;if(m(a)&&(a=a.elm,d=f(a,"colspan"),e=f(a,"rowspan"),d>1||e>1)){for(l(a,"rowSpan",1),l(a,"colSpan",1),g=0;d-1>g;g++)M.insertAfter(p(a),a);r(c,b,e-1,d)}})})}function t(b,c,d){var f,g,h,j,n,o,p,r,t,u,v;if(b?(f=B(b),g=f.x,h=f.y,j=g+(c-1),n=h+(d-1)):(I=J=null,e(G,function(a,b){e(a,function(a,c){m(a)&&(I||(I={x:c,y:b}),J={x:c,y:b})})}),I&&(g=I.x,h=I.y,j=J.x,n=J.y)),r=k(g,h),t=k(j,n),r&&t&&r.part==t.part){for(s(),i(),r=k(g,h).elm,l(r,"colSpan",j-g+1),l(r,"rowSpan",n-h+1),p=h;n>=p;p++)for(o=g;j>=o;o++)G[p]&&G[p][o]&&(b=G[p][o].elm,b!=r&&(u=a.grep(b.childNodes),e(u,function(a){r.appendChild(a)}),u.length&&(u=a.grep(r.childNodes),v=0,e(u,function(a){"BR"==a.nodeName&&M.getAttrib(a,"data-mce-bogus")&&v++0&&G[c-1][h]&&(o=G[c-1][h].elm,q=f(o,"rowSpan"),q>1)){l(o,"rowSpan",q+1);continue}}else if(q=f(d,"rowspan"),q>1){l(d,"rowSpan",q+1);continue}n=p(d),l(n,"colSpan",d.colSpan),k.appendChild(n),g=d}k.hasChildNodes()&&(a?i.parentNode.insertBefore(k,i):M.insertAfter(k,i))}}function v(a){var b,c;e(G,function(c){return e(c,function(c,d){return m(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),e(G,function(d,e){var g,h,i;d[b]&&(g=d[b].elm,g!=c&&(i=f(g,"colspan"),h=f(g,"rowspan"),1==i?a?(g.parentNode.insertBefore(p(g),g),r(b,e,h-1,i)):(M.insertAfter(p(g),g),r(b,e,h-1,i)):l(g,"colSpan",g.colSpan+1),c=g))})}function w(){var b=[];e(G,function(c){e(c,function(c,d){m(c)&&-1===a.inArray(b,d)&&(e(G,function(a){var b,c=a[d].elm;b=f(c,"colSpan"),b>1?l(c,"colSpan",b-1):M.remove(c)}),b.push(d))})}),q()}function x(){function a(a){var b,c;e(a.cells,function(a){var c=f(a,"rowSpan");c>1&&(l(a,"rowSpan",c-1),b=B(a),r(b.x,b.y,1,1))}),b=B(a.cells[0]),e(G[b.y],function(a){var b;a=a.elm,a!=c&&(b=f(a,"rowSpan"),1>=b?M.remove(a):l(a,"rowSpan",b-1),c=a)})}var b;b=n(),e(b.reverse(),function(b){a(b)}),q()}function y(){var a=n();return M.remove(a),q(),a}function z(){var a=n();return e(a,function(b,c){a[c]=j(b,!0)}),a}function A(a,b){var c=n(),d=c[b?0:c.length-1],f=d.cells.length;a&&(e(G,function(a){var b;return f=0,e(a,function(a){a.real&&(f+=a.colspan),a.elm.parentNode==d&&(b=1)}),b?!1:void 0}),b||a.reverse(),e(a,function(a){var c,e,g=a.cells.length;for(c=0;g>c;c++)e=a.cells[c],l(e,"colSpan",1),l(e,"rowSpan",1);for(c=g;f>c;c++)a.appendChild(p(a.cells[g-1]));for(c=f;g>c;c++)M.remove(a.cells[c]);b?d.parentNode.insertBefore(a,d):M.insertAfter(a,d)}),M.removeClass(M.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"))}function B(a){var b;return e(G,function(c,d){return e(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function C(a){I=B(a)}function D(){var a,b;return a=b=0,e(G,function(c,d){e(c,function(c,e){var f,g;m(c)&&(c=G[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function E(a){var b,c,d,e,f,g,h,i,j,k;if(J=B(a),I&&J){for(b=Math.min(I.x,J.x),c=Math.min(I.y,J.y),d=Math.max(I.x,J.x),e=Math.max(I.y,J.y),f=d,g=e,k=c;g>=k;k++)a=G[k][b],a.real||b-(a.colspan-1)=j;j++)a=G[c][j],a.real||c-(a.rowspan-1)=k;k++)for(j=b;d>=j;j++)a=G[k][j],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&j+h>f&&(f=j+h),i&&k+i>g&&(g=k+i));for(M.removeClass(M.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),k=c;g>=k;k++)for(j=b;f>=j;j++)G[k][j]&&M.addClass(G[k][j].elm,"mce-item-selected")}}function F(a,b){var c,d,e;c=B(a),d=c.y*H+c.x;do{if(d+=b,e=k(d%H,Math.floor(d/H)),!e)break;if(e.elm!=a)return L.select(e.elm,!0),M.isEmpty(e.elm)&&L.collapse(!0),!0}while(e.elm==a);return!1}var G,H,I,J,K,L=g.selection,M=L.dom;h=h||M.getParent(L.getStart(),"table"),i(),K=M.getParent(L.getStart(),"th,td"),K&&(I=B(K),J=D(),K=k(I.x,I.y)),a.extend(this,{deleteTable:o,split:s,merge:t,insertRow:u,insertCol:v,deleteCols:w,deleteRows:x,cutRows:y,copyRows:z,pasteRows:A,getPos:B,setStartCell:C,setEndCell:E,moveRelIdx:F,refresh:i})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d){var e=c.each,f=d.getSpanVal;return function(g){function h(){function b(b){function c(a,c){var e=a?"previousSibling":"nextSibling",f=g.dom.getParent(c,"tr"),h=f[e];if(h)return q(g,c,h,a),b.preventDefault(),!0;var k=g.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=d(a,k,l,"tbody");if(null!==n)return i(a,n,c)}return j(a,f,e,k)}function d(a,b,c,d){var e=g.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return h(a,b);if(-1===f){var i="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[i]}return e[f+(a?-1:1)]}function h(a,b){var c=a?"thead":"tfoot",d=g.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function i(a,c,d){var e=k(c,a);return e&&q(g,d,e,a),b.preventDefault(),!0}function j(a,d,e,f){var h=f[e];if(h)return l(h),!0;var i=g.dom.getParent(f,"td,th");if(i)return c(a,i,b);var j=k(d,!a);return l(j),b.preventDefault(),!1}function k(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?g.dom.getParent(c,"td,th"):c}function l(a){g.selection.setCursorLocation(a,0)}function m(){return t==a.UP||t==a.DOWN}function n(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function o(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=f(c,"colspan");return b}function p(a,b){var c=0,d=0;return e(a.children,function(a,e){return c+=f(a,"colspan"),d=e,c>b?!1:void 0}),d}function q(a,b,c,d){var e=o(g.dom.getParent(b,"td,th")),f=p(c,e),h=c.childNodes[f],i=k(h,d);l(i||h)}function r(a){var b=g.selection.getNode(),c=g.dom.getParent(b,"td,th"),d=g.dom.getParent(a,"td,th");return c&&c!==d&&s(c,d)}function s(a,b){return g.dom.getParent(a,"TABLE")===g.dom.getParent(b,"TABLE")}var t=b.keyCode;if(m()&&n(g)){var u=g.selection.getNode();setTimeout(function(){r(u)&&c(!b.shiftKey&&t===a.UP,u,b)},0)}}g.on("KeyDown",function(a){b(a)})}function i(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}g.on("KeyDown",function(b){var c,d,e=g.dom;(37==b.keyCode||38==b.keyCode)&&(c=g.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&g.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),g.selection.setRng(c),b.preventDefault()))})}function j(){g.on("KeyDown SetContent VisualAid",function(){var a;for(a=g.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(g.settings.forced_root_block?g.dom.add(g.getBody(),g.settings.forced_root_block,g.settings.forced_root_block_attrs,b.ie&&b.ie<11?" ":'
              '):g.dom.add(g.getBody(),"br",{"data-mce-bogus":"1"}))}),g.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&g.dom.remove(b)})}function k(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=g.selection.getRng(),c=g.selection.getNode(),d=g.dom.getParent(b.startContainer,"TD,TH");if(a(g,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),g.selection.setRng(b))}}g.on("KeyDown",function(){b()}),g.on("MouseDown",function(a){2!=a.button&&b()})}function l(){function b(a){g.selection.select(a,!0),g.selection.collapse(!0)}function e(a){g.$(a).empty(),d.paddCell(a)}g.on("keydown",function(d){if((d.keyCode==a.DELETE||d.keyCode==a.BACKSPACE)&&!d.isDefaultPrevented()){var f,h,i,j;if(f=g.dom.getParent(g.selection.getStart(),"table")){if(h=g.dom.select("td,th",f),i=c.grep(h,function(a){return g.dom.hasClass(a,"mce-item-selected")}),0===i.length)return j=g.dom.getParent(g.selection.getStart(),"td,th"),void(g.selection.isCollapsed()&&j&&g.dom.isEmpty(j)&&(d.preventDefault(),e(j),b(j)));d.preventDefault(),h.length==i.length?g.execCommand("mceTableDelete"):(c.each(i,e),b(i[0]))}}})}l(),b.webkit&&(h(),k()),b.gecko&&(i(),j()),b.ie>10&&(i(),j())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d){function e(a){d.getBody().style.webkitUserSelect="",(a||l)&&(d.dom.removeClass(d.dom.select("td.mce-item-selected,th.mce-item-selected"),"mce-item-selected"),l=!1)}function f(b){var c,e,f=b.target;if(!j&&h&&(g||f!=h)&&("TD"==f.nodeName||"TH"==f.nodeName)){e=k.getParent(f,"table"),e==i&&(g||(g=new a(d,e),g.setStartCell(h),d.getBody().style.webkitUserSelect="none"),g.setEndCell(f),l=!0),c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(m){}b.preventDefault()}}var g,h,i,j,k=d.dom,l=!0;return d.on("MouseDown",function(a){2==a.button||j||(e(),h=k.getParent(a.target,"td,th"),i=k.getParent(h,"table"))}),d.on("mouseover",f),d.on("remove",function(){k.unbind(d.getDoc(),"mouseover",f)}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,j,l,m,n=d.selection;if(h){if(g&&(d.getBody().style.webkitUserSelect=""),f=k.select("td.mce-item-selected,th.mce-item-selected"),f.length>0){e=k.createRng(),l=f[0],e.setStartBefore(l),e.setEndAfter(l),a(l,1),j=new b(l,k.getParent(f[0],"table"));do if("TD"==l.nodeName||"TH"==l.nodeName){if(!k.hasClass(l,"mce-item-selected"))break;m=l}while(l=j.next());a(m),n.setRng(e)}d.nodeChanged(),h=g=i=null}}),d.on("KeyUp Drop SetContent",function(a){e("setcontent"==a.type),h=g=i=null,j=!1}),d.on("ObjectResizeStart ObjectResized",function(a){j="objectresized"!=a.type}),{clear:e}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;return a?function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}:void 0}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;dc;c++){for(f+="
              ",d=0;a>d;d++)f+="";f+=""}return f+="
              "+(g.ie?" ":"
              ")+"
              ",e.undoManager.transact(function(){e.insertContent(f),h=e.dom.get("__mce"),e.dom.setAttrib(h,"id",null),e.dom.setAttribs(h,e.settings.table_default_attributes||{}),e.dom.setStyles(h,e.settings.table_default_styles||{})}),h}function i(a,b){function c(){a.disabled(!e.dom.getParent(e.selection.getStart(),b)),e.selection.selectorChanged(b,function(b){a.disabled(!b)})}e.initialized?c():e.on("init",c)}function k(){i(this,"table")}function l(){i(this,"td,th")}function m(){var a="";a='';for(var b=0;10>b;b++){a+="";for(var c=0;10>c;c++)a+='';a+=""}return a+="
              ",a+=''}function n(a,b,c){var d,f,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),f=0;10>f;f++)for(d=0;10>d;d++)h=j.rows[f].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=f,e.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}var o,p=this,q=new d(e);e.settings.table_grid===!1?e.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:q.table}):e.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),q.table())},onshow:function(){n(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");e.dom.removeClass(a,"mce-active"),e.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:m(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),(b!==this.lastX||c!==this.lastY)&&(n(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),e.undoManager.transact(function(){h(b.lastX+1,b.lastY+1)}),e.addVisual())}}]}),e.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:k,onclick:q.tableProps}),e.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:k,cmd:"mceTableDelete"}),e.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:f("mceTableCellProps"),onPostRender:l},{text:"Merge cells",onclick:f("mceTableMergeCells"),onPostRender:l},{text:"Split cell",onclick:f("mceTableSplitCells"),onPostRender:l}]}),e.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:f("mceTableInsertRowBefore"),onPostRender:l},{text:"Insert row after",onclick:f("mceTableInsertRowAfter"),onPostRender:l},{text:"Delete row",onclick:f("mceTableDeleteRow"),onPostRender:l},{text:"Row properties",onclick:f("mceTableRowProps"),onPostRender:l},{text:"-"},{text:"Cut row",onclick:f("mceTableCutRow"),onPostRender:l},{text:"Copy row",onclick:f("mceTableCopyRow"),onPostRender:l},{text:"Paste row before",onclick:f("mceTablePasteRowBefore"),onPostRender:l},{text:"Paste row after",onclick:f("mceTablePasteRowAfter"),onPostRender:l}]}),e.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:f("mceTableInsertColBefore"),onPostRender:l},{text:"Insert column after",onclick:f("mceTableInsertColAfter"),onPostRender:l},{text:"Delete column",onclick:f("mceTableDeleteCol"),onPostRender:l}]});var r=[];j("inserttable tableprops deletetable | cell row column".split(" "),function(a){r.push("|"==a?{text:"-"}:e.menuItems[a])}),e.addButton("table",{type:"menubutton",title:"Table",menu:r}),g.isIE||e.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(e.selection.select(a),e.nodeChanged())}),p.quirks=new b(e),e.on("Init",function(){p.cellSelection=new c(e)}),e.on("PreInit",function(){e.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),j({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=e.dom.getParent(e.selection.getStart(),"th,td"),e.dom.select("td.mce-item-selected,th.mce-item-selected").length?a.merge():q.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){o=a.cutRows()},mceTableCopyRow:function(a){o=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(o,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(o)},mceTableDelete:function(a){a.deleteTable()}},function(b,c){e.addCommand(c,function(){var c=new a(e);c&&(b(c),e.execCommand("mceRepaint"),p.cellSelection.clear())})}),j({mceInsertTable:q.table,mceTableProps:function(){q.table(!0)},mceTableRowProps:q.row,mceTableCellProps:q.cell},function(a,b){e.addCommand(b,function(b,c){a(c)})}),e.settings.table_tab_navigation!==!1&&e.on("keydown",function(b){var c,d,f;9==b.keyCode&&(c=e.dom.getParent(e.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(e),f=b.shiftKey?-1:1,e.undoManager.transact(function(){!d.moveRelIdx(c,f)&&f>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,f))})))}),p.insertTable=h}var j=e.each;h.add("table",i)})}(this); \ No newline at end of file +!function(a,b){"use strict";function c(a,b){for(var c,d=[],g=0;g9)&&(b.hasChildNodes()||(b.innerHTML='
              '))}return{getSpanVal:b,paddCell:c}}),d("tinymce/tableplugin/TableGrid",["tinymce/util/Tools","tinymce/Env","tinymce/tableplugin/Utils"],function(a,c,d){var e=a.each,f=d.getSpanVal;return function(g,h,i){function j(){g.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected")}function k(a){return a===g.getBody()}function l(b,c){return b?(c=a.map(c.split(","),function(a){return a.toLowerCase()}),a.grep(b.childNodes,function(b){return-1!==a.inArray(c,b.nodeName.toLowerCase())})):[]}function m(){var a=0;O=[],P=0,e(["thead","tbody","tfoot"],function(b){var c=l(h,b)[0],d=l(c,"tr");e(d,function(c,d){d+=a,e(l(c,"td,th"),function(a,c){var e,g,h,i;if(O[d])for(;O[d][c];)c++;for(h=f(a,"rowspan"),i=f(a,"colspan"),g=d;d+h>g;g++)for(O[g]||(O[g]=[]),e=c;c+i>e;e++)O[g][e]={part:b,real:g==d&&e==c,elm:a,rowspan:h,colspan:i};P=Math.max(P,c+1)})}),a+=d.length})}function n(a){return g.fire("newrow",{node:a}),a}function o(a){return g.fire("newcell",{node:a}),a}function p(a,b){return a=a.cloneNode(b),a.removeAttribute("id"),a}function q(a,b){var c;return c=O[b],c?c[a]:void 0}function r(a,b,c){a&&(c=parseInt(c,10),1===c?a.removeAttribute(b,1):a.setAttribute(b,c,1))}function s(a){return a&&(!!T.getAttrib(a.elm,"data-mce-selected")||a==i)}function t(){var a=[];return e(h.rows,function(b){e(b.cells,function(c){return T.getAttrib(c,"data-mce-selected")||i&&c==i.elm?(a.push(b),!1):void 0})}),a}function u(){var a=T.createRng();k(h)||(a.setStartAfter(h),a.setEndAfter(h),S.setRng(a),T.remove(h))}function v(b){var f,h={};return g.settings.table_clone_elements!==!1&&(h=a.makeMap((g.settings.table_clone_elements||"strong em b i span font h1 h2 h3 h4 h5 h6 p div").toUpperCase(),/[ ,]/)),a.walk(b,function(a){var d;return 3==a.nodeType?(e(T.getParents(a.parentNode,null,b).reverse(),function(a){h[a.nodeName]&&(a=p(a,!1),f?d&&d.appendChild(a):f=d=a,d=a)}),d&&(d.innerHTML=c.ie&&c.ie<10?" ":'
              '),!1):void 0},"childNodes"),b=p(b,!1),o(b),r(b,"rowSpan",1),r(b,"colSpan",1),f?b.appendChild(f):d.paddCell(b),b}function w(){var a,b=T.createRng();return e(T.select("tr",h),function(a){0===a.cells.length&&T.remove(a)}),0===T.select("tr",h).length?(b.setStartBefore(h),b.setEndBefore(h),S.setRng(b),void T.remove(h)):(e(T.select("thead,tbody,tfoot",h),function(a){0===a.rows.length&&T.remove(a)}),m(),void(Q&&(a=O[Math.min(O.length-1,Q.y)],a&&(S.select(a[Math.min(a.length-1,Q.x)].elm,!0),S.collapse(!0)))))}function x(a,b,c,d){var e,f,g,h,i;for(e=O[b][a].elm.parentNode,g=1;c>=g;g++)if(e=T.getNext(e,"tr")){for(f=a;f>=0;f--)if(i=O[b+g][f].elm,i.parentNode==e){for(h=1;d>=h;h++)T.insertAfter(v(i),i);break}if(-1==f)for(h=1;d>=h;h++)e.insertBefore(v(e.cells[0]),e.cells[0])}}function y(){e(O,function(a,b){e(a,function(a,c){var d,e,g;if(s(a)&&(a=a.elm,d=f(a,"colspan"),e=f(a,"rowspan"),d>1||e>1)){for(r(a,"rowSpan",1),r(a,"colSpan",1),g=0;d-1>g;g++)T.insertAfter(v(a),a);x(c,b,e-1,d)}})})}function z(b,c,d){var f,g,h,i,j,k,l,n,o,p,t;if(b?(f=J(b),g=f.x,h=f.y,i=g+(c-1),j=h+(d-1)):(Q=R=null,e(O,function(a,b){e(a,function(a,c){s(a)&&(Q||(Q={x:c,y:b}),R={x:c,y:b})})}),Q&&(g=Q.x,h=Q.y,i=R.x,j=R.y)),n=q(g,h),o=q(i,j),n&&o&&n.part==o.part){y(),m(),n=q(g,h).elm;var u=i-g+1,v=j-h+1;for(u===P&&v===O.length&&(u=1,v=1),u===P&&v>1&&(v=1),r(n,"colSpan",u),r(n,"rowSpan",v),l=h;j>=l;l++)for(k=g;i>=k;k++)O[l]&&O[l][k]&&(b=O[l][k].elm,b!=n&&(p=a.grep(b.childNodes),e(p,function(a){n.appendChild(a)}),p.length&&(p=a.grep(n.childNodes),t=0,e(p,function(a){"BR"==a.nodeName&&t++0&&O[c-1][h]&&(l=O[c-1][h].elm,m=f(l,"rowSpan"),m>1)){r(l,"rowSpan",m+1);continue}}else if(m=f(d,"rowspan"),m>1){r(d,"rowSpan",m+1);continue}k=v(d),r(k,"colSpan",d.colSpan),j.appendChild(k),g=d}j.hasChildNodes()&&(a?i.parentNode.insertBefore(j,i):T.insertAfter(j,i))}}function B(a){var b,c;e(O,function(c){return e(c,function(c,d){return s(c)&&(b=d,a)?!1:void 0}),a?!b:void 0}),e(O,function(d,e){var g,h,i;d[b]&&(g=d[b].elm,g!=c&&(i=f(g,"colspan"),h=f(g,"rowspan"),1==i?a?(g.parentNode.insertBefore(v(g),g),x(b,e,h-1,i)):(T.insertAfter(v(g),g),x(b,e,h-1,i)):r(g,"colSpan",g.colSpan+1),c=g))})}function C(b){return a.grep(D(b),s)}function D(a){var b=[];return e(a,function(a){e(a,function(a){b.push(a)})}),b}function E(){var b=[];if(k(h)){if(1==O[0].length)return;if(C(O).length==D(O).length)return}e(O,function(c){e(c,function(c,d){s(c)&&-1===a.inArray(b,d)&&(e(O,function(a){var b,c=a[d].elm;b=f(c,"colSpan"),b>1?r(c,"colSpan",b-1):T.remove(c)}),b.push(d))})}),w()}function F(){function a(a){var b,c;e(a.cells,function(a){var c=f(a,"rowSpan");c>1&&(r(a,"rowSpan",c-1),b=J(a),x(b.x,b.y,1,1))}),b=J(a.cells[0]),e(O[b.y],function(a){var b;a=a.elm,a!=c&&(b=f(a,"rowSpan"),1>=b?T.remove(a):r(a,"rowSpan",b-1),c=a)})}var b;b=t(),k(h)&&b.length==h.rows.length||(e(b.reverse(),function(b){a(b)}),w())}function G(){var a=t();if(!k(h)||a.length!=h.rows.length)return T.remove(a),w(),a}function H(){var a=t();return e(a,function(b,c){a[c]=p(b,!0)}),a}function I(b,c){var d,f=t(),g=f[c?0:f.length-1],h=g.cells.length;b&&(d=a.map(b,function(a){return a.cloneNode(!0)}),e(O,function(a){var b;return h=0,e(a,function(a){a.real&&(h+=a.colspan),a.elm.parentNode==g&&(b=1)}),b?!1:void 0}),c||d.reverse(),e(d,function(a){var b,d,e=a.cells.length;for(n(a),b=0;e>b;b++)d=a.cells[b],o(d),r(d,"colSpan",1),r(d,"rowSpan",1);for(b=e;h>b;b++)a.appendChild(o(v(a.cells[e-1])));for(b=h;e>b;b++)T.remove(a.cells[b]);c?g.parentNode.insertBefore(a,g):T.insertAfter(a,g)}),j())}function J(a){var b;return e(O,function(c,d){return e(c,function(c,e){return c.elm==a?(b={x:e,y:d},!1):void 0}),!b}),b}function K(a){Q=J(a)}function L(){var a,b;return a=b=0,e(O,function(c,d){e(c,function(c,e){var f,g;s(c)&&(c=O[d][e],e>a&&(a=e),d>b&&(b=d),c.real&&(f=c.colspan-1,g=c.rowspan-1,f&&e+f>a&&(a=e+f),g&&d+g>b&&(b=d+g)))})}),{x:a,y:b}}function M(a){var b,c,d,e,f,g,h,i,k,l;if(R=J(a),Q&&R){for(b=Math.min(Q.x,R.x),c=Math.min(Q.y,R.y),d=Math.max(Q.x,R.x),e=Math.max(Q.y,R.y),f=d,g=e,l=c;e>=l;l++)for(k=b;d>=k;k++)a=O[l][k],a.real&&(h=a.colspan-1,i=a.rowspan-1,h&&k+h>f&&(f=k+h),i&&l+i>g&&(g=l+i));for(j(),l=c;g>=l;l++)for(k=b;f>=k;k++)O[l][k]&&T.setAttrib(O[l][k].elm,"data-mce-selected","1")}}function N(a,b){var c,d,e;c=J(a),d=c.y*P+c.x;do{if(d+=b,e=q(d%P,Math.floor(d/P)),!e)break;if(e.elm!=a)return S.select(e.elm,!0),T.isEmpty(e.elm)&&S.collapse(!0),!0}while(e.elm==a);return!1}var O,P,Q,R,S=g.selection,T=S.dom;h=h||T.getParent(S.getStart(!0),"table"),m(),i=i||T.getParent(S.getStart(!0),"th,td"),i&&(Q=J(i),R=L(),i=q(Q.x,Q.y)),a.extend(this,{deleteTable:u,split:y,merge:z,insertRow:A,insertCol:B,deleteCols:E,deleteRows:F,cutRows:G,copyRows:H,pasteRows:I,getPos:J,setStartCell:K,setEndCell:M,moveRelIdx:N,refresh:m})}}),d("tinymce/tableplugin/Quirks",["tinymce/util/VK","tinymce/util/Delay","tinymce/Env","tinymce/util/Tools","tinymce/tableplugin/Utils"],function(a,b,c,d,e){var f=d.each,g=e.getSpanVal;return function(h){function i(){function c(c){function d(a,b){var d=a?"previousSibling":"nextSibling",f=h.dom.getParent(b,"tr"),g=f[d];if(g)return r(h,b,g,a),c.preventDefault(),!0;var i=h.dom.getParent(f,"table"),l=f.parentNode,m=l.nodeName.toLowerCase();if("tbody"===m||m===(a?"tfoot":"thead")){var n=e(a,i,l,"tbody");if(null!==n)return j(a,n,b)}return k(a,f,d,i)}function e(a,b,c,d){var e=h.dom.select(">"+d,b),f=e.indexOf(c);if(a&&0===f||!a&&f===e.length-1)return i(a,b);if(-1===f){var g="thead"===c.tagName.toLowerCase()?0:e.length-1;return e[g]}return e[f+(a?-1:1)]}function i(a,b){var c=a?"thead":"tfoot",d=h.dom.select(">"+c,b);return 0!==d.length?d[0]:null}function j(a,b,d){var e=l(b,a);return e&&r(h,d,e,a),c.preventDefault(),!0}function k(a,b,e,f){var g=f[e];if(g)return m(g),!0;var i=h.dom.getParent(f,"td,th");if(i)return d(a,i,c);var j=l(b,!a);return m(j),c.preventDefault(),!1}function l(a,b){var c=a&&a[b?"lastChild":"firstChild"];return c&&"BR"===c.nodeName?h.dom.getParent(c,"td,th"):c}function m(a){h.selection.setCursorLocation(a,0)}function n(){return u==a.UP||u==a.DOWN}function o(a){var b=a.selection.getNode(),c=a.dom.getParent(b,"tr");return null!==c}function p(a){for(var b=0,c=a;c.previousSibling;)c=c.previousSibling,b+=g(c,"colspan");return b}function q(a,b){var c=0,d=0;return f(a.children,function(a,e){return c+=g(a,"colspan"),d=e,c>b?!1:void 0}),d}function r(a,b,c,d){var e=p(h.dom.getParent(b,"td,th")),f=q(c,e),g=c.childNodes[f],i=l(g,d);m(i||g)}function s(a){var b=h.selection.getNode(),c=h.dom.getParent(b,"td,th"),d=h.dom.getParent(a,"td,th");return c&&c!==d&&t(c,d)}function t(a,b){return h.dom.getParent(a,"TABLE")===h.dom.getParent(b,"TABLE")}var u=c.keyCode;if(n()&&o(h)){var v=h.selection.getNode();b.setEditorTimeout(h,function(){s(v)&&d(!c.shiftKey&&u===a.UP,v,c)},0)}}h.on("KeyDown",function(a){c(a)})}function j(){function a(a,b){var c,d=b.ownerDocument,e=d.createRange();return e.setStartBefore(b),e.setEnd(a.endContainer,a.endOffset),c=d.createElement("body"),c.appendChild(e.cloneContents()),0===c.innerHTML.replace(/<(br|img|object|embed|input|textarea)[^>]*>/gi,"-").replace(/<[^>]+>/g,"").length}h.on("KeyDown",function(b){var c,d,e=h.dom;37!=b.keyCode&&38!=b.keyCode||(c=h.selection.getRng(),d=e.getParent(c.startContainer,"table"),d&&h.getBody().firstChild==d&&a(c,d)&&(c=e.createRng(),c.setStartBefore(d),c.setEndBefore(d),h.selection.setRng(c),b.preventDefault()))})}function k(){h.on("KeyDown SetContent VisualAid",function(){var a;for(a=h.getBody().lastChild;a;a=a.previousSibling)if(3==a.nodeType){if(a.nodeValue.length>0)break}else if(1==a.nodeType&&("BR"==a.tagName||!a.getAttribute("data-mce-bogus")))break;a&&"TABLE"==a.nodeName&&(h.settings.forced_root_block?h.dom.add(h.getBody(),h.settings.forced_root_block,h.settings.forced_root_block_attrs,c.ie&&c.ie<10?" ":'
              '):h.dom.add(h.getBody(),"br",{"data-mce-bogus":"1"}))}),h.on("PreProcess",function(a){var b=a.node.lastChild;b&&("BR"==b.nodeName||1==b.childNodes.length&&("BR"==b.firstChild.nodeName||"\xa0"==b.firstChild.nodeValue))&&b.previousSibling&&"TABLE"==b.previousSibling.nodeName&&h.dom.remove(b)})}function l(){function a(a,b,c,d){var e,f,g,h=3,i=a.dom.getParent(b.startContainer,"TABLE");return i&&(e=i.parentNode),f=b.startContainer.nodeType==h&&0===b.startOffset&&0===b.endOffset&&d&&("TR"==c.nodeName||c==e),g=("TD"==c.nodeName||"TH"==c.nodeName)&&!d,f||g}function b(){var b=h.selection.getRng(),c=h.selection.getNode(),d=h.dom.getParent(b.startContainer,"TD,TH");if(a(h,b,c,d)){d||(d=c);for(var e=d.lastChild;e.lastChild;)e=e.lastChild;3==e.nodeType&&(b.setEnd(e,e.data.length),h.selection.setRng(b))}}h.on("KeyDown",function(){b()}),h.on("MouseDown",function(a){2!=a.button&&b()})}function m(){function b(a){h.selection.select(a,!0),h.selection.collapse(!0)}function c(a){h.$(a).empty(),e.paddCell(a)}h.on("keydown",function(e){if((e.keyCode==a.DELETE||e.keyCode==a.BACKSPACE)&&!e.isDefaultPrevented()){var f,g,i,j;if(f=h.dom.getParent(h.selection.getStart(),"table")){if(g=h.dom.select("td,th",f),i=d.grep(g,function(a){return!!h.dom.getAttrib(a,"data-mce-selected")}),0===i.length)return j=h.dom.getParent(h.selection.getStart(),"td,th"),void(h.selection.isCollapsed()&&j&&h.dom.isEmpty(j)&&(e.preventDefault(),c(j),b(j)));e.preventDefault(),h.undoManager.transact(function(){g.length==i.length?h.execCommand("mceTableDelete"):(d.each(i,c),b(i[0]))})}}})}m(),c.webkit&&(i(),l()),c.gecko&&(j(),k()),c.ie>9&&(j(),k())}}),d("tinymce/tableplugin/CellSelection",["tinymce/tableplugin/TableGrid","tinymce/dom/TreeWalker","tinymce/util/Tools"],function(a,b,c){return function(d,e){function f(a){d.getBody().style.webkitUserSelect="",(a||o)&&(d.$("td[data-mce-selected],th[data-mce-selected]").removeAttr("data-mce-selected"),o=!1)}function g(a,b){return a&&b?a===n.getParent(b,"table"):!1}function h(b){var c,f,h=b.target;if(!m&&h!==l&&(l=h,k&&j)){if(f=n.getParent(h,"td,th"),g(k,f)||(f=n.getParent(k,"td,th")),j===f&&!o)return;if(e(!0),g(k,f)){b.preventDefault(),i||(i=new a(d,k,j),d.getBody().style.webkitUserSelect="none"),i.setEndCell(f),o=!0,c=d.selection.getSel();try{c.removeAllRanges?c.removeAllRanges():c.empty()}catch(p){}}}}var i,j,k,l,m,n=d.dom,o=!0,p=function(){j=i=k=l=null,e(!1)};return d.on("SelectionChange",function(a){o&&a.stopImmediatePropagation()},!0),d.on("MouseDown",function(a){2==a.button||m||(f(),j=n.getParent(a.target,"td,th"),k=n.getParent(j,"table"))}),d.on("mouseover",h),d.on("remove",function(){n.unbind(d.getDoc(),"mouseover",h),f()}),d.on("MouseUp",function(){function a(a,d){var f=new b(a,a);do{if(3==a.nodeType&&0!==c.trim(a.nodeValue).length)return void(d?e.setStart(a,0):e.setEnd(a,a.nodeValue.length));if("BR"==a.nodeName)return void(d?e.setStartBefore(a):e.setEndBefore(a))}while(a=d?f.next():f.prev())}var e,f,g,h,k,l=d.selection;if(j){if(i&&(d.getBody().style.webkitUserSelect=""),f=n.select("td[data-mce-selected],th[data-mce-selected]"),f.length>0){e=n.createRng(),h=f[0],e.setStartBefore(h),e.setEndAfter(h),a(h,1),g=new b(h,n.getParent(f[0],"table"));do if("TD"==h.nodeName||"TH"==h.nodeName){if(!n.getAttrib(h,"data-mce-selected"))break;k=h}while(h=g.next());a(k),l.setRng(e)}d.nodeChanged(),p()}}),d.on("KeyUp Drop SetContent",function(a){f("setcontent"==a.type),p(),m=!1}),d.on("ObjectResizeStart ObjectResized",function(a){m="objectresized"!=a.type}),{clear:f}}}),d("tinymce/tableplugin/Dialogs",["tinymce/util/Tools","tinymce/Env"],function(a,b){var c=a.each;return function(d){function e(){var a=d.settings.color_picker_callback;return a?function(){var b=this;a.call(d,function(a){b.value(a).fire("change")},b.value())}:void 0}function f(a){return{title:"Advanced",type:"form",defaults:{onchange:function(){l(a,this.parents().reverse()[0],"style"==this.name())}},items:[{label:"Style",name:"style",type:"textbox"},{type:"form",padding:0,formItemDefaults:{layout:"grid",alignH:["start","right"]},defaults:{size:7},items:[{label:"Border color",type:"colorbox",name:"borderColor",onaction:e()},{label:"Background color",type:"colorbox",name:"backgroundColor",onaction:e()}]}]}}function g(a){return a?a.replace(/px$/,""):""}function h(a){return/^[0-9]+$/.test(a)&&(a+="px"),a}function i(a){c("left center right".split(" "),function(b){d.formatter.remove("align"+b,{},a)})}function j(a){c("top middle bottom".split(" "),function(b){d.formatter.remove("valign"+b,{},a)})}function k(b,c,d){function e(b,d){return d=d||[],a.each(b,function(a){var b={text:a.text||a.title};a.menu?b.menu=e(a.menu):(b.value=a.value,c&&c(b)),d.push(b)}),d}return e(b,d||[])}function l(a,b,c){var d=b.toJSON(),e=a.parseStyle(d.style);c?(b.find("#borderColor").value(e["border-color"]||"")[0].fire("change"),b.find("#backgroundColor").value(e["background-color"]||"")[0].fire("change")):(e["border-color"]=d.borderColor,e["background-color"]=d.backgroundColor),b.find("#style").value(a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}function m(a,b,c){var d=a.parseStyle(a.getAttrib(c,"style"));d["border-color"]&&(b.borderColor=d["border-color"]),d["background-color"]&&(b.backgroundColor=d["background-color"]),b.style=a.serializeStyle(d)}function n(a,b,d){var e=a.parseStyle(a.getAttrib(b,"style"));c(d,function(a){e[a.name]=a.value}),a.setAttrib(b,"style",a.serializeStyle(a.parseStyle(a.serializeStyle(e))))}var o=this;o.tableProps=function(){o.table(!0)},o.table=function(e){function j(){function c(a,b,d){if("TD"===a.tagName||"TH"===a.tagName)v.setStyle(a,b,d);else if(a.children)for(var e=0;e',p.insertBefore(e,p.firstChild)),i(p),w.align&&d.formatter.apply("align"+w.align,{},p),d.focus(),d.addVisual()})}function o(a,b){function c(a,c){for(var d=0;dd;d++)c.push(d);return c}function C(a,b,c){for(var d,e=a(),f=0;f0?t(f,g,d):[],k=h.length>0?t(m,n,h):[];x(j,a.offsetWidth,i),y(k,a.offsetHeight,i)}function G(a,b,c,d){if(0>b||b>=a.length-1)return"";var e=a[b];if(e)e={value:e,delta:0};else for(var f=a.slice(0,b).reverse(),g=0;g0?e:f}function J(b,c,d){for(var e=D(b),f=a.map(e,function(a){return m(a.colIndex,a.element).x}),g=[],h=0;h1?G(f,h):I(e[h].element,c,d);j=j?j:wa,g.push(j)}return g}function K(a){var b=H(a,"height"),c=parseInt(b,10);return R(b)&&(c=0),!isNaN(c)&&c>0?c:p(a,"height")}function L(b){for(var c=E(b),d=a.map(c,function(a){return f(a.rowIndex,a.element).y}),e=[],g=0;g1?G(d,g):K(c[g].element);i=i?i:xa,e.push(i)}return e}function M(b,c,d,e,f){function g(b){return a.map(b,function(){return 0})}function h(){var a;if(f)a=[100-l[0]];else{var b=Math.max(e,l[0]+d);a=[b-l[0]]}return a}function i(a,b){var c,f=g(l.slice(0,a)),h=g(l.slice(b+1));if(d>=0){var i=Math.max(e,l[b]-d);c=f.concat([d,i-l[b]]).concat(h)}else{var j=Math.max(e,l[a]+d),k=l[a]-j;c=f.concat([j-l[a],k]).concat(h)}return c}function j(a,b){var c,f=g(l.slice(0,b));if(d>=0)c=f.concat([d]);else{var h=Math.max(e,l[b]+d);c=f.concat([h-l[b]])}return c}var k,l=b.slice(0);return k=0===b.length?[]:1===b.length?h():0===c?i(0,1):c>0&&ce;e++)d+=c[e];return d}function O(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.colIndex,a.colIndex+a.colspan,c);return{element:a.element,width:b,colspan:a.colspan}})}function P(b,c){var d=b.getAllCells();return a.map(d,function(a){var b=N(a.rowIndex,a.rowIndex+a.rowspan,c);return{element:a.element,height:b,rowspan:a.rowspan}})}function Q(b,c){var d=b.getAllRows();return a.map(d,function(a,b){return{element:a.element,height:c[b]}})}function R(a){return za.test(a)}function S(a){return Aa.test(a)}function T(b,c,d){function f(b,c){a.each(b,function(a){e.dom.setStyle(a.element,"width",a.width+c),e.dom.setAttrib(a.element,"width",null)})}function g(){return dc;c++){for(e+="",d=0;a>d;d++)e+=""+(h.ie&&h.ie<10?" ":"
              ")+"";e+=""}return e+="",f.undoManager.transact(function(){f.insertContent(e),g=f.dom.get("__mce"),f.dom.setAttrib(g,"id",null),f.$("tr",g).each(function(a,b){f.fire("newrow",{node:b}),f.$("th,td",b).each(function(a,b){f.fire("newcell",{node:b})})}),f.dom.setAttribs(g,f.settings.table_default_attributes||{}),f.dom.setStyles(g,f.settings.table_default_styles||{})}),g}function j(a,b,c){function d(){var d,e,g,h={},i=0;e=f.dom.select("td[data-mce-selected],th[data-mce-selected]"),d=e[0],d||(d=f.selection.getStart()),c&&e.length>0?(k(e,function(a){return h[a.parentNode.parentNode.nodeName]=1}),k(h,function(a){i+=a}),g=1!==i):g=!f.dom.getParent(d,b),a.disabled(g),f.selection.selectorChanged(b,function(b){a.disabled(!b)})}f.initialized?d():f.on("init",d)}function l(){j(this,"table")}function m(){j(this,"td,th")}function n(){j(this,"td,th",!0)}function o(){var a="";a='';for(var b=0;10>b;b++){a+="";for(var c=0;10>c;c++)a+='';a+=""}return a+="
              ",a+=''}function p(a,b,c){var d,e,g,h,i,j=c.getEl().getElementsByTagName("table")[0],k=c.isRtl()||"tl-tr"==c.parent().rel;for(j.nextSibling.innerHTML=a+1+" x "+(b+1),k&&(a=9-a),e=0;10>e;e++)for(d=0;10>d;d++)h=j.rows[e].childNodes[d].firstChild,i=(k?d>=a:a>=d)&&b>=e,f.dom.toggleClass(h,"mce-active",i),i&&(g=h);return g.parentNode}function q(){f.addButton("tableprops",{title:"Table properties",onclick:y.tableProps,icon:"table"}),f.addButton("tabledelete",{title:"Delete table",onclick:g("mceTableDelete")}),f.addButton("tablecellprops",{title:"Cell properties",onclick:g("mceTableCellProps")}),f.addButton("tablemergecells",{title:"Merge cells",onclick:g("mceTableMergeCells")}),f.addButton("tablesplitcells",{title:"Split cell",onclick:g("mceTableSplitCells")}),f.addButton("tableinsertrowbefore",{title:"Insert row before",onclick:g("mceTableInsertRowBefore")}),f.addButton("tableinsertrowafter",{title:"Insert row after",onclick:g("mceTableInsertRowAfter")}),f.addButton("tabledeleterow",{title:"Delete row",onclick:g("mceTableDeleteRow")}),f.addButton("tablerowprops",{title:"Row properties",onclick:g("mceTableRowProps")}),f.addButton("tablecutrow",{title:"Cut row",onclick:g("mceTableCutRow")}),f.addButton("tablecopyrow",{title:"Copy row",onclick:g("mceTableCopyRow")}),f.addButton("tablepasterowbefore",{title:"Paste row before",onclick:g("mceTablePasteRowBefore")}),f.addButton("tablepasterowafter",{title:"Paste row after",onclick:g("mceTablePasteRowAfter")}),f.addButton("tableinsertcolbefore",{title:"Insert column before",onclick:g("mceTableInsertColBefore")}),f.addButton("tableinsertcolafter",{title:"Insert column after",onclick:g("mceTableInsertColAfter")}),f.addButton("tabledeletecol",{title:"Delete column",onclick:g("mceTableDeleteCol")})}function r(a){var b=f.dom.is(a,"table")&&f.getBody().contains(a);return b}function s(){var a=f.settings.table_toolbar;""!==a&&a!==!1&&(a||(a="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"),f.addContextToolbar(r,a))}function t(){return v}function u(a){v=a}var v,w,x=this,y=new d(f);!f.settings.object_resizing||f.settings.table_resize_bars===!1||f.settings.object_resizing!==!0&&"table"!==f.settings.object_resizing||(w=e(f)),f.settings.table_grid===!1?f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",onclick:y.table}):f.addMenuItem("inserttable",{text:"Insert table",icon:"table",context:"table",ariaHideMenu:!0,onclick:function(a){a.aria&&(this.parent().hideAll(),a.stopImmediatePropagation(),y.table())},onshow:function(){p(0,0,this.menu.items()[0])},onhide:function(){var a=this.menu.items()[0].getEl().getElementsByTagName("a");f.dom.removeClass(a,"mce-active"),f.dom.addClass(a[0],"mce-active")},menu:[{type:"container",html:o(),onPostRender:function(){this.lastX=this.lastY=0},onmousemove:function(a){var b,c,d=a.target;"A"==d.tagName.toUpperCase()&&(b=parseInt(d.getAttribute("data-mce-x"),10),c=parseInt(d.getAttribute("data-mce-y"),10),(this.isRtl()||"tl-tr"==this.parent().rel)&&(b=9-b),b===this.lastX&&c===this.lastY||(p(b,c,a.control),this.lastX=b,this.lastY=c))},onclick:function(a){var b=this;"A"==a.target.tagName.toUpperCase()&&(a.preventDefault(),a.stopPropagation(),b.parent().cancel(),f.undoManager.transact(function(){i(b.lastX+1,b.lastY+1)}),f.addVisual())}}]}),f.addMenuItem("tableprops",{text:"Table properties",context:"table",onPostRender:l,onclick:y.tableProps}),f.addMenuItem("deletetable",{text:"Delete table",context:"table",onPostRender:l,cmd:"mceTableDelete"}),f.addMenuItem("cell",{separator:"before",text:"Cell",context:"table",menu:[{text:"Cell properties",onclick:g("mceTableCellProps"),onPostRender:m},{text:"Merge cells",onclick:g("mceTableMergeCells"),onPostRender:n},{text:"Split cell",onclick:g("mceTableSplitCells"),onPostRender:m}]}),f.addMenuItem("row",{text:"Row",context:"table",menu:[{text:"Insert row before",onclick:g("mceTableInsertRowBefore"),onPostRender:m},{text:"Insert row after",onclick:g("mceTableInsertRowAfter"),onPostRender:m},{text:"Delete row",onclick:g("mceTableDeleteRow"),onPostRender:m},{text:"Row properties",onclick:g("mceTableRowProps"),onPostRender:m},{text:"-"},{text:"Cut row",onclick:g("mceTableCutRow"),onPostRender:m},{text:"Copy row",onclick:g("mceTableCopyRow"),onPostRender:m},{text:"Paste row before",onclick:g("mceTablePasteRowBefore"),onPostRender:m},{text:"Paste row after",onclick:g("mceTablePasteRowAfter"),onPostRender:m}]}),f.addMenuItem("column",{text:"Column",context:"table",menu:[{text:"Insert column before",onclick:g("mceTableInsertColBefore"),onPostRender:m},{text:"Insert column after",onclick:g("mceTableInsertColAfter"),onPostRender:m},{text:"Delete column",onclick:g("mceTableDeleteCol"),onPostRender:m}]});var z=[];k("inserttable tableprops deletetable | cell row column".split(" "),function(a){"|"==a?z.push({text:"-"}):z.push(f.menuItems[a])}),f.addButton("table",{type:"menubutton",title:"Table",menu:z}),h.isIE||f.on("click",function(a){a=a.target,"TABLE"===a.nodeName&&(f.selection.select(a),f.nodeChanged())}),x.quirks=new b(f),f.on("Init",function(){x.cellSelection=new c(f,function(a){a&&w.clearBars()}),x.resizeBars=w}),f.on("PreInit",function(){f.serializer.addAttributeFilter("data-mce-cell-padding,data-mce-border,data-mce-border-color",function(a,b){for(var c=a.length;c--;)a[c].attr(b,null)})}),k({mceTableSplitCells:function(a){a.split()},mceTableMergeCells:function(a){var b;b=f.dom.getParent(f.selection.getStart(),"th,td"),f.dom.select("td[data-mce-selected],th[data-mce-selected]").length?a.merge():y.merge(a,b)},mceTableInsertRowBefore:function(a){a.insertRow(!0)},mceTableInsertRowAfter:function(a){a.insertRow()},mceTableInsertColBefore:function(a){a.insertCol(!0)},mceTableInsertColAfter:function(a){a.insertCol()},mceTableDeleteCol:function(a){a.deleteCols()},mceTableDeleteRow:function(a){a.deleteRows()},mceTableCutRow:function(a){v=a.cutRows()},mceTableCopyRow:function(a){v=a.copyRows()},mceTablePasteRowBefore:function(a){a.pasteRows(v,!0)},mceTablePasteRowAfter:function(a){a.pasteRows(v)},mceTableDelete:function(a){w&&w.clearBars(),a.deleteTable()}},function(b,c){f.addCommand(c,function(){var c=new a(f);c&&(b(c),f.execCommand("mceRepaint"),x.cellSelection.clear())})}),k({mceInsertTable:y.table,mceTableProps:function(){y.table(!0)},mceTableRowProps:y.row,mceTableCellProps:y.cell},function(a,b){f.addCommand(b,function(b,c){a(c)})}),q(),s(),f.settings.table_tab_navigation!==!1&&f.on("keydown",function(b){var c,d,e;9==b.keyCode&&(c=f.dom.getParent(f.selection.getStart(),"th,td"),c&&(b.preventDefault(),d=new a(f),e=b.shiftKey?-1:1,f.undoManager.transact(function(){!d.moveRelIdx(c,e)&&e>0&&(d.insertRow(),d.refresh(),d.moveRelIdx(c,e))})))}),x.insertTable=i,x.setClipboardRows=u,x.getClipboardRows=t}var k=f.each;i.add("table",j)})}(this); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/template/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/template/plugin.min.js index 5fddd2d..892ee75 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/template/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/template/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("template",function(a){function b(b){return function(){var c=a.settings.templates;"string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c)}}function c(b){function c(b){function c(b){if(-1==b.indexOf("")){var c="";tinymce.each(a.contentCSS,function(b){c+=''}),b=""+c+""+b+""}b=f(b,"template_preview_replace_values");var e=d.find("iframe")[0].getEl().contentWindow.document;e.open(),e.write(b),e.close()}var g=b.control.value();g.url?tinymce.util.XHR.send({url:g.url,success:function(a){e=a,c(e)}}):(e=g.content,c(e)),d.find("#description")[0].text(b.control.value().description)}var d,e,h=[];return b&&0!==b.length?(tinymce.each(b,function(a){h.push({selected:!h.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),d=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:h,onselect:c}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){g(!1,e)},width:a.getParam("template_popup_width",600),height:a.getParam("template_popup_height",500)}),void d.find("listbox")[0].fire("select")):void a.windowManager.alert("No templates defined")}function d(b,c){function d(a,b){if(a=""+a,a.length0&&(i=k.create("div",null),i.appendChild(j[0].cloneNode(!0))),h(k.select("*",i),function(b){g(b,a.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_cdate_format",a.getLang("template.cdate_format")))),g(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format")))),g(b,a.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(b.innerHTML=l)}),e(i),a.execCommand("mceInsertContent",!1,i.innerHTML),a.addVisual()}var h=tinymce.each;a.addCommand("mceInsertTemplate",g),a.addButton("template",{title:"Insert template",onclick:b(c)}),a.addMenuItem("template",{text:"Insert template",onclick:b(c),context:"insert"}),a.on("PreProcess",function(b){var c=a.dom;h(c.select("div",b.node),function(b){c.hasClass(b,"mceTmpl")&&(h(c.select("*",b),function(b){c.hasClass(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format"))))}),e(b))})})}); \ No newline at end of file +tinymce.PluginManager.add("template",function(a){function b(b){return function(){var c=a.settings.templates;return"function"==typeof c?void c(b):void("string"==typeof c?tinymce.util.XHR.send({url:c,success:function(a){b(tinymce.util.JSON.parse(a))}}):b(c))}}function c(b){function c(b){function c(b){if(-1==b.indexOf("")){var c="";tinymce.each(a.contentCSS,function(b){c+=''});var e=a.settings.body_class||"";-1!=e.indexOf("=")&&(e=a.getParam("body_class","","hash"),e=e[a.id]||""),b=""+c+''+b+""}b=f(b,"template_preview_replace_values");var g=d.find("iframe")[0].getEl().contentWindow.document;g.open(),g.write(b),g.close()}var g=b.control.value();g.url?tinymce.util.XHR.send({url:g.url,success:function(a){e=a,c(e)}}):(e=g.content,c(e)),d.find("#description")[0].text(b.control.value().description)}var d,e,h=[];if(!b||0===b.length){var i=a.translate("No templates defined.");return void a.notificationManager.open({text:i,type:"info"})}tinymce.each(b,function(a){h.push({selected:!h.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),d=a.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:h,onselect:c}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){g(!1,e)},width:a.getParam("template_popup_width",600),height:a.getParam("template_popup_height",500)}),d.find("listbox")[0].fire("select")}function d(b,c){function d(a,b){if(a=""+a,a.length0&&(i=k.create("div",null),i.appendChild(j[0].cloneNode(!0))),h(k.select("*",i),function(b){g(b,a.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_cdate_format",a.getLang("template.cdate_format")))),g(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format")))),g(b,a.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(b.innerHTML=l)}),e(i),a.execCommand("mceInsertContent",!1,i.innerHTML),a.addVisual()}var h=tinymce.each;a.addCommand("mceInsertTemplate",g),a.addButton("template",{title:"Insert template",onclick:b(c)}),a.addMenuItem("template",{text:"Insert template",onclick:b(c),context:"insert"}),a.on("PreProcess",function(b){var c=a.dom;h(c.select("div",b.node),function(b){c.hasClass(b,"mceTmpl")&&(h(c.select("*",b),function(b){c.hasClass(b,a.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(b.innerHTML=d(a.getParam("template_mdate_format",a.getLang("template.mdate_format"))))}),e(b))})})}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/textcolor/plugin.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/textcolor/plugin.min.js index 7ca105a..889c5c4 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/plugins/textcolor/plugin.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/plugins/textcolor/plugin.min.js @@ -1 +1 @@ -tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(){var b,c,d=[];for(c=a.settings.textcolor_map||["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],b=0;b
              '+(c?"×":"")+"
              "}var d,e,f,g,h,k,l,m=this,n=m._id,o=0;for(d=c(),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='',g=d.length-1,k=0;j>k;k++){for(f+="",h=0;i>h;h++)l=k*i+h,l>g?f+="":(e=d[l],f+=b(e.color,e.text));f+=""}if(a.settings.color_picker_callback){for(f+='",f+="",h=0;i>h;h++)f+=b("","Custom color");f+=""}return f+="
              "}function e(b,c){a.undoManager.transact(function(){a.focus(),a.formatter.apply(b,{value:c}),a.nodeChanged()})}function f(b){a.undoManager.transact(function(){a.focus(),a.formatter.remove(b,{value:null},null,!0),a.nodeChanged()})}function g(c){function d(a){k.hidePanel(),k.color(a),e(k.settings.format,a)}function g(){k.hidePanel(),k.resetColor(),f(k.settings.format)}function h(a,b){a.style.background=b,a.setAttribute("data-mce-color",b)}var j,k=this.parent();tinymce.DOM.getParent(c.target,".mce-custom-color-btn")&&(k.hidePanel(),a.settings.color_picker_callback.call(a,function(a){var b,c,e,f=k.panel.getEl().getElementsByTagName("table")[0];for(b=tinymce.map(f.rows[f.rows.length-1].childNodes,function(a){return a.firstChild}),e=0;ee;e++)h(b[e],b[e+1].getAttribute("data-mce-color"));h(c,a),d(a)},b(k.settings.format))),j=c.target.getAttribute("data-mce-color"),j?(this.lastId&&document.getElementById(this.lastId).setAttribute("aria-selected",!1),c.target.setAttribute("aria-selected",!0),this.lastId=c.target.id,"transparent"==j?g():d(j)):null!==j&&k.hidePanel()}function h(){var a=this;a._color?e(a.settings.format,a._color):f(a.settings.format)}var i,j;j=a.settings.textcolor_rows||5,i=a.settings.textcolor_cols||8,a.addButton("forecolor",{type:"colorbutton",tooltip:"Text color",format:"forecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h}),a.addButton("backcolor",{type:"colorbutton",tooltip:"Background color",format:"hilitecolor",panel:{role:"application",ariaRemember:!0,html:d,onclick:g},onclick:h})}); \ No newline at end of file +tinymce.PluginManager.add("textcolor",function(a){function b(b){var c;return a.dom.getParents(a.selection.getStart(),function(a){var d;(d=a.style["forecolor"==b?"color":"background-color"])&&(c=d)}),c}function c(b){var c,d,e=[];for(d=["000000","Black","993300","Burnt orange","333300","Dark olive","003300","Dark green","003366","Dark azure","000080","Navy Blue","333399","Indigo","333333","Very dark gray","800000","Maroon","FF6600","Orange","808000","Olive","008000","Green","008080","Teal","0000FF","Blue","666699","Grayish blue","808080","Gray","FF0000","Red","FF9900","Amber","99CC00","Yellow green","339966","Sea green","33CCCC","Turquoise","3366FF","Royal blue","800080","Purple","999999","Medium gray","FF00FF","Magenta","FFCC00","Gold","FFFF00","Yellow","00FF00","Lime","00FFFF","Aqua","00CCFF","Sky blue","993366","Red violet","FFFFFF","White","FF99CC","Pink","FFCC99","Peach","FFFF99","Light yellow","CCFFCC","Pale green","CCFFFF","Pale cyan","99CCFF","Light sky blue","CC99FF","Plum"],d=a.settings.textcolor_map||d,d=a.settings[b+"_map"]||d,c=0;c
              '+(c?"×":"")+"
              "}var d,e,f,g,h,k,l,m,n=this,o=n._id,p=0;for(m=n.settings.origin,d=c(m),d.push({text:tinymce.translate("No color"),color:"transparent"}),f='',g=d.length-1,k=0;k",h=0;hg?f+="":(e=d[l],f+=b(e.color,e.text));f+=""}if(a.settings.color_picker_callback){for(f+='",f+="",h=0;h]*?>/g," ").replace(/ | /gi," "),b=b.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),b=b.replace(d,"");var f=b.match(c);f&&(e=f.length)}return e}}); \ No newline at end of file +tinymce.PluginManager.add("wordcount",function(a){function b(){a.theme.panel.find("#wordcount").text(["Words: {0}",e.getCount()])}var c,d,e=this;c=a.getParam("wordcount_countregex",/[\w\u2019\x27\-\u00C0-\u1FFF]+/g),d=a.getParam("wordcount_cleanregex",/[0-9.(),;:!?%#$?\x27\x22_+=\\\/\-]*/g),a.on("init",function(){var c=a.theme.panel&&a.theme.panel.find("#statusbar")[0];c&&tinymce.util.Delay.setEditorTimeout(a,function(){c.insert({type:"label",name:"wordcount",text:["Words: {0}",e.getCount()],classes:"wordcount",disabled:a.settings.readonly},0),a.on("setcontent beforeaddundo",b),a.on("keyup",function(a){32==a.keyCode&&b()})},0)}),e.getCount=function(){var b=a.getContent({format:"raw"}),e=0;if(b){b=b.replace(/\.\.\./g," "),b=b.replace(/<.[^<>]*?>/g," ").replace(/ | /gi," "),b=b.replace(/(\w+)(&#?[a-z0-9]+;)+(\w+)/i,"$1$3").replace(/&.+?;/g," "),b=b.replace(d,"");var f=b.match(c);f&&(e=f.length)}return e}}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.inline.min.css b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.inline.min.css index 9586839..1030094 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.inline.min.css +++ b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.inline.min.css @@ -1 +1 @@ -.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} \ No newline at end of file +.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #f00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #bbb}td[data-mce-selected],th[data-mce-selected]{background-color:#39f !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2d8ac7}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #7acaff}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2d8ac7}.mce-resize-bar-dragging{background-color:blue;opacity:.25;filter:alpha(opacity=25);zoom:1} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.min.css b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.min.css index 2d4f52a..af85f74 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.min.css +++ b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/content.min.css @@ -1 +1 @@ -body{background-color:#FFF;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#F0F0EE;scrollbar-arrow-color:#676662;scrollbar-base-color:#F0F0EE;scrollbar-darkshadow-color:#DDD;scrollbar-face-color:#E0E0DD;scrollbar-highlight-color:#F0F0EE;scrollbar-shadow-color:#F0F0EE;scrollbar-track-color:#F5F5F5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-object{border:1px dotted #3A3A3A;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px!important;height:9px!important;border:1px dotted #3A3A3A;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#AAA}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#AAA;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid red;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid green;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #BBB}td.mce-item-selected,th.mce-item-selected{background-color:#39f!important}.mce-edit-focus{outline:1px dotted #333} \ No newline at end of file +body{background-color:#fff;color:#000;font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px;scrollbar-3dlight-color:#f0f0ee;scrollbar-arrow-color:#676662;scrollbar-base-color:#f0f0ee;scrollbar-darkshadow-color:#ddd;scrollbar-face-color:#e0e0dd;scrollbar-highlight-color:#f0f0ee;scrollbar-shadow-color:#f0f0ee;scrollbar-track-color:#f5f5f5}td,th{font-family:Verdana,Arial,Helvetica,sans-serif;font-size:11px}.mce-content-body .mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:black;font-family:Arial;font-size:11px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;line-height:normal;font-weight:normal;text-align:left;-webkit-tap-highlight-color:transparent;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-object{border:1px dotted #3a3a3a;background:#d5d5d5 url(img/object.gif) no-repeat center}.mce-preview-object{display:inline-block;position:relative;margin:0 2px 0 2px;line-height:0;border:1px solid gray}.mce-preview-object .mce-shim{position:absolute;top:0;left:0;width:100%;height:100%;background:url(data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)}figure.align-left{float:left}figure.align-right{float:right}figure.image.align-center{display:table;margin-left:auto;margin-right:auto}figure.image{display:inline-block;border:1px solid gray;margin:0 2px 0 1px;background:#f5f2f0}figure.image img{margin:8px 8px 0 8px}figure.image figcaption{margin:6px 8px 6px 8px;text-align:center}.mce-preview-object[data-mce-selected="2"] .mce-shim{display:none}.mce-pagebreak{cursor:default;display:block;border:0;width:100%;height:5px;border:1px dashed #666;margin-top:15px;page-break-before:always}@media print{.mce-pagebreak{border:0}}.mce-item-anchor{cursor:default;display:inline-block;-webkit-user-select:all;-webkit-user-modify:read-only;-moz-user-select:all;-moz-user-modify:read-only;user-select:all;user-modify:read-only;width:9px !important;height:9px !important;border:1px dotted #3a3a3a;background:#d5d5d5 url(img/anchor.gif) no-repeat center}.mce-nbsp,.mce-shy{background:#aaa}.mce-shy::after{content:'-'}hr{cursor:default}.mce-match-marker{background:#aaa;color:#fff}.mce-match-marker-selected{background:#39f;color:#fff}.mce-spellchecker-word{border-bottom:2px solid #f00;cursor:default}.mce-spellchecker-grammar{border-bottom:2px solid #008000;cursor:default}.mce-item-table,.mce-item-table td,.mce-item-table th,.mce-item-table caption{border:1px dashed #bbb}td[data-mce-selected],th[data-mce-selected]{background-color:#39f !important}.mce-edit-focus{outline:1px dotted #333}.mce-content-body *[contentEditable=false] *[contentEditable=true]:focus{outline:2px solid #2d8ac7}.mce-content-body *[contentEditable=false] *[contentEditable=true]:hover{outline:2px solid #7acaff}.mce-content-body *[contentEditable=false][data-mce-selected]{outline:2px solid #2d8ac7}.mce-resize-bar-dragging{background-color:blue;opacity:.25;filter:alpha(opacity=25);zoom:1} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.eot b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.eot index c8abe59..b144ba0 100644 Binary files a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.eot and b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.eot differ diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.svg b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.svg index df07ee7..b4ee6f4 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.svg +++ b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.svg @@ -6,57 +6,58 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.ttf b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.ttf index 31554f6..a983e2d 100644 Binary files a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.ttf and b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.ttf differ diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.woff b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.woff index 6be9a1d..d8962df 100644 Binary files a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.woff and b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce-small.woff differ diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.eot b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.eot index e116242..09fd441 100644 Binary files a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.eot and b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.eot differ diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.svg b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.svg index a4c92e0..8688c1c 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.svg +++ b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.svg @@ -6,78 +6,124 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.ttf b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.ttf index 422ff56..bf22ca6 100644 Binary files a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.ttf and b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.ttf differ diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.woff b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.woff index bb780bd..61cbafb 100644 Binary files a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.woff and b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/fonts/tinymce.woff differ diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.ie7.min.css b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.ie7.min.css index 27af633..2e64b89 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.ie7.min.css +++ b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.ie7.min.css @@ -1 +1 @@ -.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0px;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0px;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary{min-width:50px;color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#fff}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-alignnone{-ie7-icon:"\e003"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-rotateleft{-ie7-icon:"\eaa8"}.mce-i-rotateright{-ie7-icon:"\eaa9"}.mce-i-crop{-ie7-icon:"\ee78"}.mce-i-editimage{-ie7-icon:"\e914"}.mce-i-options{-ie7-icon:"\ec6a"}.mce-i-flipv{-ie7-icon:"\eaaa"}.mce-i-fliph{-ie7-icon:"\eaac"}.mce-i-zoomin{-ie7-icon:"\eb35"}.mce-i-zoomout{-ie7-icon:"\eb36"}.mce-i-sun{-ie7-icon:"\eccc"}.mce-i-moon{-ie7-icon:"\eccd"}.mce-i-arrowleft{-ie7-icon:"\edc0"}.mce-i-arrowright{-ie7-icon:"\edb8"}.mce-i-drop{-ie7-icon:"\e934"}.mce-i-contrast{-ie7-icon:"\ecd4"}.mce-i-sharpen{-ie7-icon:"\eba7"}.mce-i-palette{-ie7-icon:"\e92a"}.mce-i-resize2{-ie7-icon:"\edf9"}.mce-i-orientation{-ie7-icon:"\e601"}.mce-i-invert{-ie7-icon:"\e602"}.mce-i-gamma{-ie7-icon:"\e600"}.mce-i-remove{-ie7-icon:"\ed6a"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#BBB} \ No newline at end of file +.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:rgba(0,0,0,0.2);border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#f0f0f0;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:rgba(0,0,0,0.2);border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#f0f0f0;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce';font-style:normal;font-weight:normal;font-size:16px;line-height:16px;vertical-align:text-top;-webkit-font-smoothing:antialiased;display:inline-block;background:transparent center center;width:16px;height:16px;color:#333;-ie7-icon:' '}.mce-btn-small .mce-ico{font-family:'tinymce-small'}.mce-ico,i.mce-i-checkbox{zoom:expression(this.runtimeStyle['zoom'] = '1', this.innerHTML = this.currentStyle['-ie7-icon'].substr(1, 1) + ' ')}.mce-i-save{-ie7-icon:"\e000"}.mce-i-newdocument{-ie7-icon:"\e001"}.mce-i-fullpage{-ie7-icon:"\e002"}.mce-i-alignleft{-ie7-icon:"\e003"}.mce-i-aligncenter{-ie7-icon:"\e004"}.mce-i-alignright{-ie7-icon:"\e005"}.mce-i-alignjustify{-ie7-icon:"\e006"}.mce-i-alignnone{-ie7-icon:"\e003"}.mce-i-cut{-ie7-icon:"\e007"}.mce-i-paste{-ie7-icon:"\e008"}.mce-i-searchreplace{-ie7-icon:"\e009"}.mce-i-bullist{-ie7-icon:"\e00a"}.mce-i-numlist{-ie7-icon:"\e00b"}.mce-i-indent{-ie7-icon:"\e00c"}.mce-i-outdent{-ie7-icon:"\e00d"}.mce-i-blockquote{-ie7-icon:"\e00e"}.mce-i-undo{-ie7-icon:"\e00f"}.mce-i-redo{-ie7-icon:"\e010"}.mce-i-link{-ie7-icon:"\e011"}.mce-i-unlink{-ie7-icon:"\e012"}.mce-i-anchor{-ie7-icon:"\e013"}.mce-i-image{-ie7-icon:"\e014"}.mce-i-media{-ie7-icon:"\e015"}.mce-i-help{-ie7-icon:"\e016"}.mce-i-code{-ie7-icon:"\e017"}.mce-i-insertdatetime{-ie7-icon:"\e018"}.mce-i-preview{-ie7-icon:"\e019"}.mce-i-forecolor{-ie7-icon:"\e01a"}.mce-i-backcolor{-ie7-icon:"\e01a"}.mce-i-table{-ie7-icon:"\e01b"}.mce-i-hr{-ie7-icon:"\e01c"}.mce-i-removeformat{-ie7-icon:"\e01d"}.mce-i-subscript{-ie7-icon:"\e01e"}.mce-i-superscript{-ie7-icon:"\e01f"}.mce-i-charmap{-ie7-icon:"\e020"}.mce-i-emoticons{-ie7-icon:"\e021"}.mce-i-print{-ie7-icon:"\e022"}.mce-i-fullscreen{-ie7-icon:"\e023"}.mce-i-spellchecker{-ie7-icon:"\e024"}.mce-i-nonbreaking{-ie7-icon:"\e025"}.mce-i-template{-ie7-icon:"\e026"}.mce-i-pagebreak{-ie7-icon:"\e027"}.mce-i-restoredraft{-ie7-icon:"\e028"}.mce-i-untitled{-ie7-icon:"\e029"}.mce-i-bold{-ie7-icon:"\e02a"}.mce-i-italic{-ie7-icon:"\e02b"}.mce-i-underline{-ie7-icon:"\e02c"}.mce-i-strikethrough{-ie7-icon:"\e02d"}.mce-i-visualchars{-ie7-icon:"\e02e"}.mce-i-ltr{-ie7-icon:"\e02f"}.mce-i-rtl{-ie7-icon:"\e030"}.mce-i-copy{-ie7-icon:"\e031"}.mce-i-resize{-ie7-icon:"\e032"}.mce-i-browse{-ie7-icon:"\e034"}.mce-i-pastetext{-ie7-icon:"\e035"}.mce-i-rotateleft{-ie7-icon:"\eaa8"}.mce-i-rotateright{-ie7-icon:"\eaa9"}.mce-i-crop{-ie7-icon:"\ee78"}.mce-i-editimage{-ie7-icon:"\e914"}.mce-i-options{-ie7-icon:"\ec6a"}.mce-i-flipv{-ie7-icon:"\eaaa"}.mce-i-fliph{-ie7-icon:"\eaac"}.mce-i-zoomin{-ie7-icon:"\eb35"}.mce-i-zoomout{-ie7-icon:"\eb36"}.mce-i-sun{-ie7-icon:"\eccc"}.mce-i-moon{-ie7-icon:"\eccd"}.mce-i-arrowleft{-ie7-icon:"\edc0"}.mce-i-arrowright{-ie7-icon:"\edb8"}.mce-i-drop{-ie7-icon:"\e934"}.mce-i-contrast{-ie7-icon:"\ecd4"}.mce-i-sharpen{-ie7-icon:"\eba7"}.mce-i-palette{-ie7-icon:"\e92a"}.mce-i-resize2{-ie7-icon:"\edf9"}.mce-i-orientation{-ie7-icon:"\e601"}.mce-i-invert{-ie7-icon:"\e602"}.mce-i-gamma{-ie7-icon:"\e600"}.mce-i-remove{-ie7-icon:"\ed6a"}.mce-i-codesample{-ie7-icon:"\e603"}.mce-i-checkbox,.mce-i-selected{-ie7-icon:"\e033"}.mce-i-selected{visibility:hidden}.mce-i-backcolor{background:#bbb} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.min.css b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.min.css index 22e9d2f..4359855 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.min.css +++ b/copy_this/modules/bla/bla-tinymce/tinymce/skins/lightgray/skin.min.css @@ -1 +1 @@ -.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:0 0;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:400;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container [unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit!important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#FFF;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:700;font-size:20px;line-height:16px;color:#707070}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid #fff}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:#000}.mce-imagepanel{overflow:auto;background:#000}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#AAA;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid rgba(0,0,0,.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background:0 0;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,.2);border:1px solid rgba(0,0,0,.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,.2);border-bottom-color:rgba(0,0,0,.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background:0 0;background:#fff;position:fixed;top:0;left:0;opacity:0;-webkit-transition:opacity 150ms ease-in;transition:opacity 150ms ease-in}.mce-window.mce-in{opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:15px;top:9px;font-size:20px;font-weight:700;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-close:hover{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:700;text-rendering:optimizelegibility;padding-right:10px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:#fff;max-width:200px;padding:5px 8px 4px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-btn{border:1px solid #b1b1b1;border-color:transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary{min-width:50px;color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:0 0;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right,#fff,rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom,rgba(0,0,0,0),#000)}.mce-colorpicker-selector1{background:0 0;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid #000;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid #fff;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9E9E9E}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,.2);width:100%;height:100%}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-error{color:#a00}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:0 0;filter:none}.mce-menubar{border:1px solid rgba(217,217,217,.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn span{color:#333;margin-right:2px;line-height:20px;*line-height:16px}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:400;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:#fff}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:#fff}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:#fff}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:#fff}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:#fff}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:#fff}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:#fff}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:#fff;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:0 0;border-bottom:1px solid rgba(0,0,0,.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:#fff}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);background:0 0;z-index:1000;padding:5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#e3e3e3;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s;height:28px;resize:none;padding:0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url(img/loader.gif) no-repeat center center}.mce-throbber-inline{position:static;height:50px}@font-face{font-family:tinymce;src:url(fonts/tinymce.eot);src:url(fonts/tinymce.eot?#iefix) format('embedded-opentype'),url(fonts/tinymce.woff) format('woff'),url(fonts/tinymce.ttf) format('truetype'),url(fonts/tinymce.svg#tinymce) format('svg');font-weight:400;font-style:normal}@font-face{font-family:tinymce-small;src:url(fonts/tinymce-small.eot);src:url(fonts/tinymce-small.eot?#iefix) format('embedded-opentype'),url(fonts/tinymce-small.woff) format('woff'),url(fonts/tinymce-small.ttf) format('truetype'),url(fonts/tinymce-small.svg#tinymce) format('svg');font-weight:400;font-style:normal}.mce-ico{font-family:tinymce,Arial;font-style:normal;font-weight:400;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:tinymce-small,Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-untitled:before{content:"\e029"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e914"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\edb8"}.mce-i-drop:before{content:"\e934"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-palette:before{content:"\e92a"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb} \ No newline at end of file +.mce-container,.mce-container *,.mce-widget,.mce-widget *,.mce-reset{margin:0;padding:0;border:0;outline:0;vertical-align:top;background:transparent;text-decoration:none;color:#333;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;text-shadow:none;float:none;position:static;width:auto;height:auto;white-space:nowrap;cursor:inherit;-webkit-tap-highlight-color:transparent;line-height:normal;font-weight:normal;text-align:left;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;box-sizing:content-box;direction:ltr;max-width:none}.mce-widget button{-moz-box-sizing:border-box;-webkit-box-sizing:border-box;box-sizing:border-box}.mce-container *[unselectable]{-moz-user-select:none;-webkit-user-select:none;-o-user-select:none;user-select:none}.mce-fade{opacity:0;-webkit-transition:opacity .15s linear;transition:opacity .15s linear}.mce-fade.mce-in{opacity:1}.mce-tinymce{visibility:inherit !important;position:relative}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%;z-index:100}div.mce-fullscreen{position:fixed;top:0;left:0;width:100%;height:auto}.mce-tinymce{display:block}.mce-wordcount{position:absolute;top:0;right:0;padding:8px}div.mce-edit-area{background:#fff;filter:none}.mce-statusbar{position:relative}.mce-statusbar .mce-container-body{position:relative}.mce-fullscreen .mce-resizehandle{display:none}.mce-charmap{border-collapse:collapse}.mce-charmap td{cursor:default;border:1px solid rgba(0,0,0,0.2);width:20px;height:20px;line-height:20px;text-align:center;vertical-align:middle;padding:2px}.mce-charmap td div{text-align:center}.mce-charmap td:hover{background:#d9d9d9}.mce-grid td.mce-grid-cell div{border:1px solid #d6d6d6;width:15px;height:15px;margin:0;cursor:pointer}.mce-grid td.mce-grid-cell div:focus{border-color:#3498db}.mce-grid td.mce-grid-cell div[disabled]{cursor:not-allowed}.mce-grid{border-spacing:2px;border-collapse:separate}.mce-grid a{display:block;border:1px solid transparent}.mce-grid a:hover,.mce-grid a:focus{border-color:#3498db}.mce-grid-border{margin:0 4px 0 4px}.mce-grid-border a{border-color:#d6d6d6;width:13px;height:13px}.mce-grid-border a:hover,.mce-grid-border a.mce-active{border-color:#3498db;background:#3498db}.mce-text-center{text-align:center}div.mce-tinymce-inline{width:100%}.mce-colorbtn-trans div{text-align:center;vertical-align:middle;font-weight:bold;font-size:20px;line-height:16px;color:#707070}.mce-monospace{font-family:"Courier New",Courier,monospace}.mce-toolbar-grp{padding:2px 0}.mce-toolbar-grp .mce-flow-layout-item{margin-bottom:0}.mce-rtl .mce-wordcount{left:0;right:auto}.mce-croprect-container{position:absolute;top:0;left:0}.mce-croprect-handle{position:absolute;top:0;left:0;width:20px;height:20px;border:2px solid white}.mce-croprect-handle-nw{border-width:2px 0 0 2px;margin:-2px 0 0 -2px;cursor:nw-resize;top:100px;left:100px}.mce-croprect-handle-ne{border-width:2px 2px 0 0;margin:-2px 0 0 -20px;cursor:ne-resize;top:100px;left:200px}.mce-croprect-handle-sw{border-width:0 0 2px 2px;margin:-20px 2px 0 -2px;cursor:sw-resize;top:200px;left:100px}.mce-croprect-handle-se{border-width:0 2px 2px 0;margin:-20px 0 0 -20px;cursor:se-resize;top:200px;left:200px}.mce-croprect-handle-move{position:absolute;cursor:move;border:0}.mce-croprect-block{opacity:.3;filter:alpha(opacity=30);zoom:1;position:absolute;background:black}.mce-croprect-handle:focus{border-color:#3498db}.mce-croprect-handle-move:focus{outline:1px solid #3498db}.mce-imagepanel{overflow:auto;background:black}.mce-imagepanel img{position:absolute}.mce-imagetool.mce-btn .mce-ico{display:block;width:20px;height:20px;text-align:center;line-height:20px;font-size:20px;padding:5px}.mce-arrow-up{margin-top:12px}.mce-arrow-down{margin-top:-12px}.mce-arrow:before,.mce-arrow:after{position:absolute;left:50%;display:block;width:0;height:0;border-style:solid;border-color:transparent;content:""}.mce-arrow.mce-arrow-up:before{top:-9px;border-bottom-color:rgba(0,0,0,0.2);border-width:0 9px 9px;margin-left:-9px}.mce-arrow.mce-arrow-down:before{bottom:-9px;border-top-color:rgba(0,0,0,0.2);border-width:9px 9px 0;margin-left:-9px}.mce-arrow.mce-arrow-up:after{top:-8px;border-bottom-color:#f0f0f0;border-width:0 8px 8px;margin-left:-8px}.mce-arrow.mce-arrow-down:after{bottom:-8px;border-top-color:#f0f0f0;border-width:8px 8px 0;margin-left:-8px}.mce-arrow.mce-arrow-left:before,.mce-arrow.mce-arrow-left:after{margin:0}.mce-arrow.mce-arrow-left:before{left:8px}.mce-arrow.mce-arrow-left:after{left:9px}.mce-arrow.mce-arrow-right:before,.mce-arrow.mce-arrow-right:after{left:auto;margin:0}.mce-arrow.mce-arrow-right:before{right:8px}.mce-arrow.mce-arrow-right:after{right:9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:before{left:-9px;top:50%;border-right-color:rgba(0,0,0,0.2);border-width:9px 9px 9px 0;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left:after{left:-8px;top:50%;border-right-color:#f0f0f0;border-width:8px 8px 8px 0;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-left{margin-left:12px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:before{right:-9px;top:50%;border-left-color:rgba(0,0,0,0.2);border-width:9px 0 9px 9px;margin-top:-9px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right:after{right:-8px;top:50%;border-left-color:#f0f0f0;border-width:8px 0 8px 8px;margin-top:-8px}.mce-arrow.mce-arrow-center.mce-arrow.mce-arrow-right{margin-left:-14px}.mce-container,.mce-container-body{display:block}.mce-autoscroll{overflow:hidden}.mce-scrollbar{position:absolute;width:7px;height:100%;top:2px;right:2px;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-scrollbar-h{top:auto;right:auto;left:2px;bottom:2px;width:100%;height:7px}.mce-scrollbar-thumb{position:absolute;background-color:#000;border:1px solid #888;border-color:rgba(85,85,85,0.6);width:5px;height:100%}.mce-scrollbar-h .mce-scrollbar-thumb{width:100%;height:5px}.mce-scrollbar:hover,.mce-scrollbar.mce-active{background-color:#aaa;opacity:.6;filter:alpha(opacity=60);zoom:1}.mce-scroll{position:relative}.mce-panel{border:0 solid #cacaca;border:0 solid rgba(0,0,0,0.2);background-color:#f0f0f0}.mce-floatpanel{position:absolute}.mce-floatpanel.mce-fixed{position:fixed}.mce-floatpanel .mce-arrow,.mce-floatpanel .mce-arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.mce-floatpanel .mce-arrow{border-width:11px}.mce-floatpanel .mce-arrow:after{border-width:10px;content:""}.mce-floatpanel.mce-popover{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;top:0;left:0;background:#fff;border:1px solid rgba(0,0,0,0.2);border:1px solid rgba(0,0,0,0.25)}.mce-floatpanel.mce-popover.mce-bottom{margin-top:10px;*margin-top:0}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow{left:50%;margin-left:-11px;border-top-width:0;border-bottom-color:rgba(0,0,0,0.2);border-bottom-color:rgba(0,0,0,0.25);top:-11px}.mce-floatpanel.mce-popover.mce-bottom>.mce-arrow:after{top:1px;margin-left:-10px;border-top-width:0;border-bottom-color:#fff}.mce-floatpanel.mce-popover.mce-bottom.mce-start{margin-left:-22px}.mce-floatpanel.mce-popover.mce-bottom.mce-start>.mce-arrow{left:20px}.mce-floatpanel.mce-popover.mce-bottom.mce-end{margin-left:22px}.mce-floatpanel.mce-popover.mce-bottom.mce-end>.mce-arrow{right:10px;left:auto}.mce-fullscreen{border:0;padding:0;margin:0;overflow:hidden;height:100%}div.mce-fullscreen{position:fixed;top:0;left:0}#mce-modal-block{opacity:0;filter:alpha(opacity=0);zoom:1;position:fixed;left:0;top:0;width:100%;height:100%;background:#000}#mce-modal-block.mce-in{opacity:.3;filter:alpha(opacity=30);zoom:1}.mce-window-move{cursor:move}.mce-window{filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;background:#fff;position:fixed;top:0;left:0;opacity:0;transform:scale(.1);transition:transform 100ms ease-in,opacity 150ms ease-in}.mce-window.mce-in{transform:scale(1);opacity:1}.mce-window-head{padding:9px 15px;border-bottom:1px solid #c5c5c5;position:relative}.mce-window-head .mce-close{position:absolute;right:0;top:0;height:38px;width:38px;text-align:center;cursor:pointer}.mce-window-head .mce-close i{color:#858585}.mce-close:hover i{color:#adadad}.mce-window-head .mce-title{line-height:20px;font-size:20px;font-weight:bold;text-rendering:optimizelegibility;padding-right:20px}.mce-window .mce-container-body{display:block}.mce-foot{display:block;background-color:#fff;border-top:1px solid #c5c5c5}.mce-window-head .mce-dragh{position:absolute;top:0;left:0;cursor:move;width:90%;height:100%}.mce-window iframe{width:100%;height:100%}.mce-window-body .mce-listbox{border-color:#ccc}.mce-rtl .mce-window-head .mce-close{position:absolute;right:auto;left:15px}.mce-rtl .mce-window-head .mce-dragh{left:auto;right:0}.mce-rtl .mce-window-head .mce-title{direction:rtl;text-align:right}.mce-tooltip{position:absolute;padding:5px;opacity:.8;filter:alpha(opacity=80);zoom:1}.mce-tooltip-inner{font-size:11px;background-color:#000;color:white;max-width:200px;padding:5px 8px 4px 8px;text-align:center;white-space:normal}.mce-tooltip-arrow{position:absolute;width:0;height:0;line-height:0;border:5px dashed #000}.mce-tooltip-arrow-n{border-bottom-color:#000}.mce-tooltip-arrow-s{border-top-color:#000}.mce-tooltip-arrow-e{border-left-color:#000}.mce-tooltip-arrow-w{border-right-color:#000}.mce-tooltip-nw,.mce-tooltip-sw{margin-left:-14px}.mce-tooltip-n .mce-tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-nw .mce-tooltip-arrow{top:0;left:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-ne .mce-tooltip-arrow{top:0;right:10px;border-bottom-style:solid;border-top:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-s .mce-tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-sw .mce-tooltip-arrow{bottom:0;left:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-se .mce-tooltip-arrow{bottom:0;right:10px;border-top-style:solid;border-bottom:none;border-left-color:transparent;border-right-color:transparent}.mce-tooltip-e .mce-tooltip-arrow{right:0;top:50%;margin-top:-5px;border-left-style:solid;border-right:none;border-top-color:transparent;border-bottom-color:transparent}.mce-tooltip-w .mce-tooltip-arrow{left:0;top:50%;margin-top:-5px;border-right-style:solid;border-left:none;border-top-color:transparent;border-bottom-color:transparent}.mce-progress{display:inline-block;position:relative;height:20px}.mce-progress .mce-bar-container{display:inline-block;width:100px;height:100%;margin-right:8px;border:1px solid #ccc;overflow:hidden}.mce-progress .mce-text{display:inline-block;margin-top:auto;margin-bottom:auto;font-size:14px;width:40px;color:#333}.mce-bar{display:block;width:0;height:100%;background-color:#d7d7d7;-webkit-transition:width .2s ease;transition:width .2s ease}.mce-notification{position:absolute;background-color:#f0f0f0;padding:5px;margin-top:5px;border-width:1px;border-style:solid;border-color:#ccc;transition:transform 100ms ease-in,opacity 150ms ease-in;opacity:0}.mce-notification.mce-in{opacity:1}.mce-notification-success{background-color:#dff0d8;border-color:#d6e9c6}.mce-notification-info{background-color:#d9edf7;border-color:#779ecb}.mce-notification-warning{background-color:#fcf8e3;border-color:#faebcc}.mce-notification-error{background-color:#f2dede;border-color:#ebccd1}.mce-notification.mce-has-close{padding-right:15px}.mce-notification .mce-ico{margin-top:5px}.mce-notification-inner{display:inline-block;font-size:14px;margin:5px 8px 4px 8px;text-align:center;white-space:normal;color:#31708f}.mce-notification-inner a{text-decoration:underline;cursor:pointer}.mce-notification .mce-progress{margin-right:8px}.mce-notification .mce-progress .mce-text{margin-top:5px}.mce-notification *,.mce-notification .mce-progress .mce-text{color:#333}.mce-notification .mce-progress .mce-bar-container{border-color:#ccc}.mce-notification .mce-progress .mce-bar-container .mce-bar{background-color:#333}.mce-notification-success *,.mce-notification-success .mce-progress .mce-text{color:#3c763d}.mce-notification-success .mce-progress .mce-bar-container{border-color:#d6e9c6}.mce-notification-success .mce-progress .mce-bar-container .mce-bar{background-color:#3c763d}.mce-notification-info *,.mce-notification-info .mce-progress .mce-text{color:#31708f}.mce-notification-info .mce-progress .mce-bar-container{border-color:#779ecb}.mce-notification-info .mce-progress .mce-bar-container .mce-bar{background-color:#31708f}.mce-notification-warning *,.mce-notification-warning .mce-progress .mce-text{color:#8a6d3b}.mce-notification-warning .mce-progress .mce-bar-container{border-color:#faebcc}.mce-notification-warning .mce-progress .mce-bar-container .mce-bar{background-color:#8a6d3b}.mce-notification-error *,.mce-notification-error .mce-progress .mce-text{color:#a94442}.mce-notification-error .mce-progress .mce-bar-container{border-color:#ebccd1}.mce-notification-error .mce-progress .mce-bar-container .mce-bar{background-color:#a94442}.mce-notification .mce-close{position:absolute;top:6px;right:8px;font-size:20px;font-weight:bold;line-height:20px;color:#858585;cursor:pointer;height:20px;overflow:hidden}.mce-abs-layout{position:relative}body .mce-abs-layout-item,.mce-abs-end{position:absolute}.mce-abs-end{width:1px;height:1px}.mce-container-body.mce-abs-layout{overflow:hidden}.mce-btn{border:1px solid #b1b1b1;border-color:transparent transparent transparent transparent;position:relative;text-shadow:0 1px 1px rgba(255,255,255,0.75);display:inline-block;*display:inline;*zoom:1;background-color:#f0f0f0}.mce-btn:hover,.mce-btn:focus{color:#333;background-color:#e3e3e3;border-color:#ccc}.mce-btn.mce-disabled button,.mce-btn.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-btn.mce-active,.mce-btn.mce-active:hover{background-color:#dbdbdb;border-color:#ccc}.mce-btn:active{background-color:#e0e0e0;border-color:#ccc}.mce-btn button{padding:4px 8px;font-size:14px;line-height:20px;*line-height:16px;cursor:pointer;color:#333;text-align:center;overflow:visible;-webkit-appearance:none}.mce-btn button::-moz-focus-inner{border:0;padding:0}.mce-btn i{text-shadow:1px 1px none}.mce-primary.mce-btn-has-text{min-width:50px}.mce-primary{color:#fff;border:1px solid transparent;border-color:transparent;background-color:#2d8ac7}.mce-primary:hover,.mce-primary:focus{background-color:#257cb6;border-color:transparent}.mce-primary.mce-disabled button,.mce-primary.mce-disabled:hover button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-primary.mce-active,.mce-primary.mce-active:hover,.mce-primary:not(.mce-disabled):active{background-color:#206ea1}.mce-primary button,.mce-primary button i{color:#fff;text-shadow:1px 1px none}.mce-btn .mce-txt{font-size:inherit;line-height:inherit;color:inherit}.mce-btn-large button{padding:9px 14px;font-size:16px;line-height:normal}.mce-btn-large i{margin-top:2px}.mce-btn-small button{padding:1px 5px;font-size:12px;*padding-bottom:2px}.mce-btn-small i{line-height:20px;vertical-align:top;*line-height:18px}.mce-btn .mce-caret{margin-top:8px;margin-left:0}.mce-btn-small .mce-caret{margin-top:8px;margin-left:0}.mce-caret{display:inline-block;*display:inline;*zoom:1;width:0;height:0;vertical-align:top;border-top:4px solid #333;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.mce-disabled .mce-caret{border-top-color:#aaa}.mce-caret.mce-up{border-bottom:4px solid #333;border-top:0}.mce-btn-flat{border:0;background:transparent;filter:none}.mce-btn-flat:hover,.mce-btn-flat.mce-active,.mce-btn-flat:focus,.mce-btn-flat:active{border:0;background:#e6e6e6;filter:none}.mce-btn-has-text .mce-ico{padding-right:5px}.mce-rtl .mce-btn button{direction:rtl}.mce-btn-group .mce-btn{border-width:1px;margin:0;margin-left:2px}.mce-btn-group:not(:first-child){border-left:1px solid #d9d9d9;padding-left:3px;margin-left:3px}.mce-btn-group .mce-first{margin-left:0}.mce-btn-group .mce-btn.mce-flow-layout-item{margin:0}.mce-rtl .mce-btn-group .mce-btn{margin-left:0;margin-right:2px}.mce-rtl .mce-btn-group .mce-first{margin-right:0}.mce-rtl .mce-btn-group:not(:first-child){border-left:none;border-right:1px solid #d9d9d9;padding-right:4px;margin-right:4px}.mce-checkbox{cursor:pointer}i.mce-i-checkbox{margin:0 3px 0 0;border:1px solid #c5c5c5;background-color:#f0f0f0;text-indent:-10em;*font-size:0;*line-height:0;*text-indent:0;overflow:hidden}.mce-checked i.mce-i-checkbox{color:#333;font-size:16px;line-height:16px;text-indent:0}.mce-checkbox:focus i.mce-i-checkbox,.mce-checkbox.mce-focus i.mce-i-checkbox{border:1px solid rgba(82,168,236,0.8)}.mce-checkbox.mce-disabled .mce-label,.mce-checkbox.mce-disabled i.mce-i-checkbox{color:#acacac}.mce-checkbox .mce-label{vertical-align:middle}.mce-rtl .mce-checkbox{direction:rtl;text-align:right}.mce-rtl i.mce-i-checkbox{margin:0 0 0 3px}.mce-combobox{display:inline-block;*display:inline;*zoom:1;*height:32px}.mce-combobox input{border:1px solid #c5c5c5;border-right-color:#c5c5c5;height:28px}.mce-combobox.mce-disabled input{color:#adadad}.mce-combobox .mce-btn{border:1px solid #c5c5c5;border-left:0}.mce-combobox button{padding-right:8px;padding-left:8px}.mce-combobox.mce-disabled .mce-btn button{cursor:default;opacity:.4;filter:alpha(opacity=40);zoom:1}.mce-colorbox i{border:1px solid #c5c5c5;width:14px;height:14px}.mce-colorbutton .mce-ico{position:relative}.mce-colorbutton-grid{margin:4px}.mce-colorbutton button{padding-right:6px;padding-left:6px}.mce-colorbutton .mce-preview{padding-right:3px;display:block;position:absolute;left:50%;top:50%;margin-left:-17px;margin-top:7px;background:gray;width:13px;height:2px;overflow:hidden}.mce-colorbutton.mce-btn-small .mce-preview{margin-left:-16px;padding-right:0;width:16px}.mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:1px solid transparent}.mce-colorbutton:hover .mce-open{border-color:#ccc}.mce-colorbutton.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-colorbutton{direction:rtl}.mce-rtl .mce-colorbutton .mce-preview{margin-left:0;padding-right:0;padding-left:3px}.mce-rtl .mce-colorbutton.mce-btn-small .mce-preview{margin-left:0;padding-right:0;padding-left:2px}.mce-rtl .mce-colorbutton .mce-open{padding-left:4px;padding-right:4px;border-left:0}.mce-colorpicker{position:relative;width:250px;height:220px}.mce-colorpicker-sv{position:absolute;top:0;left:0;width:90%;height:100%;border:1px solid #c5c5c5;cursor:crosshair;overflow:hidden}.mce-colorpicker-h-chunk{width:100%}.mce-colorpicker-overlay1,.mce-colorpicker-overlay2{width:100%;height:100%;position:absolute;top:0;left:0}.mce-colorpicker-overlay1{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1, startColorstr='#ffffff', endColorstr='#00ffffff');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffffff', endColorstr='#00ffffff')";background:linear-gradient(to right, #fff, rgba(255,255,255,0))}.mce-colorpicker-overlay2{filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0, startColorstr='#00000000', endColorstr='#000000');-ms-filter:"progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#00000000', endColorstr='#000000')";background:linear-gradient(to bottom, rgba(0,0,0,0), #000)}.mce-colorpicker-selector1{background:none;position:absolute;width:12px;height:12px;margin:-8px 0 0 -8px;border:1px solid black;border-radius:50%}.mce-colorpicker-selector2{position:absolute;width:10px;height:10px;border:1px solid white;border-radius:50%}.mce-colorpicker-h{position:absolute;top:0;right:0;width:6.5%;height:100%;border:1px solid #c5c5c5;cursor:crosshair}.mce-colorpicker-h-marker{margin-top:-4px;position:absolute;top:0;left:-1px;width:100%;border:1px solid #333;background:#fff;height:4px;z-index:100}.mce-path{display:inline-block;*display:inline;*zoom:1;padding:8px;white-space:normal}.mce-path .mce-txt{display:inline-block;padding-right:3px}.mce-path .mce-path-body{display:inline-block}.mce-path-item{display:inline-block;*display:inline;*zoom:1;cursor:pointer;color:#333}.mce-path-item:hover{text-decoration:underline}.mce-path-item:focus{background:#666;color:#fff}.mce-path .mce-divider{display:inline}.mce-disabled .mce-path-item{color:#aaa}.mce-rtl .mce-path{direction:rtl}.mce-fieldset{border:0 solid #9e9e9e}.mce-fieldset>.mce-container-body{margin-top:-15px}.mce-fieldset-title{margin-left:5px;padding:0 5px 0 5px}.mce-fit-layout{display:inline-block;*display:inline;*zoom:1}.mce-fit-layout-item{position:absolute}.mce-flow-layout-item{display:inline-block;*display:inline;*zoom:1}.mce-flow-layout-item{margin:2px 0 2px 2px}.mce-flow-layout-item.mce-last{margin-right:2px}.mce-flow-layout{white-space:normal}.mce-tinymce-inline .mce-flow-layout{white-space:nowrap}.mce-rtl .mce-flow-layout{text-align:right;direction:rtl}.mce-rtl .mce-flow-layout-item{margin:2px 2px 2px 0}.mce-rtl .mce-flow-layout-item.mce-last{margin-left:2px}.mce-iframe{border:0 solid rgba(0,0,0,0.2);width:100%;height:100%}.mce-infobox{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden;border:1px solid red}.mce-infobox div{display:block;margin:5px}.mce-infobox div button{position:absolute;top:50%;right:4px;cursor:pointer;margin-top:-8px;display:none}.mce-infobox div button:focus{outline:2px solid #ccc}.mce-infobox.mce-has-help div{margin-right:25px}.mce-infobox.mce-has-help button{display:block}.mce-infobox.mce-success{background:#dff0d8;border-color:#d6e9c6}.mce-infobox.mce-success div{color:#3c763d}.mce-infobox.mce-warning{background:#fcf8e3;border-color:#faebcc}.mce-infobox.mce-warning div{color:#8a6d3b}.mce-infobox.mce-error{background:#f2dede;border-color:#ebccd1}.mce-infobox.mce-error div{color:#a94442}.mce-rtl .mce-infobox div{text-align:right;direction:rtl}.mce-label{display:inline-block;*display:inline;*zoom:1;text-shadow:0 1px 1px rgba(255,255,255,0.75);overflow:hidden}.mce-label.mce-autoscroll{overflow:auto}.mce-label.mce-disabled{color:#aaa}.mce-label.mce-multiline{white-space:pre-wrap}.mce-label.mce-success{color:#468847}.mce-label.mce-warning{color:#c09853}.mce-label.mce-error{color:#b94a48}.mce-rtl .mce-label{text-align:right;direction:rtl}.mce-menubar .mce-menubtn{border-color:transparent;background:transparent;filter:none}.mce-menubar .mce-menubtn button{color:#333}.mce-menubar{border:1px solid rgba(217,217,217,0.52)}.mce-menubar .mce-menubtn button span{color:#333}.mce-menubar .mce-caret{border-top-color:#333}.mce-menubar .mce-menubtn:hover,.mce-menubar .mce-menubtn.mce-active,.mce-menubar .mce-menubtn:focus{border-color:#ccc;background:#fff;filter:none}.mce-menubtn button{color:#333}.mce-menubtn.mce-btn-small span{font-size:12px}.mce-menubtn.mce-fixed-width span{display:inline-block;overflow-x:hidden;text-overflow:ellipsis;width:90px}.mce-menubtn.mce-fixed-width.mce-btn-small span{width:70px}.mce-menubtn .mce-caret{*margin-top:6px}.mce-rtl .mce-menubtn button{direction:rtl;text-align:right}.mce-menu-item{display:block;padding:6px 15px 6px 12px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap;cursor:pointer;line-height:normal;border-left:4px solid transparent;margin-bottom:1px}.mce-menu-item .mce-ico,.mce-menu-item .mce-text{color:#333}.mce-menu-item.mce-disabled .mce-text,.mce-menu-item.mce-disabled .mce-ico{color:#adadad}.mce-menu-item:hover .mce-text,.mce-menu-item.mce-selected .mce-text,.mce-menu-item:focus .mce-text{color:white}.mce-menu-item:hover .mce-ico,.mce-menu-item.mce-selected .mce-ico,.mce-menu-item:focus .mce-ico{color:white}.mce-menu-item.mce-disabled:hover{background:#ccc}.mce-menu-shortcut{display:inline-block;color:#adadad}.mce-menu-shortcut{display:inline-block;*display:inline;*zoom:1;padding:0 15px 0 20px}.mce-menu-item:hover .mce-menu-shortcut,.mce-menu-item.mce-selected .mce-menu-shortcut,.mce-menu-item:focus .mce-menu-shortcut{color:white}.mce-menu-item .mce-caret{margin-top:4px;*margin-top:3px;margin-right:6px;border-top:4px solid transparent;border-bottom:4px solid transparent;border-left:4px solid #333}.mce-menu-item.mce-selected .mce-caret,.mce-menu-item:focus .mce-caret,.mce-menu-item:hover .mce-caret{border-left-color:white}.mce-menu-align .mce-menu-shortcut{*margin-top:-2px}.mce-menu-align .mce-menu-shortcut,.mce-menu-align .mce-caret{position:absolute;right:0}.mce-menu-item.mce-active i{visibility:visible}.mce-menu-item-normal.mce-active{background-color:#3498db}.mce-menu-item-preview.mce-active{border-left:5px solid #aaa}.mce-menu-item-normal.mce-active .mce-text{color:white}.mce-menu-item-normal.mce-active:hover .mce-text,.mce-menu-item-normal.mce-active:hover .mce-ico{color:white}.mce-menu-item-normal.mce-active:focus .mce-text,.mce-menu-item-normal.mce-active:focus .mce-ico{color:white}.mce-menu-item:hover,.mce-menu-item.mce-selected,.mce-menu-item:focus{text-decoration:none;color:white;background-color:#2d8ac7}div.mce-menu .mce-menu-item-sep,.mce-menu-item-sep:hover{border:0;padding:0;height:1px;margin:9px 1px;overflow:hidden;background:transparent;border-bottom:1px solid rgba(0,0,0,0.1);cursor:default;filter:none}.mce-menu.mce-rtl{direction:rtl}.mce-rtl .mce-menu-item{text-align:right;direction:rtl;padding:6px 12px 6px 15px}.mce-menu-align.mce-rtl .mce-menu-shortcut,.mce-menu-align.mce-rtl .mce-caret{right:auto;left:0}.mce-rtl .mce-menu-item .mce-caret{margin-left:6px;margin-right:0;border-right:4px solid #333;border-left:0}.mce-rtl .mce-menu-item.mce-selected .mce-caret,.mce-rtl .mce-menu-item:focus .mce-caret,.mce-rtl .mce-menu-item:hover .mce-caret{border-left-color:transparent;border-right-color:white}.mce-throbber{position:absolute;top:0;left:0;width:100%;height:100%;opacity:.6;filter:alpha(opacity=60);zoom:1;background:#fff url('img/loader.gif') no-repeat center center}.mce-throbber-inline{position:static;height:50px}.mce-menu .mce-throbber-inline{height:25px;background-size:contain}.mce-menu{position:absolute;left:0;top:0;filter:progid:DXImageTransform.Microsoft.gradient(enabled = false);background:transparent;z-index:1000;padding:5px 0 5px 0;margin:-1px 0 0;min-width:160px;background:#fff;border:1px solid #989898;border:1px solid rgba(0,0,0,0.2);z-index:1002;max-height:400px;overflow:auto;overflow-x:hidden}.mce-menu i{display:none}.mce-menu-has-icons i{display:inline-block;*display:inline}.mce-menu-sub-tr-tl{margin:-6px 0 0 -1px}.mce-menu-sub-br-bl{margin:6px 0 0 -1px}.mce-menu-sub-tl-tr{margin:-6px 0 0 1px}.mce-menu-sub-bl-br{margin:6px 0 0 1px}.mce-listbox button{text-align:left;padding-right:20px;position:relative}.mce-listbox .mce-caret{position:absolute;margin-top:-2px;right:8px;top:50%}.mce-rtl .mce-listbox .mce-caret{right:auto;left:8px}.mce-rtl .mce-listbox button{padding-right:10px;padding-left:20px}.mce-container-body .mce-resizehandle{position:absolute;right:0;bottom:0;width:16px;height:16px;visibility:visible;cursor:s-resize;margin:0}.mce-container-body .mce-resizehandle-both{cursor:se-resize}i.mce-i-resize{color:#333}.mce-selectbox{background:#fff;border:1px solid #c5c5c5}.mce-slider{border:1px solid #aaa;background:#eee;width:100px;height:10px;position:relative;display:block}.mce-slider.mce-vertical{width:10px;height:100px}.mce-slider-handle{border:1px solid #bbb;background:#ddd;display:block;width:13px;height:13px;position:absolute;top:0;left:0;margin-left:-1px;margin-top:-2px}.mce-slider-handle:focus{background:#bbb}.mce-spacer{visibility:hidden}.mce-splitbtn .mce-open{border-left:1px solid transparent}.mce-splitbtn:hover .mce-open{border-left-color:#ccc}.mce-splitbtn button{padding-right:6px;padding-left:6px}.mce-splitbtn .mce-open{padding-right:4px;padding-left:4px}.mce-splitbtn .mce-open.mce-active{background-color:#dbdbdb;outline:1px solid #ccc}.mce-splitbtn.mce-btn-small .mce-open{padding:0 3px 0 3px}.mce-rtl .mce-splitbtn{direction:rtl;text-align:right}.mce-rtl .mce-splitbtn button{padding-right:4px;padding-left:4px}.mce-rtl .mce-splitbtn .mce-open{border-left:0}.mce-stack-layout-item{display:block}.mce-tabs{display:block;border-bottom:1px solid #c5c5c5}.mce-tabs,.mce-tabs+.mce-container-body{background:#fff}.mce-tab{display:inline-block;*display:inline;*zoom:1;border:1px solid #c5c5c5;border-width:0 1px 0 0;background:#fff;padding:8px;text-shadow:0 1px 1px rgba(255,255,255,0.75);height:13px;cursor:pointer}.mce-tab:hover{background:#fdfdfd}.mce-tab.mce-active{background:#fdfdfd;border-bottom-color:transparent;margin-bottom:-1px;height:14px}.mce-rtl .mce-tabs{text-align:right;direction:rtl}.mce-rtl .mce-tab{border-width:0 0 0 1px}.mce-textbox{background:#fff;border:1px solid #c5c5c5;display:inline-block;-webkit-transition:border linear .2s, box-shadow linear .2s;transition:border linear .2s, box-shadow linear .2s;height:28px;resize:none;padding:0 4px 0 4px;white-space:pre-wrap;*white-space:pre;color:#333}.mce-textbox:focus,.mce-textbox.mce-focus{border-color:#3498db}.mce-placeholder .mce-textbox{color:#aaa}.mce-textbox.mce-multiline{padding:4px;height:auto}.mce-textbox.mce-disabled{color:#adadad}.mce-rtl .mce-textbox{text-align:right;direction:rtl}@font-face{font-family:'tinymce';src:url('fonts/tinymce.eot');src:url('fonts/tinymce.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce.woff') format('woff'),url('fonts/tinymce.ttf') format('truetype'),url('fonts/tinymce.svg#tinymce') format('svg');font-weight:normal;font-style:normal}@font-face{font-family:'tinymce-small';src:url('fonts/tinymce-small.eot');src:url('fonts/tinymce-small.eot?#iefix') format('embedded-opentype'),url('fonts/tinymce-small.woff') format('woff'),url('fonts/tinymce-small.ttf') format('truetype'),url('fonts/tinymce-small.svg#tinymce') format('svg');font-weight:normal;font-style:normal}.mce-ico{font-family:'tinymce',Arial;font-style:normal;font-weight:normal;font-variant:normal;font-size:16px;line-height:16px;speak:none;vertical-align:text-top;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;display:inline-block;background:transparent center center;background-size:cover;width:16px;height:16px;color:#333}.mce-btn-small .mce-ico{font-family:'tinymce-small',Arial}.mce-i-save:before{content:"\e000"}.mce-i-newdocument:before{content:"\e001"}.mce-i-fullpage:before{content:"\e002"}.mce-i-alignleft:before{content:"\e003"}.mce-i-aligncenter:before{content:"\e004"}.mce-i-alignright:before{content:"\e005"}.mce-i-alignjustify:before{content:"\e006"}.mce-i-alignnone:before{content:"\e003"}.mce-i-cut:before{content:"\e007"}.mce-i-paste:before{content:"\e008"}.mce-i-searchreplace:before{content:"\e009"}.mce-i-bullist:before{content:"\e00a"}.mce-i-numlist:before{content:"\e00b"}.mce-i-indent:before{content:"\e00c"}.mce-i-outdent:before{content:"\e00d"}.mce-i-blockquote:before{content:"\e00e"}.mce-i-undo:before{content:"\e00f"}.mce-i-redo:before{content:"\e010"}.mce-i-link:before{content:"\e011"}.mce-i-unlink:before{content:"\e012"}.mce-i-anchor:before{content:"\e013"}.mce-i-image:before{content:"\e014"}.mce-i-media:before{content:"\e015"}.mce-i-help:before{content:"\e016"}.mce-i-code:before{content:"\e017"}.mce-i-insertdatetime:before{content:"\e018"}.mce-i-preview:before{content:"\e019"}.mce-i-forecolor:before{content:"\e01a"}.mce-i-backcolor:before{content:"\e01a"}.mce-i-table:before{content:"\e01b"}.mce-i-hr:before{content:"\e01c"}.mce-i-removeformat:before{content:"\e01d"}.mce-i-subscript:before{content:"\e01e"}.mce-i-superscript:before{content:"\e01f"}.mce-i-charmap:before{content:"\e020"}.mce-i-emoticons:before{content:"\e021"}.mce-i-print:before{content:"\e022"}.mce-i-fullscreen:before{content:"\e023"}.mce-i-spellchecker:before{content:"\e024"}.mce-i-nonbreaking:before{content:"\e025"}.mce-i-template:before{content:"\e026"}.mce-i-pagebreak:before{content:"\e027"}.mce-i-restoredraft:before{content:"\e028"}.mce-i-bold:before{content:"\e02a"}.mce-i-italic:before{content:"\e02b"}.mce-i-underline:before{content:"\e02c"}.mce-i-strikethrough:before{content:"\e02d"}.mce-i-visualchars:before{content:"\e02e"}.mce-i-visualblocks:before{content:"\e02e"}.mce-i-ltr:before{content:"\e02f"}.mce-i-rtl:before{content:"\e030"}.mce-i-copy:before{content:"\e031"}.mce-i-resize:before{content:"\e032"}.mce-i-browse:before{content:"\e034"}.mce-i-pastetext:before{content:"\e035"}.mce-i-rotateleft:before{content:"\eaa8"}.mce-i-rotateright:before{content:"\eaa9"}.mce-i-crop:before{content:"\ee78"}.mce-i-editimage:before{content:"\e915"}.mce-i-options:before{content:"\ec6a"}.mce-i-flipv:before{content:"\eaaa"}.mce-i-fliph:before{content:"\eaac"}.mce-i-zoomin:before{content:"\eb35"}.mce-i-zoomout:before{content:"\eb36"}.mce-i-sun:before{content:"\eccc"}.mce-i-moon:before{content:"\eccd"}.mce-i-arrowleft:before{content:"\edc0"}.mce-i-arrowright:before{content:"\e93c"}.mce-i-drop:before{content:"\e935"}.mce-i-contrast:before{content:"\ecd4"}.mce-i-sharpen:before{content:"\eba7"}.mce-i-resize2:before{content:"\edf9"}.mce-i-orientation:before{content:"\e601"}.mce-i-invert:before{content:"\e602"}.mce-i-gamma:before{content:"\e600"}.mce-i-remove:before{content:"\ed6a"}.mce-i-tablerowprops:before{content:"\e604"}.mce-i-tablecellprops:before{content:"\e605"}.mce-i-table2:before{content:"\e606"}.mce-i-tablemergecells:before{content:"\e607"}.mce-i-tableinsertcolbefore:before{content:"\e608"}.mce-i-tableinsertcolafter:before{content:"\e609"}.mce-i-tableinsertrowbefore:before{content:"\e60a"}.mce-i-tableinsertrowafter:before{content:"\e60b"}.mce-i-tablesplitcells:before{content:"\e60d"}.mce-i-tabledelete:before{content:"\e60e"}.mce-i-tableleftheader:before{content:"\e62a"}.mce-i-tabletopheader:before{content:"\e62b"}.mce-i-tabledeleterow:before{content:"\e800"}.mce-i-tabledeletecol:before{content:"\e801"}.mce-i-codesample:before{content:"\e603"}.mce-i-fill:before{content:"\e902"}.mce-i-borderwidth:before{content:"\e903"}.mce-i-line:before{content:"\e904"}.mce-i-count:before{content:"\e905"}.mce-i-translate:before{content:"\e907"}.mce-i-drag:before{content:"\e908"}.mce-i-home:before{content:"\e90b"}.mce-i-upload:before{content:"\e914"}.mce-i-bubble:before{content:"\e91c"}.mce-i-user:before{content:"\e91d"}.mce-i-lock:before{content:"\e926"}.mce-i-unlock:before{content:"\e927"}.mce-i-settings:before{content:"\e928"}.mce-i-remove2:before{content:"\e92a"}.mce-i-menu:before{content:"\e92d"}.mce-i-warning:before{content:"\e930"}.mce-i-question:before{content:"\e931"}.mce-i-pluscircle:before{content:"\e932"}.mce-i-info:before{content:"\e933"}.mce-i-notice:before{content:"\e934"}.mce-i-arrowup:before{content:"\e93b"}.mce-i-arrowdown:before{content:"\e93d"}.mce-i-arrowup2:before{content:"\e93f"}.mce-i-arrowdown2:before{content:"\e940"}.mce-i-menu2:before{content:"\e941"}.mce-i-newtab:before{content:"\e961"}.mce-i-a11y:before{content:"\e900"}.mce-i-plus:before{content:"\e93a"}.mce-i-minus:before{content:"\e939"}.mce-i-books:before{content:"\e911"}.mce-i-checkmark:before{content:"\e033"}.mce-i-checkbox:before,.mce-i-selected:before{content:"\e033"}.mce-i-selected{visibility:hidden}i.mce-i-backcolor{text-shadow:none;background:#bbb} \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/atomic.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/atomic.js new file mode 100644 index 0000000..ba613f5 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/atomic.js @@ -0,0 +1,5 @@ +configure({ + configs: [ + './prod.js' + ] +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-atomic.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-atomic.js new file mode 100644 index 0000000..08e925b --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-atomic.js @@ -0,0 +1,1491 @@ +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var kernel = bolt.kernel = bolt.kernel || {}; +kernel.api = kernel.api || {}; +kernel.async = kernel.api || {}; +kernel.fp = kernel.fp || {}; +kernel.modulator = kernel.modulator || {}; +kernel.module = kernel.module || {}; +kernel.fp.array = def( + [ + ], + + function () { + var equals = function (a1, a2) { + if (a1.length !== a2.length) + return false; + for (var i = 0; i < a1.length; ++i) + if (a1[i] !== a2[i]) + return false; + return true; + }; + + var forall = function (a, f) { + var fn = f || function (x) { + return x === true; + }; + for (var i = 0; i < a.length; ++i) + if (fn(a[i]) !== true) + return false; + return true; + }; + + var map = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + r.push(f(a[i], i)); + return r; + }; + + var flatten = function (a) { + var r = []; + for (var i = 0; i < a.length; ++i) + r = r.concat(a[i]); + return r; + }; + + var flatmap = function (a, f) { + return flatten(map(a, f)); + }; + + var filter = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + if (f(a[i])) + r.push(a[i]); + return r; + }; + + var each = map; + + var contains = function (a, x) { + return !forall(a, function (v) { + return v !== x; + }); + }; + + var indexof = function (a, x) { + for (var i = 0; i < a.length; ++i) + if (a[i] === x) + return i; + return -1; + }; + + return { + equals: equals, + forall: forall, + map: map, + flatten: flatten, + flatmap: flatmap, + filter: filter, + each: each, + contains: contains, + indexof: indexof + }; + } +); +kernel.fp.object = def( + [ + ], + + function () { + var map = function (o, f) { + var r = {}; + for (var i in o) + if (o.hasOwnProperty(i)) + r[i] = f(i, o[i]); + return r; + }; + + var each = map; + + var merge = function (d, s) { + each(s, function (k, v) { + d[k] = v; + }); + }; + + var keys = function (o) { + var r = []; + each(o, function (k) { + r.push(k); + }); + return r; + }; + + return { + each: each, + keys: keys, + map: map, + merge: merge + }; + } +); +kernel.fp.functions = def( + [ + ], + + function () { + var curry = function (f) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 1); + return function () { + var all = args.concat(slice.call(arguments, 0)); + return f.apply(null, all); + }; + }; + + var not = function (z) { + return function () { + var slice = Array.prototype.slice; + return !z.apply(null, slice.call(arguments, 0)); + }; + }; + + var apply = function (f) { + var slice = Array.prototype.slice; + return f.apply(null, slice.call(arguments, 0)); + }; + + return { + curry: curry, + not: not, + apply: apply + }; + } +);kernel.async.map = def( + [ + kernel.fp.array + ], + + function (ar) { + var amap = function (data, f, oncomplete) { + var total = data.length; + var count = 0; + var results = []; + + ar.each(data, function (datum, i) { + f(datum, function (result) { + ++count; + results[i] = result; + if (count === total) + oncomplete(results); + }); + }); + }; + + return { + amap: amap + }; + } +); +/** + * This module has a dual responsibility: + * 1. Ensures that asynchronous function calls, 'f', that share the same + * 'key' are not executed in parallel. + * 2. In the case where an attempt to call in parallel is prevented, + * the 'action' callbacks are executed when the asynchronous call is + * completed. + * + * Example: + * When we async-map to remotely fetch module definition, it is + * important that only a single define is evaluated, but the + * notification that the definition has completed is propagated + * to all interested parties. + * + * 1. we require dependencies 'x' and 'y' + * + * 2. both x and y are defined in the same file (i.e. compiled together), 'a.js'. + * + * 3. we resolve x and y, to their load spec using a modulator + * x_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * y_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * + * 4. we make the piggyback call for x: + * piggybacker.piggyback(x_spec.url, x_spec.load, xdone); + * + * this will register the 'xdone' action, and actually + * trigger the load call, with a synthetic callback + * responsible for triggering all registered actions. + * + * 5. we make the piggyback call for y: + * piggybacker.piggyback(y_spec.url, y_spec.load, ydone); + * + * this will register the 'ydone' action, but NOT trigger + * the load call. + * + * 6. the load call completes, and calls the synthetic callback, + * which is responsible for triggering both 'xdone' and 'ydone'. + * + * 7. something else happens that means we have to load 'a.js' again, + * the piggybacker DOES NOT prevent this call, and will follow + * the above process. + */ +kernel.async.piggybacker = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function () { + var queue = {}; // key -> [actions] + + var process = function (key) { + var actions = queue[key]; + delete queue[key]; + ar.each(actions, fn.apply); + }; + + var piggyback = function (key, f, action) { + if (queue[key] === undefined) { + queue[key] = [ action ]; + f(fn.curry(process, key)); + } else { + queue[key].push(action); + } + }; + + return { + piggyback: piggyback + }; + }; + + return { + create: create + }; + } +); +kernel.modulator.globalator = def( + [ + ], + + function () { + var create = function () { + // FIX pull out + var resolve = function (name, scope) { + var parts = name.split('.'); + var r = scope; + for (var i = 0; i < parts.length && r !== undefined; ++i) + r = r[parts[i]]; + return r; + }; + + var global = Function('return this')(); + + var can = function (id) { + return id.indexOf('global!') === 0; + }; + + var get = function (id, define, require) { + var name = id.substring('global!'.length); + + var load = function (onsuccess, onfailure) { + var instance = resolve(name, global); + if (instance !== undefined) { + define(id, [], function () { return instance; }); + onsuccess(); + } else { + onfailure('Modulator error: could not resolve global [' + name + ']'); + } + }; + + return { + url: id, // this just needs to be unique, no download required. + load: load, + serial: true + }; + }; + + return { + can: can, + get: get + } + }; + return { + create: create + }; + } +); +kernel.modulator.bolt = def( + [ + kernel.fp.functions + ], + + function (fn) { + var create = function (loader, pather, namespace, path, idTransformer, options) { + var can = function (id) { + return id === namespace || id.indexOf(namespace + '.') === 0 || id.indexOf(namespace + '/') === 0; + }; + + var get = function (id) { + var before = options !== undefined && options.absolute === true ? path : pather(path); + var after = options !== undefined && options.fresh === true ? '?cachebuster=' + new Date().getTime() : ''; + var url = before + "/" + idTransformer(id) + '.js' + after; + var load = fn.curry(loader.load, url); + + return { + url: url, + load: load, + serial: false + }; + }; + + return { + can: can, + get: get + }; + }; + + return { + create: create + }; + } +);kernel.module.stratifier = def( + [ + kernel.fp.array + ], + + function (ar) { + var stratify = function (specs) { + var parallels = ar.filter(specs, function (spec) { + return !spec.serial; + }); + return parallels.length > 0 ? parallels : specs.slice(0, 1); + }; + + return { + stratify: stratify + }; + } +); +/** + * This module performs dependency analysis of strings that depend on sets of + * strings. + * + * The input is an array of root strings to start analysis from, and an object + * that contains a mapping of each string to the strings it depends on. + * + * Performing an analysis results in either: + * 1. an empty array, indicating that all dependencies are satisfied, + * 2. an array of strings that are, at the minimum, still needed in order to + * satisfy the given dependency trees, or + * 3. an array of strings that form a dependency cycle. + */ +kernel.module.analyser = def( + [ + kernel.fp.array + ], + + function (array) { + var collect = function (path, name) { + var i = array.indexof(path, name); + var p = path.slice(i); + return p.concat([name]); + }; + + /** + * @param {array} roots Contains a list of root ids + * @param {object} modules Contains dependency information in format: { id: [ 'id1', 'id2' ] } + */ + var analyse = function (roots, modules) { + var done = {}; + var path = []; + var missing = []; + var cycle; + + var children = function (name) { + array.each(modules[name], attempt); + }; + + var examine = function (name) { + if (modules[name]) + children(name); + else + missing.push(name); + }; + + var descend = function (name) { + path.push(name); + examine(name); + path.pop(); + }; + + var decycle = function (name) { + if (array.contains(path, name)) + cycle = collect(path, name); + else + descend(name); + }; + + var attempt = function (name) { + if (!done[name]) { + decycle(name); + done[name] = true; + } + }; + + array.each(roots, attempt); + + return cycle ? { cycle: cycle } : { load: missing }; + }; + + return { + analyse: analyse + }; + } +); +kernel.module.fetcher = def( + [ + kernel.fp.array, + kernel.fp.functions, + kernel.async.map, + kernel.async.piggybacker, + kernel.module.stratifier + ], + + function (ar, fn, map, piggybacker, stratifier) { + var create = function (regulator, validator, onerror, define, require, demand) { + var piggyback = piggybacker.create(); + + var validate = function (onsuccess, results) { + var failed = ar.filter(results, fn.not(validator)); + if (failed.length > 0) + onerror('Fetcher error: modules were not defined: ' + failed.join(', ')); + else + onsuccess(); + }; + + var mapper = function (spec, onresult) { + var action = fn.curry(onresult, spec.id); + var load = function (callback) { + spec.load(callback, onerror); + }; + piggyback.piggyback(spec.url, load, action); + }; + + var asyncfetch = function (specs, onsuccess) { + var oncomplete = fn.curry(validate, onsuccess); + var strata = stratifier.stratify(specs); + map.amap(strata, mapper, oncomplete); + }; + + var fetch = function (ids, onsuccess) { + regulator.regulate(ids, define, require, demand, function (specs) { + asyncfetch(specs, onsuccess); + }, onerror); + }; + + return { + fetch: fetch + }; + }; + + return { + create: create + }; + } +); +kernel.module.loader = def( + [ + kernel.module.analyser + ], + + function (analyser) { + var load = function (roots, deps, fetcher, oncontinue, onsuccess, onerror) { + var result = analyser.analyse(roots, deps); + + if (result.cycle) + onerror('Dependency error: a circular module dependency exists from ' + result.cycle.join(' ~> ')); + else if (result.load.length === 0) + onsuccess(); + else + fetcher.fetch(result.load, oncontinue); + }; + + return { + load: load + }; + } +); +kernel.module.manager = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.module.loader, + kernel.module.fetcher + ], + + function (ar, obj, loader, fetcher) { + var create = function (regulator, onerror) { + var blueprints = {}; // id -> { id: string, dependencies: [ string ], definition: function } + var modules = {}; // id -> module + + // Adds a module to the system. + var define = function (id, dependencies, definition) { + if (id === undefined) + onerror("Define error: module id can not be undefined"); + else if (blueprints[id] !== undefined) + onerror("Define error: module '" + id + "' is already defined"); + else + blueprints[id] = { id: id, dependencies: dependencies, definition: definition }; + }; + + // Loads a set of modules asynchronously. + var require = function (ids, callback) { + var onsuccess = function () { + var instances = ar.map(ids, demand); + callback.apply(null, instances); + }; + + var oncontinue = function () { + var deps = obj.map(blueprints, function (k, v) { + return v.dependencies; + }); + loader.load(ids, deps, fetch, oncontinue, onsuccess, onerror); + }; + + oncontinue(); + }; + + // Instantiates a module and all of its dependencies. + var demand = function (id) { + if (modules[id] !== undefined) + return modules[id]; + if (blueprints[id] === undefined) + throw "module '" + id + "' is not defined"; + var result = instantiate(id); + if (result === undefined) + throw "module '" + id + "' returned undefined from definition function"; + modules[id] = result; + return result; + }; + + var instantiate = function (id) { + var blueprint = blueprints[id]; + var args = ar.map(blueprint.dependencies, demand); // Instantiate dependencies + return blueprint.definition.apply(null, args); // Instantiate self + }; + + var validator = function (id) { return blueprints[id] !== undefined; }; + var fetch = fetcher.create(regulator, validator, onerror, define, require, demand); + + return { + define: define, + require: require, + demand: demand + }; + }; + + return { + create: create + }; + } +); +kernel.api.sources = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.modulator.globalator + ], + + function (ar, obj, globalator) { + var create = function (builtins, configuration) { + var data = { + 'global': { instance: globalator } + }; + obj.each(builtins, function (key, value) { + data[key] = { instance: value }; + }); + ar.each(configuration.types, function (spec) { + data[spec.type] = { id: spec.modulator }; + }); + var sourcespecs = configuration.sources.slice(0); + var sources = [ globalator.create() ]; + + var guard = function (type) { + if (data[type] === undefined) + throw 'Unknown modulator type [' + type + '].'; + }; + + var isResolved = function (type) { + guard(type); + return data[type].instance !== undefined; + }; + + var idOf = function (type) { + guard(type); + return data[type].id; + }; + + var instanceOf = function (type) { + guard(type); + return data[type].instance; + }; + + var register = function (type, instance) { + guard(type); + data[type].instance = instance; + }; + + var find = function (id) { + for (var i = 0; i < sources.length; ++i) + if (sources[i].can(id)) + return { found: sources[i] }; + return { notfound: true }; + }; + + var crank = function () { + var left = []; + ar.each(sourcespecs, function (spec) { + if (isResolved(spec.type)) { + var instance = instanceOf(spec.type); + var source = instance.create.apply(null, spec.args); + sources.push(source); + } else + left.push(spec); + }); + sourcespecs = left; + }; + + return { + isResolved: isResolved, + idOf: idOf, + instanceOf: instanceOf, + register: register, + find: find, + crank: crank + }; + }; + + return { + create: create + }; + } +); +kernel.api.regulator = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function (sources) { + /* + * 1. Resolve configuration as much as possible + * 2. Check for unresolved modulator types that are required to continue. + * a) Go ahead and resolve, if we have everything we need. + * b) Delay, requiring the modulators, then retry. + */ + var regulate = function (ids, define, require, demand, onsuccess, onerror) { + sources.crank(); + var required = ar.map(ids, determinetype); + var unresolved = ar.filter(required, fn.not(sources.isResolved)); + if (unresolved.length === 0) + resolve(ids, define, require, demand, onsuccess, onerror); + else + delay(unresolved, ids, define, require, demand, onsuccess, onerror); + }; + + var resolve = function (ids, define, require, demand, onsuccess, onerror) { + var r = []; + for (var i = 0; i < ids.length; ++i) { + var id = ids[i]; + var source = sources.find(id); + if (source.notfound) { + onerror('Could not find source for module [' + id + ']'); + return; + } + var spec = source.found.get(id, define, require, demand); + r[i] = build(id, spec); + } + onsuccess(r); + }; + + var build = function (id, spec) { + return { + id: id, + url: spec.url, + load: spec.load, + serial: spec.serial + }; + }; + + var delay = function (types, ids, define, require, demand, onsuccess, onerror) { + var modulatorids = ar.map(types, sources.idOf); + require(modulatorids, function (/* modulators */) { + var modulators = arguments; + ar.each(types, function (type, i) { + sources.register(type, modulators[i]); + }); + regulate(ids, define, require, demand, onsuccess, onerror); + }); + }; + + var determinetype = function (id) { + var index = id.indexOf('!'); + return index === -1 ? 'bolt' : id.substring(0, index); + }; + + return { + regulate: regulate + }; + }; + + return { + create: create + }; + } +); +kernel.api.config = def( + [ + kernel.module.manager, + kernel.api.regulator, + kernel.api.sources + ], + + function (manager, regulator, sources) { + var configure = function (configuration, builtins, onerror) { + var s = sources.create(builtins, configuration); + var r = regulator.create(s); + var engine = manager.create(r, onerror); + + return { + define: engine.define, + require: engine.require, + demand: engine.demand + }; + }; + + return { + configure: configure + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var loader = bolt.loader = bolt.loader || {}; +loader.executor = loader.executor || {}; +loader.api = loader.api || {}; +loader.transporter = loader.transporter || {}; +loader.tag = loader.tag || {}; +loader.tag.script = def( + [ + ], + + function () { + var guard = function (callback) { + return function (evt) { + if (evt.srcElement.readyState === "loaded" || evt.srcElement.readyState === "complete") + callback(); + }; + }; + + var ie = function (el) { + return el.attachEvent && !window.opera; + }; + + var onload = function (el, callback) { + if (ie(el)) + el.attachEvent("onreadystatechange", guard(callback)); + else + el.addEventListener("load", callback, false); + }; + + var createtag = function (callback) { + var el = document.createElement("script"); + el.type = "text/javascript"; + onload(el, callback); + return el; + }; + + var insert = function (decorator, callback) { + var el = createtag(callback); + decorator(el); + var head = document.getElementsByTagName("head")[0]; + head.appendChild(el); + }; + + return { + insert: insert + }; + } +); +loader.transporter.commonjs = def( + [ + ], + + function () { + var read = function (url, success, error) { + var fs = require('fs'); + fs.exists(url, function (exists) { + if (exists) + fs.readFile(url, 'UTF-8', function (err, data) { + if (err) + error('Error reading file [' + url + '], error [' + err + ']'); + else + success(data); + }); + else + error('File does not exist [' + url + ']'); + }); + }; + + return { + read: read + }; + } +); +loader.transporter.xhr = def( + [ + ], + + function () { + var requestObject = function () { + // Correct way to use XMLHttpRequest in IE: + // http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx + var factories = [ + function () { return new XMLHttpRequest() }, + function () { return new ActiveXObject("Microsoft.XMLHTTP") } + ]; + + return fallback(factories); + }; + + var fallback = function (items) { + for (var i = 0; i < items.length; ++i) { + try { + return items[i](); + } catch (e) { + } + } + }; + + var handler = function (req, url, success, error) { + return function () { + if (req.readyState === 4) + done(req, url, success, error); + }; + }; + + var done = function (req, url, success, error) { + if (req.status === 200 || req.status === 304) + success(req.responseText); + else + error('Transport error: ' + req.status + ' ' + req.statusText + ' for resource: "' + url + '"'); + }; + + var getUrl = function (req, url, success, error) { + req.open('GET', url, true); + req.onreadystatechange = handler(req, url, success, error); + req.send(); + }; + + var request = function (url, success, error) { + var req = requestObject(); + if (req) + getUrl(req, url, success, error); + else + error('Transport error: browser does not support XMLHttpRequest.'); + }; + + return { + request: request + }; + } +); +loader.executor.evaller = def( + [ + ], + + function () { + var execute = function (data, onsuccess, onfailure) { + try { + eval(data); + } catch(e) { + onfailure(e); + return; + } + + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.executor.injector = def( + [ + loader.tag.script + ], + + function (script) { + var execute = function (data, onsuccess, onfailure) { + var inject = function (tag) { + tag.text = data; + }; + + var noop = function () {}; + + // Injection does not fire events, but execution happens synchronously, + // so we just make an explicit callback + script.insert(inject, noop); + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.api.commonjsevaller = def( + [ + loader.transporter.commonjs, + loader.executor.evaller + ], + + function (commonjs, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + commonjs.read(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.scripttag = def( + [ + loader.tag.script + ], + + function (script) { + var load = function (url, onsuccess, onfailure) { + var sourcer = function (tag) { + tag.src = url; + }; + + script.insert(sourcer, onsuccess); + }; + + return { + load: load + }; + } +); +loader.api.xhrevaller = def( + [ + loader.transporter.xhr, + loader.executor.evaller + ], + + function (xhr, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.xhrinjector = def( + [ + loader.transporter.xhr, + loader.executor.injector + ], + + function (xhr, injector) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + injector.execute(data, onsuccess); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var module = bolt.module = bolt.module || {}; +module.bootstrap = module.bootstrap || {}; +module.config = module.config || {}; +module.error = module.error || {}; +module.modulator = module.modulator || {}; +module.reader = module.reader || {}; +module.runtime = module.runtime || {}; +module.util = module.util || {}; +module.error.error = def( + [ + ], + + function () { + var die = function (msg) { + throw msg || new Error('unknown error'); + }; + + return { + die: die + }; + } +); +module.config.mapper = def( + [ + ], + + function () { + var flat = function (id) { + return id; + }; + + var hierarchical = function (id) { + return id.replace(/\./g, '/'); + }; + + var constant = function (name) { + return function () { + return name; + }; + }; + + return { + flat: flat, + hierarchical: hierarchical, + constant: constant + }; + } +); +module.api = def( + [ + module.runtime + ], + + function (runtime) { + var delegate = function (method) { + return function () { + return runtime[method].apply(null, arguments); + }; + }; + + return { + define: delegate('define'), + require: delegate('require'), + demand: delegate('demand'), + main: delegate('main'), + load: delegate('load'), + loadscript: delegate('loadscript') + }; + } +); +module.util.path = def( + [ + ], + + function () { + var dirname = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(0, end); + }; + + var basename = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(end + 1); + }; + + return { + basename: basename, + dirname: dirname + }; + } +); +module.util.locator = def( + [ + ], + + function () { + var browser = function () { + var scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1].src; + }; + + var runtime = module.runtime.locate; + + var locate = function () { + var f = runtime || browser; + return f(); + }; + + return { + locate: locate + }; + } +); +module.util.pather = def( + [ + module.util.path + ], + + function (path) { + var create = function (relativeto) { + var base = path.dirname(relativeto); + return function (path) { + return base + '/' + path; + }; + }; + + return { + create: create + }; + } +);module.modulator.modulators = def( + [ + ephox.bolt.kernel.fp.functions, + ephox.bolt.kernel.modulator.bolt, + ephox.bolt.loader.api.commonjsevaller, + ephox.bolt.loader.api.scripttag, + ephox.bolt.loader.api.xhrevaller, + ephox.bolt.loader.api.xhrinjector + ], + + function (fn, bolt, commonjsevaller, scripttag, xhrevaller, xhrinjector) { + var wrap = function (modulator, loader) { + var create = fn.curry(modulator.create, loader); + + return { + create: create + } + }; + + return { + boltcommonjs: wrap(bolt, commonjsevaller), + boltscripttag: wrap(bolt, scripttag), + boltxhreval: wrap(bolt, xhrevaller), + boltxhrinjector: wrap(bolt, xhrinjector) + }; + } +); +module.config.builtins = def( + [ + ephox.bolt.module.modulator.modulators.boltscripttag, + ephox.bolt.module.modulator.modulators.boltcommonjs + ], + + function (boltscripttag, boltcommonjs) { + return { + // TODO: 'amd' is maintained for backwards compatibility, will be removed + // at some point. + browser: { bolt: boltscripttag, amd: boltscripttag }, + commonjs: { bolt: boltcommonjs, amd: boltcommonjs } + }; + } +); +module.config.specs = def( + [ + module.util.pather + ], + + function (pather) { + var type = function (type, implementation) { + return { + type: type, + implementation: implementation, + modulator: implementation + '.Modulator', + compiler: implementation + '.Compiler' + }; + }; + + var source = function (relativeto) { + return function (type /*, args */) { + return { + type: type, + relativeto: relativeto, + args: [ pather.create(relativeto) ].concat(Array.prototype.slice.call(arguments, 1)) + }; + } + }; + + return { + type: type, + source: source + }; + } +); +module.reader.bouncing = def( + [ + ephox.bolt.kernel.fp.array, + module.error.error, + module.config.specs + ], + + function (ar, error, specs) { + var bounce = function (done, read, acc) { + var next = acc.configs.shift(); + read(next.relativeto, next.config, done, acc); + }; + + var tick = function (file, cfg, done, read, acc) { + var munged = ar.map(cfg.configs || [], function (config) { + return { relativeto: file, config: config }; + }); + var accumulated = { + sources: acc.sources.concat(cfg.sources || []), + types: acc.types.concat(cfg.types || []), + configs: munged.concat(acc.configs) + }; + if (accumulated.configs.length > 0) + bounce(done, read, accumulated); + else + done({ sources: accumulated.sources, types: accumulated.types }); + }; + + /* + * All precedence is depth-first, pre-order. Example: + * + * A + * /-\ + * B C + * /| |\ + * D E F G + * + * Configs are read in A, B, D, E, C, F, G. + * + * If configs mixed delegation and sources, the + * sources would be ordered the same: A, B, D, E, C, F, G. + */ + + var evaluate = function (file, payload, done, read, acc) { + var result = {}; + /* eval scope */ + var mapper = module.config.mapper; + var type = specs.type; + var source = specs.source(file); + var configure = function (configuration) { + result = configuration; + }; + try { + eval(payload); + } catch (e) { + throw 'Could not load configuration [' + file + '], with: ' + e; + } + tick(file, result, done, read, acc); + }; + + return { + evaluate: evaluate + }; + } +); +module.reader.browser = def( + [ + module.error.error, + module.reader.bouncing, + module.util.path, + ephox.bolt.loader.transporter.xhr + ], + + function (error, bouncing, path, xhr) { + var read = function (relativeto, file, done, acc) { + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = base + '/' + file; + xhr.request(absolute, function (payload) { + bouncing.evaluate(absolute, payload, done, read, accumulated); + }, error.die); + }; + + return { + read: read + }; + } +); +module.reader.node = def( + [ + module.reader.bouncing + ], + + function (bouncing, path, fs) { + var read = function (relativeto, file, done, acc) { + var fs = require('fs'); + var path = require('path'); + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = path.resolve(base, file); + var payload = fs.readFileSync(absolute, 'UTF-8'); + bouncing.evaluate(absolute, payload, done, read, accumulated); + }; + + return { + read: read + }; + } +); +module.reader.direct = def( + [ + ], + + function () { + var create = function (configuration) { + return function (done) { + done({ + sources: configuration.sources || [], + types: configuration.types || [], + configs: configuration.configs || [] + }); + }; + }; + + return { + create: create + }; + } +); +module.bootstrap.configloader = def( + [ + module.util.locator, + module.reader.browser + ], + + function (locator, browser) { + var create = function (file) { + var script = locator.locate(); + return function (done) { + browser.read(script, file, done); + }; + }; + + return { + create: create + }; + } +);module.bootstrap.deferred = def( + [ + ephox.bolt.kernel.fp.array + ], + + function (ar) { + var deferred = []; + + var require = function (ids, fn) { + var r = function (real) { + real(ids, fn); + }; + deferred.push(r); + }; + + var configured = function (require) { + ar.each(deferred, function (action) { + action(require); + }); + deferred = []; + }; + + return { + require: require, + configured: configured + }; + } +); +module.bootstrap.main = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.runtime + ], + + function (config, deferred, runtime) { + var main = function (id, args, configids, callback) { + runtime.require(configids || [], function () { + callback && callback.apply(null, arguments); + runtime.require([ id ], function (module) { + module.apply(null, args || []); + }); + }); + }; + + return { + main: main + }; + } +); +module.bootstrap.install = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.bootstrap.main, + module.runtime, + module.error.error + ], + + function (config, deferred, main, runtime, error) { + var notready = function () { throw 'bolt not initialised, can not call define or demand, did you mean to use require or main?'; }; + + var install = function (reader, builtins, load, loadscript) { + runtime.define = notready; + runtime.demand = notready; + runtime.require = deferred.require; + runtime.main = main.main; + runtime.load = load; + runtime.loadscript = loadscript; + + reader(function (configuration) { + var bolt = config.configure(configuration, builtins, error.die); + runtime.define = bolt.define; + runtime.require = bolt.require; + runtime.demand = bolt.demand; + + deferred.configured(runtime.require); + }); + }; + + return { + install: install + }; + } +); + +})(Function('return this')()); +(function (global) { + var obj = ephox.bolt.kernel.fp.object; + var api = ephox.bolt.module.api; + var builtins = ephox.bolt.module.config.builtins.browser; + var install = ephox.bolt.module.bootstrap.install; + var reader = ephox.bolt.module.bootstrap.configloader.create("atomic.js"); + var transport = ephox.bolt.loader.transporter.xhr.request; + var script = ephox.bolt.loader.api.scripttag.load; + install.install(reader, builtins, transport, script); + obj.merge(global, api); +})(Function("return this;")()); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-browser.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-browser.js new file mode 100644 index 0000000..0f787ca --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-browser.js @@ -0,0 +1,1491 @@ +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var kernel = bolt.kernel = bolt.kernel || {}; +kernel.api = kernel.api || {}; +kernel.async = kernel.api || {}; +kernel.fp = kernel.fp || {}; +kernel.modulator = kernel.modulator || {}; +kernel.module = kernel.module || {}; +kernel.fp.array = def( + [ + ], + + function () { + var equals = function (a1, a2) { + if (a1.length !== a2.length) + return false; + for (var i = 0; i < a1.length; ++i) + if (a1[i] !== a2[i]) + return false; + return true; + }; + + var forall = function (a, f) { + var fn = f || function (x) { + return x === true; + }; + for (var i = 0; i < a.length; ++i) + if (fn(a[i]) !== true) + return false; + return true; + }; + + var map = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + r.push(f(a[i], i)); + return r; + }; + + var flatten = function (a) { + var r = []; + for (var i = 0; i < a.length; ++i) + r = r.concat(a[i]); + return r; + }; + + var flatmap = function (a, f) { + return flatten(map(a, f)); + }; + + var filter = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + if (f(a[i])) + r.push(a[i]); + return r; + }; + + var each = map; + + var contains = function (a, x) { + return !forall(a, function (v) { + return v !== x; + }); + }; + + var indexof = function (a, x) { + for (var i = 0; i < a.length; ++i) + if (a[i] === x) + return i; + return -1; + }; + + return { + equals: equals, + forall: forall, + map: map, + flatten: flatten, + flatmap: flatmap, + filter: filter, + each: each, + contains: contains, + indexof: indexof + }; + } +); +kernel.fp.object = def( + [ + ], + + function () { + var map = function (o, f) { + var r = {}; + for (var i in o) + if (o.hasOwnProperty(i)) + r[i] = f(i, o[i]); + return r; + }; + + var each = map; + + var merge = function (d, s) { + each(s, function (k, v) { + d[k] = v; + }); + }; + + var keys = function (o) { + var r = []; + each(o, function (k) { + r.push(k); + }); + return r; + }; + + return { + each: each, + keys: keys, + map: map, + merge: merge + }; + } +); +kernel.fp.functions = def( + [ + ], + + function () { + var curry = function (f) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 1); + return function () { + var all = args.concat(slice.call(arguments, 0)); + return f.apply(null, all); + }; + }; + + var not = function (z) { + return function () { + var slice = Array.prototype.slice; + return !z.apply(null, slice.call(arguments, 0)); + }; + }; + + var apply = function (f) { + var slice = Array.prototype.slice; + return f.apply(null, slice.call(arguments, 0)); + }; + + return { + curry: curry, + not: not, + apply: apply + }; + } +);kernel.async.map = def( + [ + kernel.fp.array + ], + + function (ar) { + var amap = function (data, f, oncomplete) { + var total = data.length; + var count = 0; + var results = []; + + ar.each(data, function (datum, i) { + f(datum, function (result) { + ++count; + results[i] = result; + if (count === total) + oncomplete(results); + }); + }); + }; + + return { + amap: amap + }; + } +); +/** + * This module has a dual responsibility: + * 1. Ensures that asynchronous function calls, 'f', that share the same + * 'key' are not executed in parallel. + * 2. In the case where an attempt to call in parallel is prevented, + * the 'action' callbacks are executed when the asynchronous call is + * completed. + * + * Example: + * When we async-map to remotely fetch module definition, it is + * important that only a single define is evaluated, but the + * notification that the definition has completed is propagated + * to all interested parties. + * + * 1. we require dependencies 'x' and 'y' + * + * 2. both x and y are defined in the same file (i.e. compiled together), 'a.js'. + * + * 3. we resolve x and y, to their load spec using a modulator + * x_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * y_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * + * 4. we make the piggyback call for x: + * piggybacker.piggyback(x_spec.url, x_spec.load, xdone); + * + * this will register the 'xdone' action, and actually + * trigger the load call, with a synthetic callback + * responsible for triggering all registered actions. + * + * 5. we make the piggyback call for y: + * piggybacker.piggyback(y_spec.url, y_spec.load, ydone); + * + * this will register the 'ydone' action, but NOT trigger + * the load call. + * + * 6. the load call completes, and calls the synthetic callback, + * which is responsible for triggering both 'xdone' and 'ydone'. + * + * 7. something else happens that means we have to load 'a.js' again, + * the piggybacker DOES NOT prevent this call, and will follow + * the above process. + */ +kernel.async.piggybacker = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function () { + var queue = {}; // key -> [actions] + + var process = function (key) { + var actions = queue[key]; + delete queue[key]; + ar.each(actions, fn.apply); + }; + + var piggyback = function (key, f, action) { + if (queue[key] === undefined) { + queue[key] = [ action ]; + f(fn.curry(process, key)); + } else { + queue[key].push(action); + } + }; + + return { + piggyback: piggyback + }; + }; + + return { + create: create + }; + } +); +kernel.modulator.globalator = def( + [ + ], + + function () { + var create = function () { + // FIX pull out + var resolve = function (name, scope) { + var parts = name.split('.'); + var r = scope; + for (var i = 0; i < parts.length && r !== undefined; ++i) + r = r[parts[i]]; + return r; + }; + + var global = Function('return this')(); + + var can = function (id) { + return id.indexOf('global!') === 0; + }; + + var get = function (id, define, require) { + var name = id.substring('global!'.length); + + var load = function (onsuccess, onfailure) { + var instance = resolve(name, global); + if (instance !== undefined) { + define(id, [], function () { return instance; }); + onsuccess(); + } else { + onfailure('Modulator error: could not resolve global [' + name + ']'); + } + }; + + return { + url: id, // this just needs to be unique, no download required. + load: load, + serial: true + }; + }; + + return { + can: can, + get: get + } + }; + return { + create: create + }; + } +); +kernel.modulator.bolt = def( + [ + kernel.fp.functions + ], + + function (fn) { + var create = function (loader, pather, namespace, path, idTransformer, options) { + var can = function (id) { + return id === namespace || id.indexOf(namespace + '.') === 0 || id.indexOf(namespace + '/') === 0; + }; + + var get = function (id) { + var before = options !== undefined && options.absolute === true ? path : pather(path); + var after = options !== undefined && options.fresh === true ? '?cachebuster=' + new Date().getTime() : ''; + var url = before + "/" + idTransformer(id) + '.js' + after; + var load = fn.curry(loader.load, url); + + return { + url: url, + load: load, + serial: false + }; + }; + + return { + can: can, + get: get + }; + }; + + return { + create: create + }; + } +);kernel.module.stratifier = def( + [ + kernel.fp.array + ], + + function (ar) { + var stratify = function (specs) { + var parallels = ar.filter(specs, function (spec) { + return !spec.serial; + }); + return parallels.length > 0 ? parallels : specs.slice(0, 1); + }; + + return { + stratify: stratify + }; + } +); +/** + * This module performs dependency analysis of strings that depend on sets of + * strings. + * + * The input is an array of root strings to start analysis from, and an object + * that contains a mapping of each string to the strings it depends on. + * + * Performing an analysis results in either: + * 1. an empty array, indicating that all dependencies are satisfied, + * 2. an array of strings that are, at the minimum, still needed in order to + * satisfy the given dependency trees, or + * 3. an array of strings that form a dependency cycle. + */ +kernel.module.analyser = def( + [ + kernel.fp.array + ], + + function (array) { + var collect = function (path, name) { + var i = array.indexof(path, name); + var p = path.slice(i); + return p.concat([name]); + }; + + /** + * @param {array} roots Contains a list of root ids + * @param {object} modules Contains dependency information in format: { id: [ 'id1', 'id2' ] } + */ + var analyse = function (roots, modules) { + var done = {}; + var path = []; + var missing = []; + var cycle; + + var children = function (name) { + array.each(modules[name], attempt); + }; + + var examine = function (name) { + if (modules[name]) + children(name); + else + missing.push(name); + }; + + var descend = function (name) { + path.push(name); + examine(name); + path.pop(); + }; + + var decycle = function (name) { + if (array.contains(path, name)) + cycle = collect(path, name); + else + descend(name); + }; + + var attempt = function (name) { + if (!done[name]) { + decycle(name); + done[name] = true; + } + }; + + array.each(roots, attempt); + + return cycle ? { cycle: cycle } : { load: missing }; + }; + + return { + analyse: analyse + }; + } +); +kernel.module.fetcher = def( + [ + kernel.fp.array, + kernel.fp.functions, + kernel.async.map, + kernel.async.piggybacker, + kernel.module.stratifier + ], + + function (ar, fn, map, piggybacker, stratifier) { + var create = function (regulator, validator, onerror, define, require, demand) { + var piggyback = piggybacker.create(); + + var validate = function (onsuccess, results) { + var failed = ar.filter(results, fn.not(validator)); + if (failed.length > 0) + onerror('Fetcher error: modules were not defined: ' + failed.join(', ')); + else + onsuccess(); + }; + + var mapper = function (spec, onresult) { + var action = fn.curry(onresult, spec.id); + var load = function (callback) { + spec.load(callback, onerror); + }; + piggyback.piggyback(spec.url, load, action); + }; + + var asyncfetch = function (specs, onsuccess) { + var oncomplete = fn.curry(validate, onsuccess); + var strata = stratifier.stratify(specs); + map.amap(strata, mapper, oncomplete); + }; + + var fetch = function (ids, onsuccess) { + regulator.regulate(ids, define, require, demand, function (specs) { + asyncfetch(specs, onsuccess); + }, onerror); + }; + + return { + fetch: fetch + }; + }; + + return { + create: create + }; + } +); +kernel.module.loader = def( + [ + kernel.module.analyser + ], + + function (analyser) { + var load = function (roots, deps, fetcher, oncontinue, onsuccess, onerror) { + var result = analyser.analyse(roots, deps); + + if (result.cycle) + onerror('Dependency error: a circular module dependency exists from ' + result.cycle.join(' ~> ')); + else if (result.load.length === 0) + onsuccess(); + else + fetcher.fetch(result.load, oncontinue); + }; + + return { + load: load + }; + } +); +kernel.module.manager = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.module.loader, + kernel.module.fetcher + ], + + function (ar, obj, loader, fetcher) { + var create = function (regulator, onerror) { + var blueprints = {}; // id -> { id: string, dependencies: [ string ], definition: function } + var modules = {}; // id -> module + + // Adds a module to the system. + var define = function (id, dependencies, definition) { + if (id === undefined) + onerror("Define error: module id can not be undefined"); + else if (blueprints[id] !== undefined) + onerror("Define error: module '" + id + "' is already defined"); + else + blueprints[id] = { id: id, dependencies: dependencies, definition: definition }; + }; + + // Loads a set of modules asynchronously. + var require = function (ids, callback) { + var onsuccess = function () { + var instances = ar.map(ids, demand); + callback.apply(null, instances); + }; + + var oncontinue = function () { + var deps = obj.map(blueprints, function (k, v) { + return v.dependencies; + }); + loader.load(ids, deps, fetch, oncontinue, onsuccess, onerror); + }; + + oncontinue(); + }; + + // Instantiates a module and all of its dependencies. + var demand = function (id) { + if (modules[id] !== undefined) + return modules[id]; + if (blueprints[id] === undefined) + throw "module '" + id + "' is not defined"; + var result = instantiate(id); + if (result === undefined) + throw "module '" + id + "' returned undefined from definition function"; + modules[id] = result; + return result; + }; + + var instantiate = function (id) { + var blueprint = blueprints[id]; + var args = ar.map(blueprint.dependencies, demand); // Instantiate dependencies + return blueprint.definition.apply(null, args); // Instantiate self + }; + + var validator = function (id) { return blueprints[id] !== undefined; }; + var fetch = fetcher.create(regulator, validator, onerror, define, require, demand); + + return { + define: define, + require: require, + demand: demand + }; + }; + + return { + create: create + }; + } +); +kernel.api.sources = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.modulator.globalator + ], + + function (ar, obj, globalator) { + var create = function (builtins, configuration) { + var data = { + 'global': { instance: globalator } + }; + obj.each(builtins, function (key, value) { + data[key] = { instance: value }; + }); + ar.each(configuration.types, function (spec) { + data[spec.type] = { id: spec.modulator }; + }); + var sourcespecs = configuration.sources.slice(0); + var sources = [ globalator.create() ]; + + var guard = function (type) { + if (data[type] === undefined) + throw 'Unknown modulator type [' + type + '].'; + }; + + var isResolved = function (type) { + guard(type); + return data[type].instance !== undefined; + }; + + var idOf = function (type) { + guard(type); + return data[type].id; + }; + + var instanceOf = function (type) { + guard(type); + return data[type].instance; + }; + + var register = function (type, instance) { + guard(type); + data[type].instance = instance; + }; + + var find = function (id) { + for (var i = 0; i < sources.length; ++i) + if (sources[i].can(id)) + return { found: sources[i] }; + return { notfound: true }; + }; + + var crank = function () { + var left = []; + ar.each(sourcespecs, function (spec) { + if (isResolved(spec.type)) { + var instance = instanceOf(spec.type); + var source = instance.create.apply(null, spec.args); + sources.push(source); + } else + left.push(spec); + }); + sourcespecs = left; + }; + + return { + isResolved: isResolved, + idOf: idOf, + instanceOf: instanceOf, + register: register, + find: find, + crank: crank + }; + }; + + return { + create: create + }; + } +); +kernel.api.regulator = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function (sources) { + /* + * 1. Resolve configuration as much as possible + * 2. Check for unresolved modulator types that are required to continue. + * a) Go ahead and resolve, if we have everything we need. + * b) Delay, requiring the modulators, then retry. + */ + var regulate = function (ids, define, require, demand, onsuccess, onerror) { + sources.crank(); + var required = ar.map(ids, determinetype); + var unresolved = ar.filter(required, fn.not(sources.isResolved)); + if (unresolved.length === 0) + resolve(ids, define, require, demand, onsuccess, onerror); + else + delay(unresolved, ids, define, require, demand, onsuccess, onerror); + }; + + var resolve = function (ids, define, require, demand, onsuccess, onerror) { + var r = []; + for (var i = 0; i < ids.length; ++i) { + var id = ids[i]; + var source = sources.find(id); + if (source.notfound) { + onerror('Could not find source for module [' + id + ']'); + return; + } + var spec = source.found.get(id, define, require, demand); + r[i] = build(id, spec); + } + onsuccess(r); + }; + + var build = function (id, spec) { + return { + id: id, + url: spec.url, + load: spec.load, + serial: spec.serial + }; + }; + + var delay = function (types, ids, define, require, demand, onsuccess, onerror) { + var modulatorids = ar.map(types, sources.idOf); + require(modulatorids, function (/* modulators */) { + var modulators = arguments; + ar.each(types, function (type, i) { + sources.register(type, modulators[i]); + }); + regulate(ids, define, require, demand, onsuccess, onerror); + }); + }; + + var determinetype = function (id) { + var index = id.indexOf('!'); + return index === -1 ? 'bolt' : id.substring(0, index); + }; + + return { + regulate: regulate + }; + }; + + return { + create: create + }; + } +); +kernel.api.config = def( + [ + kernel.module.manager, + kernel.api.regulator, + kernel.api.sources + ], + + function (manager, regulator, sources) { + var configure = function (configuration, builtins, onerror) { + var s = sources.create(builtins, configuration); + var r = regulator.create(s); + var engine = manager.create(r, onerror); + + return { + define: engine.define, + require: engine.require, + demand: engine.demand + }; + }; + + return { + configure: configure + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var loader = bolt.loader = bolt.loader || {}; +loader.executor = loader.executor || {}; +loader.api = loader.api || {}; +loader.transporter = loader.transporter || {}; +loader.tag = loader.tag || {}; +loader.tag.script = def( + [ + ], + + function () { + var guard = function (callback) { + return function (evt) { + if (evt.srcElement.readyState === "loaded" || evt.srcElement.readyState === "complete") + callback(); + }; + }; + + var ie = function (el) { + return el.attachEvent && !window.opera; + }; + + var onload = function (el, callback) { + if (ie(el)) + el.attachEvent("onreadystatechange", guard(callback)); + else + el.addEventListener("load", callback, false); + }; + + var createtag = function (callback) { + var el = document.createElement("script"); + el.type = "text/javascript"; + onload(el, callback); + return el; + }; + + var insert = function (decorator, callback) { + var el = createtag(callback); + decorator(el); + var head = document.getElementsByTagName("head")[0]; + head.appendChild(el); + }; + + return { + insert: insert + }; + } +); +loader.transporter.commonjs = def( + [ + ], + + function () { + var read = function (url, success, error) { + var fs = require('fs'); + fs.exists(url, function (exists) { + if (exists) + fs.readFile(url, 'UTF-8', function (err, data) { + if (err) + error('Error reading file [' + url + '], error [' + err + ']'); + else + success(data); + }); + else + error('File does not exist [' + url + ']'); + }); + }; + + return { + read: read + }; + } +); +loader.transporter.xhr = def( + [ + ], + + function () { + var requestObject = function () { + // Correct way to use XMLHttpRequest in IE: + // http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx + var factories = [ + function () { return new XMLHttpRequest() }, + function () { return new ActiveXObject("Microsoft.XMLHTTP") } + ]; + + return fallback(factories); + }; + + var fallback = function (items) { + for (var i = 0; i < items.length; ++i) { + try { + return items[i](); + } catch (e) { + } + } + }; + + var handler = function (req, url, success, error) { + return function () { + if (req.readyState === 4) + done(req, url, success, error); + }; + }; + + var done = function (req, url, success, error) { + if (req.status === 200 || req.status === 304) + success(req.responseText); + else + error('Transport error: ' + req.status + ' ' + req.statusText + ' for resource: "' + url + '"'); + }; + + var getUrl = function (req, url, success, error) { + req.open('GET', url, true); + req.onreadystatechange = handler(req, url, success, error); + req.send(); + }; + + var request = function (url, success, error) { + var req = requestObject(); + if (req) + getUrl(req, url, success, error); + else + error('Transport error: browser does not support XMLHttpRequest.'); + }; + + return { + request: request + }; + } +); +loader.executor.evaller = def( + [ + ], + + function () { + var execute = function (data, onsuccess, onfailure) { + try { + eval(data); + } catch(e) { + onfailure(e); + return; + } + + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.executor.injector = def( + [ + loader.tag.script + ], + + function (script) { + var execute = function (data, onsuccess, onfailure) { + var inject = function (tag) { + tag.text = data; + }; + + var noop = function () {}; + + // Injection does not fire events, but execution happens synchronously, + // so we just make an explicit callback + script.insert(inject, noop); + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.api.commonjsevaller = def( + [ + loader.transporter.commonjs, + loader.executor.evaller + ], + + function (commonjs, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + commonjs.read(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.scripttag = def( + [ + loader.tag.script + ], + + function (script) { + var load = function (url, onsuccess, onfailure) { + var sourcer = function (tag) { + tag.src = url; + }; + + script.insert(sourcer, onsuccess); + }; + + return { + load: load + }; + } +); +loader.api.xhrevaller = def( + [ + loader.transporter.xhr, + loader.executor.evaller + ], + + function (xhr, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.xhrinjector = def( + [ + loader.transporter.xhr, + loader.executor.injector + ], + + function (xhr, injector) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + injector.execute(data, onsuccess); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var module = bolt.module = bolt.module || {}; +module.bootstrap = module.bootstrap || {}; +module.config = module.config || {}; +module.error = module.error || {}; +module.modulator = module.modulator || {}; +module.reader = module.reader || {}; +module.runtime = module.runtime || {}; +module.util = module.util || {}; +module.error.error = def( + [ + ], + + function () { + var die = function (msg) { + throw msg || new Error('unknown error'); + }; + + return { + die: die + }; + } +); +module.config.mapper = def( + [ + ], + + function () { + var flat = function (id) { + return id; + }; + + var hierarchical = function (id) { + return id.replace(/\./g, '/'); + }; + + var constant = function (name) { + return function () { + return name; + }; + }; + + return { + flat: flat, + hierarchical: hierarchical, + constant: constant + }; + } +); +module.api = def( + [ + module.runtime + ], + + function (runtime) { + var delegate = function (method) { + return function () { + return runtime[method].apply(null, arguments); + }; + }; + + return { + define: delegate('define'), + require: delegate('require'), + demand: delegate('demand'), + main: delegate('main'), + load: delegate('load'), + loadscript: delegate('loadscript') + }; + } +); +module.util.path = def( + [ + ], + + function () { + var dirname = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(0, end); + }; + + var basename = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(end + 1); + }; + + return { + basename: basename, + dirname: dirname + }; + } +); +module.util.locator = def( + [ + ], + + function () { + var browser = function () { + var scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1].src; + }; + + var runtime = module.runtime.locate; + + var locate = function () { + var f = runtime || browser; + return f(); + }; + + return { + locate: locate + }; + } +); +module.util.pather = def( + [ + module.util.path + ], + + function (path) { + var create = function (relativeto) { + var base = path.dirname(relativeto); + return function (path) { + return base + '/' + path; + }; + }; + + return { + create: create + }; + } +);module.modulator.modulators = def( + [ + ephox.bolt.kernel.fp.functions, + ephox.bolt.kernel.modulator.bolt, + ephox.bolt.loader.api.commonjsevaller, + ephox.bolt.loader.api.scripttag, + ephox.bolt.loader.api.xhrevaller, + ephox.bolt.loader.api.xhrinjector + ], + + function (fn, bolt, commonjsevaller, scripttag, xhrevaller, xhrinjector) { + var wrap = function (modulator, loader) { + var create = fn.curry(modulator.create, loader); + + return { + create: create + } + }; + + return { + boltcommonjs: wrap(bolt, commonjsevaller), + boltscripttag: wrap(bolt, scripttag), + boltxhreval: wrap(bolt, xhrevaller), + boltxhrinjector: wrap(bolt, xhrinjector) + }; + } +); +module.config.builtins = def( + [ + ephox.bolt.module.modulator.modulators.boltscripttag, + ephox.bolt.module.modulator.modulators.boltcommonjs + ], + + function (boltscripttag, boltcommonjs) { + return { + // TODO: 'amd' is maintained for backwards compatibility, will be removed + // at some point. + browser: { bolt: boltscripttag, amd: boltscripttag }, + commonjs: { bolt: boltcommonjs, amd: boltcommonjs } + }; + } +); +module.config.specs = def( + [ + module.util.pather + ], + + function (pather) { + var type = function (type, implementation) { + return { + type: type, + implementation: implementation, + modulator: implementation + '.Modulator', + compiler: implementation + '.Compiler' + }; + }; + + var source = function (relativeto) { + return function (type /*, args */) { + return { + type: type, + relativeto: relativeto, + args: [ pather.create(relativeto) ].concat(Array.prototype.slice.call(arguments, 1)) + }; + } + }; + + return { + type: type, + source: source + }; + } +); +module.reader.bouncing = def( + [ + ephox.bolt.kernel.fp.array, + module.error.error, + module.config.specs + ], + + function (ar, error, specs) { + var bounce = function (done, read, acc) { + var next = acc.configs.shift(); + read(next.relativeto, next.config, done, acc); + }; + + var tick = function (file, cfg, done, read, acc) { + var munged = ar.map(cfg.configs || [], function (config) { + return { relativeto: file, config: config }; + }); + var accumulated = { + sources: acc.sources.concat(cfg.sources || []), + types: acc.types.concat(cfg.types || []), + configs: munged.concat(acc.configs) + }; + if (accumulated.configs.length > 0) + bounce(done, read, accumulated); + else + done({ sources: accumulated.sources, types: accumulated.types }); + }; + + /* + * All precedence is depth-first, pre-order. Example: + * + * A + * /-\ + * B C + * /| |\ + * D E F G + * + * Configs are read in A, B, D, E, C, F, G. + * + * If configs mixed delegation and sources, the + * sources would be ordered the same: A, B, D, E, C, F, G. + */ + + var evaluate = function (file, payload, done, read, acc) { + var result = {}; + /* eval scope */ + var mapper = module.config.mapper; + var type = specs.type; + var source = specs.source(file); + var configure = function (configuration) { + result = configuration; + }; + try { + eval(payload); + } catch (e) { + throw 'Could not load configuration [' + file + '], with: ' + e; + } + tick(file, result, done, read, acc); + }; + + return { + evaluate: evaluate + }; + } +); +module.reader.browser = def( + [ + module.error.error, + module.reader.bouncing, + module.util.path, + ephox.bolt.loader.transporter.xhr + ], + + function (error, bouncing, path, xhr) { + var read = function (relativeto, file, done, acc) { + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = base + '/' + file; + xhr.request(absolute, function (payload) { + bouncing.evaluate(absolute, payload, done, read, accumulated); + }, error.die); + }; + + return { + read: read + }; + } +); +module.reader.node = def( + [ + module.reader.bouncing + ], + + function (bouncing, path, fs) { + var read = function (relativeto, file, done, acc) { + var fs = require('fs'); + var path = require('path'); + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = path.resolve(base, file); + var payload = fs.readFileSync(absolute, 'UTF-8'); + bouncing.evaluate(absolute, payload, done, read, accumulated); + }; + + return { + read: read + }; + } +); +module.reader.direct = def( + [ + ], + + function () { + var create = function (configuration) { + return function (done) { + done({ + sources: configuration.sources || [], + types: configuration.types || [], + configs: configuration.configs || [] + }); + }; + }; + + return { + create: create + }; + } +); +module.bootstrap.configloader = def( + [ + module.util.locator, + module.reader.browser + ], + + function (locator, browser) { + var create = function (file) { + var script = locator.locate(); + return function (done) { + browser.read(script, file, done); + }; + }; + + return { + create: create + }; + } +);module.bootstrap.deferred = def( + [ + ephox.bolt.kernel.fp.array + ], + + function (ar) { + var deferred = []; + + var require = function (ids, fn) { + var r = function (real) { + real(ids, fn); + }; + deferred.push(r); + }; + + var configured = function (require) { + ar.each(deferred, function (action) { + action(require); + }); + deferred = []; + }; + + return { + require: require, + configured: configured + }; + } +); +module.bootstrap.main = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.runtime + ], + + function (config, deferred, runtime) { + var main = function (id, args, configids, callback) { + runtime.require(configids || [], function () { + callback && callback.apply(null, arguments); + runtime.require([ id ], function (module) { + module.apply(null, args || []); + }); + }); + }; + + return { + main: main + }; + } +); +module.bootstrap.install = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.bootstrap.main, + module.runtime, + module.error.error + ], + + function (config, deferred, main, runtime, error) { + var notready = function () { throw 'bolt not initialised, can not call define or demand, did you mean to use require or main?'; }; + + var install = function (reader, builtins, load, loadscript) { + runtime.define = notready; + runtime.demand = notready; + runtime.require = deferred.require; + runtime.main = main.main; + runtime.load = load; + runtime.loadscript = loadscript; + + reader(function (configuration) { + var bolt = config.configure(configuration, builtins, error.die); + runtime.define = bolt.define; + runtime.require = bolt.require; + runtime.demand = bolt.demand; + + deferred.configured(runtime.require); + }); + }; + + return { + install: install + }; + } +); + +})(Function('return this')()); +(function (global) { + var obj = ephox.bolt.kernel.fp.object; + var api = ephox.bolt.module.api; + var builtins = ephox.bolt.module.config.builtins.browser; + var install = ephox.bolt.module.bootstrap.install; + var reader = ephox.bolt.module.bootstrap.configloader.create("browser.js"); + var transport = ephox.bolt.loader.transporter.xhr.request; + var script = ephox.bolt.loader.api.scripttag.load; + install.install(reader, builtins, transport, script); + obj.merge(global, api); +})(Function("return this;")()); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-demo.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-demo.js new file mode 100644 index 0000000..c07c094 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-demo.js @@ -0,0 +1,1491 @@ +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var kernel = bolt.kernel = bolt.kernel || {}; +kernel.api = kernel.api || {}; +kernel.async = kernel.api || {}; +kernel.fp = kernel.fp || {}; +kernel.modulator = kernel.modulator || {}; +kernel.module = kernel.module || {}; +kernel.fp.array = def( + [ + ], + + function () { + var equals = function (a1, a2) { + if (a1.length !== a2.length) + return false; + for (var i = 0; i < a1.length; ++i) + if (a1[i] !== a2[i]) + return false; + return true; + }; + + var forall = function (a, f) { + var fn = f || function (x) { + return x === true; + }; + for (var i = 0; i < a.length; ++i) + if (fn(a[i]) !== true) + return false; + return true; + }; + + var map = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + r.push(f(a[i], i)); + return r; + }; + + var flatten = function (a) { + var r = []; + for (var i = 0; i < a.length; ++i) + r = r.concat(a[i]); + return r; + }; + + var flatmap = function (a, f) { + return flatten(map(a, f)); + }; + + var filter = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + if (f(a[i])) + r.push(a[i]); + return r; + }; + + var each = map; + + var contains = function (a, x) { + return !forall(a, function (v) { + return v !== x; + }); + }; + + var indexof = function (a, x) { + for (var i = 0; i < a.length; ++i) + if (a[i] === x) + return i; + return -1; + }; + + return { + equals: equals, + forall: forall, + map: map, + flatten: flatten, + flatmap: flatmap, + filter: filter, + each: each, + contains: contains, + indexof: indexof + }; + } +); +kernel.fp.object = def( + [ + ], + + function () { + var map = function (o, f) { + var r = {}; + for (var i in o) + if (o.hasOwnProperty(i)) + r[i] = f(i, o[i]); + return r; + }; + + var each = map; + + var merge = function (d, s) { + each(s, function (k, v) { + d[k] = v; + }); + }; + + var keys = function (o) { + var r = []; + each(o, function (k) { + r.push(k); + }); + return r; + }; + + return { + each: each, + keys: keys, + map: map, + merge: merge + }; + } +); +kernel.fp.functions = def( + [ + ], + + function () { + var curry = function (f) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 1); + return function () { + var all = args.concat(slice.call(arguments, 0)); + return f.apply(null, all); + }; + }; + + var not = function (z) { + return function () { + var slice = Array.prototype.slice; + return !z.apply(null, slice.call(arguments, 0)); + }; + }; + + var apply = function (f) { + var slice = Array.prototype.slice; + return f.apply(null, slice.call(arguments, 0)); + }; + + return { + curry: curry, + not: not, + apply: apply + }; + } +);kernel.async.map = def( + [ + kernel.fp.array + ], + + function (ar) { + var amap = function (data, f, oncomplete) { + var total = data.length; + var count = 0; + var results = []; + + ar.each(data, function (datum, i) { + f(datum, function (result) { + ++count; + results[i] = result; + if (count === total) + oncomplete(results); + }); + }); + }; + + return { + amap: amap + }; + } +); +/** + * This module has a dual responsibility: + * 1. Ensures that asynchronous function calls, 'f', that share the same + * 'key' are not executed in parallel. + * 2. In the case where an attempt to call in parallel is prevented, + * the 'action' callbacks are executed when the asynchronous call is + * completed. + * + * Example: + * When we async-map to remotely fetch module definition, it is + * important that only a single define is evaluated, but the + * notification that the definition has completed is propagated + * to all interested parties. + * + * 1. we require dependencies 'x' and 'y' + * + * 2. both x and y are defined in the same file (i.e. compiled together), 'a.js'. + * + * 3. we resolve x and y, to their load spec using a modulator + * x_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * y_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * + * 4. we make the piggyback call for x: + * piggybacker.piggyback(x_spec.url, x_spec.load, xdone); + * + * this will register the 'xdone' action, and actually + * trigger the load call, with a synthetic callback + * responsible for triggering all registered actions. + * + * 5. we make the piggyback call for y: + * piggybacker.piggyback(y_spec.url, y_spec.load, ydone); + * + * this will register the 'ydone' action, but NOT trigger + * the load call. + * + * 6. the load call completes, and calls the synthetic callback, + * which is responsible for triggering both 'xdone' and 'ydone'. + * + * 7. something else happens that means we have to load 'a.js' again, + * the piggybacker DOES NOT prevent this call, and will follow + * the above process. + */ +kernel.async.piggybacker = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function () { + var queue = {}; // key -> [actions] + + var process = function (key) { + var actions = queue[key]; + delete queue[key]; + ar.each(actions, fn.apply); + }; + + var piggyback = function (key, f, action) { + if (queue[key] === undefined) { + queue[key] = [ action ]; + f(fn.curry(process, key)); + } else { + queue[key].push(action); + } + }; + + return { + piggyback: piggyback + }; + }; + + return { + create: create + }; + } +); +kernel.modulator.globalator = def( + [ + ], + + function () { + var create = function () { + // FIX pull out + var resolve = function (name, scope) { + var parts = name.split('.'); + var r = scope; + for (var i = 0; i < parts.length && r !== undefined; ++i) + r = r[parts[i]]; + return r; + }; + + var global = Function('return this')(); + + var can = function (id) { + return id.indexOf('global!') === 0; + }; + + var get = function (id, define, require) { + var name = id.substring('global!'.length); + + var load = function (onsuccess, onfailure) { + var instance = resolve(name, global); + if (instance !== undefined) { + define(id, [], function () { return instance; }); + onsuccess(); + } else { + onfailure('Modulator error: could not resolve global [' + name + ']'); + } + }; + + return { + url: id, // this just needs to be unique, no download required. + load: load, + serial: true + }; + }; + + return { + can: can, + get: get + } + }; + return { + create: create + }; + } +); +kernel.modulator.bolt = def( + [ + kernel.fp.functions + ], + + function (fn) { + var create = function (loader, pather, namespace, path, idTransformer, options) { + var can = function (id) { + return id === namespace || id.indexOf(namespace + '.') === 0 || id.indexOf(namespace + '/') === 0; + }; + + var get = function (id) { + var before = options !== undefined && options.absolute === true ? path : pather(path); + var after = options !== undefined && options.fresh === true ? '?cachebuster=' + new Date().getTime() : ''; + var url = before + "/" + idTransformer(id) + '.js' + after; + var load = fn.curry(loader.load, url); + + return { + url: url, + load: load, + serial: false + }; + }; + + return { + can: can, + get: get + }; + }; + + return { + create: create + }; + } +);kernel.module.stratifier = def( + [ + kernel.fp.array + ], + + function (ar) { + var stratify = function (specs) { + var parallels = ar.filter(specs, function (spec) { + return !spec.serial; + }); + return parallels.length > 0 ? parallels : specs.slice(0, 1); + }; + + return { + stratify: stratify + }; + } +); +/** + * This module performs dependency analysis of strings that depend on sets of + * strings. + * + * The input is an array of root strings to start analysis from, and an object + * that contains a mapping of each string to the strings it depends on. + * + * Performing an analysis results in either: + * 1. an empty array, indicating that all dependencies are satisfied, + * 2. an array of strings that are, at the minimum, still needed in order to + * satisfy the given dependency trees, or + * 3. an array of strings that form a dependency cycle. + */ +kernel.module.analyser = def( + [ + kernel.fp.array + ], + + function (array) { + var collect = function (path, name) { + var i = array.indexof(path, name); + var p = path.slice(i); + return p.concat([name]); + }; + + /** + * @param {array} roots Contains a list of root ids + * @param {object} modules Contains dependency information in format: { id: [ 'id1', 'id2' ] } + */ + var analyse = function (roots, modules) { + var done = {}; + var path = []; + var missing = []; + var cycle; + + var children = function (name) { + array.each(modules[name], attempt); + }; + + var examine = function (name) { + if (modules[name]) + children(name); + else + missing.push(name); + }; + + var descend = function (name) { + path.push(name); + examine(name); + path.pop(); + }; + + var decycle = function (name) { + if (array.contains(path, name)) + cycle = collect(path, name); + else + descend(name); + }; + + var attempt = function (name) { + if (!done[name]) { + decycle(name); + done[name] = true; + } + }; + + array.each(roots, attempt); + + return cycle ? { cycle: cycle } : { load: missing }; + }; + + return { + analyse: analyse + }; + } +); +kernel.module.fetcher = def( + [ + kernel.fp.array, + kernel.fp.functions, + kernel.async.map, + kernel.async.piggybacker, + kernel.module.stratifier + ], + + function (ar, fn, map, piggybacker, stratifier) { + var create = function (regulator, validator, onerror, define, require, demand) { + var piggyback = piggybacker.create(); + + var validate = function (onsuccess, results) { + var failed = ar.filter(results, fn.not(validator)); + if (failed.length > 0) + onerror('Fetcher error: modules were not defined: ' + failed.join(', ')); + else + onsuccess(); + }; + + var mapper = function (spec, onresult) { + var action = fn.curry(onresult, spec.id); + var load = function (callback) { + spec.load(callback, onerror); + }; + piggyback.piggyback(spec.url, load, action); + }; + + var asyncfetch = function (specs, onsuccess) { + var oncomplete = fn.curry(validate, onsuccess); + var strata = stratifier.stratify(specs); + map.amap(strata, mapper, oncomplete); + }; + + var fetch = function (ids, onsuccess) { + regulator.regulate(ids, define, require, demand, function (specs) { + asyncfetch(specs, onsuccess); + }, onerror); + }; + + return { + fetch: fetch + }; + }; + + return { + create: create + }; + } +); +kernel.module.loader = def( + [ + kernel.module.analyser + ], + + function (analyser) { + var load = function (roots, deps, fetcher, oncontinue, onsuccess, onerror) { + var result = analyser.analyse(roots, deps); + + if (result.cycle) + onerror('Dependency error: a circular module dependency exists from ' + result.cycle.join(' ~> ')); + else if (result.load.length === 0) + onsuccess(); + else + fetcher.fetch(result.load, oncontinue); + }; + + return { + load: load + }; + } +); +kernel.module.manager = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.module.loader, + kernel.module.fetcher + ], + + function (ar, obj, loader, fetcher) { + var create = function (regulator, onerror) { + var blueprints = {}; // id -> { id: string, dependencies: [ string ], definition: function } + var modules = {}; // id -> module + + // Adds a module to the system. + var define = function (id, dependencies, definition) { + if (id === undefined) + onerror("Define error: module id can not be undefined"); + else if (blueprints[id] !== undefined) + onerror("Define error: module '" + id + "' is already defined"); + else + blueprints[id] = { id: id, dependencies: dependencies, definition: definition }; + }; + + // Loads a set of modules asynchronously. + var require = function (ids, callback) { + var onsuccess = function () { + var instances = ar.map(ids, demand); + callback.apply(null, instances); + }; + + var oncontinue = function () { + var deps = obj.map(blueprints, function (k, v) { + return v.dependencies; + }); + loader.load(ids, deps, fetch, oncontinue, onsuccess, onerror); + }; + + oncontinue(); + }; + + // Instantiates a module and all of its dependencies. + var demand = function (id) { + if (modules[id] !== undefined) + return modules[id]; + if (blueprints[id] === undefined) + throw "module '" + id + "' is not defined"; + var result = instantiate(id); + if (result === undefined) + throw "module '" + id + "' returned undefined from definition function"; + modules[id] = result; + return result; + }; + + var instantiate = function (id) { + var blueprint = blueprints[id]; + var args = ar.map(blueprint.dependencies, demand); // Instantiate dependencies + return blueprint.definition.apply(null, args); // Instantiate self + }; + + var validator = function (id) { return blueprints[id] !== undefined; }; + var fetch = fetcher.create(regulator, validator, onerror, define, require, demand); + + return { + define: define, + require: require, + demand: demand + }; + }; + + return { + create: create + }; + } +); +kernel.api.sources = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.modulator.globalator + ], + + function (ar, obj, globalator) { + var create = function (builtins, configuration) { + var data = { + 'global': { instance: globalator } + }; + obj.each(builtins, function (key, value) { + data[key] = { instance: value }; + }); + ar.each(configuration.types, function (spec) { + data[spec.type] = { id: spec.modulator }; + }); + var sourcespecs = configuration.sources.slice(0); + var sources = [ globalator.create() ]; + + var guard = function (type) { + if (data[type] === undefined) + throw 'Unknown modulator type [' + type + '].'; + }; + + var isResolved = function (type) { + guard(type); + return data[type].instance !== undefined; + }; + + var idOf = function (type) { + guard(type); + return data[type].id; + }; + + var instanceOf = function (type) { + guard(type); + return data[type].instance; + }; + + var register = function (type, instance) { + guard(type); + data[type].instance = instance; + }; + + var find = function (id) { + for (var i = 0; i < sources.length; ++i) + if (sources[i].can(id)) + return { found: sources[i] }; + return { notfound: true }; + }; + + var crank = function () { + var left = []; + ar.each(sourcespecs, function (spec) { + if (isResolved(spec.type)) { + var instance = instanceOf(spec.type); + var source = instance.create.apply(null, spec.args); + sources.push(source); + } else + left.push(spec); + }); + sourcespecs = left; + }; + + return { + isResolved: isResolved, + idOf: idOf, + instanceOf: instanceOf, + register: register, + find: find, + crank: crank + }; + }; + + return { + create: create + }; + } +); +kernel.api.regulator = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function (sources) { + /* + * 1. Resolve configuration as much as possible + * 2. Check for unresolved modulator types that are required to continue. + * a) Go ahead and resolve, if we have everything we need. + * b) Delay, requiring the modulators, then retry. + */ + var regulate = function (ids, define, require, demand, onsuccess, onerror) { + sources.crank(); + var required = ar.map(ids, determinetype); + var unresolved = ar.filter(required, fn.not(sources.isResolved)); + if (unresolved.length === 0) + resolve(ids, define, require, demand, onsuccess, onerror); + else + delay(unresolved, ids, define, require, demand, onsuccess, onerror); + }; + + var resolve = function (ids, define, require, demand, onsuccess, onerror) { + var r = []; + for (var i = 0; i < ids.length; ++i) { + var id = ids[i]; + var source = sources.find(id); + if (source.notfound) { + onerror('Could not find source for module [' + id + ']'); + return; + } + var spec = source.found.get(id, define, require, demand); + r[i] = build(id, spec); + } + onsuccess(r); + }; + + var build = function (id, spec) { + return { + id: id, + url: spec.url, + load: spec.load, + serial: spec.serial + }; + }; + + var delay = function (types, ids, define, require, demand, onsuccess, onerror) { + var modulatorids = ar.map(types, sources.idOf); + require(modulatorids, function (/* modulators */) { + var modulators = arguments; + ar.each(types, function (type, i) { + sources.register(type, modulators[i]); + }); + regulate(ids, define, require, demand, onsuccess, onerror); + }); + }; + + var determinetype = function (id) { + var index = id.indexOf('!'); + return index === -1 ? 'bolt' : id.substring(0, index); + }; + + return { + regulate: regulate + }; + }; + + return { + create: create + }; + } +); +kernel.api.config = def( + [ + kernel.module.manager, + kernel.api.regulator, + kernel.api.sources + ], + + function (manager, regulator, sources) { + var configure = function (configuration, builtins, onerror) { + var s = sources.create(builtins, configuration); + var r = regulator.create(s); + var engine = manager.create(r, onerror); + + return { + define: engine.define, + require: engine.require, + demand: engine.demand + }; + }; + + return { + configure: configure + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var loader = bolt.loader = bolt.loader || {}; +loader.executor = loader.executor || {}; +loader.api = loader.api || {}; +loader.transporter = loader.transporter || {}; +loader.tag = loader.tag || {}; +loader.tag.script = def( + [ + ], + + function () { + var guard = function (callback) { + return function (evt) { + if (evt.srcElement.readyState === "loaded" || evt.srcElement.readyState === "complete") + callback(); + }; + }; + + var ie = function (el) { + return el.attachEvent && !window.opera; + }; + + var onload = function (el, callback) { + if (ie(el)) + el.attachEvent("onreadystatechange", guard(callback)); + else + el.addEventListener("load", callback, false); + }; + + var createtag = function (callback) { + var el = document.createElement("script"); + el.type = "text/javascript"; + onload(el, callback); + return el; + }; + + var insert = function (decorator, callback) { + var el = createtag(callback); + decorator(el); + var head = document.getElementsByTagName("head")[0]; + head.appendChild(el); + }; + + return { + insert: insert + }; + } +); +loader.transporter.commonjs = def( + [ + ], + + function () { + var read = function (url, success, error) { + var fs = require('fs'); + fs.exists(url, function (exists) { + if (exists) + fs.readFile(url, 'UTF-8', function (err, data) { + if (err) + error('Error reading file [' + url + '], error [' + err + ']'); + else + success(data); + }); + else + error('File does not exist [' + url + ']'); + }); + }; + + return { + read: read + }; + } +); +loader.transporter.xhr = def( + [ + ], + + function () { + var requestObject = function () { + // Correct way to use XMLHttpRequest in IE: + // http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx + var factories = [ + function () { return new XMLHttpRequest() }, + function () { return new ActiveXObject("Microsoft.XMLHTTP") } + ]; + + return fallback(factories); + }; + + var fallback = function (items) { + for (var i = 0; i < items.length; ++i) { + try { + return items[i](); + } catch (e) { + } + } + }; + + var handler = function (req, url, success, error) { + return function () { + if (req.readyState === 4) + done(req, url, success, error); + }; + }; + + var done = function (req, url, success, error) { + if (req.status === 200 || req.status === 304) + success(req.responseText); + else + error('Transport error: ' + req.status + ' ' + req.statusText + ' for resource: "' + url + '"'); + }; + + var getUrl = function (req, url, success, error) { + req.open('GET', url, true); + req.onreadystatechange = handler(req, url, success, error); + req.send(); + }; + + var request = function (url, success, error) { + var req = requestObject(); + if (req) + getUrl(req, url, success, error); + else + error('Transport error: browser does not support XMLHttpRequest.'); + }; + + return { + request: request + }; + } +); +loader.executor.evaller = def( + [ + ], + + function () { + var execute = function (data, onsuccess, onfailure) { + try { + eval(data); + } catch(e) { + onfailure(e); + return; + } + + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.executor.injector = def( + [ + loader.tag.script + ], + + function (script) { + var execute = function (data, onsuccess, onfailure) { + var inject = function (tag) { + tag.text = data; + }; + + var noop = function () {}; + + // Injection does not fire events, but execution happens synchronously, + // so we just make an explicit callback + script.insert(inject, noop); + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.api.commonjsevaller = def( + [ + loader.transporter.commonjs, + loader.executor.evaller + ], + + function (commonjs, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + commonjs.read(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.scripttag = def( + [ + loader.tag.script + ], + + function (script) { + var load = function (url, onsuccess, onfailure) { + var sourcer = function (tag) { + tag.src = url; + }; + + script.insert(sourcer, onsuccess); + }; + + return { + load: load + }; + } +); +loader.api.xhrevaller = def( + [ + loader.transporter.xhr, + loader.executor.evaller + ], + + function (xhr, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.xhrinjector = def( + [ + loader.transporter.xhr, + loader.executor.injector + ], + + function (xhr, injector) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + injector.execute(data, onsuccess); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var module = bolt.module = bolt.module || {}; +module.bootstrap = module.bootstrap || {}; +module.config = module.config || {}; +module.error = module.error || {}; +module.modulator = module.modulator || {}; +module.reader = module.reader || {}; +module.runtime = module.runtime || {}; +module.util = module.util || {}; +module.error.error = def( + [ + ], + + function () { + var die = function (msg) { + throw msg || new Error('unknown error'); + }; + + return { + die: die + }; + } +); +module.config.mapper = def( + [ + ], + + function () { + var flat = function (id) { + return id; + }; + + var hierarchical = function (id) { + return id.replace(/\./g, '/'); + }; + + var constant = function (name) { + return function () { + return name; + }; + }; + + return { + flat: flat, + hierarchical: hierarchical, + constant: constant + }; + } +); +module.api = def( + [ + module.runtime + ], + + function (runtime) { + var delegate = function (method) { + return function () { + return runtime[method].apply(null, arguments); + }; + }; + + return { + define: delegate('define'), + require: delegate('require'), + demand: delegate('demand'), + main: delegate('main'), + load: delegate('load'), + loadscript: delegate('loadscript') + }; + } +); +module.util.path = def( + [ + ], + + function () { + var dirname = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(0, end); + }; + + var basename = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(end + 1); + }; + + return { + basename: basename, + dirname: dirname + }; + } +); +module.util.locator = def( + [ + ], + + function () { + var browser = function () { + var scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1].src; + }; + + var runtime = module.runtime.locate; + + var locate = function () { + var f = runtime || browser; + return f(); + }; + + return { + locate: locate + }; + } +); +module.util.pather = def( + [ + module.util.path + ], + + function (path) { + var create = function (relativeto) { + var base = path.dirname(relativeto); + return function (path) { + return base + '/' + path; + }; + }; + + return { + create: create + }; + } +);module.modulator.modulators = def( + [ + ephox.bolt.kernel.fp.functions, + ephox.bolt.kernel.modulator.bolt, + ephox.bolt.loader.api.commonjsevaller, + ephox.bolt.loader.api.scripttag, + ephox.bolt.loader.api.xhrevaller, + ephox.bolt.loader.api.xhrinjector + ], + + function (fn, bolt, commonjsevaller, scripttag, xhrevaller, xhrinjector) { + var wrap = function (modulator, loader) { + var create = fn.curry(modulator.create, loader); + + return { + create: create + } + }; + + return { + boltcommonjs: wrap(bolt, commonjsevaller), + boltscripttag: wrap(bolt, scripttag), + boltxhreval: wrap(bolt, xhrevaller), + boltxhrinjector: wrap(bolt, xhrinjector) + }; + } +); +module.config.builtins = def( + [ + ephox.bolt.module.modulator.modulators.boltscripttag, + ephox.bolt.module.modulator.modulators.boltcommonjs + ], + + function (boltscripttag, boltcommonjs) { + return { + // TODO: 'amd' is maintained for backwards compatibility, will be removed + // at some point. + browser: { bolt: boltscripttag, amd: boltscripttag }, + commonjs: { bolt: boltcommonjs, amd: boltcommonjs } + }; + } +); +module.config.specs = def( + [ + module.util.pather + ], + + function (pather) { + var type = function (type, implementation) { + return { + type: type, + implementation: implementation, + modulator: implementation + '.Modulator', + compiler: implementation + '.Compiler' + }; + }; + + var source = function (relativeto) { + return function (type /*, args */) { + return { + type: type, + relativeto: relativeto, + args: [ pather.create(relativeto) ].concat(Array.prototype.slice.call(arguments, 1)) + }; + } + }; + + return { + type: type, + source: source + }; + } +); +module.reader.bouncing = def( + [ + ephox.bolt.kernel.fp.array, + module.error.error, + module.config.specs + ], + + function (ar, error, specs) { + var bounce = function (done, read, acc) { + var next = acc.configs.shift(); + read(next.relativeto, next.config, done, acc); + }; + + var tick = function (file, cfg, done, read, acc) { + var munged = ar.map(cfg.configs || [], function (config) { + return { relativeto: file, config: config }; + }); + var accumulated = { + sources: acc.sources.concat(cfg.sources || []), + types: acc.types.concat(cfg.types || []), + configs: munged.concat(acc.configs) + }; + if (accumulated.configs.length > 0) + bounce(done, read, accumulated); + else + done({ sources: accumulated.sources, types: accumulated.types }); + }; + + /* + * All precedence is depth-first, pre-order. Example: + * + * A + * /-\ + * B C + * /| |\ + * D E F G + * + * Configs are read in A, B, D, E, C, F, G. + * + * If configs mixed delegation and sources, the + * sources would be ordered the same: A, B, D, E, C, F, G. + */ + + var evaluate = function (file, payload, done, read, acc) { + var result = {}; + /* eval scope */ + var mapper = module.config.mapper; + var type = specs.type; + var source = specs.source(file); + var configure = function (configuration) { + result = configuration; + }; + try { + eval(payload); + } catch (e) { + throw 'Could not load configuration [' + file + '], with: ' + e; + } + tick(file, result, done, read, acc); + }; + + return { + evaluate: evaluate + }; + } +); +module.reader.browser = def( + [ + module.error.error, + module.reader.bouncing, + module.util.path, + ephox.bolt.loader.transporter.xhr + ], + + function (error, bouncing, path, xhr) { + var read = function (relativeto, file, done, acc) { + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = base + '/' + file; + xhr.request(absolute, function (payload) { + bouncing.evaluate(absolute, payload, done, read, accumulated); + }, error.die); + }; + + return { + read: read + }; + } +); +module.reader.node = def( + [ + module.reader.bouncing + ], + + function (bouncing, path, fs) { + var read = function (relativeto, file, done, acc) { + var fs = require('fs'); + var path = require('path'); + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = path.resolve(base, file); + var payload = fs.readFileSync(absolute, 'UTF-8'); + bouncing.evaluate(absolute, payload, done, read, accumulated); + }; + + return { + read: read + }; + } +); +module.reader.direct = def( + [ + ], + + function () { + var create = function (configuration) { + return function (done) { + done({ + sources: configuration.sources || [], + types: configuration.types || [], + configs: configuration.configs || [] + }); + }; + }; + + return { + create: create + }; + } +); +module.bootstrap.configloader = def( + [ + module.util.locator, + module.reader.browser + ], + + function (locator, browser) { + var create = function (file) { + var script = locator.locate(); + return function (done) { + browser.read(script, file, done); + }; + }; + + return { + create: create + }; + } +);module.bootstrap.deferred = def( + [ + ephox.bolt.kernel.fp.array + ], + + function (ar) { + var deferred = []; + + var require = function (ids, fn) { + var r = function (real) { + real(ids, fn); + }; + deferred.push(r); + }; + + var configured = function (require) { + ar.each(deferred, function (action) { + action(require); + }); + deferred = []; + }; + + return { + require: require, + configured: configured + }; + } +); +module.bootstrap.main = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.runtime + ], + + function (config, deferred, runtime) { + var main = function (id, args, configids, callback) { + runtime.require(configids || [], function () { + callback && callback.apply(null, arguments); + runtime.require([ id ], function (module) { + module.apply(null, args || []); + }); + }); + }; + + return { + main: main + }; + } +); +module.bootstrap.install = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.bootstrap.main, + module.runtime, + module.error.error + ], + + function (config, deferred, main, runtime, error) { + var notready = function () { throw 'bolt not initialised, can not call define or demand, did you mean to use require or main?'; }; + + var install = function (reader, builtins, load, loadscript) { + runtime.define = notready; + runtime.demand = notready; + runtime.require = deferred.require; + runtime.main = main.main; + runtime.load = load; + runtime.loadscript = loadscript; + + reader(function (configuration) { + var bolt = config.configure(configuration, builtins, error.die); + runtime.define = bolt.define; + runtime.require = bolt.require; + runtime.demand = bolt.demand; + + deferred.configured(runtime.require); + }); + }; + + return { + install: install + }; + } +); + +})(Function('return this')()); +(function (global) { + var obj = ephox.bolt.kernel.fp.object; + var api = ephox.bolt.module.api; + var builtins = ephox.bolt.module.config.builtins.browser; + var install = ephox.bolt.module.bootstrap.install; + var reader = ephox.bolt.module.bootstrap.configloader.create("demo.js"); + var transport = ephox.bolt.loader.transporter.xhr.request; + var script = ephox.bolt.loader.api.scripttag.load; + install.install(reader, builtins, transport, script); + obj.merge(global, api); +})(Function("return this;")()); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-prod.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-prod.js new file mode 100644 index 0000000..d999c52 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/bootstrap-prod.js @@ -0,0 +1,1491 @@ +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var kernel = bolt.kernel = bolt.kernel || {}; +kernel.api = kernel.api || {}; +kernel.async = kernel.api || {}; +kernel.fp = kernel.fp || {}; +kernel.modulator = kernel.modulator || {}; +kernel.module = kernel.module || {}; +kernel.fp.array = def( + [ + ], + + function () { + var equals = function (a1, a2) { + if (a1.length !== a2.length) + return false; + for (var i = 0; i < a1.length; ++i) + if (a1[i] !== a2[i]) + return false; + return true; + }; + + var forall = function (a, f) { + var fn = f || function (x) { + return x === true; + }; + for (var i = 0; i < a.length; ++i) + if (fn(a[i]) !== true) + return false; + return true; + }; + + var map = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + r.push(f(a[i], i)); + return r; + }; + + var flatten = function (a) { + var r = []; + for (var i = 0; i < a.length; ++i) + r = r.concat(a[i]); + return r; + }; + + var flatmap = function (a, f) { + return flatten(map(a, f)); + }; + + var filter = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + if (f(a[i])) + r.push(a[i]); + return r; + }; + + var each = map; + + var contains = function (a, x) { + return !forall(a, function (v) { + return v !== x; + }); + }; + + var indexof = function (a, x) { + for (var i = 0; i < a.length; ++i) + if (a[i] === x) + return i; + return -1; + }; + + return { + equals: equals, + forall: forall, + map: map, + flatten: flatten, + flatmap: flatmap, + filter: filter, + each: each, + contains: contains, + indexof: indexof + }; + } +); +kernel.fp.object = def( + [ + ], + + function () { + var map = function (o, f) { + var r = {}; + for (var i in o) + if (o.hasOwnProperty(i)) + r[i] = f(i, o[i]); + return r; + }; + + var each = map; + + var merge = function (d, s) { + each(s, function (k, v) { + d[k] = v; + }); + }; + + var keys = function (o) { + var r = []; + each(o, function (k) { + r.push(k); + }); + return r; + }; + + return { + each: each, + keys: keys, + map: map, + merge: merge + }; + } +); +kernel.fp.functions = def( + [ + ], + + function () { + var curry = function (f) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 1); + return function () { + var all = args.concat(slice.call(arguments, 0)); + return f.apply(null, all); + }; + }; + + var not = function (z) { + return function () { + var slice = Array.prototype.slice; + return !z.apply(null, slice.call(arguments, 0)); + }; + }; + + var apply = function (f) { + var slice = Array.prototype.slice; + return f.apply(null, slice.call(arguments, 0)); + }; + + return { + curry: curry, + not: not, + apply: apply + }; + } +);kernel.async.map = def( + [ + kernel.fp.array + ], + + function (ar) { + var amap = function (data, f, oncomplete) { + var total = data.length; + var count = 0; + var results = []; + + ar.each(data, function (datum, i) { + f(datum, function (result) { + ++count; + results[i] = result; + if (count === total) + oncomplete(results); + }); + }); + }; + + return { + amap: amap + }; + } +); +/** + * This module has a dual responsibility: + * 1. Ensures that asynchronous function calls, 'f', that share the same + * 'key' are not executed in parallel. + * 2. In the case where an attempt to call in parallel is prevented, + * the 'action' callbacks are executed when the asynchronous call is + * completed. + * + * Example: + * When we async-map to remotely fetch module definition, it is + * important that only a single define is evaluated, but the + * notification that the definition has completed is propagated + * to all interested parties. + * + * 1. we require dependencies 'x' and 'y' + * + * 2. both x and y are defined in the same file (i.e. compiled together), 'a.js'. + * + * 3. we resolve x and y, to their load spec using a modulator + * x_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * y_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * + * 4. we make the piggyback call for x: + * piggybacker.piggyback(x_spec.url, x_spec.load, xdone); + * + * this will register the 'xdone' action, and actually + * trigger the load call, with a synthetic callback + * responsible for triggering all registered actions. + * + * 5. we make the piggyback call for y: + * piggybacker.piggyback(y_spec.url, y_spec.load, ydone); + * + * this will register the 'ydone' action, but NOT trigger + * the load call. + * + * 6. the load call completes, and calls the synthetic callback, + * which is responsible for triggering both 'xdone' and 'ydone'. + * + * 7. something else happens that means we have to load 'a.js' again, + * the piggybacker DOES NOT prevent this call, and will follow + * the above process. + */ +kernel.async.piggybacker = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function () { + var queue = {}; // key -> [actions] + + var process = function (key) { + var actions = queue[key]; + delete queue[key]; + ar.each(actions, fn.apply); + }; + + var piggyback = function (key, f, action) { + if (queue[key] === undefined) { + queue[key] = [ action ]; + f(fn.curry(process, key)); + } else { + queue[key].push(action); + } + }; + + return { + piggyback: piggyback + }; + }; + + return { + create: create + }; + } +); +kernel.modulator.globalator = def( + [ + ], + + function () { + var create = function () { + // FIX pull out + var resolve = function (name, scope) { + var parts = name.split('.'); + var r = scope; + for (var i = 0; i < parts.length && r !== undefined; ++i) + r = r[parts[i]]; + return r; + }; + + var global = Function('return this')(); + + var can = function (id) { + return id.indexOf('global!') === 0; + }; + + var get = function (id, define, require) { + var name = id.substring('global!'.length); + + var load = function (onsuccess, onfailure) { + var instance = resolve(name, global); + if (instance !== undefined) { + define(id, [], function () { return instance; }); + onsuccess(); + } else { + onfailure('Modulator error: could not resolve global [' + name + ']'); + } + }; + + return { + url: id, // this just needs to be unique, no download required. + load: load, + serial: true + }; + }; + + return { + can: can, + get: get + } + }; + return { + create: create + }; + } +); +kernel.modulator.bolt = def( + [ + kernel.fp.functions + ], + + function (fn) { + var create = function (loader, pather, namespace, path, idTransformer, options) { + var can = function (id) { + return id === namespace || id.indexOf(namespace + '.') === 0 || id.indexOf(namespace + '/') === 0; + }; + + var get = function (id) { + var before = options !== undefined && options.absolute === true ? path : pather(path); + var after = options !== undefined && options.fresh === true ? '?cachebuster=' + new Date().getTime() : ''; + var url = before + "/" + idTransformer(id) + '.js' + after; + var load = fn.curry(loader.load, url); + + return { + url: url, + load: load, + serial: false + }; + }; + + return { + can: can, + get: get + }; + }; + + return { + create: create + }; + } +);kernel.module.stratifier = def( + [ + kernel.fp.array + ], + + function (ar) { + var stratify = function (specs) { + var parallels = ar.filter(specs, function (spec) { + return !spec.serial; + }); + return parallels.length > 0 ? parallels : specs.slice(0, 1); + }; + + return { + stratify: stratify + }; + } +); +/** + * This module performs dependency analysis of strings that depend on sets of + * strings. + * + * The input is an array of root strings to start analysis from, and an object + * that contains a mapping of each string to the strings it depends on. + * + * Performing an analysis results in either: + * 1. an empty array, indicating that all dependencies are satisfied, + * 2. an array of strings that are, at the minimum, still needed in order to + * satisfy the given dependency trees, or + * 3. an array of strings that form a dependency cycle. + */ +kernel.module.analyser = def( + [ + kernel.fp.array + ], + + function (array) { + var collect = function (path, name) { + var i = array.indexof(path, name); + var p = path.slice(i); + return p.concat([name]); + }; + + /** + * @param {array} roots Contains a list of root ids + * @param {object} modules Contains dependency information in format: { id: [ 'id1', 'id2' ] } + */ + var analyse = function (roots, modules) { + var done = {}; + var path = []; + var missing = []; + var cycle; + + var children = function (name) { + array.each(modules[name], attempt); + }; + + var examine = function (name) { + if (modules[name]) + children(name); + else + missing.push(name); + }; + + var descend = function (name) { + path.push(name); + examine(name); + path.pop(); + }; + + var decycle = function (name) { + if (array.contains(path, name)) + cycle = collect(path, name); + else + descend(name); + }; + + var attempt = function (name) { + if (!done[name]) { + decycle(name); + done[name] = true; + } + }; + + array.each(roots, attempt); + + return cycle ? { cycle: cycle } : { load: missing }; + }; + + return { + analyse: analyse + }; + } +); +kernel.module.fetcher = def( + [ + kernel.fp.array, + kernel.fp.functions, + kernel.async.map, + kernel.async.piggybacker, + kernel.module.stratifier + ], + + function (ar, fn, map, piggybacker, stratifier) { + var create = function (regulator, validator, onerror, define, require, demand) { + var piggyback = piggybacker.create(); + + var validate = function (onsuccess, results) { + var failed = ar.filter(results, fn.not(validator)); + if (failed.length > 0) + onerror('Fetcher error: modules were not defined: ' + failed.join(', ')); + else + onsuccess(); + }; + + var mapper = function (spec, onresult) { + var action = fn.curry(onresult, spec.id); + var load = function (callback) { + spec.load(callback, onerror); + }; + piggyback.piggyback(spec.url, load, action); + }; + + var asyncfetch = function (specs, onsuccess) { + var oncomplete = fn.curry(validate, onsuccess); + var strata = stratifier.stratify(specs); + map.amap(strata, mapper, oncomplete); + }; + + var fetch = function (ids, onsuccess) { + regulator.regulate(ids, define, require, demand, function (specs) { + asyncfetch(specs, onsuccess); + }, onerror); + }; + + return { + fetch: fetch + }; + }; + + return { + create: create + }; + } +); +kernel.module.loader = def( + [ + kernel.module.analyser + ], + + function (analyser) { + var load = function (roots, deps, fetcher, oncontinue, onsuccess, onerror) { + var result = analyser.analyse(roots, deps); + + if (result.cycle) + onerror('Dependency error: a circular module dependency exists from ' + result.cycle.join(' ~> ')); + else if (result.load.length === 0) + onsuccess(); + else + fetcher.fetch(result.load, oncontinue); + }; + + return { + load: load + }; + } +); +kernel.module.manager = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.module.loader, + kernel.module.fetcher + ], + + function (ar, obj, loader, fetcher) { + var create = function (regulator, onerror) { + var blueprints = {}; // id -> { id: string, dependencies: [ string ], definition: function } + var modules = {}; // id -> module + + // Adds a module to the system. + var define = function (id, dependencies, definition) { + if (id === undefined) + onerror("Define error: module id can not be undefined"); + else if (blueprints[id] !== undefined) + onerror("Define error: module '" + id + "' is already defined"); + else + blueprints[id] = { id: id, dependencies: dependencies, definition: definition }; + }; + + // Loads a set of modules asynchronously. + var require = function (ids, callback) { + var onsuccess = function () { + var instances = ar.map(ids, demand); + callback.apply(null, instances); + }; + + var oncontinue = function () { + var deps = obj.map(blueprints, function (k, v) { + return v.dependencies; + }); + loader.load(ids, deps, fetch, oncontinue, onsuccess, onerror); + }; + + oncontinue(); + }; + + // Instantiates a module and all of its dependencies. + var demand = function (id) { + if (modules[id] !== undefined) + return modules[id]; + if (blueprints[id] === undefined) + throw "module '" + id + "' is not defined"; + var result = instantiate(id); + if (result === undefined) + throw "module '" + id + "' returned undefined from definition function"; + modules[id] = result; + return result; + }; + + var instantiate = function (id) { + var blueprint = blueprints[id]; + var args = ar.map(blueprint.dependencies, demand); // Instantiate dependencies + return blueprint.definition.apply(null, args); // Instantiate self + }; + + var validator = function (id) { return blueprints[id] !== undefined; }; + var fetch = fetcher.create(regulator, validator, onerror, define, require, demand); + + return { + define: define, + require: require, + demand: demand + }; + }; + + return { + create: create + }; + } +); +kernel.api.sources = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.modulator.globalator + ], + + function (ar, obj, globalator) { + var create = function (builtins, configuration) { + var data = { + 'global': { instance: globalator } + }; + obj.each(builtins, function (key, value) { + data[key] = { instance: value }; + }); + ar.each(configuration.types, function (spec) { + data[spec.type] = { id: spec.modulator }; + }); + var sourcespecs = configuration.sources.slice(0); + var sources = [ globalator.create() ]; + + var guard = function (type) { + if (data[type] === undefined) + throw 'Unknown modulator type [' + type + '].'; + }; + + var isResolved = function (type) { + guard(type); + return data[type].instance !== undefined; + }; + + var idOf = function (type) { + guard(type); + return data[type].id; + }; + + var instanceOf = function (type) { + guard(type); + return data[type].instance; + }; + + var register = function (type, instance) { + guard(type); + data[type].instance = instance; + }; + + var find = function (id) { + for (var i = 0; i < sources.length; ++i) + if (sources[i].can(id)) + return { found: sources[i] }; + return { notfound: true }; + }; + + var crank = function () { + var left = []; + ar.each(sourcespecs, function (spec) { + if (isResolved(spec.type)) { + var instance = instanceOf(spec.type); + var source = instance.create.apply(null, spec.args); + sources.push(source); + } else + left.push(spec); + }); + sourcespecs = left; + }; + + return { + isResolved: isResolved, + idOf: idOf, + instanceOf: instanceOf, + register: register, + find: find, + crank: crank + }; + }; + + return { + create: create + }; + } +); +kernel.api.regulator = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function (sources) { + /* + * 1. Resolve configuration as much as possible + * 2. Check for unresolved modulator types that are required to continue. + * a) Go ahead and resolve, if we have everything we need. + * b) Delay, requiring the modulators, then retry. + */ + var regulate = function (ids, define, require, demand, onsuccess, onerror) { + sources.crank(); + var required = ar.map(ids, determinetype); + var unresolved = ar.filter(required, fn.not(sources.isResolved)); + if (unresolved.length === 0) + resolve(ids, define, require, demand, onsuccess, onerror); + else + delay(unresolved, ids, define, require, demand, onsuccess, onerror); + }; + + var resolve = function (ids, define, require, demand, onsuccess, onerror) { + var r = []; + for (var i = 0; i < ids.length; ++i) { + var id = ids[i]; + var source = sources.find(id); + if (source.notfound) { + onerror('Could not find source for module [' + id + ']'); + return; + } + var spec = source.found.get(id, define, require, demand); + r[i] = build(id, spec); + } + onsuccess(r); + }; + + var build = function (id, spec) { + return { + id: id, + url: spec.url, + load: spec.load, + serial: spec.serial + }; + }; + + var delay = function (types, ids, define, require, demand, onsuccess, onerror) { + var modulatorids = ar.map(types, sources.idOf); + require(modulatorids, function (/* modulators */) { + var modulators = arguments; + ar.each(types, function (type, i) { + sources.register(type, modulators[i]); + }); + regulate(ids, define, require, demand, onsuccess, onerror); + }); + }; + + var determinetype = function (id) { + var index = id.indexOf('!'); + return index === -1 ? 'bolt' : id.substring(0, index); + }; + + return { + regulate: regulate + }; + }; + + return { + create: create + }; + } +); +kernel.api.config = def( + [ + kernel.module.manager, + kernel.api.regulator, + kernel.api.sources + ], + + function (manager, regulator, sources) { + var configure = function (configuration, builtins, onerror) { + var s = sources.create(builtins, configuration); + var r = regulator.create(s); + var engine = manager.create(r, onerror); + + return { + define: engine.define, + require: engine.require, + demand: engine.demand + }; + }; + + return { + configure: configure + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var loader = bolt.loader = bolt.loader || {}; +loader.executor = loader.executor || {}; +loader.api = loader.api || {}; +loader.transporter = loader.transporter || {}; +loader.tag = loader.tag || {}; +loader.tag.script = def( + [ + ], + + function () { + var guard = function (callback) { + return function (evt) { + if (evt.srcElement.readyState === "loaded" || evt.srcElement.readyState === "complete") + callback(); + }; + }; + + var ie = function (el) { + return el.attachEvent && !window.opera; + }; + + var onload = function (el, callback) { + if (ie(el)) + el.attachEvent("onreadystatechange", guard(callback)); + else + el.addEventListener("load", callback, false); + }; + + var createtag = function (callback) { + var el = document.createElement("script"); + el.type = "text/javascript"; + onload(el, callback); + return el; + }; + + var insert = function (decorator, callback) { + var el = createtag(callback); + decorator(el); + var head = document.getElementsByTagName("head")[0]; + head.appendChild(el); + }; + + return { + insert: insert + }; + } +); +loader.transporter.commonjs = def( + [ + ], + + function () { + var read = function (url, success, error) { + var fs = require('fs'); + fs.exists(url, function (exists) { + if (exists) + fs.readFile(url, 'UTF-8', function (err, data) { + if (err) + error('Error reading file [' + url + '], error [' + err + ']'); + else + success(data); + }); + else + error('File does not exist [' + url + ']'); + }); + }; + + return { + read: read + }; + } +); +loader.transporter.xhr = def( + [ + ], + + function () { + var requestObject = function () { + // Correct way to use XMLHttpRequest in IE: + // http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx + var factories = [ + function () { return new XMLHttpRequest() }, + function () { return new ActiveXObject("Microsoft.XMLHTTP") } + ]; + + return fallback(factories); + }; + + var fallback = function (items) { + for (var i = 0; i < items.length; ++i) { + try { + return items[i](); + } catch (e) { + } + } + }; + + var handler = function (req, url, success, error) { + return function () { + if (req.readyState === 4) + done(req, url, success, error); + }; + }; + + var done = function (req, url, success, error) { + if (req.status === 200 || req.status === 304) + success(req.responseText); + else + error('Transport error: ' + req.status + ' ' + req.statusText + ' for resource: "' + url + '"'); + }; + + var getUrl = function (req, url, success, error) { + req.open('GET', url, true); + req.onreadystatechange = handler(req, url, success, error); + req.send(); + }; + + var request = function (url, success, error) { + var req = requestObject(); + if (req) + getUrl(req, url, success, error); + else + error('Transport error: browser does not support XMLHttpRequest.'); + }; + + return { + request: request + }; + } +); +loader.executor.evaller = def( + [ + ], + + function () { + var execute = function (data, onsuccess, onfailure) { + try { + eval(data); + } catch(e) { + onfailure(e); + return; + } + + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.executor.injector = def( + [ + loader.tag.script + ], + + function (script) { + var execute = function (data, onsuccess, onfailure) { + var inject = function (tag) { + tag.text = data; + }; + + var noop = function () {}; + + // Injection does not fire events, but execution happens synchronously, + // so we just make an explicit callback + script.insert(inject, noop); + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.api.commonjsevaller = def( + [ + loader.transporter.commonjs, + loader.executor.evaller + ], + + function (commonjs, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + commonjs.read(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.scripttag = def( + [ + loader.tag.script + ], + + function (script) { + var load = function (url, onsuccess, onfailure) { + var sourcer = function (tag) { + tag.src = url; + }; + + script.insert(sourcer, onsuccess); + }; + + return { + load: load + }; + } +); +loader.api.xhrevaller = def( + [ + loader.transporter.xhr, + loader.executor.evaller + ], + + function (xhr, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.xhrinjector = def( + [ + loader.transporter.xhr, + loader.executor.injector + ], + + function (xhr, injector) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + injector.execute(data, onsuccess); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var module = bolt.module = bolt.module || {}; +module.bootstrap = module.bootstrap || {}; +module.config = module.config || {}; +module.error = module.error || {}; +module.modulator = module.modulator || {}; +module.reader = module.reader || {}; +module.runtime = module.runtime || {}; +module.util = module.util || {}; +module.error.error = def( + [ + ], + + function () { + var die = function (msg) { + throw msg || new Error('unknown error'); + }; + + return { + die: die + }; + } +); +module.config.mapper = def( + [ + ], + + function () { + var flat = function (id) { + return id; + }; + + var hierarchical = function (id) { + return id.replace(/\./g, '/'); + }; + + var constant = function (name) { + return function () { + return name; + }; + }; + + return { + flat: flat, + hierarchical: hierarchical, + constant: constant + }; + } +); +module.api = def( + [ + module.runtime + ], + + function (runtime) { + var delegate = function (method) { + return function () { + return runtime[method].apply(null, arguments); + }; + }; + + return { + define: delegate('define'), + require: delegate('require'), + demand: delegate('demand'), + main: delegate('main'), + load: delegate('load'), + loadscript: delegate('loadscript') + }; + } +); +module.util.path = def( + [ + ], + + function () { + var dirname = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(0, end); + }; + + var basename = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(end + 1); + }; + + return { + basename: basename, + dirname: dirname + }; + } +); +module.util.locator = def( + [ + ], + + function () { + var browser = function () { + var scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1].src; + }; + + var runtime = module.runtime.locate; + + var locate = function () { + var f = runtime || browser; + return f(); + }; + + return { + locate: locate + }; + } +); +module.util.pather = def( + [ + module.util.path + ], + + function (path) { + var create = function (relativeto) { + var base = path.dirname(relativeto); + return function (path) { + return base + '/' + path; + }; + }; + + return { + create: create + }; + } +);module.modulator.modulators = def( + [ + ephox.bolt.kernel.fp.functions, + ephox.bolt.kernel.modulator.bolt, + ephox.bolt.loader.api.commonjsevaller, + ephox.bolt.loader.api.scripttag, + ephox.bolt.loader.api.xhrevaller, + ephox.bolt.loader.api.xhrinjector + ], + + function (fn, bolt, commonjsevaller, scripttag, xhrevaller, xhrinjector) { + var wrap = function (modulator, loader) { + var create = fn.curry(modulator.create, loader); + + return { + create: create + } + }; + + return { + boltcommonjs: wrap(bolt, commonjsevaller), + boltscripttag: wrap(bolt, scripttag), + boltxhreval: wrap(bolt, xhrevaller), + boltxhrinjector: wrap(bolt, xhrinjector) + }; + } +); +module.config.builtins = def( + [ + ephox.bolt.module.modulator.modulators.boltscripttag, + ephox.bolt.module.modulator.modulators.boltcommonjs + ], + + function (boltscripttag, boltcommonjs) { + return { + // TODO: 'amd' is maintained for backwards compatibility, will be removed + // at some point. + browser: { bolt: boltscripttag, amd: boltscripttag }, + commonjs: { bolt: boltcommonjs, amd: boltcommonjs } + }; + } +); +module.config.specs = def( + [ + module.util.pather + ], + + function (pather) { + var type = function (type, implementation) { + return { + type: type, + implementation: implementation, + modulator: implementation + '.Modulator', + compiler: implementation + '.Compiler' + }; + }; + + var source = function (relativeto) { + return function (type /*, args */) { + return { + type: type, + relativeto: relativeto, + args: [ pather.create(relativeto) ].concat(Array.prototype.slice.call(arguments, 1)) + }; + } + }; + + return { + type: type, + source: source + }; + } +); +module.reader.bouncing = def( + [ + ephox.bolt.kernel.fp.array, + module.error.error, + module.config.specs + ], + + function (ar, error, specs) { + var bounce = function (done, read, acc) { + var next = acc.configs.shift(); + read(next.relativeto, next.config, done, acc); + }; + + var tick = function (file, cfg, done, read, acc) { + var munged = ar.map(cfg.configs || [], function (config) { + return { relativeto: file, config: config }; + }); + var accumulated = { + sources: acc.sources.concat(cfg.sources || []), + types: acc.types.concat(cfg.types || []), + configs: munged.concat(acc.configs) + }; + if (accumulated.configs.length > 0) + bounce(done, read, accumulated); + else + done({ sources: accumulated.sources, types: accumulated.types }); + }; + + /* + * All precedence is depth-first, pre-order. Example: + * + * A + * /-\ + * B C + * /| |\ + * D E F G + * + * Configs are read in A, B, D, E, C, F, G. + * + * If configs mixed delegation and sources, the + * sources would be ordered the same: A, B, D, E, C, F, G. + */ + + var evaluate = function (file, payload, done, read, acc) { + var result = {}; + /* eval scope */ + var mapper = module.config.mapper; + var type = specs.type; + var source = specs.source(file); + var configure = function (configuration) { + result = configuration; + }; + try { + eval(payload); + } catch (e) { + throw 'Could not load configuration [' + file + '], with: ' + e; + } + tick(file, result, done, read, acc); + }; + + return { + evaluate: evaluate + }; + } +); +module.reader.browser = def( + [ + module.error.error, + module.reader.bouncing, + module.util.path, + ephox.bolt.loader.transporter.xhr + ], + + function (error, bouncing, path, xhr) { + var read = function (relativeto, file, done, acc) { + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = base + '/' + file; + xhr.request(absolute, function (payload) { + bouncing.evaluate(absolute, payload, done, read, accumulated); + }, error.die); + }; + + return { + read: read + }; + } +); +module.reader.node = def( + [ + module.reader.bouncing + ], + + function (bouncing, path, fs) { + var read = function (relativeto, file, done, acc) { + var fs = require('fs'); + var path = require('path'); + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = path.resolve(base, file); + var payload = fs.readFileSync(absolute, 'UTF-8'); + bouncing.evaluate(absolute, payload, done, read, accumulated); + }; + + return { + read: read + }; + } +); +module.reader.direct = def( + [ + ], + + function () { + var create = function (configuration) { + return function (done) { + done({ + sources: configuration.sources || [], + types: configuration.types || [], + configs: configuration.configs || [] + }); + }; + }; + + return { + create: create + }; + } +); +module.bootstrap.configloader = def( + [ + module.util.locator, + module.reader.browser + ], + + function (locator, browser) { + var create = function (file) { + var script = locator.locate(); + return function (done) { + browser.read(script, file, done); + }; + }; + + return { + create: create + }; + } +);module.bootstrap.deferred = def( + [ + ephox.bolt.kernel.fp.array + ], + + function (ar) { + var deferred = []; + + var require = function (ids, fn) { + var r = function (real) { + real(ids, fn); + }; + deferred.push(r); + }; + + var configured = function (require) { + ar.each(deferred, function (action) { + action(require); + }); + deferred = []; + }; + + return { + require: require, + configured: configured + }; + } +); +module.bootstrap.main = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.runtime + ], + + function (config, deferred, runtime) { + var main = function (id, args, configids, callback) { + runtime.require(configids || [], function () { + callback && callback.apply(null, arguments); + runtime.require([ id ], function (module) { + module.apply(null, args || []); + }); + }); + }; + + return { + main: main + }; + } +); +module.bootstrap.install = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.bootstrap.main, + module.runtime, + module.error.error + ], + + function (config, deferred, main, runtime, error) { + var notready = function () { throw 'bolt not initialised, can not call define or demand, did you mean to use require or main?'; }; + + var install = function (reader, builtins, load, loadscript) { + runtime.define = notready; + runtime.demand = notready; + runtime.require = deferred.require; + runtime.main = main.main; + runtime.load = load; + runtime.loadscript = loadscript; + + reader(function (configuration) { + var bolt = config.configure(configuration, builtins, error.die); + runtime.define = bolt.define; + runtime.require = bolt.require; + runtime.demand = bolt.demand; + + deferred.configured(runtime.require); + }); + }; + + return { + install: install + }; + } +); + +})(Function('return this')()); +(function (global) { + var obj = ephox.bolt.kernel.fp.object; + var api = ephox.bolt.module.api; + var builtins = ephox.bolt.module.config.builtins.browser; + var install = ephox.bolt.module.bootstrap.install; + var reader = ephox.bolt.module.bootstrap.configloader.create("prod.js"); + var transport = ephox.bolt.loader.transporter.xhr.request; + var script = ephox.bolt.loader.api.scripttag.load; + install.install(reader, builtins, transport, script); + obj.merge(global, api); +})(Function("return this;")()); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/browser.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/browser.js new file mode 100644 index 0000000..6f437c5 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/browser.js @@ -0,0 +1,10 @@ +configure({ + configs: [ + './prod.js' + ], + sources: [ + source('amd', 'ephox/tinymce', '', mapper.constant('../../../../../tinymce')), + source('amd', 'ephox.mcagar', '../../lib/test', mapper.flat), + source('amd', 'ephox', '../../lib/test', mapper.flat) + ] +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/demo.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/demo.js new file mode 100644 index 0000000..385032c --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/demo.js @@ -0,0 +1,8 @@ +configure({ + configs: [ + './prod.js' + ], + sources: [ + source('amd', 'tinymce/inlite/Demo', '../../src/demo/js', mapper.hierarchical) + ] +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/prod.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/prod.js new file mode 100644 index 0000000..a1ef542 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/bolt/prod.js @@ -0,0 +1,5 @@ +configure({ + sources: [ + source('amd', 'tinymce/inlite', '../../src/main/js', mapper.hierarchical) + ] +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/dent/depend.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/dent/depend.js new file mode 100644 index 0000000..9283c0a --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/config/dent/depend.js @@ -0,0 +1,21 @@ +var lib = 'lib'; +var run = lib + '/run'; +var depend = run + '/depend'; +var licenses = run + '/licenses'; +var demo = lib + '/demo'; +var test = lib + '/test'; +var config = lib + '/config'; + +var cleanDirs = [ lib ]; + +var dependencies = [ + { + name: 'mcagar', + repository: 'buildrepo2', + source: 'mcagar.zip', + targets: [ + { name: 'module/*.js', path: test }, + { name: 'depend/*.js', path: test } + ] + } +]; diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/compile/bootstrap.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/compile/bootstrap.js new file mode 100644 index 0000000..9e8c646 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/compile/bootstrap.js @@ -0,0 +1,1526 @@ +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var kernel = bolt.kernel = bolt.kernel || {}; +kernel.api = kernel.api || {}; +kernel.async = kernel.api || {}; +kernel.fp = kernel.fp || {}; +kernel.modulator = kernel.modulator || {}; +kernel.module = kernel.module || {}; +kernel.fp.array = def( + [ + ], + + function () { + var equals = function (a1, a2) { + if (a1.length !== a2.length) + return false; + for (var i = 0; i < a1.length; ++i) + if (a1[i] !== a2[i]) + return false; + return true; + }; + + var forall = function (a, f) { + var fn = f || function (x) { + return x === true; + }; + for (var i = 0; i < a.length; ++i) + if (fn(a[i]) !== true) + return false; + return true; + }; + + var map = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + r.push(f(a[i], i)); + return r; + }; + + var flatten = function (a) { + var r = []; + for (var i = 0; i < a.length; ++i) + r = r.concat(a[i]); + return r; + }; + + var flatmap = function (a, f) { + return flatten(map(a, f)); + }; + + var filter = function (a, f) { + var r = []; + for (var i = 0; i < a.length; ++i) + if (f(a[i])) + r.push(a[i]); + return r; + }; + + var each = map; + + var contains = function (a, x) { + return !forall(a, function (v) { + return v !== x; + }); + }; + + var indexof = function (a, x) { + for (var i = 0; i < a.length; ++i) + if (a[i] === x) + return i; + return -1; + }; + + return { + equals: equals, + forall: forall, + map: map, + flatten: flatten, + flatmap: flatmap, + filter: filter, + each: each, + contains: contains, + indexof: indexof + }; + } +); +kernel.fp.object = def( + [ + ], + + function () { + var map = function (o, f) { + var r = {}; + for (var i in o) + if (o.hasOwnProperty(i)) + r[i] = f(i, o[i]); + return r; + }; + + var each = map; + + var merge = function (d, s) { + each(s, function (k, v) { + d[k] = v; + }); + }; + + var keys = function (o) { + var r = []; + each(o, function (k) { + r.push(k); + }); + return r; + }; + + return { + each: each, + keys: keys, + map: map, + merge: merge + }; + } +); +kernel.fp.functions = def( + [ + ], + + function () { + var curry = function (f) { + var slice = Array.prototype.slice; + var args = slice.call(arguments, 1); + return function () { + var all = args.concat(slice.call(arguments, 0)); + return f.apply(null, all); + }; + }; + + var not = function (z) { + return function () { + var slice = Array.prototype.slice; + return !z.apply(null, slice.call(arguments, 0)); + }; + }; + + var apply = function (f) { + var slice = Array.prototype.slice; + return f.apply(null, slice.call(arguments, 0)); + }; + + return { + curry: curry, + not: not, + apply: apply + }; + } +);kernel.async.map = def( + [ + kernel.fp.array + ], + + function (ar) { + var amap = function (data, f, oncomplete) { + var total = data.length; + var count = 0; + var results = []; + + ar.each(data, function (datum, i) { + f(datum, function (result) { + ++count; + results[i] = result; + if (count === total) + oncomplete(results); + }); + }); + }; + + return { + amap: amap + }; + } +); +/** + * This module has a dual responsibility: + * 1. Ensures that asynchronous function calls, 'f', that share the same + * 'key' are not executed in parallel. + * 2. In the case where an attempt to call in parallel is prevented, + * the 'action' callbacks are executed when the asynchronous call is + * completed. + * + * Example: + * When we async-map to remotely fetch module definition, it is + * important that only a single define is evaluated, but the + * notification that the definition has completed is propagated + * to all interested parties. + * + * 1. we require dependencies 'x' and 'y' + * + * 2. both x and y are defined in the same file (i.e. compiled together), 'a.js'. + * + * 3. we resolve x and y, to their load spec using a modulator + * x_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * y_spec = {load: function () { -- load a.js -- }, url: a.js, serial: false}; + * + * 4. we make the piggyback call for x: + * piggybacker.piggyback(x_spec.url, x_spec.load, xdone); + * + * this will register the 'xdone' action, and actually + * trigger the load call, with a synthetic callback + * responsible for triggering all registered actions. + * + * 5. we make the piggyback call for y: + * piggybacker.piggyback(y_spec.url, y_spec.load, ydone); + * + * this will register the 'ydone' action, but NOT trigger + * the load call. + * + * 6. the load call completes, and calls the synthetic callback, + * which is responsible for triggering both 'xdone' and 'ydone'. + * + * 7. something else happens that means we have to load 'a.js' again, + * the piggybacker DOES NOT prevent this call, and will follow + * the above process. + */ +kernel.async.piggybacker = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function () { + var queue = {}; // key -> [actions] + + var process = function (key) { + var actions = queue[key]; + delete queue[key]; + ar.each(actions, fn.apply); + }; + + var piggyback = function (key, f, action) { + if (queue[key] === undefined) { + queue[key] = [ action ]; + f(fn.curry(process, key)); + } else { + queue[key].push(action); + } + }; + + return { + piggyback: piggyback + }; + }; + + return { + create: create + }; + } +); +kernel.modulator.globalator = def( + [ + ], + + function () { + var create = function () { + // FIX pull out + var resolve = function (name, scope) { + var parts = name.split('.'); + var r = scope; + for (var i = 0; i < parts.length && r !== undefined; ++i) + r = r[parts[i]]; + return r; + }; + + var global = Function('return this')(); + + var can = function (id) { + return id.indexOf('global!') === 0; + }; + + var get = function (id, define, require) { + var name = id.substring('global!'.length); + + var load = function (onsuccess, onfailure) { + var instance = resolve(name, global); + if (instance !== undefined) { + define(id, [], function () { return instance; }); + onsuccess(); + } else { + onfailure('Modulator error: could not resolve global [' + name + ']'); + } + }; + + return { + url: id, // this just needs to be unique, no download required. + load: load, + serial: true + }; + }; + + return { + can: can, + get: get + } + }; + return { + create: create + }; + } +); +kernel.modulator.bolt = def( + [ + kernel.fp.functions + ], + + function (fn) { + var create = function (loader, pather, namespace, path, idTransformer, options) { + var can = function (id) { + return id === namespace || id.indexOf(namespace + '.') === 0 || id.indexOf(namespace + '/') === 0; + }; + + var get = function (id) { + var before = options !== undefined && options.absolute === true ? path : pather(path); + var after = options !== undefined && options.fresh === true ? '?cachebuster=' + new Date().getTime() : ''; + var url = before + "/" + idTransformer(id) + '.js' + after; + var load = fn.curry(loader.load, url); + + return { + url: url, + load: load, + serial: false + }; + }; + + return { + can: can, + get: get + }; + }; + + return { + create: create + }; + } +);kernel.module.stratifier = def( + [ + kernel.fp.array + ], + + function (ar) { + var stratify = function (specs) { + var parallels = ar.filter(specs, function (spec) { + return !spec.serial; + }); + return parallels.length > 0 ? parallels : specs.slice(0, 1); + }; + + return { + stratify: stratify + }; + } +); +/** + * This module performs dependency analysis of strings that depend on sets of + * strings. + * + * The input is an array of root strings to start analysis from, and an object + * that contains a mapping of each string to the strings it depends on. + * + * Performing an analysis results in either: + * 1. an empty array, indicating that all dependencies are satisfied, + * 2. an array of strings that are, at the minimum, still needed in order to + * satisfy the given dependency trees, or + * 3. an array of strings that form a dependency cycle. + */ +kernel.module.analyser = def( + [ + kernel.fp.array + ], + + function (array) { + var collect = function (path, name) { + var i = array.indexof(path, name); + var p = path.slice(i); + return p.concat([name]); + }; + + /** + * @param {array} roots Contains a list of root ids + * @param {object} modules Contains dependency information in format: { id: [ 'id1', 'id2' ] } + */ + var analyse = function (roots, modules) { + var done = {}; + var path = []; + var missing = []; + var cycle; + + var children = function (name) { + array.each(modules[name], attempt); + }; + + var examine = function (name) { + if (modules[name]) + children(name); + else + missing.push(name); + }; + + var descend = function (name) { + path.push(name); + examine(name); + path.pop(); + }; + + var decycle = function (name) { + if (array.contains(path, name)) + cycle = collect(path, name); + else + descend(name); + }; + + var attempt = function (name) { + if (!done[name]) { + decycle(name); + done[name] = true; + } + }; + + array.each(roots, attempt); + + return cycle ? { cycle: cycle } : { load: missing }; + }; + + return { + analyse: analyse + }; + } +); +kernel.module.fetcher = def( + [ + kernel.fp.array, + kernel.fp.functions, + kernel.async.map, + kernel.async.piggybacker, + kernel.module.stratifier + ], + + function (ar, fn, map, piggybacker, stratifier) { + var create = function (regulator, validator, onerror, define, require, demand) { + var piggyback = piggybacker.create(); + + var validate = function (onsuccess, results) { + var failed = ar.filter(results, fn.not(validator)); + if (failed.length > 0) + onerror('Fetcher error: modules were not defined: ' + failed.join(', ')); + else + onsuccess(); + }; + + var mapper = function (spec, onresult) { + var action = fn.curry(onresult, spec.id); + var load = function (callback) { + spec.load(callback, onerror); + }; + piggyback.piggyback(spec.url, load, action); + }; + + var asyncfetch = function (specs, onsuccess) { + var oncomplete = fn.curry(validate, onsuccess); + var strata = stratifier.stratify(specs); + map.amap(strata, mapper, oncomplete); + }; + + var fetch = function (ids, onsuccess) { + regulator.regulate(ids, define, require, demand, function (specs) { + asyncfetch(specs, onsuccess); + }, onerror); + }; + + return { + fetch: fetch + }; + }; + + return { + create: create + }; + } +); +kernel.module.loader = def( + [ + kernel.module.analyser + ], + + function (analyser) { + var load = function (roots, deps, fetcher, oncontinue, onsuccess, onerror) { + var result = analyser.analyse(roots, deps); + + if (result.cycle) + onerror('Dependency error: a circular module dependency exists from ' + result.cycle.join(' ~> ')); + else if (result.load.length === 0) + onsuccess(); + else + fetcher.fetch(result.load, oncontinue); + }; + + return { + load: load + }; + } +); +kernel.module.manager = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.module.loader, + kernel.module.fetcher + ], + + function (ar, obj, loader, fetcher) { + var create = function (regulator, onerror) { + var blueprints = {}; // id -> { id: string, dependencies: [ string ], definition: function } + var modules = {}; // id -> module + + // Adds a module to the system. + var define = function (id, dependencies, definition) { + if (id === undefined) + onerror("Define error: module id can not be undefined"); + else if (blueprints[id] !== undefined) + onerror("Define error: module '" + id + "' is already defined"); + else + blueprints[id] = { id: id, dependencies: dependencies, definition: definition }; + }; + + // Loads a set of modules asynchronously. + var require = function (ids, callback) { + var onsuccess = function () { + var instances = ar.map(ids, demand); + callback.apply(null, instances); + }; + + var oncontinue = function () { + var deps = obj.map(blueprints, function (k, v) { + return v.dependencies; + }); + loader.load(ids, deps, fetch, oncontinue, onsuccess, onerror); + }; + + oncontinue(); + }; + + // Instantiates a module and all of its dependencies. + var demand = function (id) { + if (modules[id] !== undefined) + return modules[id]; + if (blueprints[id] === undefined) + throw "module '" + id + "' is not defined"; + var result = instantiate(id); + if (result === undefined) + throw "module '" + id + "' returned undefined from definition function"; + modules[id] = result; + return result; + }; + + var instantiate = function (id) { + var blueprint = blueprints[id]; + var args = ar.map(blueprint.dependencies, demand); // Instantiate dependencies + return blueprint.definition.apply(null, args); // Instantiate self + }; + + var validator = function (id) { return blueprints[id] !== undefined; }; + var fetch = fetcher.create(regulator, validator, onerror, define, require, demand); + + return { + define: define, + require: require, + demand: demand + }; + }; + + return { + create: create + }; + } +); +kernel.api.sources = def( + [ + kernel.fp.array, + kernel.fp.object, + kernel.modulator.globalator + ], + + function (ar, obj, globalator) { + var create = function (builtins, configuration) { + var data = { + 'global': { instance: globalator } + }; + obj.each(builtins, function (key, value) { + data[key] = { instance: value }; + }); + ar.each(configuration.types, function (spec) { + data[spec.type] = { id: spec.modulator }; + }); + var sourcespecs = configuration.sources.slice(0); + var sources = [ globalator.create() ]; + + var guard = function (type) { + if (data[type] === undefined) + throw 'Unknown modulator type [' + type + '].'; + }; + + var isResolved = function (type) { + guard(type); + return data[type].instance !== undefined; + }; + + var idOf = function (type) { + guard(type); + return data[type].id; + }; + + var instanceOf = function (type) { + guard(type); + return data[type].instance; + }; + + var register = function (type, instance) { + guard(type); + data[type].instance = instance; + }; + + var find = function (id) { + for (var i = 0; i < sources.length; ++i) + if (sources[i].can(id)) + return { found: sources[i] }; + return { notfound: true }; + }; + + var crank = function () { + var left = []; + ar.each(sourcespecs, function (spec) { + if (isResolved(spec.type)) { + var instance = instanceOf(spec.type); + var source = instance.create.apply(null, spec.args); + sources.push(source); + } else + left.push(spec); + }); + sourcespecs = left; + }; + + return { + isResolved: isResolved, + idOf: idOf, + instanceOf: instanceOf, + register: register, + find: find, + crank: crank + }; + }; + + return { + create: create + }; + } +); +kernel.api.regulator = def( + [ + kernel.fp.array, + kernel.fp.functions + ], + + function (ar, fn) { + var create = function (sources) { + /* + * 1. Resolve configuration as much as possible + * 2. Check for unresolved modulator types that are required to continue. + * a) Go ahead and resolve, if we have everything we need. + * b) Delay, requiring the modulators, then retry. + */ + var regulate = function (ids, define, require, demand, onsuccess, onerror) { + sources.crank(); + var required = ar.map(ids, determinetype); + var unresolved = ar.filter(required, fn.not(sources.isResolved)); + if (unresolved.length === 0) + resolve(ids, define, require, demand, onsuccess, onerror); + else + delay(unresolved, ids, define, require, demand, onsuccess, onerror); + }; + + var resolve = function (ids, define, require, demand, onsuccess, onerror) { + var r = []; + for (var i = 0; i < ids.length; ++i) { + var id = ids[i]; + var source = sources.find(id); + if (source.notfound) { + onerror('Could not find source for module [' + id + ']'); + return; + } + var spec = source.found.get(id, define, require, demand); + r[i] = build(id, spec); + } + onsuccess(r); + }; + + var build = function (id, spec) { + return { + id: id, + url: spec.url, + load: spec.load, + serial: spec.serial + }; + }; + + var delay = function (types, ids, define, require, demand, onsuccess, onerror) { + var modulatorids = ar.map(types, sources.idOf); + require(modulatorids, function (/* modulators */) { + var modulators = arguments; + ar.each(types, function (type, i) { + sources.register(type, modulators[i]); + }); + regulate(ids, define, require, demand, onsuccess, onerror); + }); + }; + + var determinetype = function (id) { + var index = id.indexOf('!'); + return index === -1 ? 'bolt' : id.substring(0, index); + }; + + return { + regulate: regulate + }; + }; + + return { + create: create + }; + } +); +kernel.api.config = def( + [ + kernel.module.manager, + kernel.api.regulator, + kernel.api.sources + ], + + function (manager, regulator, sources) { + var configure = function (configuration, builtins, onerror) { + var s = sources.create(builtins, configuration); + var r = regulator.create(s); + var engine = manager.create(r, onerror); + + return { + define: engine.define, + require: engine.require, + demand: engine.demand + }; + }; + + return { + configure: configure + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var loader = bolt.loader = bolt.loader || {}; +loader.executor = loader.executor || {}; +loader.api = loader.api || {}; +loader.transporter = loader.transporter || {}; +loader.tag = loader.tag || {}; +loader.tag.script = def( + [ + ], + + function () { + var guard = function (callback) { + return function (evt) { + if (evt.srcElement.readyState === "loaded" || evt.srcElement.readyState === "complete") + callback(); + }; + }; + + var ie = function (el) { + return el.attachEvent && !window.opera; + }; + + var onload = function (el, callback) { + if (ie(el)) + el.attachEvent("onreadystatechange", guard(callback)); + else + el.addEventListener("load", callback, false); + }; + + var createtag = function (callback) { + var el = document.createElement("script"); + el.type = "text/javascript"; + onload(el, callback); + return el; + }; + + var insert = function (decorator, callback) { + var el = createtag(callback); + decorator(el); + var head = document.getElementsByTagName("head")[0]; + head.appendChild(el); + }; + + return { + insert: insert + }; + } +); +loader.transporter.commonjs = def( + [ + ], + + function () { + var read = function (url, success, error) { + var fs = require('fs'); + fs.exists(url, function (exists) { + if (exists) + fs.readFile(url, 'UTF-8', function (err, data) { + if (err) + error('Error reading file [' + url + '], error [' + err + ']'); + else + success(data); + }); + else + error('File does not exist [' + url + ']'); + }); + }; + + return { + read: read + }; + } +); +loader.transporter.xhr = def( + [ + ], + + function () { + var requestObject = function () { + // Correct way to use XMLHttpRequest in IE: + // http://blogs.msdn.com/b/ie/archive/2006/01/23/516393.aspx + var factories = [ + function () { return new XMLHttpRequest() }, + function () { return new ActiveXObject("Microsoft.XMLHTTP") } + ]; + + return fallback(factories); + }; + + var fallback = function (items) { + for (var i = 0; i < items.length; ++i) { + try { + return items[i](); + } catch (e) { + } + } + }; + + var handler = function (req, url, success, error) { + return function () { + if (req.readyState === 4) + done(req, url, success, error); + }; + }; + + var done = function (req, url, success, error) { + if (req.status === 200 || req.status === 304) + success(req.responseText); + else + error('Transport error: ' + req.status + ' ' + req.statusText + ' for resource: "' + url + '"'); + }; + + var getUrl = function (req, url, success, error) { + req.open('GET', url, true); + req.onreadystatechange = handler(req, url, success, error); + req.send(); + }; + + var request = function (url, success, error) { + var req = requestObject(); + if (req) + getUrl(req, url, success, error); + else + error('Transport error: browser does not support XMLHttpRequest.'); + }; + + return { + request: request + }; + } +); +loader.executor.evaller = def( + [ + ], + + function () { + var execute = function (data, onsuccess, onfailure) { + try { + eval(data); + } catch(e) { + onfailure(e); + return; + } + + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.executor.injector = def( + [ + loader.tag.script + ], + + function (script) { + var execute = function (data, onsuccess, onfailure) { + var inject = function (tag) { + tag.text = data; + }; + + var noop = function () {}; + + // Injection does not fire events, but execution happens synchronously, + // so we just make an explicit callback + script.insert(inject, noop); + onsuccess(); + }; + + return { + execute: execute + }; + } +); +loader.api.commonjsevaller = def( + [ + loader.transporter.commonjs, + loader.executor.evaller + ], + + function (commonjs, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + commonjs.read(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.scripttag = def( + [ + loader.tag.script + ], + + function (script) { + var load = function (url, onsuccess, onfailure) { + var sourcer = function (tag) { + tag.src = url; + }; + + script.insert(sourcer, onsuccess); + }; + + return { + load: load + }; + } +); +loader.api.xhrevaller = def( + [ + loader.transporter.xhr, + loader.executor.evaller + ], + + function (xhr, evaller) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + evaller.execute(data, onsuccess, onfailure); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +loader.api.xhrinjector = def( + [ + loader.transporter.xhr, + loader.executor.injector + ], + + function (xhr, injector) { + var load = function (url, onsuccess, onfailure) { + var inject = function (data) { + injector.execute(data, onsuccess); + }; + + xhr.request(url, inject, onfailure); + }; + + return { + load: load + }; + } +); +})(Function('return this')()); + +(function (scope) { +var ephox = scope.ephox = scope.ephox || {}; +var bolt = ephox.bolt = ephox.bolt || {}; + +var def = function (deps, factory) { + return factory.apply(null, deps); +}; +var module = bolt.module = bolt.module || {}; +module.bootstrap = module.bootstrap || {}; +module.config = module.config || {}; +module.error = module.error || {}; +module.modulator = module.modulator || {}; +module.reader = module.reader || {}; +module.runtime = module.runtime || {}; +module.util = module.util || {}; +module.error.error = def( + [ + ], + + function () { + var die = function (msg) { + throw msg || new Error('unknown error'); + }; + + return { + die: die + }; + } +); +module.config.mapper = def( + [ + ], + + function () { + var flat = function (id) { + return id; + }; + + var hierarchical = function (id) { + return id.replace(/\./g, '/'); + }; + + var constant = function (name) { + return function () { + return name; + }; + }; + + return { + flat: flat, + hierarchical: hierarchical, + constant: constant + }; + } +); +module.api = def( + [ + module.runtime + ], + + function (runtime) { + var delegate = function (method) { + return function () { + return runtime[method].apply(null, arguments); + }; + }; + + return { + define: delegate('define'), + require: delegate('require'), + demand: delegate('demand'), + main: delegate('main'), + load: delegate('load'), + loadscript: delegate('loadscript') + }; + } +); +module.util.path = def( + [ + ], + + function () { + var dirname = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(0, end); + }; + + var basename = function (file) { + var normalized = file.replace(/\\/g, '/'); + var end = normalized.lastIndexOf('/'); + return normalized.substring(end + 1); + }; + + return { + basename: basename, + dirname: dirname + }; + } +); +module.util.locator = def( + [ + ], + + function () { + var browser = function () { + var scripts = document.getElementsByTagName("script"); + return scripts[scripts.length - 1].src; + }; + + var runtime = module.runtime.locate; + + var locate = function () { + var f = runtime || browser; + return f(); + }; + + return { + locate: locate + }; + } +); +module.util.pather = def( + [ + module.util.path + ], + + function (path) { + var create = function (relativeto) { + var base = path.dirname(relativeto); + return function (path) { + return base + '/' + path; + }; + }; + + return { + create: create + }; + } +);module.modulator.modulators = def( + [ + ephox.bolt.kernel.fp.functions, + ephox.bolt.kernel.modulator.bolt, + ephox.bolt.loader.api.commonjsevaller, + ephox.bolt.loader.api.scripttag, + ephox.bolt.loader.api.xhrevaller, + ephox.bolt.loader.api.xhrinjector + ], + + function (fn, bolt, commonjsevaller, scripttag, xhrevaller, xhrinjector) { + var wrap = function (modulator, loader) { + var create = fn.curry(modulator.create, loader); + + return { + create: create + } + }; + + return { + boltcommonjs: wrap(bolt, commonjsevaller), + boltscripttag: wrap(bolt, scripttag), + boltxhreval: wrap(bolt, xhrevaller), + boltxhrinjector: wrap(bolt, xhrinjector) + }; + } +); +module.config.builtins = def( + [ + ephox.bolt.module.modulator.modulators.boltscripttag, + ephox.bolt.module.modulator.modulators.boltcommonjs + ], + + function (boltscripttag, boltcommonjs) { + return { + // TODO: 'amd' is maintained for backwards compatibility, will be removed + // at some point. + browser: { bolt: boltscripttag, amd: boltscripttag }, + commonjs: { bolt: boltcommonjs, amd: boltcommonjs } + }; + } +); +module.config.specs = def( + [ + module.util.pather + ], + + function (pather) { + var type = function (type, implementation) { + return { + type: type, + implementation: implementation, + modulator: implementation + '.Modulator', + compiler: implementation + '.Compiler' + }; + }; + + var source = function (relativeto) { + return function (type /*, args */) { + return { + type: type, + relativeto: relativeto, + args: [ pather.create(relativeto) ].concat(Array.prototype.slice.call(arguments, 1)) + }; + } + }; + + return { + type: type, + source: source + }; + } +); +module.reader.bouncing = def( + [ + ephox.bolt.kernel.fp.array, + module.error.error, + module.config.specs + ], + + function (ar, error, specs) { + var bounce = function (done, read, acc) { + var next = acc.configs.shift(); + read(next.relativeto, next.config, done, acc); + }; + + var tick = function (file, cfg, done, read, acc) { + var munged = ar.map(cfg.configs || [], function (config) { + return { relativeto: file, config: config }; + }); + var accumulated = { + sources: acc.sources.concat(cfg.sources || []), + types: acc.types.concat(cfg.types || []), + configs: munged.concat(acc.configs) + }; + if (accumulated.configs.length > 0) + bounce(done, read, accumulated); + else + done({ sources: accumulated.sources, types: accumulated.types }); + }; + + /* + * All precedence is depth-first, pre-order. Example: + * + * A + * /-\ + * B C + * /| |\ + * D E F G + * + * Configs are read in A, B, D, E, C, F, G. + * + * If configs mixed delegation and sources, the + * sources would be ordered the same: A, B, D, E, C, F, G. + */ + + var evaluate = function (file, payload, done, read, acc) { + var result = {}; + /* eval scope */ + var mapper = module.config.mapper; + var type = specs.type; + var source = specs.source(file); + var configure = function (configuration) { + result = configuration; + }; + try { + eval(payload); + } catch (e) { + throw 'Could not load configuration [' + file + '], with: ' + e; + } + tick(file, result, done, read, acc); + }; + + return { + evaluate: evaluate + }; + } +); +module.reader.browser = def( + [ + module.error.error, + module.reader.bouncing, + module.util.path, + ephox.bolt.loader.transporter.xhr + ], + + function (error, bouncing, path, xhr) { + var read = function (relativeto, file, done, acc) { + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = base + '/' + file; + xhr.request(absolute, function (payload) { + bouncing.evaluate(absolute, payload, done, read, accumulated); + }, error.die); + }; + + return { + read: read + }; + } +); +module.reader.node = def( + [ + module.reader.bouncing + ], + + function (bouncing, path, fs) { + var read = function (relativeto, file, done, acc) { + var fs = require('fs'); + var path = require('path'); + var accumulated = acc || { sources: [], types: [], configs: [] }; + var base = path.dirname(relativeto); + var absolute = path.resolve(base, file); + var payload = fs.readFileSync(absolute, 'UTF-8'); + bouncing.evaluate(absolute, payload, done, read, accumulated); + }; + + return { + read: read + }; + } +); +module.reader.direct = def( + [ + ], + + function () { + var create = function (configuration) { + return function (done) { + done({ + sources: configuration.sources || [], + types: configuration.types || [], + configs: configuration.configs || [] + }); + }; + }; + + return { + create: create + }; + } +); +module.bootstrap.configloader = def( + [ + module.util.locator, + module.reader.browser + ], + + function (locator, browser) { + var create = function (file) { + var script = locator.locate(); + return function (done) { + browser.read(script, file, done); + }; + }; + + return { + create: create + }; + } +);module.bootstrap.deferred = def( + [ + ephox.bolt.kernel.fp.array + ], + + function (ar) { + var deferred = []; + + var require = function (ids, fn) { + var r = function (real) { + real(ids, fn); + }; + deferred.push(r); + }; + + var configured = function (require) { + ar.each(deferred, function (action) { + action(require); + }); + deferred = []; + }; + + return { + require: require, + configured: configured + }; + } +); +module.bootstrap.main = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.runtime + ], + + function (config, deferred, runtime) { + var main = function (id, args, configids, callback) { + runtime.require(configids || [], function () { + callback && callback.apply(null, arguments); + runtime.require([ id ], function (module) { + module.apply(null, args || []); + }); + }); + }; + + return { + main: main + }; + } +); +module.bootstrap.install = def( + [ + ephox.bolt.kernel.api.config, + module.bootstrap.deferred, + module.bootstrap.main, + module.runtime, + module.error.error + ], + + function (config, deferred, main, runtime, error) { + var notready = function () { throw 'bolt not initialised, can not call define or demand, did you mean to use require or main?'; }; + + var install = function (reader, builtins, load, loadscript) { + runtime.define = notready; + runtime.demand = notready; + runtime.require = deferred.require; + runtime.main = main.main; + runtime.load = load; + runtime.loadscript = loadscript; + + reader(function (configuration) { + var bolt = config.configure(configuration, builtins, error.die); + runtime.define = bolt.define; + runtime.require = bolt.require; + runtime.demand = bolt.demand; + + deferred.configured(runtime.require); + }); + }; + + return { + install: install + }; + } +); + +})(Function('return this')()); +(function () { + var install = ephox.bolt.module.bootstrap.install; + var builtins = ephox.bolt.module.config.builtins.browser; + var transport = ephox.bolt.loader.transporter.xhr.request; + var script = ephox.bolt.loader.api.scripttag.load; + var direct = ephox.bolt.module.reader.direct; + var mapper = ephox.bolt.module.config.mapper; + var locator = ephox.bolt.module.util.locator; + var source = ephox.bolt.module.config.specs.source(locator.locate()); + var reader = direct.create({ + sources: [ + source("bolt", "tinymce/inlite/Theme", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.ThemeManager", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.util.Delay", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/ui/Panel", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/ui/Buttons", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/SkinLoader", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/SelectionMatcher", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/ElementMatcher", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/Matcher", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/alien/Arr", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/PredicateId", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.util.Tools", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.ui.Factory", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.DOM", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/ui/Toolbar", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/ui/Forms", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/Measure", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/Layout", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/file/Conversions", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/file/Picker", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/Actions", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.EditorManager", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.util.Promise", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/alien/Uuid", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/alien/Unlink", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/UrlType", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.geom.Rect", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/core/Convert", ".", mapper.constant("theme")), + source("bolt", "tinymce/inlite/alien/Bookmark", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.dom.TreeWalker", ".", mapper.constant("theme")), + source("bolt", "global!tinymce.dom.RangeUtils", ".", mapper.constant("theme")) + ] + }); + install.install(reader, builtins, transport, script); +})(); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/compile/theme.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/compile/theme.js new file mode 100644 index 0000000..c05f0e4 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/compile/theme.js @@ -0,0 +1,1594 @@ +/*jsc +["tinymce/inlite/Theme","global!tinymce.ThemeManager","global!tinymce.util.Delay","tinymce/inlite/ui/Panel","tinymce/inlite/ui/Buttons","tinymce/inlite/core/SkinLoader","tinymce/inlite/core/SelectionMatcher","tinymce/inlite/core/ElementMatcher","tinymce/inlite/core/Matcher","tinymce/inlite/alien/Arr","tinymce/inlite/core/PredicateId","global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","tinymce/inlite/ui/Toolbar","tinymce/inlite/ui/Forms","tinymce/inlite/core/Measure","tinymce/inlite/core/Layout","tinymce/inlite/file/Conversions","tinymce/inlite/file/Picker","tinymce/inlite/core/Actions","global!tinymce.EditorManager","global!tinymce.util.Promise","tinymce/inlite/alien/Uuid","tinymce/inlite/alien/Unlink","tinymce/inlite/core/UrlType","global!tinymce.geom.Rect","tinymce/inlite/core/Convert","tinymce/inlite/alien/Bookmark","global!tinymce.dom.TreeWalker","global!tinymce.dom.RangeUtils"] +jsc*/ +defineGlobal("global!tinymce.ThemeManager", tinymce.ThemeManager); +defineGlobal("global!tinymce.util.Delay", tinymce.util.Delay); +defineGlobal("global!tinymce.util.Tools", tinymce.util.Tools); +defineGlobal("global!tinymce.ui.Factory", tinymce.ui.Factory); +defineGlobal("global!tinymce.DOM", tinymce.DOM); +/** + * Toolbar.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Toolbar', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory' +], function (Tools, Factory) { + var setActiveItem = function (item, name) { + return function(state, args) { + var nodeName, i = args.parents.length; + + while (i--) { + nodeName = args.parents[i].nodeName; + if (nodeName == 'OL' || nodeName == 'UL') { + break; + } + } + + item.active(state && nodeName == name); + }; + }; + + var getSelectorStateResult = function (itemName, item) { + var result = function (selector, handler) { + return { + selector: selector, + handler: handler + }; + }; + + var activeHandler = function(state) { + item.active(state); + }; + + var disabledHandler = function (state) { + item.disabled(state); + }; + + if (itemName == 'bullist') { + return result('ul > li', setActiveItem(item, 'UL')); + } + + if (itemName == 'numlist') { + return result('ol > li', setActiveItem(item, 'OL')); + } + + if (item.settings.stateSelector) { + return result(item.settings.stateSelector, activeHandler); + } + + if (item.settings.disabledStateSelector) { + return result(item.settings.disabledStateSelector, disabledHandler); + } + + return null; + }; + + var bindSelectorChanged = function (editor, itemName, item) { + return function () { + var result = getSelectorStateResult(itemName, item); + if (result !== null) { + editor.selection.selectorChanged(result.selector, result.handler); + } + }; + }; + + var create = function (editor, name, items) { + var toolbarItems = [], buttonGroup; + + if (!items) { + return; + } + + Tools.each(items.split(/[ ,]/), function(item) { + var itemName; + + if (item == '|') { + buttonGroup = null; + } else { + if (Factory.has(item)) { + item = {type: item}; + toolbarItems.push(item); + buttonGroup = null; + } else { + if (!buttonGroup) { + buttonGroup = {type: 'buttongroup', items: []}; + toolbarItems.push(buttonGroup); + } + + if (editor.buttons[item]) { + itemName = item; + item = editor.buttons[itemName]; + + if (typeof item == 'function') { + item = item(); + } + + item.type = item.type || 'button'; + + item = Factory.create(item); + item.on('postRender', bindSelectorChanged(editor, itemName, item)); + buttonGroup.items.push(item); + } + } + } + }); + + return Factory.create({ + type: 'toolbar', + layout: 'flow', + name: name, + items: toolbarItems + }); + }; + + return { + create: create + }; +}); + +defineGlobal("global!tinymce.util.Promise", tinymce.util.Promise); +/** + * Uuid.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Generates unique ids this is the same as in core but since + * it's not exposed as a global we can't access it. + */ +define("tinymce/inlite/alien/Uuid", [ +], function() { + var count = 0; + + var seed = function () { + var rnd = function () { + return Math.round(Math.random() * 0xFFFFFFFF).toString(36); + }; + + return 's' + Date.now().toString(36) + rnd() + rnd() + rnd(); + }; + + var uuid = function (prefix) { + return prefix + (count++) + seed(); + }; + + return { + uuid: uuid + }; +}); + +/** + * Bookmark.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/alien/Bookmark', [ +], function () { + /** + * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with + * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans + * added to them since they can be restored after a dom operation. + * + * So this:

              ||

              + * becomes:

              ||

              + * + * @param {DOMRange} rng DOM Range to get bookmark on. + * @return {Object} Bookmark object. + */ + var create = function (dom, rng) { + var bookmark = {}; + + function setupEndPoint(start) { + var offsetNode, container, offset; + + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; + + if (container.nodeType == 1) { + offsetNode = dom.create('span', {'data-mce-type': 'bookmark'}); + + if (container.hasChildNodes()) { + offset = Math.min(offset, container.childNodes.length - 1); + + if (start) { + container.insertBefore(offsetNode, container.childNodes[offset]); + } else { + dom.insertAfter(offsetNode, container.childNodes[offset]); + } + } else { + container.appendChild(offsetNode); + } + + container = offsetNode; + offset = 0; + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + setupEndPoint(true); + + if (!rng.collapsed) { + setupEndPoint(); + } + + return bookmark; + }; + + /** + * Moves the selection to the current bookmark and removes any selection container wrappers. + * + * @param {Object} bookmark Bookmark object to move selection to. + */ + var resolve = function (dom, bookmark) { + function restoreEndPoint(start) { + var container, offset, node; + + function nodeIndex(container) { + var node = container.parentNode.firstChild, idx = 0; + + while (node) { + if (node == container) { + return idx; + } + + // Skip data-mce-type=bookmark nodes + if (node.nodeType != 1 || node.getAttribute('data-mce-type') != 'bookmark') { + idx++; + } + + node = node.nextSibling; + } + + return -1; + } + + container = node = bookmark[start ? 'startContainer' : 'endContainer']; + offset = bookmark[start ? 'startOffset' : 'endOffset']; + + if (!container) { + return; + } + + if (container.nodeType == 1) { + offset = nodeIndex(container); + container = container.parentNode; + dom.remove(node); + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + restoreEndPoint(true); + restoreEndPoint(); + + var rng = dom.createRng(); + + rng.setStart(bookmark.startContainer, bookmark.startOffset); + + if (bookmark.endContainer) { + rng.setEnd(bookmark.endContainer, bookmark.endOffset); + } + + return rng; + }; + + return { + create: create, + resolve: resolve + }; +}); + + + +defineGlobal("global!tinymce.dom.TreeWalker", tinymce.dom.TreeWalker); +defineGlobal("global!tinymce.dom.RangeUtils", tinymce.dom.RangeUtils); +/** + * Unlink.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Unlink implementation that doesn't leave partial links for example it would produce: + * a[bc]de -> a[bc]de + * instead of: + * a[bc]de -> a[bc]de + */ +define("tinymce/inlite/alien/Unlink", [ + 'tinymce/inlite/alien/Bookmark', + 'global!tinymce.util.Tools', + 'global!tinymce.dom.TreeWalker', + 'global!tinymce.dom.RangeUtils' +], function (Bookmark, Tools, TreeWalker, RangeUtils) { + var getSelectedElements = function (rootElm, startNode, endNode) { + var walker, node, elms = []; + + walker = new TreeWalker(startNode, rootElm); + for (node = startNode; node; node = walker.next()) { + if (node.nodeType === 1) { + elms.push(node); + } + + if (node === endNode) { + break; + } + } + + return elms; + }; + + var unwrapElements = function (editor, elms) { + var bookmark, dom, selection; + + dom = editor.dom; + selection = editor.selection; + bookmark = Bookmark.create(dom, selection.getRng()); + + Tools.each(elms, function (elm) { + editor.dom.remove(elm, true); + }); + + selection.setRng(Bookmark.resolve(dom, bookmark)); + }; + + var isLink = function (elm) { + return elm.nodeName === 'A' && elm.hasAttribute('href'); + }; + + var getParentAnchorOrSelf = function (dom, elm) { + var anchorElm = dom.getParent(elm, isLink); + return anchorElm ? anchorElm : elm; + }; + + var getSelectedAnchors = function (editor) { + var startElm, endElm, rootElm, anchorElms, selection, dom, rng; + + selection = editor.selection; + dom = editor.dom; + rng = selection.getRng(); + startElm = getParentAnchorOrSelf(dom, RangeUtils.getNode(rng.startContainer, rng.startOffset)); + endElm = RangeUtils.getNode(rng.endContainer, rng.endOffset); + rootElm = editor.getBody(); + anchorElms = Tools.grep(getSelectedElements(rootElm, startElm, endElm), isLink); + + return anchorElms; + }; + + var unlinkSelection = function (editor) { + unwrapElements(editor, getSelectedAnchors(editor)); + }; + + return { + unlinkSelection: unlinkSelection + }; +}); + +/** + * Actions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Actions', [ + 'tinymce/inlite/alien/Uuid', + 'tinymce/inlite/alien/Unlink' +], function (Uuid, Unlink) { + var createTableHtml = function (cols, rows) { + var x, y, html; + + html = '
              '; + html += ''; + + for (y = 0; y < rows; y++) { + html += ''; + + for (x = 0; x < cols; x++) { + html += ''; + } + + html += ''; + } + + html += ''; + html += '

              '; + + return html; + }; + + var getInsertedElement = function (editor) { + var elms = editor.dom.select('*[data-mce-id]'); + return elms[0]; + }; + + var insertTable = function (editor, cols, rows) { + editor.undoManager.transact(function () { + var tableElm, cellElm; + + editor.insertContent(createTableHtml(cols, rows)); + + tableElm = getInsertedElement(editor); + tableElm.removeAttribute('data-mce-id'); + cellElm = editor.dom.select('td,th', tableElm); + editor.selection.setCursorLocation(cellElm[0], 0); + }); + }; + + var formatBlock = function (editor, formatName) { + editor.execCommand('FormatBlock', false, formatName); + }; + + var insertBlob = function (editor, base64, blob) { + var blobCache, blobInfo; + + blobCache = editor.editorUpload.blobCache; + blobInfo = blobCache.create(Uuid.uuid('mceu'), blob, base64); + blobCache.add(blobInfo); + + editor.insertContent(editor.dom.createHTML('img', {src: blobInfo.blobUri()})); + }; + + var collapseSelectionToEnd = function (editor) { + editor.selection.collapse(false); + }; + + var unlink = function (editor) { + editor.focus(); + Unlink.unlinkSelection(editor); + collapseSelectionToEnd(editor); + }; + + var changeHref = function (editor, elm, url) { + editor.focus(); + editor.dom.setAttrib(elm, 'href', url); + collapseSelectionToEnd(editor); + }; + + var insertLink = function (editor, url) { + editor.execCommand('mceInsertLink', false, {href: url}); + collapseSelectionToEnd(editor); + }; + + var updateOrInsertLink = function (editor, url) { + var elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + elm ? changeHref(editor, elm, url) : insertLink(editor, url); + }; + + var createLink = function (editor, url) { + url.trim().length === 0 ? unlink(editor) : updateOrInsertLink(editor, url); + }; + + return { + insertTable: insertTable, + formatBlock: formatBlock, + insertBlob: insertBlob, + createLink: createLink, + unlink: unlink + }; +}); + +/** + * UrlType.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/UrlType', [ +], function () { + var isDomainLike = function (href) { + return /^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(href.trim()); + }; + + var isAbsolute = function (href) { + return /^https?:\/\//.test(href.trim()); + }; + + return { + isDomainLike: isDomainLike, + isAbsolute: isAbsolute + }; +}); + + + +/** + * Forms.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Forms', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory', + 'global!tinymce.util.Promise', + 'tinymce/inlite/core/Actions', + 'tinymce/inlite/core/UrlType' +], function (Tools, Factory, Promise, Actions, UrlType) { + var focusFirstTextBox = function (form) { + form.find('textbox').eq(0).each(function (ctrl) { + ctrl.focus(); + }); + }; + + var createForm = function (name, spec) { + var form = Factory.create( + Tools.extend({ + type: 'form', + layout: 'flex', + direction: 'row', + padding: 5, + name: name, + spacing: 3 + }, spec) + ); + + form.on('show', function () { + focusFirstTextBox(form); + }); + + return form; + }; + + var toggleVisibility = function (ctrl, state) { + return state ? ctrl.show() : ctrl.hide(); + }; + + var askAboutPrefix = function (editor, href) { + return new Promise(function (resolve) { + editor.windowManager.confirm( + 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', + function (result) { + var output = result === true ? 'http://' + href : href; + resolve(output); + } + ); + }); + }; + + var convertLinkToAbsolute = function (editor, href) { + return !UrlType.isAbsolute(href) && UrlType.isDomainLike(href) ? askAboutPrefix(editor, href) : Promise.resolve(href); + }; + + var createQuickLinkForm = function (editor, hide) { + var unlink = function () { + editor.focus(); + Actions.unlink(editor); + hide(); + }; + + return createForm('quicklink', { + items: [ + {type: 'button', name: 'unlink', icon: 'unlink', onclick: unlink, tooltip: 'Remove link'}, + {type: 'textbox', name: 'linkurl', placeholder: 'Paste or type a link'}, + {type: 'button', icon: 'checkmark', subtype: 'primary', tooltip: 'Ok', onclick: 'submit'} + ], + onshow: function () { + var elm, linkurl = ''; + + elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + if (elm) { + linkurl = editor.dom.getAttrib(elm, 'href'); + } + + this.fromJSON({ + linkurl: linkurl + }); + + toggleVisibility(this.find('#unlink'), elm); + }, + onsubmit: function (e) { + convertLinkToAbsolute(editor, e.data.linkurl).then(function (url) { + Actions.createLink(editor, url); + hide(); + }); + } + }); + }; + + return { + createQuickLinkForm: createQuickLinkForm + }; +}); + +defineGlobal("global!tinymce.geom.Rect", tinymce.geom.Rect); +/** + * Convert.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Convert', [ +], function () { + var fromClientRect = function (clientRect) { + return { + x: clientRect.left, + y: clientRect.top, + w: clientRect.width, + h: clientRect.height + }; + }; + + var toClientRect = function (geomRect) { + return { + left: geomRect.x, + top: geomRect.y, + width: geomRect.w, + height: geomRect.h, + right: geomRect.x + geomRect.w, + bottom: geomRect.y + geomRect.h + }; + }; + + return { + fromClientRect: fromClientRect, + toClientRect: toClientRect + }; +}); + +/** + * Measure.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Measure', [ + 'global!tinymce.DOM', + 'global!tinymce.geom.Rect', + 'tinymce/inlite/core/Convert' +], function (DOM, Rect, Convert) { + var toAbsolute = function (rect) { + var vp = DOM.getViewPort(); + + return { + x: rect.x + vp.x, + y: rect.y + vp.y, + w: rect.w, + h: rect.h + }; + }; + + var measureElement = function (elm) { + var clientRect = elm.getBoundingClientRect(); + + return toAbsolute({ + x: clientRect.left, + y: clientRect.top, + w: Math.max(elm.clientWidth, elm.offsetWidth), + h: Math.max(elm.clientHeight, elm.offsetHeight) + }); + }; + + var getElementRect = function (editor, elm) { + return measureElement(elm); + }; + + var getPageAreaRect = function (editor) { + return measureElement(editor.getElement().ownerDocument.body); + }; + + var getContentAreaRect = function (editor) { + return measureElement(editor.getContentAreaContainer() || editor.getBody()); + }; + + var getSelectionRect = function (editor) { + var clientRect = editor.selection.getBoundingClientRect(); + return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null; + }; + + return { + getElementRect: getElementRect, + getPageAreaRect: getPageAreaRect, + getContentAreaRect: getContentAreaRect, + getSelectionRect: getSelectionRect + }; +}); + +/** + * Layout.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Layout', [ + 'global!tinymce.geom.Rect', + 'tinymce/inlite/core/Convert' +], function (Rect, Convert) { + var result = function (rect, position) { + return { + rect: rect, + position: position + }; + }; + + var moveTo = function (rect, toRect) { + return {x: toRect.x, y: toRect.y, w: rect.w, h: rect.h}; + }; + + var calcByPositions = function (testPositions1, testPositions2, targetRect, contentAreaRect, panelRect) { + var relPos, relRect, outputPanelRect; + + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions1); + targetRect = Rect.clamp(targetRect, contentAreaRect); + + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + targetRect = Rect.intersect(contentAreaRect, targetRect); + if (targetRect) { + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions2); + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + outputPanelRect = moveTo(panelRect, targetRect); + return result(outputPanelRect, relPos); + } + + return null; + }; + + var calcInsert = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['cr-cl', 'cl-cr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var calc = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['tc-bc', 'bc-tc', 'tl-bl', 'bl-tl', 'tr-br', 'br-tr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var userConstrain = function (handler, targetRect, contentAreaRect, panelRect) { + var userConstrainedPanelRect; + + if (typeof handler === 'function') { + userConstrainedPanelRect = handler({ + elementRect: Convert.toClientRect(targetRect), + contentAreaRect: Convert.toClientRect(contentAreaRect), + panelRect: Convert.toClientRect(panelRect) + }); + + return Convert.fromClientRect(userConstrainedPanelRect); + } + + return panelRect; + }; + + return { + calcInsert: calcInsert, + calc: calc, + userConstrain: userConstrain + }; +}); + +/** + * Panel.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Panel', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory', + 'global!tinymce.DOM', + 'tinymce/inlite/ui/Toolbar', + 'tinymce/inlite/ui/Forms', + 'tinymce/inlite/core/Measure', + 'tinymce/inlite/core/Layout' +], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout) { + return function () { + var DEFAULT_TEXT_SELECTION_ITEMS = 'bold italic | quicklink h2 h3 blockquote'; + var DEFAULT_INSERT_TOOLBAR_ITEMS = 'quickimage quicktable'; + var panel, currentRect; + + var createToolbars = function (editor, toolbars) { + return Tools.map(toolbars, function (toolbar) { + return Toolbar.create(editor, toolbar.id, toolbar.items); + }); + }; + + var getTextSelectionToolbarItems = function (settings) { + var value = settings.selection_toolbar; + return value ? value : DEFAULT_TEXT_SELECTION_ITEMS; + }; + + var getInsertToolbarItems = function (settings) { + var value = settings.insert_toolbar; + return value ? value : DEFAULT_INSERT_TOOLBAR_ITEMS; + }; + + var create = function (editor, toolbars) { + var items, settings = editor.settings; + + items = createToolbars(editor, toolbars); + items = items.concat([ + Toolbar.create(editor, 'text', getTextSelectionToolbarItems(settings)), + Toolbar.create(editor, 'insert', getInsertToolbarItems(settings)), + Forms.createQuickLinkForm(editor, hide) + ]); + + return Factory.create({ + type: 'floatpanel', + role: 'dialog', + classes: 'tinymce tinymce-inline arrow', + ariaLabel: 'Inline toolbar', + layout: 'flex', + direction: 'column', + align: 'stretch', + autohide: false, + autofix: true, + fixed: true, + border: 1, + items: items, + oncancel: function() { + editor.focus(); + } + }); + }; + + var showPanel = function (panel) { + if (panel) { + panel.show(); + } + }; + + var movePanelTo = function (panel, pos) { + panel.moveTo(pos.x, pos.y); + }; + + var togglePositionClass = function (panel, relPos) { + relPos = relPos ? relPos.substr(0, 2) : ''; + + Tools.each({ + t: 'down', + b: 'up', + c: 'center' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(0, 1)); + }); + + if (relPos === 'cr') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', false); + } else if (relPos === 'cl') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', true); + } else { + Tools.each({ + l: 'left', + r: 'right' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(1, 1)); + }); + } + }; + + var showToolbar = function (panel, id) { + var toolbars = panel.items().filter('#' + id); + + if (toolbars.length > 0) { + toolbars[0].show(); + panel.reflow(); + } + }; + + var showPanelAt = function (panel, id, editor, targetRect) { + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + if (id === 'insert') { + result = Layout.calcInsert(targetRect, contentAreaRect, panelRect); + } else { + result = Layout.calc(targetRect, contentAreaRect, panelRect); + } + + if (result) { + panelRect = result.rect; + currentRect = targetRect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } else { + hide(panel); + } + }; + + var hasFormVisible = function () { + return panel.items().filter('form:visible').length > 0; + }; + + var showForm = function (editor, id) { + if (panel) { + panel.items().hide(); + showToolbar(panel, id); + + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + result = Layout.calc(currentRect, contentAreaRect, panelRect); + + if (result) { + panelRect = result.rect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } + } + }; + + var show = function (editor, id, targetRect, toolbars) { + if (!panel) { + panel = create(editor, toolbars); + panel.renderTo(document.body).reflow().moveTo(targetRect.x, targetRect.y); + editor.nodeChanged(); + } + + showPanelAt(panel, id, editor, targetRect); + }; + + var hide = function () { + if (panel) { + panel.hide(); + } + }; + + var focus = function () { + if (panel) { + panel.find('toolbar:visible').eq(0).each(function (item) { + item.focus(true); + }); + } + }; + + var remove = function () { + if (panel) { + panel.remove(); + panel = null; + } + }; + + var inForm = function () { + return panel && panel.visible() && hasFormVisible(); + }; + + return { + show: show, + showForm: showForm, + inForm: inForm, + hide: hide, + focus: focus, + remove: remove + }; + }; +}); + +/** + * Conversions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/file/Conversions', [ + 'global!tinymce.util.Promise' +], function (Promise) { + var blobToBase64 = function (blob) { + return new Promise(function(resolve) { + var reader = new FileReader(); + + reader.onloadend = function() { + resolve(reader.result.split(',')[1]); + }; + + reader.readAsDataURL(blob); + }); + }; + + return { + blobToBase64: blobToBase64 + }; +}); + + + +/** + * Picker.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/file/Picker', [ + 'global!tinymce.util.Promise' +], function (Promise) { + var pickFile = function () { + return new Promise(function (resolve) { + var fileInput; + + fileInput = document.createElement("input"); + fileInput.type = "file"; + fileInput.style.position = 'fixed'; + fileInput.style.left = 0; + fileInput.style.top = 0; + fileInput.style.opacity = 0.001; + document.body.appendChild(fileInput); + + fileInput.onchange = function(e) { + resolve(Array.prototype.slice.call(e.target.files)); + }; + + fileInput.click(); + fileInput.parentNode.removeChild(fileInput); + }); + }; + + return { + pickFile: pickFile + }; +}); + + + +/** + * Buttons.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Buttons', [ + 'tinymce/inlite/ui/Panel', + 'tinymce/inlite/file/Conversions', + 'tinymce/inlite/file/Picker', + 'tinymce/inlite/core/Actions' +], function (Panel, Conversions, Picker, Actions) { + var addHeaderButtons = function (editor) { + var formatBlock = function (name) { + return function () { + Actions.formatBlock(editor, name); + }; + }; + + for (var i = 1; i < 6; i++) { + var name = 'h' + i; + + editor.addButton(name, { + text: name.toUpperCase(), + tooltip: 'Heading ' + i, + stateSelector: name, + onclick: formatBlock(name), + onPostRender: function () { + // TODO: Remove this hack that produces bold H1-H6 when we have proper icons + var span = this.getEl().firstChild.firstChild; + span.style.fontWeight = 'bold'; + } + }); + } + }; + + var addToEditor = function (editor, panel) { + editor.addButton('quicklink', { + icon: 'link', + tooltip: 'Insert/Edit link', + stateSelector: 'a[href]', + onclick: function () { + panel.showForm(editor, 'quicklink'); + } + }); + + editor.addButton('quickimage', { + icon: 'image', + tooltip: 'Insert image', + onclick: function () { + Picker.pickFile().then(function (files) { + var blob = files[0]; + + Conversions.blobToBase64(blob).then(function (base64) { + Actions.insertBlob(editor, base64, blob); + }); + }); + } + }); + + editor.addButton('quicktable', { + icon: 'table', + tooltip: 'Insert table', + onclick: function () { + panel.hide(); + Actions.insertTable(editor, 2, 2); + } + }); + + addHeaderButtons(editor); + }; + + return { + addToEditor: addToEditor + }; +}); + +defineGlobal("global!tinymce.EditorManager", tinymce.EditorManager); +/** + * SkinLoader.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SkinLoader', [ + 'global!tinymce.EditorManager', + 'global!tinymce.DOM' +], function (EditorManager, DOM) { + var fireSkinLoaded = function (editor, callback) { + var done = function () { + editor.fire('SkinLoaded'); + callback(); + }; + + if (editor.initialized) { + done(); + } else { + editor.on('init', done); + } + }; + + var load = function (editor, skin, callback) { + var baseUrl = EditorManager.baseURL; + var skinUrl = baseUrl + '/skins/' + skin; + + var done = function () { + fireSkinLoaded(editor, callback); + }; + + DOM.styleSheetLoader.load(skinUrl + '/skin.min.css', done); + editor.contentCSS.push(skinUrl + '/content.inline.min.css'); + }; + + return { + load: load + }; +}); + + + +/** + * Matcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Matcher', [ +], function () { + // result :: String, Rect -> Matcher.result + var result = function (id, rect) { + return { + id: id, + rect: rect + }; + }; + + // match :: Editor, [(Editor -> Matcher.result | Null)] -> Matcher.result | Null + var match = function (editor, matchers) { + for (var i = 0; i < matchers.length; i++) { + var f = matchers[i]; + var result = f(editor); + + if (result) { + return result; + } + } + + return null; + }; + + return { + match: match, + result: result + }; +}); + +/** + * SelectionMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SelectionMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // textSelection :: String -> (Editor -> Matcher.result | Null) + var textSelection = function (id) { + return function (editor) { + if (!editor.selection.isCollapsed()) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + }; + }; + + // emptyTextBlock :: [Elements], String -> (Editor -> Matcher.result | Null) + var emptyTextBlock = function (elements, id) { + return function (editor) { + var i, textBlockElementsMap = editor.schema.getTextBlockElements(); + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName === 'TABLE') { + return null; + } + } + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName in textBlockElementsMap) { + if (editor.dom.isEmpty(elements[i])) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + } + } + + return null; + }; + }; + + return { + textSelection: textSelection, + emptyTextBlock: emptyTextBlock + }; +}); + +/** + * ElementMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/ElementMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // element :: Element, [PredicateId] -> (Editor -> Matcher.result | Null) + var element = function (element, predicateIds) { + return function (editor) { + for (var i = 0; i < predicateIds.length; i++) { + if (predicateIds[i].predicate(element)) { + return Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element)); + } + } + + return null; + }; + }; + + // parent :: [Elements], [PredicateId] -> (Editor -> Matcher.result | Null) + var parent = function (elements, predicateIds) { + return function (editor) { + for (var i = 0; i < elements.length; i++) { + for (var x = 0; x < predicateIds.length; x++) { + if (predicateIds[x].predicate(elements[i])) { + return Matcher.result(predicateIds[x].id, Measure.getElementRect(editor, elements[i])); + } + } + } + + return null; + }; + }; + + return { + element: element, + parent: parent + }; +}); + +/** + * Arr.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/alien/Arr', [ +], function () { + var flatten = function (arr) { + return arr.reduce(function (results, item) { + return Array.isArray(item) ? results.concat(flatten(item)) : results.concat(item); + }, []); + }; + + return { + flatten: flatten + }; +}); + +/** + * PredicateId.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/PredicateId', [ + 'global!tinymce.util.Tools' +], function (Tools) { + var create = function (id, predicate) { + return { + id: id, + predicate: predicate + }; + }; + + // fromContextToolbars :: [ContextToolbar] -> [PredicateId] + var fromContextToolbars = function (toolbars) { + return Tools.map(toolbars, function (toolbar) { + return create(toolbar.id, toolbar.predicate); + }); + }; + + return { + create: create, + fromContextToolbars: fromContextToolbars + }; +}); + +/** + * Theme.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/Theme', [ + 'global!tinymce.ThemeManager', + 'global!tinymce.util.Delay', + 'tinymce/inlite/ui/Panel', + 'tinymce/inlite/ui/Buttons', + 'tinymce/inlite/core/SkinLoader', + 'tinymce/inlite/core/SelectionMatcher', + 'tinymce/inlite/core/ElementMatcher', + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/alien/Arr', + 'tinymce/inlite/core/PredicateId' +], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, PredicateId) { + var getSelectionElements = function (editor) { + var node = editor.selection.getNode(); + var elms = editor.dom.getParents(node); + return elms; + }; + + var createToolbar = function (editor, selector, id, items) { + var selectorPredicate = function (elm) { + return editor.dom.is(elm, selector); + }; + + return { + predicate: selectorPredicate, + id: id, + items: items + }; + }; + + var getToolbars = function (editor) { + var contextToolbars = editor.contextToolbars; + + return Arr.flatten([ + contextToolbars ? contextToolbars : [], + createToolbar(editor, 'img', 'image', 'alignleft aligncenter alignright') + ]); + }; + + var findMatchResult = function (editor, toolbars) { + var result, elements, contextToolbarsPredicateIds; + + elements = getSelectionElements(editor); + contextToolbarsPredicateIds = PredicateId.fromContextToolbars(toolbars); + + result = Matcher.match(editor, [ + ElementMatcher.element(elements[0], contextToolbarsPredicateIds), + SelectionMatcher.textSelection('text'), + SelectionMatcher.emptyTextBlock(elements, 'insert'), + ElementMatcher.parent(elements, contextToolbarsPredicateIds) + ]); + + return result && result.rect ? result : null; + }; + + var togglePanel = function (editor, panel) { + var toggle = function () { + var toolbars = getToolbars(editor); + var result = findMatchResult(editor, toolbars); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } else { + panel.hide(); + } + }; + + return function () { + if (!editor.removed) { + toggle(); + } + }; + }; + + var ignoreWhenFormIsVisible = function (panel, f) { + return function () { + if (!panel.inForm()) { + f(); + } + }; + }; + + var bindContextualToolbarsEvents = function (editor, panel) { + var throttledTogglePanel = Delay.throttle(togglePanel(editor, panel), 0); + var throttledTogglePanelWhenNotInForm = Delay.throttle(ignoreWhenFormIsVisible(panel, togglePanel(editor, panel)), 0); + + editor.on('blur hide ObjectResizeStart', panel.hide); + editor.on('click', throttledTogglePanel); + editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm); + editor.on('ResizeEditor ResizeWindow keyup', throttledTogglePanel); + editor.on('remove', panel.remove); + + editor.shortcuts.add('Alt+F10', '', panel.focus); + }; + + var overrideLinkShortcut = function (editor, panel) { + editor.shortcuts.remove('meta+k'); + editor.shortcuts.add('meta+k', '', function () { + var toolbars = getToolbars(editor); + var result = result = Matcher.match(editor, [ + SelectionMatcher.textSelection('quicklink') + ]); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } + }); + }; + + var renderInlineUI = function (editor, panel) { + var skinName = editor.settings.skin || 'lightgray'; + + SkinLoader.load(editor, skinName, function () { + bindContextualToolbarsEvents(editor, panel); + overrideLinkShortcut(editor, panel); + }); + + return {}; + }; + + var fail = function (message) { + throw new Error(message); + }; + + ThemeManager.add('inlite', function (editor) { + var panel = new Panel(); + + Buttons.addToEditor(editor, panel); + + var renderUI = function () { + return editor.inline ? renderInlineUI(editor, panel) : fail('inlite theme only supports inline mode.'); + }; + + return { + renderUI: renderUI + }; + }); + + return function() {}; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/inline/theme.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/inline/theme.js new file mode 100644 index 0000000..d052cd2 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/inline/theme.js @@ -0,0 +1,1679 @@ +(function () { + +var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} + +// Used when there is no 'main' module. +// The name is probably (hopefully) unique so minification removes for releases. +var register_3795 = function (id) { + var module = dem(id); + var fragments = id.split('.'); + var target = Function('return this;')(); + for (var i = 0; i < fragments.length - 1; ++i) { + if (target[fragments[i]] === undefined) + target[fragments[i]] = {}; + target = target[fragments[i]]; + } + target[fragments[fragments.length - 1]] = module; +}; + +var instantiate = function (id) { + var actual = defs[id]; + var dependencies = actual.deps; + var definition = actual.defn; + var len = dependencies.length; + var instances = new Array(len); + for (var i = 0; i < len; ++i) + instances[i] = dem(dependencies[i]); + var defResult = definition.apply(null, instances); + if (defResult === undefined) + throw 'module [' + id + '] returned undefined'; + actual.instance = defResult; +}; + +var def = function (id, dependencies, definition) { + if (typeof id !== 'string') + throw 'module id must be a string'; + else if (dependencies === undefined) + throw 'no dependencies for ' + id; + else if (definition === undefined) + throw 'no definition function for ' + id; + defs[id] = { + deps: dependencies, + defn: definition, + instance: undefined + }; +}; + +var dem = function (id) { + var actual = defs[id]; + if (actual === undefined) + throw 'module [' + id + '] was undefined'; + else if (actual.instance === undefined) + instantiate(id); + return actual.instance; +}; + +var req = function (ids, callback) { + var len = ids.length; + var instances = new Array(len); + for (var i = 0; i < len; ++i) + instances.push(dem(ids[i])); + callback.apply(null, callback); +}; + +var ephox = {}; + +ephox.bolt = { + module: { + api: { + define: def, + require: req, + demand: dem + } + } +}; + +var define = def; +var require = req; +var demand = dem; +// this helps with minificiation when using a lot of global references +var defineGlobal = function (id, ref) { + define(id, [], function () { return ref; }); +}; +/*jsc +["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u"] +jsc*/ +defineGlobal("1", tinymce.ThemeManager); +defineGlobal("2", tinymce.util.Delay); +defineGlobal("b", tinymce.util.Tools); +defineGlobal("c", tinymce.ui.Factory); +defineGlobal("d", tinymce.DOM); +/** + * Toolbar.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("e", [ + "b", + "c" +], function (Tools, Factory) { + var setActiveItem = function (item, name) { + return function(state, args) { + var nodeName, i = args.parents.length; + + while (i--) { + nodeName = args.parents[i].nodeName; + if (nodeName == 'OL' || nodeName == 'UL') { + break; + } + } + + item.active(state && nodeName == name); + }; + }; + + var getSelectorStateResult = function (itemName, item) { + var result = function (selector, handler) { + return { + selector: selector, + handler: handler + }; + }; + + var activeHandler = function(state) { + item.active(state); + }; + + var disabledHandler = function (state) { + item.disabled(state); + }; + + if (itemName == 'bullist') { + return result('ul > li', setActiveItem(item, 'UL')); + } + + if (itemName == 'numlist') { + return result('ol > li', setActiveItem(item, 'OL')); + } + + if (item.settings.stateSelector) { + return result(item.settings.stateSelector, activeHandler); + } + + if (item.settings.disabledStateSelector) { + return result(item.settings.disabledStateSelector, disabledHandler); + } + + return null; + }; + + var bindSelectorChanged = function (editor, itemName, item) { + return function () { + var result = getSelectorStateResult(itemName, item); + if (result !== null) { + editor.selection.selectorChanged(result.selector, result.handler); + } + }; + }; + + var create = function (editor, name, items) { + var toolbarItems = [], buttonGroup; + + if (!items) { + return; + } + + Tools.each(items.split(/[ ,]/), function(item) { + var itemName; + + if (item == '|') { + buttonGroup = null; + } else { + if (Factory.has(item)) { + item = {type: item}; + toolbarItems.push(item); + buttonGroup = null; + } else { + if (!buttonGroup) { + buttonGroup = {type: 'buttongroup', items: []}; + toolbarItems.push(buttonGroup); + } + + if (editor.buttons[item]) { + itemName = item; + item = editor.buttons[itemName]; + + if (typeof item == 'function') { + item = item(); + } + + item.type = item.type || 'button'; + + item = Factory.create(item); + item.on('postRender', bindSelectorChanged(editor, itemName, item)); + buttonGroup.items.push(item); + } + } + } + }); + + return Factory.create({ + type: 'toolbar', + layout: 'flow', + name: name, + items: toolbarItems + }); + }; + + return { + create: create + }; +}); + +defineGlobal("m", tinymce.util.Promise); +/** + * Uuid.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Generates unique ids this is the same as in core but since + * it's not exposed as a global we can't access it. + */ +define("n", [ +], function() { + var count = 0; + + var seed = function () { + var rnd = function () { + return Math.round(Math.random() * 0xFFFFFFFF).toString(36); + }; + + return 's' + Date.now().toString(36) + rnd() + rnd() + rnd(); + }; + + var uuid = function (prefix) { + return prefix + (count++) + seed(); + }; + + return { + uuid: uuid + }; +}); + +/** + * Bookmark.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("s", [ +], function () { + /** + * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with + * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans + * added to them since they can be restored after a dom operation. + * + * So this:

              ||

              + * becomes:

              ||

              + * + * @param {DOMRange} rng DOM Range to get bookmark on. + * @return {Object} Bookmark object. + */ + var create = function (dom, rng) { + var bookmark = {}; + + function setupEndPoint(start) { + var offsetNode, container, offset; + + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; + + if (container.nodeType == 1) { + offsetNode = dom.create('span', {'data-mce-type': 'bookmark'}); + + if (container.hasChildNodes()) { + offset = Math.min(offset, container.childNodes.length - 1); + + if (start) { + container.insertBefore(offsetNode, container.childNodes[offset]); + } else { + dom.insertAfter(offsetNode, container.childNodes[offset]); + } + } else { + container.appendChild(offsetNode); + } + + container = offsetNode; + offset = 0; + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + setupEndPoint(true); + + if (!rng.collapsed) { + setupEndPoint(); + } + + return bookmark; + }; + + /** + * Moves the selection to the current bookmark and removes any selection container wrappers. + * + * @param {Object} bookmark Bookmark object to move selection to. + */ + var resolve = function (dom, bookmark) { + function restoreEndPoint(start) { + var container, offset, node; + + function nodeIndex(container) { + var node = container.parentNode.firstChild, idx = 0; + + while (node) { + if (node == container) { + return idx; + } + + // Skip data-mce-type=bookmark nodes + if (node.nodeType != 1 || node.getAttribute('data-mce-type') != 'bookmark') { + idx++; + } + + node = node.nextSibling; + } + + return -1; + } + + container = node = bookmark[start ? 'startContainer' : 'endContainer']; + offset = bookmark[start ? 'startOffset' : 'endOffset']; + + if (!container) { + return; + } + + if (container.nodeType == 1) { + offset = nodeIndex(container); + container = container.parentNode; + dom.remove(node); + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + restoreEndPoint(true); + restoreEndPoint(); + + var rng = dom.createRng(); + + rng.setStart(bookmark.startContainer, bookmark.startOffset); + + if (bookmark.endContainer) { + rng.setEnd(bookmark.endContainer, bookmark.endOffset); + } + + return rng; + }; + + return { + create: create, + resolve: resolve + }; +}); + + + +defineGlobal("t", tinymce.dom.TreeWalker); +defineGlobal("u", tinymce.dom.RangeUtils); +/** + * Unlink.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Unlink implementation that doesn't leave partial links for example it would produce: + * a[bc]de -> a[bc]de + * instead of: + * a[bc]de -> a[bc]de + */ +define("o", [ + "s", + "b", + "t", + "u" +], function (Bookmark, Tools, TreeWalker, RangeUtils) { + var getSelectedElements = function (rootElm, startNode, endNode) { + var walker, node, elms = []; + + walker = new TreeWalker(startNode, rootElm); + for (node = startNode; node; node = walker.next()) { + if (node.nodeType === 1) { + elms.push(node); + } + + if (node === endNode) { + break; + } + } + + return elms; + }; + + var unwrapElements = function (editor, elms) { + var bookmark, dom, selection; + + dom = editor.dom; + selection = editor.selection; + bookmark = Bookmark.create(dom, selection.getRng()); + + Tools.each(elms, function (elm) { + editor.dom.remove(elm, true); + }); + + selection.setRng(Bookmark.resolve(dom, bookmark)); + }; + + var isLink = function (elm) { + return elm.nodeName === 'A' && elm.hasAttribute('href'); + }; + + var getParentAnchorOrSelf = function (dom, elm) { + var anchorElm = dom.getParent(elm, isLink); + return anchorElm ? anchorElm : elm; + }; + + var getSelectedAnchors = function (editor) { + var startElm, endElm, rootElm, anchorElms, selection, dom, rng; + + selection = editor.selection; + dom = editor.dom; + rng = selection.getRng(); + startElm = getParentAnchorOrSelf(dom, RangeUtils.getNode(rng.startContainer, rng.startOffset)); + endElm = RangeUtils.getNode(rng.endContainer, rng.endOffset); + rootElm = editor.getBody(); + anchorElms = Tools.grep(getSelectedElements(rootElm, startElm, endElm), isLink); + + return anchorElms; + }; + + var unlinkSelection = function (editor) { + unwrapElements(editor, getSelectedAnchors(editor)); + }; + + return { + unlinkSelection: unlinkSelection + }; +}); + +/** + * Actions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("k", [ + "n", + "o" +], function (Uuid, Unlink) { + var createTableHtml = function (cols, rows) { + var x, y, html; + + html = ''; + html += ''; + + for (y = 0; y < rows; y++) { + html += ''; + + for (x = 0; x < cols; x++) { + html += ''; + } + + html += ''; + } + + html += ''; + html += '

              '; + + return html; + }; + + var getInsertedElement = function (editor) { + var elms = editor.dom.select('*[data-mce-id]'); + return elms[0]; + }; + + var insertTable = function (editor, cols, rows) { + editor.undoManager.transact(function () { + var tableElm, cellElm; + + editor.insertContent(createTableHtml(cols, rows)); + + tableElm = getInsertedElement(editor); + tableElm.removeAttribute('data-mce-id'); + cellElm = editor.dom.select('td,th', tableElm); + editor.selection.setCursorLocation(cellElm[0], 0); + }); + }; + + var formatBlock = function (editor, formatName) { + editor.execCommand('FormatBlock', false, formatName); + }; + + var insertBlob = function (editor, base64, blob) { + var blobCache, blobInfo; + + blobCache = editor.editorUpload.blobCache; + blobInfo = blobCache.create(Uuid.uuid('mceu'), blob, base64); + blobCache.add(blobInfo); + + editor.insertContent(editor.dom.createHTML('img', {src: blobInfo.blobUri()})); + }; + + var collapseSelectionToEnd = function (editor) { + editor.selection.collapse(false); + }; + + var unlink = function (editor) { + editor.focus(); + Unlink.unlinkSelection(editor); + collapseSelectionToEnd(editor); + }; + + var changeHref = function (editor, elm, url) { + editor.focus(); + editor.dom.setAttrib(elm, 'href', url); + collapseSelectionToEnd(editor); + }; + + var insertLink = function (editor, url) { + editor.execCommand('mceInsertLink', false, {href: url}); + collapseSelectionToEnd(editor); + }; + + var updateOrInsertLink = function (editor, url) { + var elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + elm ? changeHref(editor, elm, url) : insertLink(editor, url); + }; + + var createLink = function (editor, url) { + url.trim().length === 0 ? unlink(editor) : updateOrInsertLink(editor, url); + }; + + return { + insertTable: insertTable, + formatBlock: formatBlock, + insertBlob: insertBlob, + createLink: createLink, + unlink: unlink + }; +}); + +/** + * UrlType.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("p", [ +], function () { + var isDomainLike = function (href) { + return /^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(href.trim()); + }; + + var isAbsolute = function (href) { + return /^https?:\/\//.test(href.trim()); + }; + + return { + isDomainLike: isDomainLike, + isAbsolute: isAbsolute + }; +}); + + + +/** + * Forms.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("f", [ + "b", + "c", + "m", + "k", + "p" +], function (Tools, Factory, Promise, Actions, UrlType) { + var focusFirstTextBox = function (form) { + form.find('textbox').eq(0).each(function (ctrl) { + ctrl.focus(); + }); + }; + + var createForm = function (name, spec) { + var form = Factory.create( + Tools.extend({ + type: 'form', + layout: 'flex', + direction: 'row', + padding: 5, + name: name, + spacing: 3 + }, spec) + ); + + form.on('show', function () { + focusFirstTextBox(form); + }); + + return form; + }; + + var toggleVisibility = function (ctrl, state) { + return state ? ctrl.show() : ctrl.hide(); + }; + + var askAboutPrefix = function (editor, href) { + return new Promise(function (resolve) { + editor.windowManager.confirm( + 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', + function (result) { + var output = result === true ? 'http://' + href : href; + resolve(output); + } + ); + }); + }; + + var convertLinkToAbsolute = function (editor, href) { + return !UrlType.isAbsolute(href) && UrlType.isDomainLike(href) ? askAboutPrefix(editor, href) : Promise.resolve(href); + }; + + var createQuickLinkForm = function (editor, hide) { + var unlink = function () { + editor.focus(); + Actions.unlink(editor); + hide(); + }; + + return createForm('quicklink', { + items: [ + {type: 'button', name: 'unlink', icon: 'unlink', onclick: unlink, tooltip: 'Remove link'}, + {type: 'textbox', name: 'linkurl', placeholder: 'Paste or type a link'}, + {type: 'button', icon: 'checkmark', subtype: 'primary', tooltip: 'Ok', onclick: 'submit'} + ], + onshow: function () { + var elm, linkurl = ''; + + elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + if (elm) { + linkurl = editor.dom.getAttrib(elm, 'href'); + } + + this.fromJSON({ + linkurl: linkurl + }); + + toggleVisibility(this.find('#unlink'), elm); + }, + onsubmit: function (e) { + convertLinkToAbsolute(editor, e.data.linkurl).then(function (url) { + Actions.createLink(editor, url); + hide(); + }); + } + }); + }; + + return { + createQuickLinkForm: createQuickLinkForm + }; +}); + +defineGlobal("q", tinymce.geom.Rect); +/** + * Convert.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("r", [ +], function () { + var fromClientRect = function (clientRect) { + return { + x: clientRect.left, + y: clientRect.top, + w: clientRect.width, + h: clientRect.height + }; + }; + + var toClientRect = function (geomRect) { + return { + left: geomRect.x, + top: geomRect.y, + width: geomRect.w, + height: geomRect.h, + right: geomRect.x + geomRect.w, + bottom: geomRect.y + geomRect.h + }; + }; + + return { + fromClientRect: fromClientRect, + toClientRect: toClientRect + }; +}); + +/** + * Measure.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("g", [ + "d", + "q", + "r" +], function (DOM, Rect, Convert) { + var toAbsolute = function (rect) { + var vp = DOM.getViewPort(); + + return { + x: rect.x + vp.x, + y: rect.y + vp.y, + w: rect.w, + h: rect.h + }; + }; + + var measureElement = function (elm) { + var clientRect = elm.getBoundingClientRect(); + + return toAbsolute({ + x: clientRect.left, + y: clientRect.top, + w: Math.max(elm.clientWidth, elm.offsetWidth), + h: Math.max(elm.clientHeight, elm.offsetHeight) + }); + }; + + var getElementRect = function (editor, elm) { + return measureElement(elm); + }; + + var getPageAreaRect = function (editor) { + return measureElement(editor.getElement().ownerDocument.body); + }; + + var getContentAreaRect = function (editor) { + return measureElement(editor.getContentAreaContainer() || editor.getBody()); + }; + + var getSelectionRect = function (editor) { + var clientRect = editor.selection.getBoundingClientRect(); + return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null; + }; + + return { + getElementRect: getElementRect, + getPageAreaRect: getPageAreaRect, + getContentAreaRect: getContentAreaRect, + getSelectionRect: getSelectionRect + }; +}); + +/** + * Layout.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("h", [ + "q", + "r" +], function (Rect, Convert) { + var result = function (rect, position) { + return { + rect: rect, + position: position + }; + }; + + var moveTo = function (rect, toRect) { + return {x: toRect.x, y: toRect.y, w: rect.w, h: rect.h}; + }; + + var calcByPositions = function (testPositions1, testPositions2, targetRect, contentAreaRect, panelRect) { + var relPos, relRect, outputPanelRect; + + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions1); + targetRect = Rect.clamp(targetRect, contentAreaRect); + + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + targetRect = Rect.intersect(contentAreaRect, targetRect); + if (targetRect) { + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions2); + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + outputPanelRect = moveTo(panelRect, targetRect); + return result(outputPanelRect, relPos); + } + + return null; + }; + + var calcInsert = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['cr-cl', 'cl-cr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var calc = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['tc-bc', 'bc-tc', 'tl-bl', 'bl-tl', 'tr-br', 'br-tr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var userConstrain = function (handler, targetRect, contentAreaRect, panelRect) { + var userConstrainedPanelRect; + + if (typeof handler === 'function') { + userConstrainedPanelRect = handler({ + elementRect: Convert.toClientRect(targetRect), + contentAreaRect: Convert.toClientRect(contentAreaRect), + panelRect: Convert.toClientRect(panelRect) + }); + + return Convert.fromClientRect(userConstrainedPanelRect); + } + + return panelRect; + }; + + return { + calcInsert: calcInsert, + calc: calc, + userConstrain: userConstrain + }; +}); + +/** + * Panel.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("3", [ + "b", + "c", + "d", + "e", + "f", + "g", + "h" +], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout) { + return function () { + var DEFAULT_TEXT_SELECTION_ITEMS = 'bold italic | quicklink h2 h3 blockquote'; + var DEFAULT_INSERT_TOOLBAR_ITEMS = 'quickimage quicktable'; + var panel, currentRect; + + var createToolbars = function (editor, toolbars) { + return Tools.map(toolbars, function (toolbar) { + return Toolbar.create(editor, toolbar.id, toolbar.items); + }); + }; + + var getTextSelectionToolbarItems = function (settings) { + var value = settings.selection_toolbar; + return value ? value : DEFAULT_TEXT_SELECTION_ITEMS; + }; + + var getInsertToolbarItems = function (settings) { + var value = settings.insert_toolbar; + return value ? value : DEFAULT_INSERT_TOOLBAR_ITEMS; + }; + + var create = function (editor, toolbars) { + var items, settings = editor.settings; + + items = createToolbars(editor, toolbars); + items = items.concat([ + Toolbar.create(editor, 'text', getTextSelectionToolbarItems(settings)), + Toolbar.create(editor, 'insert', getInsertToolbarItems(settings)), + Forms.createQuickLinkForm(editor, hide) + ]); + + return Factory.create({ + type: 'floatpanel', + role: 'dialog', + classes: 'tinymce tinymce-inline arrow', + ariaLabel: 'Inline toolbar', + layout: 'flex', + direction: 'column', + align: 'stretch', + autohide: false, + autofix: true, + fixed: true, + border: 1, + items: items, + oncancel: function() { + editor.focus(); + } + }); + }; + + var showPanel = function (panel) { + if (panel) { + panel.show(); + } + }; + + var movePanelTo = function (panel, pos) { + panel.moveTo(pos.x, pos.y); + }; + + var togglePositionClass = function (panel, relPos) { + relPos = relPos ? relPos.substr(0, 2) : ''; + + Tools.each({ + t: 'down', + b: 'up', + c: 'center' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(0, 1)); + }); + + if (relPos === 'cr') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', false); + } else if (relPos === 'cl') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', true); + } else { + Tools.each({ + l: 'left', + r: 'right' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(1, 1)); + }); + } + }; + + var showToolbar = function (panel, id) { + var toolbars = panel.items().filter('#' + id); + + if (toolbars.length > 0) { + toolbars[0].show(); + panel.reflow(); + } + }; + + var showPanelAt = function (panel, id, editor, targetRect) { + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + if (id === 'insert') { + result = Layout.calcInsert(targetRect, contentAreaRect, panelRect); + } else { + result = Layout.calc(targetRect, contentAreaRect, panelRect); + } + + if (result) { + panelRect = result.rect; + currentRect = targetRect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } else { + hide(panel); + } + }; + + var hasFormVisible = function () { + return panel.items().filter('form:visible').length > 0; + }; + + var showForm = function (editor, id) { + if (panel) { + panel.items().hide(); + showToolbar(panel, id); + + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + result = Layout.calc(currentRect, contentAreaRect, panelRect); + + if (result) { + panelRect = result.rect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } + } + }; + + var show = function (editor, id, targetRect, toolbars) { + if (!panel) { + panel = create(editor, toolbars); + panel.renderTo(document.body).reflow().moveTo(targetRect.x, targetRect.y); + editor.nodeChanged(); + } + + showPanelAt(panel, id, editor, targetRect); + }; + + var hide = function () { + if (panel) { + panel.hide(); + } + }; + + var focus = function () { + if (panel) { + panel.find('toolbar:visible').eq(0).each(function (item) { + item.focus(true); + }); + } + }; + + var remove = function () { + if (panel) { + panel.remove(); + panel = null; + } + }; + + var inForm = function () { + return panel && panel.visible() && hasFormVisible(); + }; + + return { + show: show, + showForm: showForm, + inForm: inForm, + hide: hide, + focus: focus, + remove: remove + }; + }; +}); + +/** + * Conversions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("i", [ + "m" +], function (Promise) { + var blobToBase64 = function (blob) { + return new Promise(function(resolve) { + var reader = new FileReader(); + + reader.onloadend = function() { + resolve(reader.result.split(',')[1]); + }; + + reader.readAsDataURL(blob); + }); + }; + + return { + blobToBase64: blobToBase64 + }; +}); + + + +/** + * Picker.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("j", [ + "m" +], function (Promise) { + var pickFile = function () { + return new Promise(function (resolve) { + var fileInput; + + fileInput = document.createElement("input"); + fileInput.type = "file"; + fileInput.style.position = 'fixed'; + fileInput.style.left = 0; + fileInput.style.top = 0; + fileInput.style.opacity = 0.001; + document.body.appendChild(fileInput); + + fileInput.onchange = function(e) { + resolve(Array.prototype.slice.call(e.target.files)); + }; + + fileInput.click(); + fileInput.parentNode.removeChild(fileInput); + }); + }; + + return { + pickFile: pickFile + }; +}); + + + +/** + * Buttons.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("4", [ + "3", + "i", + "j", + "k" +], function (Panel, Conversions, Picker, Actions) { + var addHeaderButtons = function (editor) { + var formatBlock = function (name) { + return function () { + Actions.formatBlock(editor, name); + }; + }; + + for (var i = 1; i < 6; i++) { + var name = 'h' + i; + + editor.addButton(name, { + text: name.toUpperCase(), + tooltip: 'Heading ' + i, + stateSelector: name, + onclick: formatBlock(name), + onPostRender: function () { + // TODO: Remove this hack that produces bold H1-H6 when we have proper icons + var span = this.getEl().firstChild.firstChild; + span.style.fontWeight = 'bold'; + } + }); + } + }; + + var addToEditor = function (editor, panel) { + editor.addButton('quicklink', { + icon: 'link', + tooltip: 'Insert/Edit link', + stateSelector: 'a[href]', + onclick: function () { + panel.showForm(editor, 'quicklink'); + } + }); + + editor.addButton('quickimage', { + icon: 'image', + tooltip: 'Insert image', + onclick: function () { + Picker.pickFile().then(function (files) { + var blob = files[0]; + + Conversions.blobToBase64(blob).then(function (base64) { + Actions.insertBlob(editor, base64, blob); + }); + }); + } + }); + + editor.addButton('quicktable', { + icon: 'table', + tooltip: 'Insert table', + onclick: function () { + panel.hide(); + Actions.insertTable(editor, 2, 2); + } + }); + + addHeaderButtons(editor); + }; + + return { + addToEditor: addToEditor + }; +}); + +defineGlobal("l", tinymce.EditorManager); +/** + * SkinLoader.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("5", [ + "l", + "d" +], function (EditorManager, DOM) { + var fireSkinLoaded = function (editor, callback) { + var done = function () { + editor.fire('SkinLoaded'); + callback(); + }; + + if (editor.initialized) { + done(); + } else { + editor.on('init', done); + } + }; + + var load = function (editor, skin, callback) { + var baseUrl = EditorManager.baseURL; + var skinUrl = baseUrl + '/skins/' + skin; + + var done = function () { + fireSkinLoaded(editor, callback); + }; + + DOM.styleSheetLoader.load(skinUrl + '/skin.min.css', done); + editor.contentCSS.push(skinUrl + '/content.inline.min.css'); + }; + + return { + load: load + }; +}); + + + +/** + * Matcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("8", [ +], function () { + // result :: String, Rect -> Matcher.result + var result = function (id, rect) { + return { + id: id, + rect: rect + }; + }; + + // match :: Editor, [(Editor -> Matcher.result | Null)] -> Matcher.result | Null + var match = function (editor, matchers) { + for (var i = 0; i < matchers.length; i++) { + var f = matchers[i]; + var result = f(editor); + + if (result) { + return result; + } + } + + return null; + }; + + return { + match: match, + result: result + }; +}); + +/** + * SelectionMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("6", [ + "8", + "g" +], function (Matcher, Measure) { + // textSelection :: String -> (Editor -> Matcher.result | Null) + var textSelection = function (id) { + return function (editor) { + if (!editor.selection.isCollapsed()) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + }; + }; + + // emptyTextBlock :: [Elements], String -> (Editor -> Matcher.result | Null) + var emptyTextBlock = function (elements, id) { + return function (editor) { + var i, textBlockElementsMap = editor.schema.getTextBlockElements(); + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName === 'TABLE') { + return null; + } + } + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName in textBlockElementsMap) { + if (editor.dom.isEmpty(elements[i])) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + } + } + + return null; + }; + }; + + return { + textSelection: textSelection, + emptyTextBlock: emptyTextBlock + }; +}); + +/** + * ElementMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("7", [ + "8", + "g" +], function (Matcher, Measure) { + // element :: Element, [PredicateId] -> (Editor -> Matcher.result | Null) + var element = function (element, predicateIds) { + return function (editor) { + for (var i = 0; i < predicateIds.length; i++) { + if (predicateIds[i].predicate(element)) { + return Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element)); + } + } + + return null; + }; + }; + + // parent :: [Elements], [PredicateId] -> (Editor -> Matcher.result | Null) + var parent = function (elements, predicateIds) { + return function (editor) { + for (var i = 0; i < elements.length; i++) { + for (var x = 0; x < predicateIds.length; x++) { + if (predicateIds[x].predicate(elements[i])) { + return Matcher.result(predicateIds[x].id, Measure.getElementRect(editor, elements[i])); + } + } + } + + return null; + }; + }; + + return { + element: element, + parent: parent + }; +}); + +/** + * Arr.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("9", [ +], function () { + var flatten = function (arr) { + return arr.reduce(function (results, item) { + return Array.isArray(item) ? results.concat(flatten(item)) : results.concat(item); + }, []); + }; + + return { + flatten: flatten + }; +}); + +/** + * PredicateId.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("a", [ + "b" +], function (Tools) { + var create = function (id, predicate) { + return { + id: id, + predicate: predicate + }; + }; + + // fromContextToolbars :: [ContextToolbar] -> [PredicateId] + var fromContextToolbars = function (toolbars) { + return Tools.map(toolbars, function (toolbar) { + return create(toolbar.id, toolbar.predicate); + }); + }; + + return { + create: create, + fromContextToolbars: fromContextToolbars + }; +}); + +/** + * Theme.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define("0", [ + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "a" +], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, PredicateId) { + var getSelectionElements = function (editor) { + var node = editor.selection.getNode(); + var elms = editor.dom.getParents(node); + return elms; + }; + + var createToolbar = function (editor, selector, id, items) { + var selectorPredicate = function (elm) { + return editor.dom.is(elm, selector); + }; + + return { + predicate: selectorPredicate, + id: id, + items: items + }; + }; + + var getToolbars = function (editor) { + var contextToolbars = editor.contextToolbars; + + return Arr.flatten([ + contextToolbars ? contextToolbars : [], + createToolbar(editor, 'img', 'image', 'alignleft aligncenter alignright') + ]); + }; + + var findMatchResult = function (editor, toolbars) { + var result, elements, contextToolbarsPredicateIds; + + elements = getSelectionElements(editor); + contextToolbarsPredicateIds = PredicateId.fromContextToolbars(toolbars); + + result = Matcher.match(editor, [ + ElementMatcher.element(elements[0], contextToolbarsPredicateIds), + SelectionMatcher.textSelection('text'), + SelectionMatcher.emptyTextBlock(elements, 'insert'), + ElementMatcher.parent(elements, contextToolbarsPredicateIds) + ]); + + return result && result.rect ? result : null; + }; + + var togglePanel = function (editor, panel) { + var toggle = function () { + var toolbars = getToolbars(editor); + var result = findMatchResult(editor, toolbars); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } else { + panel.hide(); + } + }; + + return function () { + if (!editor.removed) { + toggle(); + } + }; + }; + + var ignoreWhenFormIsVisible = function (panel, f) { + return function () { + if (!panel.inForm()) { + f(); + } + }; + }; + + var bindContextualToolbarsEvents = function (editor, panel) { + var throttledTogglePanel = Delay.throttle(togglePanel(editor, panel), 0); + var throttledTogglePanelWhenNotInForm = Delay.throttle(ignoreWhenFormIsVisible(panel, togglePanel(editor, panel)), 0); + + editor.on('blur hide ObjectResizeStart', panel.hide); + editor.on('click', throttledTogglePanel); + editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm); + editor.on('ResizeEditor ResizeWindow keyup', throttledTogglePanel); + editor.on('remove', panel.remove); + + editor.shortcuts.add('Alt+F10', '', panel.focus); + }; + + var overrideLinkShortcut = function (editor, panel) { + editor.shortcuts.remove('meta+k'); + editor.shortcuts.add('meta+k', '', function () { + var toolbars = getToolbars(editor); + var result = result = Matcher.match(editor, [ + SelectionMatcher.textSelection('quicklink') + ]); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } + }); + }; + + var renderInlineUI = function (editor, panel) { + var skinName = editor.settings.skin || 'lightgray'; + + SkinLoader.load(editor, skinName, function () { + bindContextualToolbarsEvents(editor, panel); + overrideLinkShortcut(editor, panel); + }); + + return {}; + }; + + var fail = function (message) { + throw new Error(message); + }; + + ThemeManager.add('inlite', function (editor) { + var panel = new Panel(); + + Buttons.addToEditor(editor, panel); + + var renderUI = function () { + return editor.inline ? renderInlineUI(editor, panel) : fail('inlite theme only supports inline mode.'); + }; + + return { + renderUI: renderUI + }; + }); + + return function() {}; +}); + +dem("0")(); +})(); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/inline/theme.raw.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/inline/theme.raw.js new file mode 100644 index 0000000..13152a5 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/scratch/inline/theme.raw.js @@ -0,0 +1,1679 @@ +(function () { + +var defs = {}; // id -> {dependencies, definition, instance (possibly undefined)} + +// Used when there is no 'main' module. +// The name is probably (hopefully) unique so minification removes for releases. +var register_3795 = function (id) { + var module = dem(id); + var fragments = id.split('.'); + var target = Function('return this;')(); + for (var i = 0; i < fragments.length - 1; ++i) { + if (target[fragments[i]] === undefined) + target[fragments[i]] = {}; + target = target[fragments[i]]; + } + target[fragments[fragments.length - 1]] = module; +}; + +var instantiate = function (id) { + var actual = defs[id]; + var dependencies = actual.deps; + var definition = actual.defn; + var len = dependencies.length; + var instances = new Array(len); + for (var i = 0; i < len; ++i) + instances[i] = dem(dependencies[i]); + var defResult = definition.apply(null, instances); + if (defResult === undefined) + throw 'module [' + id + '] returned undefined'; + actual.instance = defResult; +}; + +var def = function (id, dependencies, definition) { + if (typeof id !== 'string') + throw 'module id must be a string'; + else if (dependencies === undefined) + throw 'no dependencies for ' + id; + else if (definition === undefined) + throw 'no definition function for ' + id; + defs[id] = { + deps: dependencies, + defn: definition, + instance: undefined + }; +}; + +var dem = function (id) { + var actual = defs[id]; + if (actual === undefined) + throw 'module [' + id + '] was undefined'; + else if (actual.instance === undefined) + instantiate(id); + return actual.instance; +}; + +var req = function (ids, callback) { + var len = ids.length; + var instances = new Array(len); + for (var i = 0; i < len; ++i) + instances.push(dem(ids[i])); + callback.apply(null, callback); +}; + +var ephox = {}; + +ephox.bolt = { + module: { + api: { + define: def, + require: req, + demand: dem + } + } +}; + +var define = def; +var require = req; +var demand = dem; +// this helps with minificiation when using a lot of global references +var defineGlobal = function (id, ref) { + define(id, [], function () { return ref; }); +}; +/*jsc +["tinymce/inlite/Theme","global!tinymce.ThemeManager","global!tinymce.util.Delay","tinymce/inlite/ui/Panel","tinymce/inlite/ui/Buttons","tinymce/inlite/core/SkinLoader","tinymce/inlite/core/SelectionMatcher","tinymce/inlite/core/ElementMatcher","tinymce/inlite/core/Matcher","tinymce/inlite/alien/Arr","tinymce/inlite/core/PredicateId","global!tinymce.util.Tools","global!tinymce.ui.Factory","global!tinymce.DOM","tinymce/inlite/ui/Toolbar","tinymce/inlite/ui/Forms","tinymce/inlite/core/Measure","tinymce/inlite/core/Layout","tinymce/inlite/file/Conversions","tinymce/inlite/file/Picker","tinymce/inlite/core/Actions","global!tinymce.EditorManager","global!tinymce.util.Promise","tinymce/inlite/alien/Uuid","tinymce/inlite/alien/Unlink","tinymce/inlite/core/UrlType","global!tinymce.geom.Rect","tinymce/inlite/core/Convert","tinymce/inlite/alien/Bookmark","global!tinymce.dom.TreeWalker","global!tinymce.dom.RangeUtils"] +jsc*/ +defineGlobal("global!tinymce.ThemeManager", tinymce.ThemeManager); +defineGlobal("global!tinymce.util.Delay", tinymce.util.Delay); +defineGlobal("global!tinymce.util.Tools", tinymce.util.Tools); +defineGlobal("global!tinymce.ui.Factory", tinymce.ui.Factory); +defineGlobal("global!tinymce.DOM", tinymce.DOM); +/** + * Toolbar.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Toolbar', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory' +], function (Tools, Factory) { + var setActiveItem = function (item, name) { + return function(state, args) { + var nodeName, i = args.parents.length; + + while (i--) { + nodeName = args.parents[i].nodeName; + if (nodeName == 'OL' || nodeName == 'UL') { + break; + } + } + + item.active(state && nodeName == name); + }; + }; + + var getSelectorStateResult = function (itemName, item) { + var result = function (selector, handler) { + return { + selector: selector, + handler: handler + }; + }; + + var activeHandler = function(state) { + item.active(state); + }; + + var disabledHandler = function (state) { + item.disabled(state); + }; + + if (itemName == 'bullist') { + return result('ul > li', setActiveItem(item, 'UL')); + } + + if (itemName == 'numlist') { + return result('ol > li', setActiveItem(item, 'OL')); + } + + if (item.settings.stateSelector) { + return result(item.settings.stateSelector, activeHandler); + } + + if (item.settings.disabledStateSelector) { + return result(item.settings.disabledStateSelector, disabledHandler); + } + + return null; + }; + + var bindSelectorChanged = function (editor, itemName, item) { + return function () { + var result = getSelectorStateResult(itemName, item); + if (result !== null) { + editor.selection.selectorChanged(result.selector, result.handler); + } + }; + }; + + var create = function (editor, name, items) { + var toolbarItems = [], buttonGroup; + + if (!items) { + return; + } + + Tools.each(items.split(/[ ,]/), function(item) { + var itemName; + + if (item == '|') { + buttonGroup = null; + } else { + if (Factory.has(item)) { + item = {type: item}; + toolbarItems.push(item); + buttonGroup = null; + } else { + if (!buttonGroup) { + buttonGroup = {type: 'buttongroup', items: []}; + toolbarItems.push(buttonGroup); + } + + if (editor.buttons[item]) { + itemName = item; + item = editor.buttons[itemName]; + + if (typeof item == 'function') { + item = item(); + } + + item.type = item.type || 'button'; + + item = Factory.create(item); + item.on('postRender', bindSelectorChanged(editor, itemName, item)); + buttonGroup.items.push(item); + } + } + } + }); + + return Factory.create({ + type: 'toolbar', + layout: 'flow', + name: name, + items: toolbarItems + }); + }; + + return { + create: create + }; +}); + +defineGlobal("global!tinymce.util.Promise", tinymce.util.Promise); +/** + * Uuid.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Generates unique ids this is the same as in core but since + * it's not exposed as a global we can't access it. + */ +define("tinymce/inlite/alien/Uuid", [ +], function() { + var count = 0; + + var seed = function () { + var rnd = function () { + return Math.round(Math.random() * 0xFFFFFFFF).toString(36); + }; + + return 's' + Date.now().toString(36) + rnd() + rnd() + rnd(); + }; + + var uuid = function (prefix) { + return prefix + (count++) + seed(); + }; + + return { + uuid: uuid + }; +}); + +/** + * Bookmark.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/alien/Bookmark', [ +], function () { + /** + * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with + * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans + * added to them since they can be restored after a dom operation. + * + * So this:

              ||

              + * becomes:

              ||

              + * + * @param {DOMRange} rng DOM Range to get bookmark on. + * @return {Object} Bookmark object. + */ + var create = function (dom, rng) { + var bookmark = {}; + + function setupEndPoint(start) { + var offsetNode, container, offset; + + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; + + if (container.nodeType == 1) { + offsetNode = dom.create('span', {'data-mce-type': 'bookmark'}); + + if (container.hasChildNodes()) { + offset = Math.min(offset, container.childNodes.length - 1); + + if (start) { + container.insertBefore(offsetNode, container.childNodes[offset]); + } else { + dom.insertAfter(offsetNode, container.childNodes[offset]); + } + } else { + container.appendChild(offsetNode); + } + + container = offsetNode; + offset = 0; + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + setupEndPoint(true); + + if (!rng.collapsed) { + setupEndPoint(); + } + + return bookmark; + }; + + /** + * Moves the selection to the current bookmark and removes any selection container wrappers. + * + * @param {Object} bookmark Bookmark object to move selection to. + */ + var resolve = function (dom, bookmark) { + function restoreEndPoint(start) { + var container, offset, node; + + function nodeIndex(container) { + var node = container.parentNode.firstChild, idx = 0; + + while (node) { + if (node == container) { + return idx; + } + + // Skip data-mce-type=bookmark nodes + if (node.nodeType != 1 || node.getAttribute('data-mce-type') != 'bookmark') { + idx++; + } + + node = node.nextSibling; + } + + return -1; + } + + container = node = bookmark[start ? 'startContainer' : 'endContainer']; + offset = bookmark[start ? 'startOffset' : 'endOffset']; + + if (!container) { + return; + } + + if (container.nodeType == 1) { + offset = nodeIndex(container); + container = container.parentNode; + dom.remove(node); + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + restoreEndPoint(true); + restoreEndPoint(); + + var rng = dom.createRng(); + + rng.setStart(bookmark.startContainer, bookmark.startOffset); + + if (bookmark.endContainer) { + rng.setEnd(bookmark.endContainer, bookmark.endOffset); + } + + return rng; + }; + + return { + create: create, + resolve: resolve + }; +}); + + + +defineGlobal("global!tinymce.dom.TreeWalker", tinymce.dom.TreeWalker); +defineGlobal("global!tinymce.dom.RangeUtils", tinymce.dom.RangeUtils); +/** + * Unlink.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Unlink implementation that doesn't leave partial links for example it would produce: + * a[bc]de -> a[bc]de + * instead of: + * a[bc]de -> a[bc]de + */ +define("tinymce/inlite/alien/Unlink", [ + 'tinymce/inlite/alien/Bookmark', + 'global!tinymce.util.Tools', + 'global!tinymce.dom.TreeWalker', + 'global!tinymce.dom.RangeUtils' +], function (Bookmark, Tools, TreeWalker, RangeUtils) { + var getSelectedElements = function (rootElm, startNode, endNode) { + var walker, node, elms = []; + + walker = new TreeWalker(startNode, rootElm); + for (node = startNode; node; node = walker.next()) { + if (node.nodeType === 1) { + elms.push(node); + } + + if (node === endNode) { + break; + } + } + + return elms; + }; + + var unwrapElements = function (editor, elms) { + var bookmark, dom, selection; + + dom = editor.dom; + selection = editor.selection; + bookmark = Bookmark.create(dom, selection.getRng()); + + Tools.each(elms, function (elm) { + editor.dom.remove(elm, true); + }); + + selection.setRng(Bookmark.resolve(dom, bookmark)); + }; + + var isLink = function (elm) { + return elm.nodeName === 'A' && elm.hasAttribute('href'); + }; + + var getParentAnchorOrSelf = function (dom, elm) { + var anchorElm = dom.getParent(elm, isLink); + return anchorElm ? anchorElm : elm; + }; + + var getSelectedAnchors = function (editor) { + var startElm, endElm, rootElm, anchorElms, selection, dom, rng; + + selection = editor.selection; + dom = editor.dom; + rng = selection.getRng(); + startElm = getParentAnchorOrSelf(dom, RangeUtils.getNode(rng.startContainer, rng.startOffset)); + endElm = RangeUtils.getNode(rng.endContainer, rng.endOffset); + rootElm = editor.getBody(); + anchorElms = Tools.grep(getSelectedElements(rootElm, startElm, endElm), isLink); + + return anchorElms; + }; + + var unlinkSelection = function (editor) { + unwrapElements(editor, getSelectedAnchors(editor)); + }; + + return { + unlinkSelection: unlinkSelection + }; +}); + +/** + * Actions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Actions', [ + 'tinymce/inlite/alien/Uuid', + 'tinymce/inlite/alien/Unlink' +], function (Uuid, Unlink) { + var createTableHtml = function (cols, rows) { + var x, y, html; + + html = ''; + html += ''; + + for (y = 0; y < rows; y++) { + html += ''; + + for (x = 0; x < cols; x++) { + html += ''; + } + + html += ''; + } + + html += ''; + html += '

              '; + + return html; + }; + + var getInsertedElement = function (editor) { + var elms = editor.dom.select('*[data-mce-id]'); + return elms[0]; + }; + + var insertTable = function (editor, cols, rows) { + editor.undoManager.transact(function () { + var tableElm, cellElm; + + editor.insertContent(createTableHtml(cols, rows)); + + tableElm = getInsertedElement(editor); + tableElm.removeAttribute('data-mce-id'); + cellElm = editor.dom.select('td,th', tableElm); + editor.selection.setCursorLocation(cellElm[0], 0); + }); + }; + + var formatBlock = function (editor, formatName) { + editor.execCommand('FormatBlock', false, formatName); + }; + + var insertBlob = function (editor, base64, blob) { + var blobCache, blobInfo; + + blobCache = editor.editorUpload.blobCache; + blobInfo = blobCache.create(Uuid.uuid('mceu'), blob, base64); + blobCache.add(blobInfo); + + editor.insertContent(editor.dom.createHTML('img', {src: blobInfo.blobUri()})); + }; + + var collapseSelectionToEnd = function (editor) { + editor.selection.collapse(false); + }; + + var unlink = function (editor) { + editor.focus(); + Unlink.unlinkSelection(editor); + collapseSelectionToEnd(editor); + }; + + var changeHref = function (editor, elm, url) { + editor.focus(); + editor.dom.setAttrib(elm, 'href', url); + collapseSelectionToEnd(editor); + }; + + var insertLink = function (editor, url) { + editor.execCommand('mceInsertLink', false, {href: url}); + collapseSelectionToEnd(editor); + }; + + var updateOrInsertLink = function (editor, url) { + var elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + elm ? changeHref(editor, elm, url) : insertLink(editor, url); + }; + + var createLink = function (editor, url) { + url.trim().length === 0 ? unlink(editor) : updateOrInsertLink(editor, url); + }; + + return { + insertTable: insertTable, + formatBlock: formatBlock, + insertBlob: insertBlob, + createLink: createLink, + unlink: unlink + }; +}); + +/** + * UrlType.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/UrlType', [ +], function () { + var isDomainLike = function (href) { + return /^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(href.trim()); + }; + + var isAbsolute = function (href) { + return /^https?:\/\//.test(href.trim()); + }; + + return { + isDomainLike: isDomainLike, + isAbsolute: isAbsolute + }; +}); + + + +/** + * Forms.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Forms', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory', + 'global!tinymce.util.Promise', + 'tinymce/inlite/core/Actions', + 'tinymce/inlite/core/UrlType' +], function (Tools, Factory, Promise, Actions, UrlType) { + var focusFirstTextBox = function (form) { + form.find('textbox').eq(0).each(function (ctrl) { + ctrl.focus(); + }); + }; + + var createForm = function (name, spec) { + var form = Factory.create( + Tools.extend({ + type: 'form', + layout: 'flex', + direction: 'row', + padding: 5, + name: name, + spacing: 3 + }, spec) + ); + + form.on('show', function () { + focusFirstTextBox(form); + }); + + return form; + }; + + var toggleVisibility = function (ctrl, state) { + return state ? ctrl.show() : ctrl.hide(); + }; + + var askAboutPrefix = function (editor, href) { + return new Promise(function (resolve) { + editor.windowManager.confirm( + 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', + function (result) { + var output = result === true ? 'http://' + href : href; + resolve(output); + } + ); + }); + }; + + var convertLinkToAbsolute = function (editor, href) { + return !UrlType.isAbsolute(href) && UrlType.isDomainLike(href) ? askAboutPrefix(editor, href) : Promise.resolve(href); + }; + + var createQuickLinkForm = function (editor, hide) { + var unlink = function () { + editor.focus(); + Actions.unlink(editor); + hide(); + }; + + return createForm('quicklink', { + items: [ + {type: 'button', name: 'unlink', icon: 'unlink', onclick: unlink, tooltip: 'Remove link'}, + {type: 'textbox', name: 'linkurl', placeholder: 'Paste or type a link'}, + {type: 'button', icon: 'checkmark', subtype: 'primary', tooltip: 'Ok', onclick: 'submit'} + ], + onshow: function () { + var elm, linkurl = ''; + + elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + if (elm) { + linkurl = editor.dom.getAttrib(elm, 'href'); + } + + this.fromJSON({ + linkurl: linkurl + }); + + toggleVisibility(this.find('#unlink'), elm); + }, + onsubmit: function (e) { + convertLinkToAbsolute(editor, e.data.linkurl).then(function (url) { + Actions.createLink(editor, url); + hide(); + }); + } + }); + }; + + return { + createQuickLinkForm: createQuickLinkForm + }; +}); + +defineGlobal("global!tinymce.geom.Rect", tinymce.geom.Rect); +/** + * Convert.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Convert', [ +], function () { + var fromClientRect = function (clientRect) { + return { + x: clientRect.left, + y: clientRect.top, + w: clientRect.width, + h: clientRect.height + }; + }; + + var toClientRect = function (geomRect) { + return { + left: geomRect.x, + top: geomRect.y, + width: geomRect.w, + height: geomRect.h, + right: geomRect.x + geomRect.w, + bottom: geomRect.y + geomRect.h + }; + }; + + return { + fromClientRect: fromClientRect, + toClientRect: toClientRect + }; +}); + +/** + * Measure.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Measure', [ + 'global!tinymce.DOM', + 'global!tinymce.geom.Rect', + 'tinymce/inlite/core/Convert' +], function (DOM, Rect, Convert) { + var toAbsolute = function (rect) { + var vp = DOM.getViewPort(); + + return { + x: rect.x + vp.x, + y: rect.y + vp.y, + w: rect.w, + h: rect.h + }; + }; + + var measureElement = function (elm) { + var clientRect = elm.getBoundingClientRect(); + + return toAbsolute({ + x: clientRect.left, + y: clientRect.top, + w: Math.max(elm.clientWidth, elm.offsetWidth), + h: Math.max(elm.clientHeight, elm.offsetHeight) + }); + }; + + var getElementRect = function (editor, elm) { + return measureElement(elm); + }; + + var getPageAreaRect = function (editor) { + return measureElement(editor.getElement().ownerDocument.body); + }; + + var getContentAreaRect = function (editor) { + return measureElement(editor.getContentAreaContainer() || editor.getBody()); + }; + + var getSelectionRect = function (editor) { + var clientRect = editor.selection.getBoundingClientRect(); + return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null; + }; + + return { + getElementRect: getElementRect, + getPageAreaRect: getPageAreaRect, + getContentAreaRect: getContentAreaRect, + getSelectionRect: getSelectionRect + }; +}); + +/** + * Layout.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Layout', [ + 'global!tinymce.geom.Rect', + 'tinymce/inlite/core/Convert' +], function (Rect, Convert) { + var result = function (rect, position) { + return { + rect: rect, + position: position + }; + }; + + var moveTo = function (rect, toRect) { + return {x: toRect.x, y: toRect.y, w: rect.w, h: rect.h}; + }; + + var calcByPositions = function (testPositions1, testPositions2, targetRect, contentAreaRect, panelRect) { + var relPos, relRect, outputPanelRect; + + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions1); + targetRect = Rect.clamp(targetRect, contentAreaRect); + + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + targetRect = Rect.intersect(contentAreaRect, targetRect); + if (targetRect) { + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions2); + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + outputPanelRect = moveTo(panelRect, targetRect); + return result(outputPanelRect, relPos); + } + + return null; + }; + + var calcInsert = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['cr-cl', 'cl-cr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var calc = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['tc-bc', 'bc-tc', 'tl-bl', 'bl-tl', 'tr-br', 'br-tr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var userConstrain = function (handler, targetRect, contentAreaRect, panelRect) { + var userConstrainedPanelRect; + + if (typeof handler === 'function') { + userConstrainedPanelRect = handler({ + elementRect: Convert.toClientRect(targetRect), + contentAreaRect: Convert.toClientRect(contentAreaRect), + panelRect: Convert.toClientRect(panelRect) + }); + + return Convert.fromClientRect(userConstrainedPanelRect); + } + + return panelRect; + }; + + return { + calcInsert: calcInsert, + calc: calc, + userConstrain: userConstrain + }; +}); + +/** + * Panel.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Panel', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory', + 'global!tinymce.DOM', + 'tinymce/inlite/ui/Toolbar', + 'tinymce/inlite/ui/Forms', + 'tinymce/inlite/core/Measure', + 'tinymce/inlite/core/Layout' +], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout) { + return function () { + var DEFAULT_TEXT_SELECTION_ITEMS = 'bold italic | quicklink h2 h3 blockquote'; + var DEFAULT_INSERT_TOOLBAR_ITEMS = 'quickimage quicktable'; + var panel, currentRect; + + var createToolbars = function (editor, toolbars) { + return Tools.map(toolbars, function (toolbar) { + return Toolbar.create(editor, toolbar.id, toolbar.items); + }); + }; + + var getTextSelectionToolbarItems = function (settings) { + var value = settings.selection_toolbar; + return value ? value : DEFAULT_TEXT_SELECTION_ITEMS; + }; + + var getInsertToolbarItems = function (settings) { + var value = settings.insert_toolbar; + return value ? value : DEFAULT_INSERT_TOOLBAR_ITEMS; + }; + + var create = function (editor, toolbars) { + var items, settings = editor.settings; + + items = createToolbars(editor, toolbars); + items = items.concat([ + Toolbar.create(editor, 'text', getTextSelectionToolbarItems(settings)), + Toolbar.create(editor, 'insert', getInsertToolbarItems(settings)), + Forms.createQuickLinkForm(editor, hide) + ]); + + return Factory.create({ + type: 'floatpanel', + role: 'dialog', + classes: 'tinymce tinymce-inline arrow', + ariaLabel: 'Inline toolbar', + layout: 'flex', + direction: 'column', + align: 'stretch', + autohide: false, + autofix: true, + fixed: true, + border: 1, + items: items, + oncancel: function() { + editor.focus(); + } + }); + }; + + var showPanel = function (panel) { + if (panel) { + panel.show(); + } + }; + + var movePanelTo = function (panel, pos) { + panel.moveTo(pos.x, pos.y); + }; + + var togglePositionClass = function (panel, relPos) { + relPos = relPos ? relPos.substr(0, 2) : ''; + + Tools.each({ + t: 'down', + b: 'up', + c: 'center' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(0, 1)); + }); + + if (relPos === 'cr') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', false); + } else if (relPos === 'cl') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', true); + } else { + Tools.each({ + l: 'left', + r: 'right' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(1, 1)); + }); + } + }; + + var showToolbar = function (panel, id) { + var toolbars = panel.items().filter('#' + id); + + if (toolbars.length > 0) { + toolbars[0].show(); + panel.reflow(); + } + }; + + var showPanelAt = function (panel, id, editor, targetRect) { + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + if (id === 'insert') { + result = Layout.calcInsert(targetRect, contentAreaRect, panelRect); + } else { + result = Layout.calc(targetRect, contentAreaRect, panelRect); + } + + if (result) { + panelRect = result.rect; + currentRect = targetRect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } else { + hide(panel); + } + }; + + var hasFormVisible = function () { + return panel.items().filter('form:visible').length > 0; + }; + + var showForm = function (editor, id) { + if (panel) { + panel.items().hide(); + showToolbar(panel, id); + + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + result = Layout.calc(currentRect, contentAreaRect, panelRect); + + if (result) { + panelRect = result.rect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } + } + }; + + var show = function (editor, id, targetRect, toolbars) { + if (!panel) { + panel = create(editor, toolbars); + panel.renderTo(document.body).reflow().moveTo(targetRect.x, targetRect.y); + editor.nodeChanged(); + } + + showPanelAt(panel, id, editor, targetRect); + }; + + var hide = function () { + if (panel) { + panel.hide(); + } + }; + + var focus = function () { + if (panel) { + panel.find('toolbar:visible').eq(0).each(function (item) { + item.focus(true); + }); + } + }; + + var remove = function () { + if (panel) { + panel.remove(); + panel = null; + } + }; + + var inForm = function () { + return panel && panel.visible() && hasFormVisible(); + }; + + return { + show: show, + showForm: showForm, + inForm: inForm, + hide: hide, + focus: focus, + remove: remove + }; + }; +}); + +/** + * Conversions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/file/Conversions', [ + 'global!tinymce.util.Promise' +], function (Promise) { + var blobToBase64 = function (blob) { + return new Promise(function(resolve) { + var reader = new FileReader(); + + reader.onloadend = function() { + resolve(reader.result.split(',')[1]); + }; + + reader.readAsDataURL(blob); + }); + }; + + return { + blobToBase64: blobToBase64 + }; +}); + + + +/** + * Picker.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/file/Picker', [ + 'global!tinymce.util.Promise' +], function (Promise) { + var pickFile = function () { + return new Promise(function (resolve) { + var fileInput; + + fileInput = document.createElement("input"); + fileInput.type = "file"; + fileInput.style.position = 'fixed'; + fileInput.style.left = 0; + fileInput.style.top = 0; + fileInput.style.opacity = 0.001; + document.body.appendChild(fileInput); + + fileInput.onchange = function(e) { + resolve(Array.prototype.slice.call(e.target.files)); + }; + + fileInput.click(); + fileInput.parentNode.removeChild(fileInput); + }); + }; + + return { + pickFile: pickFile + }; +}); + + + +/** + * Buttons.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Buttons', [ + 'tinymce/inlite/ui/Panel', + 'tinymce/inlite/file/Conversions', + 'tinymce/inlite/file/Picker', + 'tinymce/inlite/core/Actions' +], function (Panel, Conversions, Picker, Actions) { + var addHeaderButtons = function (editor) { + var formatBlock = function (name) { + return function () { + Actions.formatBlock(editor, name); + }; + }; + + for (var i = 1; i < 6; i++) { + var name = 'h' + i; + + editor.addButton(name, { + text: name.toUpperCase(), + tooltip: 'Heading ' + i, + stateSelector: name, + onclick: formatBlock(name), + onPostRender: function () { + // TODO: Remove this hack that produces bold H1-H6 when we have proper icons + var span = this.getEl().firstChild.firstChild; + span.style.fontWeight = 'bold'; + } + }); + } + }; + + var addToEditor = function (editor, panel) { + editor.addButton('quicklink', { + icon: 'link', + tooltip: 'Insert/Edit link', + stateSelector: 'a[href]', + onclick: function () { + panel.showForm(editor, 'quicklink'); + } + }); + + editor.addButton('quickimage', { + icon: 'image', + tooltip: 'Insert image', + onclick: function () { + Picker.pickFile().then(function (files) { + var blob = files[0]; + + Conversions.blobToBase64(blob).then(function (base64) { + Actions.insertBlob(editor, base64, blob); + }); + }); + } + }); + + editor.addButton('quicktable', { + icon: 'table', + tooltip: 'Insert table', + onclick: function () { + panel.hide(); + Actions.insertTable(editor, 2, 2); + } + }); + + addHeaderButtons(editor); + }; + + return { + addToEditor: addToEditor + }; +}); + +defineGlobal("global!tinymce.EditorManager", tinymce.EditorManager); +/** + * SkinLoader.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SkinLoader', [ + 'global!tinymce.EditorManager', + 'global!tinymce.DOM' +], function (EditorManager, DOM) { + var fireSkinLoaded = function (editor, callback) { + var done = function () { + editor.fire('SkinLoaded'); + callback(); + }; + + if (editor.initialized) { + done(); + } else { + editor.on('init', done); + } + }; + + var load = function (editor, skin, callback) { + var baseUrl = EditorManager.baseURL; + var skinUrl = baseUrl + '/skins/' + skin; + + var done = function () { + fireSkinLoaded(editor, callback); + }; + + DOM.styleSheetLoader.load(skinUrl + '/skin.min.css', done); + editor.contentCSS.push(skinUrl + '/content.inline.min.css'); + }; + + return { + load: load + }; +}); + + + +/** + * Matcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Matcher', [ +], function () { + // result :: String, Rect -> Matcher.result + var result = function (id, rect) { + return { + id: id, + rect: rect + }; + }; + + // match :: Editor, [(Editor -> Matcher.result | Null)] -> Matcher.result | Null + var match = function (editor, matchers) { + for (var i = 0; i < matchers.length; i++) { + var f = matchers[i]; + var result = f(editor); + + if (result) { + return result; + } + } + + return null; + }; + + return { + match: match, + result: result + }; +}); + +/** + * SelectionMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SelectionMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // textSelection :: String -> (Editor -> Matcher.result | Null) + var textSelection = function (id) { + return function (editor) { + if (!editor.selection.isCollapsed()) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + }; + }; + + // emptyTextBlock :: [Elements], String -> (Editor -> Matcher.result | Null) + var emptyTextBlock = function (elements, id) { + return function (editor) { + var i, textBlockElementsMap = editor.schema.getTextBlockElements(); + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName === 'TABLE') { + return null; + } + } + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName in textBlockElementsMap) { + if (editor.dom.isEmpty(elements[i])) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + } + } + + return null; + }; + }; + + return { + textSelection: textSelection, + emptyTextBlock: emptyTextBlock + }; +}); + +/** + * ElementMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/ElementMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // element :: Element, [PredicateId] -> (Editor -> Matcher.result | Null) + var element = function (element, predicateIds) { + return function (editor) { + for (var i = 0; i < predicateIds.length; i++) { + if (predicateIds[i].predicate(element)) { + return Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element)); + } + } + + return null; + }; + }; + + // parent :: [Elements], [PredicateId] -> (Editor -> Matcher.result | Null) + var parent = function (elements, predicateIds) { + return function (editor) { + for (var i = 0; i < elements.length; i++) { + for (var x = 0; x < predicateIds.length; x++) { + if (predicateIds[x].predicate(elements[i])) { + return Matcher.result(predicateIds[x].id, Measure.getElementRect(editor, elements[i])); + } + } + } + + return null; + }; + }; + + return { + element: element, + parent: parent + }; +}); + +/** + * Arr.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/alien/Arr', [ +], function () { + var flatten = function (arr) { + return arr.reduce(function (results, item) { + return Array.isArray(item) ? results.concat(flatten(item)) : results.concat(item); + }, []); + }; + + return { + flatten: flatten + }; +}); + +/** + * PredicateId.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/PredicateId', [ + 'global!tinymce.util.Tools' +], function (Tools) { + var create = function (id, predicate) { + return { + id: id, + predicate: predicate + }; + }; + + // fromContextToolbars :: [ContextToolbar] -> [PredicateId] + var fromContextToolbars = function (toolbars) { + return Tools.map(toolbars, function (toolbar) { + return create(toolbar.id, toolbar.predicate); + }); + }; + + return { + create: create, + fromContextToolbars: fromContextToolbars + }; +}); + +/** + * Theme.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/Theme', [ + 'global!tinymce.ThemeManager', + 'global!tinymce.util.Delay', + 'tinymce/inlite/ui/Panel', + 'tinymce/inlite/ui/Buttons', + 'tinymce/inlite/core/SkinLoader', + 'tinymce/inlite/core/SelectionMatcher', + 'tinymce/inlite/core/ElementMatcher', + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/alien/Arr', + 'tinymce/inlite/core/PredicateId' +], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, PredicateId) { + var getSelectionElements = function (editor) { + var node = editor.selection.getNode(); + var elms = editor.dom.getParents(node); + return elms; + }; + + var createToolbar = function (editor, selector, id, items) { + var selectorPredicate = function (elm) { + return editor.dom.is(elm, selector); + }; + + return { + predicate: selectorPredicate, + id: id, + items: items + }; + }; + + var getToolbars = function (editor) { + var contextToolbars = editor.contextToolbars; + + return Arr.flatten([ + contextToolbars ? contextToolbars : [], + createToolbar(editor, 'img', 'image', 'alignleft aligncenter alignright') + ]); + }; + + var findMatchResult = function (editor, toolbars) { + var result, elements, contextToolbarsPredicateIds; + + elements = getSelectionElements(editor); + contextToolbarsPredicateIds = PredicateId.fromContextToolbars(toolbars); + + result = Matcher.match(editor, [ + ElementMatcher.element(elements[0], contextToolbarsPredicateIds), + SelectionMatcher.textSelection('text'), + SelectionMatcher.emptyTextBlock(elements, 'insert'), + ElementMatcher.parent(elements, contextToolbarsPredicateIds) + ]); + + return result && result.rect ? result : null; + }; + + var togglePanel = function (editor, panel) { + var toggle = function () { + var toolbars = getToolbars(editor); + var result = findMatchResult(editor, toolbars); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } else { + panel.hide(); + } + }; + + return function () { + if (!editor.removed) { + toggle(); + } + }; + }; + + var ignoreWhenFormIsVisible = function (panel, f) { + return function () { + if (!panel.inForm()) { + f(); + } + }; + }; + + var bindContextualToolbarsEvents = function (editor, panel) { + var throttledTogglePanel = Delay.throttle(togglePanel(editor, panel), 0); + var throttledTogglePanelWhenNotInForm = Delay.throttle(ignoreWhenFormIsVisible(panel, togglePanel(editor, panel)), 0); + + editor.on('blur hide ObjectResizeStart', panel.hide); + editor.on('click', throttledTogglePanel); + editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm); + editor.on('ResizeEditor ResizeWindow keyup', throttledTogglePanel); + editor.on('remove', panel.remove); + + editor.shortcuts.add('Alt+F10', '', panel.focus); + }; + + var overrideLinkShortcut = function (editor, panel) { + editor.shortcuts.remove('meta+k'); + editor.shortcuts.add('meta+k', '', function () { + var toolbars = getToolbars(editor); + var result = result = Matcher.match(editor, [ + SelectionMatcher.textSelection('quicklink') + ]); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } + }); + }; + + var renderInlineUI = function (editor, panel) { + var skinName = editor.settings.skin || 'lightgray'; + + SkinLoader.load(editor, skinName, function () { + bindContextualToolbarsEvents(editor, panel); + overrideLinkShortcut(editor, panel); + }); + + return {}; + }; + + var fail = function (message) { + throw new Error(message); + }; + + ThemeManager.add('inlite', function (editor) { + var panel = new Panel(); + + Buttons.addToEditor(editor, panel); + + var renderUI = function () { + return editor.inline ? renderInlineUI(editor, panel) : fail('inlite theme only supports inline mode.'); + }; + + return { + renderUI: renderUI + }; + }); + + return function() {}; +}); + +dem('tinymce/inlite/Theme')(); +})(); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/css/demo.css b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/css/demo.css new file mode 100644 index 0000000..3e6c242 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/css/demo.css @@ -0,0 +1,25 @@ +blockquote { + border-left: 3px solid rgba(0,0,0,.8); + padding-left: 20px; + margin: 0; +} + +.mce-edit-focus { + outline: 1px solid blue; +} + +.tinymce { + margin: 10px; + padding: 10px; + overflow: auto; + border: 1px solid gray; +} + +table, td { + border: 1px dashed gray; +} + +/*.mce-tinymce-inline { + transition: left 50ms ease-in-out, top 50ms ease-in-out; +} +*/ \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/html/demo.html b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/html/demo.html new file mode 100644 index 0000000..84b60db --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/html/demo.html @@ -0,0 +1,69 @@ + + + +inlite-theme Demo Page + + + + + + + +

              inlite-theme Demo Page

              +
              +
              +

              + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ultricies posuere felis sed interdum. Quisque nec diam + nec purus gravida dapibus +

              +

              + eget non nulla. Ut eu vestibulum libero. Vestibulum pretium est vitae metus auctor, quis fermentum mi + luctus. Fusce aliquet tincidunt massa vitae scelerisque. Vivamus in tellus risus. Mauris auctor metus ut gravida feugiat. + Nunc consequat urna eu augue commodo, eget malesuada odio fringilla. Morbi vitae turpis in elit laoreet malesuada a nec massa. +

              + + + + + + + + + + + +
              Lorem ipsum dolor sit ametLorem ipsum dolor sit amet
              Vivamus in tellus risusVivamus in tellus risus
              +
              + +
              + +
              +

              + + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Morbi ultricies posuere felis sed interdum. Quisque nec diam + nec purus gravida dapibus +

              +

              + eget non nulla. Ut eu vestibulum libero. Vestibulum pretium est vitae metus auctor, quis fermentum mi + luctus. Fusce aliquet tincidunt massa vitae scelerisque. Vivamus in tellus risus. Mauris auctor metus ut gravida feugiat. + Nunc consequat urna eu augue commodo, eget malesuada odio fringilla. Morbi vitae turpis in elit laoreet malesuada a nec massa. +

              + + + + + + + + + + + +
              Lorem ipsum dolor sit ametLorem ipsum dolor sit amet
              Vivamus in tellus risusVivamus in tellus risus
              +
              +
              + + diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/js/tinymce/inlite/Demo.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/js/tinymce/inlite/Demo.js new file mode 100644 index 0000000..6140a3d --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/demo/js/tinymce/inlite/Demo.js @@ -0,0 +1,28 @@ +/** + * Demo.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/*eslint no-console:0 */ + +define('tinymce/inlite/Demo', [ + 'tinymce/inlite/Theme', + 'global!tinymce' +], function(Theme, tinymce) { + tinymce.init({ + selector: 'div.tinymce', + theme: 'inlite', + plugins: 'image table link paste contextmenu textpattern autolink', + insert_toolbar: 'quickimage quicktable', + selection_toolbar: 'bold italic | quicklink h2 h3 blockquote', + inline: true, + paste_data_images: true + }); + + return function() {}; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/Theme.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/Theme.js new file mode 100644 index 0000000..28ded12 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/Theme.js @@ -0,0 +1,150 @@ +/** + * Theme.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/Theme', [ + 'global!tinymce.ThemeManager', + 'global!tinymce.util.Delay', + 'tinymce/inlite/ui/Panel', + 'tinymce/inlite/ui/Buttons', + 'tinymce/inlite/core/SkinLoader', + 'tinymce/inlite/core/SelectionMatcher', + 'tinymce/inlite/core/ElementMatcher', + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/alien/Arr', + 'tinymce/inlite/core/PredicateId' +], function(ThemeManager, Delay, Panel, Buttons, SkinLoader, SelectionMatcher, ElementMatcher, Matcher, Arr, PredicateId) { + var getSelectionElements = function (editor) { + var node = editor.selection.getNode(); + var elms = editor.dom.getParents(node); + return elms; + }; + + var createToolbar = function (editor, selector, id, items) { + var selectorPredicate = function (elm) { + return editor.dom.is(elm, selector); + }; + + return { + predicate: selectorPredicate, + id: id, + items: items + }; + }; + + var getToolbars = function (editor) { + var contextToolbars = editor.contextToolbars; + + return Arr.flatten([ + contextToolbars ? contextToolbars : [], + createToolbar(editor, 'img', 'image', 'alignleft aligncenter alignright') + ]); + }; + + var findMatchResult = function (editor, toolbars) { + var result, elements, contextToolbarsPredicateIds; + + elements = getSelectionElements(editor); + contextToolbarsPredicateIds = PredicateId.fromContextToolbars(toolbars); + + result = Matcher.match(editor, [ + ElementMatcher.element(elements[0], contextToolbarsPredicateIds), + SelectionMatcher.textSelection('text'), + SelectionMatcher.emptyTextBlock(elements, 'insert'), + ElementMatcher.parent(elements, contextToolbarsPredicateIds) + ]); + + return result && result.rect ? result : null; + }; + + var togglePanel = function (editor, panel) { + var toggle = function () { + var toolbars = getToolbars(editor); + var result = findMatchResult(editor, toolbars); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } else { + panel.hide(); + } + }; + + return function () { + if (!editor.removed) { + toggle(); + } + }; + }; + + var ignoreWhenFormIsVisible = function (panel, f) { + return function () { + if (!panel.inForm()) { + f(); + } + }; + }; + + var bindContextualToolbarsEvents = function (editor, panel) { + var throttledTogglePanel = Delay.throttle(togglePanel(editor, panel), 0); + var throttledTogglePanelWhenNotInForm = Delay.throttle(ignoreWhenFormIsVisible(panel, togglePanel(editor, panel)), 0); + + editor.on('blur hide ObjectResizeStart', panel.hide); + editor.on('click', throttledTogglePanel); + editor.on('nodeChange mouseup', throttledTogglePanelWhenNotInForm); + editor.on('ResizeEditor ResizeWindow keyup', throttledTogglePanel); + editor.on('remove', panel.remove); + + editor.shortcuts.add('Alt+F10', '', panel.focus); + }; + + var overrideLinkShortcut = function (editor, panel) { + editor.shortcuts.remove('meta+k'); + editor.shortcuts.add('meta+k', '', function () { + var toolbars = getToolbars(editor); + var result = result = Matcher.match(editor, [ + SelectionMatcher.textSelection('quicklink') + ]); + + if (result) { + panel.show(editor, result.id, result.rect, toolbars); + } + }); + }; + + var renderInlineUI = function (editor, panel) { + var skinName = editor.settings.skin || 'lightgray'; + + SkinLoader.load(editor, skinName, function () { + bindContextualToolbarsEvents(editor, panel); + overrideLinkShortcut(editor, panel); + }); + + return {}; + }; + + var fail = function (message) { + throw new Error(message); + }; + + ThemeManager.add('inlite', function (editor) { + var panel = new Panel(); + + Buttons.addToEditor(editor, panel); + + var renderUI = function () { + return editor.inline ? renderInlineUI(editor, panel) : fail('inlite theme only supports inline mode.'); + }; + + return { + renderUI: renderUI + }; + }); + + return function() {}; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Arr.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Arr.js new file mode 100644 index 0000000..3e88845 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Arr.js @@ -0,0 +1,22 @@ +/** + * Arr.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/alien/Arr', [ +], function () { + var flatten = function (arr) { + return arr.reduce(function (results, item) { + return Array.isArray(item) ? results.concat(flatten(item)) : results.concat(item); + }, []); + }; + + return { + flatten: flatten + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Bookmark.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Bookmark.js new file mode 100644 index 0000000..7446f36 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Bookmark.js @@ -0,0 +1,130 @@ +/** + * Bookmark.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/alien/Bookmark', [ +], function () { + /** + * Returns a range bookmark. This will convert indexed bookmarks into temporary span elements with + * index 0 so that they can be restored properly after the DOM has been modified. Text bookmarks will not have spans + * added to them since they can be restored after a dom operation. + * + * So this:

              ||

              + * becomes:

              ||

              + * + * @param {DOMRange} rng DOM Range to get bookmark on. + * @return {Object} Bookmark object. + */ + var create = function (dom, rng) { + var bookmark = {}; + + function setupEndPoint(start) { + var offsetNode, container, offset; + + container = rng[start ? 'startContainer' : 'endContainer']; + offset = rng[start ? 'startOffset' : 'endOffset']; + + if (container.nodeType == 1) { + offsetNode = dom.create('span', {'data-mce-type': 'bookmark'}); + + if (container.hasChildNodes()) { + offset = Math.min(offset, container.childNodes.length - 1); + + if (start) { + container.insertBefore(offsetNode, container.childNodes[offset]); + } else { + dom.insertAfter(offsetNode, container.childNodes[offset]); + } + } else { + container.appendChild(offsetNode); + } + + container = offsetNode; + offset = 0; + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + setupEndPoint(true); + + if (!rng.collapsed) { + setupEndPoint(); + } + + return bookmark; + }; + + /** + * Moves the selection to the current bookmark and removes any selection container wrappers. + * + * @param {Object} bookmark Bookmark object to move selection to. + */ + var resolve = function (dom, bookmark) { + function restoreEndPoint(start) { + var container, offset, node; + + function nodeIndex(container) { + var node = container.parentNode.firstChild, idx = 0; + + while (node) { + if (node == container) { + return idx; + } + + // Skip data-mce-type=bookmark nodes + if (node.nodeType != 1 || node.getAttribute('data-mce-type') != 'bookmark') { + idx++; + } + + node = node.nextSibling; + } + + return -1; + } + + container = node = bookmark[start ? 'startContainer' : 'endContainer']; + offset = bookmark[start ? 'startOffset' : 'endOffset']; + + if (!container) { + return; + } + + if (container.nodeType == 1) { + offset = nodeIndex(container); + container = container.parentNode; + dom.remove(node); + } + + bookmark[start ? 'startContainer' : 'endContainer'] = container; + bookmark[start ? 'startOffset' : 'endOffset'] = offset; + } + + restoreEndPoint(true); + restoreEndPoint(); + + var rng = dom.createRng(); + + rng.setStart(bookmark.startContainer, bookmark.startOffset); + + if (bookmark.endContainer) { + rng.setEnd(bookmark.endContainer, bookmark.endOffset); + } + + return rng; + }; + + return { + create: create, + resolve: resolve + }; +}); + + diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Unlink.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Unlink.js new file mode 100644 index 0000000..aa595a1 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Unlink.js @@ -0,0 +1,84 @@ +/** + * Unlink.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Unlink implementation that doesn't leave partial links for example it would produce: + * a[bc]de -> a[bc]de + * instead of: + * a[bc]de -> a[bc]de + */ +define("tinymce/inlite/alien/Unlink", [ + 'tinymce/inlite/alien/Bookmark', + 'global!tinymce.util.Tools', + 'global!tinymce.dom.TreeWalker', + 'global!tinymce.dom.RangeUtils' +], function (Bookmark, Tools, TreeWalker, RangeUtils) { + var getSelectedElements = function (rootElm, startNode, endNode) { + var walker, node, elms = []; + + walker = new TreeWalker(startNode, rootElm); + for (node = startNode; node; node = walker.next()) { + if (node.nodeType === 1) { + elms.push(node); + } + + if (node === endNode) { + break; + } + } + + return elms; + }; + + var unwrapElements = function (editor, elms) { + var bookmark, dom, selection; + + dom = editor.dom; + selection = editor.selection; + bookmark = Bookmark.create(dom, selection.getRng()); + + Tools.each(elms, function (elm) { + editor.dom.remove(elm, true); + }); + + selection.setRng(Bookmark.resolve(dom, bookmark)); + }; + + var isLink = function (elm) { + return elm.nodeName === 'A' && elm.hasAttribute('href'); + }; + + var getParentAnchorOrSelf = function (dom, elm) { + var anchorElm = dom.getParent(elm, isLink); + return anchorElm ? anchorElm : elm; + }; + + var getSelectedAnchors = function (editor) { + var startElm, endElm, rootElm, anchorElms, selection, dom, rng; + + selection = editor.selection; + dom = editor.dom; + rng = selection.getRng(); + startElm = getParentAnchorOrSelf(dom, RangeUtils.getNode(rng.startContainer, rng.startOffset)); + endElm = RangeUtils.getNode(rng.endContainer, rng.endOffset); + rootElm = editor.getBody(); + anchorElms = Tools.grep(getSelectedElements(rootElm, startElm, endElm), isLink); + + return anchorElms; + }; + + var unlinkSelection = function (editor) { + unwrapElements(editor, getSelectedAnchors(editor)); + }; + + return { + unlinkSelection: unlinkSelection + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Uuid.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Uuid.js new file mode 100644 index 0000000..a863c2e --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/alien/Uuid.js @@ -0,0 +1,34 @@ +/** + * Uuid.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +/** + * Generates unique ids this is the same as in core but since + * it's not exposed as a global we can't access it. + */ +define("tinymce/inlite/alien/Uuid", [ +], function() { + var count = 0; + + var seed = function () { + var rnd = function () { + return Math.round(Math.random() * 0xFFFFFFFF).toString(36); + }; + + return 's' + Date.now().toString(36) + rnd() + rnd() + rnd(); + }; + + var uuid = function (prefix) { + return prefix + (count++) + seed(); + }; + + return { + uuid: uuid + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Actions.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Actions.js new file mode 100644 index 0000000..9a95e2d --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Actions.js @@ -0,0 +1,106 @@ +/** + * Actions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Actions', [ + 'tinymce/inlite/alien/Uuid', + 'tinymce/inlite/alien/Unlink' +], function (Uuid, Unlink) { + var createTableHtml = function (cols, rows) { + var x, y, html; + + html = ''; + html += ''; + + for (y = 0; y < rows; y++) { + html += ''; + + for (x = 0; x < cols; x++) { + html += ''; + } + + html += ''; + } + + html += ''; + html += '

              '; + + return html; + }; + + var getInsertedElement = function (editor) { + var elms = editor.dom.select('*[data-mce-id]'); + return elms[0]; + }; + + var insertTable = function (editor, cols, rows) { + editor.undoManager.transact(function () { + var tableElm, cellElm; + + editor.insertContent(createTableHtml(cols, rows)); + + tableElm = getInsertedElement(editor); + tableElm.removeAttribute('data-mce-id'); + cellElm = editor.dom.select('td,th', tableElm); + editor.selection.setCursorLocation(cellElm[0], 0); + }); + }; + + var formatBlock = function (editor, formatName) { + editor.execCommand('FormatBlock', false, formatName); + }; + + var insertBlob = function (editor, base64, blob) { + var blobCache, blobInfo; + + blobCache = editor.editorUpload.blobCache; + blobInfo = blobCache.create(Uuid.uuid('mceu'), blob, base64); + blobCache.add(blobInfo); + + editor.insertContent(editor.dom.createHTML('img', {src: blobInfo.blobUri()})); + }; + + var collapseSelectionToEnd = function (editor) { + editor.selection.collapse(false); + }; + + var unlink = function (editor) { + editor.focus(); + Unlink.unlinkSelection(editor); + collapseSelectionToEnd(editor); + }; + + var changeHref = function (editor, elm, url) { + editor.focus(); + editor.dom.setAttrib(elm, 'href', url); + collapseSelectionToEnd(editor); + }; + + var insertLink = function (editor, url) { + editor.execCommand('mceInsertLink', false, {href: url}); + collapseSelectionToEnd(editor); + }; + + var updateOrInsertLink = function (editor, url) { + var elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + elm ? changeHref(editor, elm, url) : insertLink(editor, url); + }; + + var createLink = function (editor, url) { + url.trim().length === 0 ? unlink(editor) : updateOrInsertLink(editor, url); + }; + + return { + insertTable: insertTable, + formatBlock: formatBlock, + insertBlob: insertBlob, + createLink: createLink, + unlink: unlink + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Convert.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Convert.js new file mode 100644 index 0000000..01c6c2e --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Convert.js @@ -0,0 +1,37 @@ +/** + * Convert.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Convert', [ +], function () { + var fromClientRect = function (clientRect) { + return { + x: clientRect.left, + y: clientRect.top, + w: clientRect.width, + h: clientRect.height + }; + }; + + var toClientRect = function (geomRect) { + return { + left: geomRect.x, + top: geomRect.y, + width: geomRect.w, + height: geomRect.h, + right: geomRect.x + geomRect.w, + bottom: geomRect.y + geomRect.h + }; + }; + + return { + fromClientRect: fromClientRect, + toClientRect: toClientRect + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/ElementMatcher.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/ElementMatcher.js new file mode 100644 index 0000000..4a39bda --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/ElementMatcher.js @@ -0,0 +1,47 @@ +/** + * ElementMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/ElementMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // element :: Element, [PredicateId] -> (Editor -> Matcher.result | Null) + var element = function (element, predicateIds) { + return function (editor) { + for (var i = 0; i < predicateIds.length; i++) { + if (predicateIds[i].predicate(element)) { + return Matcher.result(predicateIds[i].id, Measure.getElementRect(editor, element)); + } + } + + return null; + }; + }; + + // parent :: [Elements], [PredicateId] -> (Editor -> Matcher.result | Null) + var parent = function (elements, predicateIds) { + return function (editor) { + for (var i = 0; i < elements.length; i++) { + for (var x = 0; x < predicateIds.length; x++) { + if (predicateIds[x].predicate(elements[i])) { + return Matcher.result(predicateIds[x].id, Measure.getElementRect(editor, elements[i])); + } + } + } + + return null; + }; + }; + + return { + element: element, + parent: parent + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Layout.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Layout.js new file mode 100644 index 0000000..7967f16 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Layout.js @@ -0,0 +1,95 @@ +/** + * Layout.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Layout', [ + 'global!tinymce.geom.Rect', + 'tinymce/inlite/core/Convert' +], function (Rect, Convert) { + var result = function (rect, position) { + return { + rect: rect, + position: position + }; + }; + + var moveTo = function (rect, toRect) { + return {x: toRect.x, y: toRect.y, w: rect.w, h: rect.h}; + }; + + var calcByPositions = function (testPositions1, testPositions2, targetRect, contentAreaRect, panelRect) { + var relPos, relRect, outputPanelRect; + + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions1); + targetRect = Rect.clamp(targetRect, contentAreaRect); + + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + targetRect = Rect.intersect(contentAreaRect, targetRect); + if (targetRect) { + relPos = Rect.findBestRelativePosition(panelRect, targetRect, contentAreaRect, testPositions2); + if (relPos) { + relRect = Rect.relativePosition(panelRect, targetRect, relPos); + outputPanelRect = moveTo(panelRect, relRect); + return result(outputPanelRect, relPos); + } + + outputPanelRect = moveTo(panelRect, targetRect); + return result(outputPanelRect, relPos); + } + + return null; + }; + + var calcInsert = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['cr-cl', 'cl-cr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var calc = function (targetRect, contentAreaRect, panelRect) { + return calcByPositions( + ['tc-bc', 'bc-tc', 'tl-bl', 'bl-tl', 'tr-br', 'br-tr'], + ['bc-tc', 'bl-tl', 'br-tr'], + targetRect, + contentAreaRect, + panelRect + ); + }; + + var userConstrain = function (handler, targetRect, contentAreaRect, panelRect) { + var userConstrainedPanelRect; + + if (typeof handler === 'function') { + userConstrainedPanelRect = handler({ + elementRect: Convert.toClientRect(targetRect), + contentAreaRect: Convert.toClientRect(contentAreaRect), + panelRect: Convert.toClientRect(panelRect) + }); + + return Convert.fromClientRect(userConstrainedPanelRect); + } + + return panelRect; + }; + + return { + calcInsert: calcInsert, + calc: calc, + userConstrain: userConstrain + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Matcher.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Matcher.js new file mode 100644 index 0000000..8183323 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Matcher.js @@ -0,0 +1,39 @@ +/** + * Matcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Matcher', [ +], function () { + // result :: String, Rect -> Matcher.result + var result = function (id, rect) { + return { + id: id, + rect: rect + }; + }; + + // match :: Editor, [(Editor -> Matcher.result | Null)] -> Matcher.result | Null + var match = function (editor, matchers) { + for (var i = 0; i < matchers.length; i++) { + var f = matchers[i]; + var result = f(editor); + + if (result) { + return result; + } + } + + return null; + }; + + return { + match: match, + result: result + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Measure.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Measure.js new file mode 100644 index 0000000..76c9d4f --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/Measure.js @@ -0,0 +1,61 @@ +/** + * Measure.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/Measure', [ + 'global!tinymce.DOM', + 'global!tinymce.geom.Rect', + 'tinymce/inlite/core/Convert' +], function (DOM, Rect, Convert) { + var toAbsolute = function (rect) { + var vp = DOM.getViewPort(); + + return { + x: rect.x + vp.x, + y: rect.y + vp.y, + w: rect.w, + h: rect.h + }; + }; + + var measureElement = function (elm) { + var clientRect = elm.getBoundingClientRect(); + + return toAbsolute({ + x: clientRect.left, + y: clientRect.top, + w: Math.max(elm.clientWidth, elm.offsetWidth), + h: Math.max(elm.clientHeight, elm.offsetHeight) + }); + }; + + var getElementRect = function (editor, elm) { + return measureElement(elm); + }; + + var getPageAreaRect = function (editor) { + return measureElement(editor.getElement().ownerDocument.body); + }; + + var getContentAreaRect = function (editor) { + return measureElement(editor.getContentAreaContainer() || editor.getBody()); + }; + + var getSelectionRect = function (editor) { + var clientRect = editor.selection.getBoundingClientRect(); + return clientRect ? toAbsolute(Convert.fromClientRect(clientRect)) : null; + }; + + return { + getElementRect: getElementRect, + getPageAreaRect: getPageAreaRect, + getContentAreaRect: getContentAreaRect, + getSelectionRect: getSelectionRect + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/PredicateId.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/PredicateId.js new file mode 100644 index 0000000..6524edd --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/PredicateId.js @@ -0,0 +1,32 @@ +/** + * PredicateId.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/PredicateId', [ + 'global!tinymce.util.Tools' +], function (Tools) { + var create = function (id, predicate) { + return { + id: id, + predicate: predicate + }; + }; + + // fromContextToolbars :: [ContextToolbar] -> [PredicateId] + var fromContextToolbars = function (toolbars) { + return Tools.map(toolbars, function (toolbar) { + return create(toolbar.id, toolbar.predicate); + }); + }; + + return { + create: create, + fromContextToolbars: fromContextToolbars + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/SelectionMatcher.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/SelectionMatcher.js new file mode 100644 index 0000000..94aeb47 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/SelectionMatcher.js @@ -0,0 +1,55 @@ +/** + * SelectionMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SelectionMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // textSelection :: String -> (Editor -> Matcher.result | Null) + var textSelection = function (id) { + return function (editor) { + if (!editor.selection.isCollapsed()) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + }; + }; + + // emptyTextBlock :: [Elements], String -> (Editor -> Matcher.result | Null) + var emptyTextBlock = function (elements, id) { + return function (editor) { + var i, textBlockElementsMap = editor.schema.getTextBlockElements(); + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName === 'TABLE') { + return null; + } + } + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName in textBlockElementsMap) { + if (editor.dom.isEmpty(elements[i])) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + } + } + + return null; + }; + }; + + return { + textSelection: textSelection, + emptyTextBlock: emptyTextBlock + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/SkinLoader.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/SkinLoader.js new file mode 100644 index 0000000..fb97920 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/SkinLoader.js @@ -0,0 +1,45 @@ +/** + * SkinLoader.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SkinLoader', [ + 'global!tinymce.EditorManager', + 'global!tinymce.DOM' +], function (EditorManager, DOM) { + var fireSkinLoaded = function (editor, callback) { + var done = function () { + editor.fire('SkinLoaded'); + callback(); + }; + + if (editor.initialized) { + done(); + } else { + editor.on('init', done); + } + }; + + var load = function (editor, skin, callback) { + var baseUrl = EditorManager.baseURL; + var skinUrl = baseUrl + '/skins/' + skin; + + var done = function () { + fireSkinLoaded(editor, callback); + }; + + DOM.styleSheetLoader.load(skinUrl + '/skin.min.css', done); + editor.contentCSS.push(skinUrl + '/content.inline.min.css'); + }; + + return { + load: load + }; +}); + + diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/UrlType.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/UrlType.js new file mode 100644 index 0000000..c37fa2f --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/core/UrlType.js @@ -0,0 +1,27 @@ +/** + * UrlType.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/UrlType', [ +], function () { + var isDomainLike = function (href) { + return /^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(href.trim()); + }; + + var isAbsolute = function (href) { + return /^https?:\/\//.test(href.trim()); + }; + + return { + isDomainLike: isDomainLike, + isAbsolute: isAbsolute + }; +}); + + diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/file/Conversions.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/file/Conversions.js new file mode 100644 index 0000000..8c1aeb0 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/file/Conversions.js @@ -0,0 +1,31 @@ +/** + * Conversions.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/file/Conversions', [ + 'global!tinymce.util.Promise' +], function (Promise) { + var blobToBase64 = function (blob) { + return new Promise(function(resolve) { + var reader = new FileReader(); + + reader.onloadend = function() { + resolve(reader.result.split(',')[1]); + }; + + reader.readAsDataURL(blob); + }); + }; + + return { + blobToBase64: blobToBase64 + }; +}); + + diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/file/Picker.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/file/Picker.js new file mode 100644 index 0000000..0b937ea --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/file/Picker.js @@ -0,0 +1,40 @@ +/** + * Picker.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/file/Picker', [ + 'global!tinymce.util.Promise' +], function (Promise) { + var pickFile = function () { + return new Promise(function (resolve) { + var fileInput; + + fileInput = document.createElement("input"); + fileInput.type = "file"; + fileInput.style.position = 'fixed'; + fileInput.style.left = 0; + fileInput.style.top = 0; + fileInput.style.opacity = 0.001; + document.body.appendChild(fileInput); + + fileInput.onchange = function(e) { + resolve(Array.prototype.slice.call(e.target.files)); + }; + + fileInput.click(); + fileInput.parentNode.removeChild(fileInput); + }); + }; + + return { + pickFile: pickFile + }; +}); + + diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Buttons.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Buttons.js new file mode 100644 index 0000000..8fac642 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Buttons.js @@ -0,0 +1,80 @@ +/** + * Buttons.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Buttons', [ + 'tinymce/inlite/ui/Panel', + 'tinymce/inlite/file/Conversions', + 'tinymce/inlite/file/Picker', + 'tinymce/inlite/core/Actions' +], function (Panel, Conversions, Picker, Actions) { + var addHeaderButtons = function (editor) { + var formatBlock = function (name) { + return function () { + Actions.formatBlock(editor, name); + }; + }; + + for (var i = 1; i < 6; i++) { + var name = 'h' + i; + + editor.addButton(name, { + text: name.toUpperCase(), + tooltip: 'Heading ' + i, + stateSelector: name, + onclick: formatBlock(name), + onPostRender: function () { + // TODO: Remove this hack that produces bold H1-H6 when we have proper icons + var span = this.getEl().firstChild.firstChild; + span.style.fontWeight = 'bold'; + } + }); + } + }; + + var addToEditor = function (editor, panel) { + editor.addButton('quicklink', { + icon: 'link', + tooltip: 'Insert/Edit link', + stateSelector: 'a[href]', + onclick: function () { + panel.showForm(editor, 'quicklink'); + } + }); + + editor.addButton('quickimage', { + icon: 'image', + tooltip: 'Insert image', + onclick: function () { + Picker.pickFile().then(function (files) { + var blob = files[0]; + + Conversions.blobToBase64(blob).then(function (base64) { + Actions.insertBlob(editor, base64, blob); + }); + }); + } + }); + + editor.addButton('quicktable', { + icon: 'table', + tooltip: 'Insert table', + onclick: function () { + panel.hide(); + Actions.insertTable(editor, 2, 2); + } + }); + + addHeaderButtons(editor); + }; + + return { + addToEditor: addToEditor + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Forms.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Forms.js new file mode 100644 index 0000000..b8cb3a4 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Forms.js @@ -0,0 +1,102 @@ +/** + * Forms.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Forms', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory', + 'global!tinymce.util.Promise', + 'tinymce/inlite/core/Actions', + 'tinymce/inlite/core/UrlType' +], function (Tools, Factory, Promise, Actions, UrlType) { + var focusFirstTextBox = function (form) { + form.find('textbox').eq(0).each(function (ctrl) { + ctrl.focus(); + }); + }; + + var createForm = function (name, spec) { + var form = Factory.create( + Tools.extend({ + type: 'form', + layout: 'flex', + direction: 'row', + padding: 5, + name: name, + spacing: 3 + }, spec) + ); + + form.on('show', function () { + focusFirstTextBox(form); + }); + + return form; + }; + + var toggleVisibility = function (ctrl, state) { + return state ? ctrl.show() : ctrl.hide(); + }; + + var askAboutPrefix = function (editor, href) { + return new Promise(function (resolve) { + editor.windowManager.confirm( + 'The URL you entered seems to be an external link. Do you want to add the required http:// prefix?', + function (result) { + var output = result === true ? 'http://' + href : href; + resolve(output); + } + ); + }); + }; + + var convertLinkToAbsolute = function (editor, href) { + return !UrlType.isAbsolute(href) && UrlType.isDomainLike(href) ? askAboutPrefix(editor, href) : Promise.resolve(href); + }; + + var createQuickLinkForm = function (editor, hide) { + var unlink = function () { + editor.focus(); + Actions.unlink(editor); + hide(); + }; + + return createForm('quicklink', { + items: [ + {type: 'button', name: 'unlink', icon: 'unlink', onclick: unlink, tooltip: 'Remove link'}, + {type: 'textbox', name: 'linkurl', placeholder: 'Paste or type a link'}, + {type: 'button', icon: 'checkmark', subtype: 'primary', tooltip: 'Ok', onclick: 'submit'} + ], + onshow: function () { + var elm, linkurl = ''; + + elm = editor.dom.getParent(editor.selection.getStart(), 'a[href]'); + if (elm) { + linkurl = editor.dom.getAttrib(elm, 'href'); + } + + this.fromJSON({ + linkurl: linkurl + }); + + toggleVisibility(this.find('#unlink'), elm); + }, + onsubmit: function (e) { + convertLinkToAbsolute(editor, e.data.linkurl).then(function (url) { + Actions.createLink(editor, url); + hide(); + }); + } + }); + }; + + return { + createQuickLinkForm: createQuickLinkForm + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Panel.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Panel.js new file mode 100644 index 0000000..5eb074e --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Panel.js @@ -0,0 +1,218 @@ +/** + * Panel.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Panel', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory', + 'global!tinymce.DOM', + 'tinymce/inlite/ui/Toolbar', + 'tinymce/inlite/ui/Forms', + 'tinymce/inlite/core/Measure', + 'tinymce/inlite/core/Layout' +], function (Tools, Factory, DOM, Toolbar, Forms, Measure, Layout) { + return function () { + var DEFAULT_TEXT_SELECTION_ITEMS = 'bold italic | quicklink h2 h3 blockquote'; + var DEFAULT_INSERT_TOOLBAR_ITEMS = 'quickimage quicktable'; + var panel, currentRect; + + var createToolbars = function (editor, toolbars) { + return Tools.map(toolbars, function (toolbar) { + return Toolbar.create(editor, toolbar.id, toolbar.items); + }); + }; + + var getTextSelectionToolbarItems = function (settings) { + var value = settings.selection_toolbar; + return value ? value : DEFAULT_TEXT_SELECTION_ITEMS; + }; + + var getInsertToolbarItems = function (settings) { + var value = settings.insert_toolbar; + return value ? value : DEFAULT_INSERT_TOOLBAR_ITEMS; + }; + + var create = function (editor, toolbars) { + var items, settings = editor.settings; + + items = createToolbars(editor, toolbars); + items = items.concat([ + Toolbar.create(editor, 'text', getTextSelectionToolbarItems(settings)), + Toolbar.create(editor, 'insert', getInsertToolbarItems(settings)), + Forms.createQuickLinkForm(editor, hide) + ]); + + return Factory.create({ + type: 'floatpanel', + role: 'dialog', + classes: 'tinymce tinymce-inline arrow', + ariaLabel: 'Inline toolbar', + layout: 'flex', + direction: 'column', + align: 'stretch', + autohide: false, + autofix: true, + fixed: true, + border: 1, + items: items, + oncancel: function() { + editor.focus(); + } + }); + }; + + var showPanel = function (panel) { + if (panel) { + panel.show(); + } + }; + + var movePanelTo = function (panel, pos) { + panel.moveTo(pos.x, pos.y); + }; + + var togglePositionClass = function (panel, relPos) { + relPos = relPos ? relPos.substr(0, 2) : ''; + + Tools.each({ + t: 'down', + b: 'up', + c: 'center' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(0, 1)); + }); + + if (relPos === 'cr') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', false); + } else if (relPos === 'cl') { + panel.classes.toggle('arrow-left', true); + panel.classes.toggle('arrow-right', true); + } else { + Tools.each({ + l: 'left', + r: 'right' + }, function(cls, pos) { + panel.classes.toggle('arrow-' + cls, pos === relPos.substr(1, 1)); + }); + } + }; + + var showToolbar = function (panel, id) { + var toolbars = panel.items().filter('#' + id); + + if (toolbars.length > 0) { + toolbars[0].show(); + panel.reflow(); + } + }; + + var showPanelAt = function (panel, id, editor, targetRect) { + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + if (id === 'insert') { + result = Layout.calcInsert(targetRect, contentAreaRect, panelRect); + } else { + result = Layout.calc(targetRect, contentAreaRect, panelRect); + } + + if (result) { + panelRect = result.rect; + currentRect = targetRect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, targetRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } else { + hide(panel); + } + }; + + var hasFormVisible = function () { + return panel.items().filter('form:visible').length > 0; + }; + + var showForm = function (editor, id) { + if (panel) { + panel.items().hide(); + showToolbar(panel, id); + + var contentAreaRect, panelRect, result, userConstainHandler; + + showPanel(panel); + panel.items().hide(); + showToolbar(panel, id); + + userConstainHandler = editor.settings.inline_toolbar_position_handler; + contentAreaRect = Measure.getContentAreaRect(editor); + panelRect = DOM.getRect(panel.getEl()); + + result = Layout.calc(currentRect, contentAreaRect, panelRect); + + if (result) { + panelRect = result.rect; + movePanelTo(panel, Layout.userConstrain(userConstainHandler, currentRect, contentAreaRect, panelRect)); + + togglePositionClass(panel, result.position); + } + } + }; + + var show = function (editor, id, targetRect, toolbars) { + if (!panel) { + panel = create(editor, toolbars); + panel.renderTo(document.body).reflow().moveTo(targetRect.x, targetRect.y); + editor.nodeChanged(); + } + + showPanelAt(panel, id, editor, targetRect); + }; + + var hide = function () { + if (panel) { + panel.hide(); + } + }; + + var focus = function () { + if (panel) { + panel.find('toolbar:visible').eq(0).each(function (item) { + item.focus(true); + }); + } + }; + + var remove = function () { + if (panel) { + panel.remove(); + panel = null; + } + }; + + var inForm = function () { + return panel && panel.visible() && hasFormVisible(); + }; + + return { + show: show, + showForm: showForm, + inForm: inForm, + hide: hide, + focus: focus, + remove: remove + }; + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Toolbar.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Toolbar.js new file mode 100644 index 0000000..a6b2c7f --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/main/js/tinymce/inlite/ui/Toolbar.js @@ -0,0 +1,126 @@ +/** + * Toolbar.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/ui/Toolbar', [ + 'global!tinymce.util.Tools', + 'global!tinymce.ui.Factory' +], function (Tools, Factory) { + var setActiveItem = function (item, name) { + return function(state, args) { + var nodeName, i = args.parents.length; + + while (i--) { + nodeName = args.parents[i].nodeName; + if (nodeName == 'OL' || nodeName == 'UL') { + break; + } + } + + item.active(state && nodeName == name); + }; + }; + + var getSelectorStateResult = function (itemName, item) { + var result = function (selector, handler) { + return { + selector: selector, + handler: handler + }; + }; + + var activeHandler = function(state) { + item.active(state); + }; + + var disabledHandler = function (state) { + item.disabled(state); + }; + + if (itemName == 'bullist') { + return result('ul > li', setActiveItem(item, 'UL')); + } + + if (itemName == 'numlist') { + return result('ol > li', setActiveItem(item, 'OL')); + } + + if (item.settings.stateSelector) { + return result(item.settings.stateSelector, activeHandler); + } + + if (item.settings.disabledStateSelector) { + return result(item.settings.disabledStateSelector, disabledHandler); + } + + return null; + }; + + var bindSelectorChanged = function (editor, itemName, item) { + return function () { + var result = getSelectorStateResult(itemName, item); + if (result !== null) { + editor.selection.selectorChanged(result.selector, result.handler); + } + }; + }; + + var create = function (editor, name, items) { + var toolbarItems = [], buttonGroup; + + if (!items) { + return; + } + + Tools.each(items.split(/[ ,]/), function(item) { + var itemName; + + if (item == '|') { + buttonGroup = null; + } else { + if (Factory.has(item)) { + item = {type: item}; + toolbarItems.push(item); + buttonGroup = null; + } else { + if (!buttonGroup) { + buttonGroup = {type: 'buttongroup', items: []}; + toolbarItems.push(buttonGroup); + } + + if (editor.buttons[item]) { + itemName = item; + item = editor.buttons[itemName]; + + if (typeof item == 'function') { + item = item(); + } + + item.type = item.type || 'button'; + + item = Factory.create(item); + item.on('postRender', bindSelectorChanged(editor, itemName, item)); + buttonGroup.items.push(item); + } + } + } + }); + + return Factory.create({ + type: 'toolbar', + layout: 'flow', + name: name, + items: toolbarItems + }); + }; + + return { + create: create + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/.eslintrc b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/.eslintrc new file mode 100644 index 0000000..c0ccd9b --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/.eslintrc @@ -0,0 +1,14 @@ +{ + "env": { + "browser": true, + "amd": true + }, + + "globals": { + "assert": true, + "test": true, + "asynctest": true + }, + + "extends": "../../../../../../.eslintrc" +} diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/alien/ArrTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/alien/ArrTest.js new file mode 100644 index 0000000..eef3d61 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/alien/ArrTest.js @@ -0,0 +1,9 @@ +test('atomic/alien/ArrTest', [ + 'tinymce/inlite/alien/Arr' +], function (Arr) { + var testFlatten = function () { + assert.eq(Arr.flatten([1, 2, [3, 4, [5, 6]], [7, 8], 9]), [1, 2, 3, 4, 5, 6, 7, 8, 9]); + }; + + testFlatten(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/alien/UuidTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/alien/UuidTest.js new file mode 100644 index 0000000..93e8d72 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/alien/UuidTest.js @@ -0,0 +1,10 @@ +test('atomic/alien/UuidTest', [ + 'tinymce/inlite/alien/Uuid' +], function (Uuid) { + var testUuid = function () { + assert.eq(Uuid.uuid('mce').indexOf('mce'), 0); + assert.eq(Uuid.uuid('mce') !== Uuid.uuid('mce'), true); + }; + + testUuid(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/ConvertTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/ConvertTest.js new file mode 100644 index 0000000..f74e35f --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/ConvertTest.js @@ -0,0 +1,12 @@ +test('atomic/core/ConvertTest', [ + 'tinymce/inlite/core/Convert' +], function (Convert) { + var testConvert = function () { + assert.eq({x: 1, y: 2, w: 3, h: 4}, Convert.fromClientRect({left: 1, top: 2, width: 3, height: 4})); + assert.eq({x: 2, y: 3, w: 4, h: 5}, Convert.fromClientRect({left: 2, top: 3, width: 4, height: 5})); + assert.eq({left: 1, top: 2, width: 3, height: 4, bottom: 2 + 4, right: 1 + 3}, Convert.toClientRect({x: 1, y: 2, w: 3, h: 4})); + assert.eq({left: 2, top: 3, width: 4, height: 5, bottom: 3 + 5, right: 2 + 4}, Convert.toClientRect({x: 2, y: 3, w: 4, h: 5})); + }; + + testConvert(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/MatcherTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/MatcherTest.js new file mode 100644 index 0000000..d606156 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/MatcherTest.js @@ -0,0 +1,51 @@ +test('browser/atomic/MatcherTest', [ + 'tinymce/inlite/core/Matcher' +], function (Matcher) { + var testMatch = function (mockEditor, matches, expectedResult) { + var result; + + result = Matcher.match(mockEditor, matches); + assert.eq(expectedResult, result); + }; + + var match = function (key) { + return function (editor) { + return editor[key]; + }; + }; + + var testMatcher = function () { + var mockEditor = { + success1: 'success1', + success2: 'success2', + failure: null + }; + + testMatch(mockEditor, [ + match('success1') + ], 'success1'); + + testMatch(mockEditor, [ + match(null), + match('success2') + ], 'success2'); + + testMatch(mockEditor, [ + match('success1'), + match('success2') + ], 'success1'); + + testMatch(mockEditor, [ + match(null) + ], null); + + testMatch(mockEditor, [ + match(null), + match(null) + ], null); + + testMatch(mockEditor, [], null); + }; + + testMatcher(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/UrlTypeTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/UrlTypeTest.js new file mode 100644 index 0000000..2d1ec52 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/atomic/core/UrlTypeTest.js @@ -0,0 +1,33 @@ +test('atomic/core/UrlTypeTest', [ + 'tinymce/inlite/core/UrlType' +], function (UrlType) { + var testIsDomainLike = function () { + var mostUsedTopLevelDomains = [ + 'com', 'org', 'edu', 'gov', 'uk', 'net', 'ca', 'de', 'jp', + 'fr', 'au', 'us', 'ru', 'ch', 'it', 'nl', 'se', 'no', 'es', 'mil' + ]; + + assert.eq(UrlType.isDomainLike('www.site.com'), true); + assert.eq(UrlType.isDomainLike('www.site.xyz'), true); + assert.eq(UrlType.isDomainLike(' www.site.xyz'), true); + assert.eq(UrlType.isDomainLike('site.xyz'), false); + + mostUsedTopLevelDomains.forEach(function (tld) { + assert.eq(UrlType.isDomainLike('site.' + tld), true); + assert.eq(UrlType.isDomainLike(' site.' + tld), true); + assert.eq(UrlType.isDomainLike('site.' + tld + ' '), true); + }); + + assert.eq(UrlType.isDomainLike('/a/b'), false); + }; + + var testIsAbsoluteUrl = function () { + assert.eq(UrlType.isAbsolute('http://www.site.com'), true); + assert.eq(UrlType.isAbsolute('https://www.site.com'), true); + assert.eq(UrlType.isAbsolute('www.site.com'), false); + assert.eq(UrlType.isAbsolute('file.gif'), false); + }; + + testIsDomainLike(); + testIsAbsoluteUrl(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/ThemeTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/ThemeTest.js new file mode 100644 index 0000000..fa53ac2 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/ThemeTest.js @@ -0,0 +1,202 @@ +asynctest('browser/core/ThemeTest', [ + 'ephox.mcagar.api.TinyLoader', + 'ephox.mcagar.api.TinyApis', + 'ephox.mcagar.api.TinyActions', + 'ephox.mcagar.api.TinyDom', + 'tinymce/inlite/Theme', + 'ephox.agar.api.Pipeline', + 'ephox.agar.api.Chain', + 'ephox.agar.api.UiFinder', + 'ephox.agar.api.Mouse', + 'ephox.agar.api.GeneralSteps', + 'ephox.agar.api.UiControls', + 'ephox.agar.api.FocusTools' +], function (TinyLoader, TinyApis, TinyActions, TinyDom, Theme, Pipeline, Chain, UiFinder, Mouse, GeneralSteps, UiControls, FocusTools) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + var dialogRoot = TinyDom.fromDom(document.body); + + var cWaitForContextToolbar = Chain.fromChainsWith(dialogRoot, [ + UiFinder.cWaitForState('label', '.mce-tinymce-inline', function (elm) { + return elm.dom().style.display === ""; + }) + ]); + + var cClickToolbarButton = function (ariaLabel) { + return Chain.fromChains([ + UiFinder.cFindIn('div[aria-label="' + ariaLabel + '"]'), + Mouse.cTrueClick + ]); + }; + + var sClickFocusedButton = Chain.asStep(TinyDom.fromDom(document), [ + FocusTools.cGetFocused, + Mouse.cTrueClick + ]); + + var sClickContextButton = function (ariaLabel) { + return Chain.asStep({}, [ + cWaitForContextToolbar, + cClickToolbarButton(ariaLabel) + ]); + }; + + var sWaitForToolbar = function () { + return Chain.asStep({}, [ + cWaitForContextToolbar + ]); + }; + + var sBoldTests = function (tinyApis) { + return GeneralSteps.sequence([ + tinyApis.sSetContent('

              a

              '), + tinyApis.sSetSelection([0, 0], 0, [0, 0], 1), + sClickContextButton('Bold'), + tinyApis.sAssertContent('

              a

              ') + ]); + }; + + var sH2Tests = function (tinyApis) { + return GeneralSteps.sequence([ + tinyApis.sSetContent('

              a

              '), + tinyApis.sSetSelection([0, 0], 0, [0, 0], 1), + sClickContextButton('Heading 2'), + tinyApis.sAssertContent('

              a

              ') + ]); + }; + + var sInsertLink = function (url) { + return Chain.asStep({}, [ + cWaitForContextToolbar, + cClickToolbarButton('Insert/Edit link'), + cWaitForContextToolbar, + UiFinder.cFindIn('input'), + UiControls.cSetValue(url), + cWaitForContextToolbar, + cClickToolbarButton('Ok') + ]); + }; + + var cWaitForConfirmDialog = Chain.fromChainsWith(dialogRoot, [ + UiFinder.cWaitForState('window element', '.mce-window', function () { + return true; + }) + ]); + + var cClickButton = function (btnText) { + return Chain.fromChains([ + UiFinder.cFindIn('button:contains("' + btnText + '")'), + Mouse.cTrueClick + ]); + }; + + var sClickConfirmButton = function (btnText) { + return Chain.asStep({}, [ + cWaitForConfirmDialog, + cClickButton(btnText) + ]); + }; + + var sInsertLinkConfirmPrefix = function (url, btnText) { + return GeneralSteps.sequence([ + sInsertLink(url), + sClickConfirmButton(btnText) + ]); + }; + + var sUnlink = Chain.asStep({}, [ + cWaitForContextToolbar, + cClickToolbarButton('Insert/Edit link'), + cWaitForContextToolbar, + cClickToolbarButton('Remove link') + ]); + + var sLinkTests = function (tinyApis) { + var sContentActionTest = function (inputHtml, spath, soffset, fpath, foffset, expectedHtml, sAction) { + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetSelection(spath, soffset, fpath, foffset), + sAction, + tinyApis.sAssertContent(expectedHtml) + ]); + }; + + var sLinkTest = function (inputHtml, spath, soffset, fpath, foffset, url, expectedHtml) { + return sContentActionTest(inputHtml, spath, soffset, fpath, foffset, expectedHtml, sInsertLink(url)); + }; + + var sUnlinkTest = function (inputHtml, spath, soffset, fpath, foffset, expectedHtml) { + return sContentActionTest(inputHtml, spath, soffset, fpath, foffset, expectedHtml, sUnlink); + }; + + var sLinkWithConfirmOkTest = function (inputHtml, spath, soffset, fpath, foffset, url, expectedHtml) { + return sContentActionTest(inputHtml, spath, soffset, fpath, foffset, expectedHtml, sInsertLinkConfirmPrefix(url, 'Ok')); + }; + + var sLinkWithConfirmCancelTest = function (inputHtml, spath, soffset, fpath, foffset, url, expectedHtml) { + return sContentActionTest(inputHtml, spath, soffset, fpath, foffset, expectedHtml, sInsertLinkConfirmPrefix(url, 'Cancel')); + }; + + return GeneralSteps.sequence([ + sLinkWithConfirmOkTest('

              a

              ', [0, 0], 0, [0, 0], 1, 'www.site.com', '

              a

              '), + sLinkWithConfirmCancelTest('

              a

              ', [0, 0], 0, [0, 0], 1, 'www.site.com', '

              a

              '), + sLinkTest('

              a

              ', [0, 0], 0, [0, 0], 1, '#1', '

              a

              '), + sLinkTest('

              a

              ', [0, 0, 0], 0, [0, 0, 0], 1, '#2', '

              a

              '), + sLinkTest('

              a

              ', [0, 0, 0], 0, [0, 0, 0], 1, '', '

              a

              '), + sUnlinkTest('

              a

              ', [0, 0, 0], 0, [0, 0, 0], 1, '

              a

              ') + ]); + }; + + var sInsertTableTests = function (tinyApis) { + return GeneralSteps.sequence([ + tinyApis.sSetContent('


              b

              '), + tinyApis.sSetCursor([0], 0), + sClickContextButton('Insert table'), + tinyApis.sAssertContent([ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
                
                
              ', + '

              b

              ' + ].join('\n') + ) + ]); + }; + + var sAriaTests = function (tinyApis, tinyActions) { + return GeneralSteps.sequence([ + tinyApis.sSetContent('

              a

              '), + tinyApis.sSetSelection([0, 0], 0, [0, 0], 1), + sWaitForToolbar(), + tinyActions.sContentKeydown(121, {alt: true}), + sClickFocusedButton, + tinyApis.sAssertContent('

              a

              ') + ]); + }; + + TinyLoader.setup(function (editor, onSuccess, onFailure) { + var tinyApis = TinyApis(editor), tinyActions = TinyActions(editor); + + Pipeline.async({}, [ + sBoldTests(tinyApis), + sH2Tests(tinyApis), + sLinkTests(tinyApis), + sInsertTableTests(tinyApis), + sAriaTests(tinyApis, tinyActions) + ], onSuccess, onFailure); + }, { + theme: 'inlite', + plugins: 'image table link paste contextmenu textpattern', + insert_toolbar: 'quickimage media quicktable', + selection_toolbar: 'bold italic | quicklink h1 h2 blockquote', + inline: true + }, success, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/alien/BookmarkTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/alien/BookmarkTest.js new file mode 100644 index 0000000..c07413f --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/alien/BookmarkTest.js @@ -0,0 +1,65 @@ +asynctest('browser/alien/BookmarkTest', [ + 'ephox/tinymce', + 'ephox.agar.api.Pipeline', + 'ephox.agar.api.Chain', + 'ephox.agar.api.Cursors', + 'ephox.agar.api.Assertions', + 'ephox.mcagar.api.TinyDom', + 'tinymce/inlite/alien/Bookmark' +], function (tinymce, Pipeline, Chain, Cursors, Assertions, TinyDom, Bookmark) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var toNativeRange = function (range) { + var domRange = document.createRange(); + domRange.setStart(range.start().dom(), range.soffset()); + domRange.setEnd(range.finish().dom(), range.foffset()); + return domRange; + }; + + var rangeToBookmark = function (dom) { + return function (range) { + return Bookmark.create(dom, range); + }; + }; + + var bookmarkToRange = function (dom) { + return function (bookmark) { + return Bookmark.resolve(dom, bookmark); + }; + }; + + var cAssertRangeEq = function (expected) { + return Chain.op(function (actual) { + Assertions.assertEq('Not equal startContainer', expected.start().dom(), actual.startContainer); + Assertions.assertEq('Not equal startOffset', expected.soffset(), actual.startOffset); + Assertions.assertEq('Not equal endContainer', expected.finish().dom(), actual.endContainer); + Assertions.assertEq('Not equal endOffset', expected.foffset(), actual.endOffset); + }); + }; + + var sTestBookmark = function (html, path) { + var dom = tinymce.DOM; + var elm = TinyDom.fromDom(dom.create('div', {}, html)); + + return Chain.asStep(elm, [ + Cursors.cFollowPath(Cursors.pathFrom(path)), + Chain.mapper(toNativeRange), + Chain.mapper(rangeToBookmark(dom)), + Chain.mapper(bookmarkToRange(dom)), + cAssertRangeEq(Cursors.calculate(elm, Cursors.pathFrom(path))) + ]); + }; + + Pipeline.async({}, [ + sTestBookmark('abc', {element: [0], offset: 0}), + sTestBookmark('abc', {element: [0], offset: 1}), + sTestBookmark('abc', {start: {element: [0], offset: 0}, finish: {element: [0], offset: 1}}), + sTestBookmark('a', {element: [0, 0], offset: 0}), + sTestBookmark('a', {element: [0, 0], offset: 0}), + sTestBookmark('a', {start: {element: [0, 0], offset: 0}, finish: {element: [0, 0], offset: 1}}), + sTestBookmark('ab', {start: {element: [0, 0], offset: 0}, finish: {element: [1, 0], offset: 1}}) + ], function () { + success(); + }, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/alien/UnlinkTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/alien/UnlinkTest.js new file mode 100644 index 0000000..4f20eb0 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/alien/UnlinkTest.js @@ -0,0 +1,38 @@ +asynctest('browser/alien/UnlinkTest', [ + 'ephox.mcagar.api.TinyLoader', + 'ephox.mcagar.api.TinyApis', + 'tinymce/inlite/alien/Unlink', + 'ephox.agar.api.Pipeline', + 'ephox.agar.api.Step', + 'ephox.agar.api.GeneralSteps' +], function (TinyLoader, TinyApis, Unlink, Pipeline, Step, GeneralSteps) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var sUnlinkSelection = function (editor) { + return Step.sync(function () { + Unlink.unlinkSelection(editor); + }); + }; + + TinyLoader.setup(function (editor, onSuccess, onFailure) { + var tinyApis = TinyApis(editor); + + var sAssertUnlink = function (inputHtml, startPath, startOffset, finishPath, finishOffset, expectedHtml) { + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetSelection(startPath, startOffset, finishPath, finishOffset), + sUnlinkSelection(editor), + tinyApis.sAssertContent(expectedHtml, 'Should match expected anchor less html') + ]); + }; + + Pipeline.async({}, [ + sAssertUnlink('

              a

              ', [0, 0, 0], 0, [0, 0, 0], 1, '

              a

              '), + sAssertUnlink('

              ab

              ', [0, 0, 0], 0, [0, 1], 1, '

              ab

              '), + sAssertUnlink('

              a

              b', [0, 0, 0], 0, [0, 0, 0], 1, '

              a

              \n

              b

              '), + sAssertUnlink('

              a

              b', [0, 0, 0], 0, [1, 0, 0], 1, '

              a

              \n

              b

              ') + ], onSuccess, onFailure); + }, { + }, success, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/ActionsTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/ActionsTest.js new file mode 100644 index 0000000..51e6e54 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/ActionsTest.js @@ -0,0 +1,177 @@ +asynctest('browser/core/ActionsTest', [ + 'ephox.mcagar.api.TinyLoader', + 'ephox.mcagar.api.TinyApis', + 'tinymce/inlite/core/Actions', + 'ephox.agar.api.Pipeline', + 'ephox.agar.api.Step', + 'ephox.agar.api.GeneralSteps' +], function (TinyLoader, TinyApis, Actions, Pipeline, Step, GeneralSteps) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var wrap = function (f, args) { + return function () { + var currentArgs = Array.prototype.slice.call(arguments); + return Step.sync(function () { + f.apply(null, [].concat(args).concat(currentArgs)); + }); + }; + }; + + var sInsertTableTests = function (editor, tinyApis) { + var sInsertTableTest = function (cols, rows, expectedHtml, message) { + var sInsertTable = wrap(Actions.insertTable, editor); + + return GeneralSteps.sequence([ + tinyApis.sSetContent(''), + sInsertTable(cols, rows), + tinyApis.sAssertContent(expectedHtml, message) + ]); + }; + + return GeneralSteps.sequence([ + sInsertTableTest(2, 3, [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
                
                
                
              ' + ].join('\n'), + 'Should be a 2x3 table' + ), + + sInsertTableTest(3, 2, [ + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '', + '
                 
                 
              ' + ].join('\n'), + 'Should be a 3x2 table' + ) + ]); + }; + + var sFormatBlockTests = function (editor, tinyApis) { + var sFormatBlockTest = function (name) { + var sFormatBlock = wrap(Actions.formatBlock, editor); + + return GeneralSteps.sequence([ + tinyApis.sSetContent('

              a

              '), + tinyApis.sSetCursor([0], 0), + sFormatBlock(name), + tinyApis.sAssertContent('<' + name + '>a', 'Should be a ' + name + ' block') + ]); + }; + + return GeneralSteps.sequence([ + sFormatBlockTest('h1'), + sFormatBlockTest('h2'), + sFormatBlockTest('pre') + ]); + }; + + var sCreateLinkTests = function (editor, tinyApis) { + var sCreateLinkTest = function (inputHtml, url, sPath, sOffset, fPath, fOffset, expectedHtml) { + var sCreateLink = wrap(Actions.createLink, editor); + + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetSelection(sPath, sOffset, fPath, fOffset), + sCreateLink(url), + tinyApis.sAssertContent(expectedHtml, 'Should have a link') + ]); + }; + + return GeneralSteps.sequence([ + sCreateLinkTest('

              a

              ', '#1', [0, 0], 0, [0, 0], 1, '

              a

              '), + sCreateLinkTest('

              a

              ', '#2', [0, 0], 0, [0, 0], 1, '

              a

              '), + sCreateLinkTest('

              a

              ', '#2', [0, 0, 0], 0, [0, 0, 0], 1, '

              a

              ') + ]); + }; + + var sUnlinkTests = function (editor, tinyApis) { + var sUnlinkTest = function (inputHtml, sPath, sOffset, fPath, fOffset, expectedHtml) { + var sUnlink = wrap(Actions.unlink, editor); + + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetSelection(sPath, sOffset, fPath, fOffset), + sUnlink(), + tinyApis.sAssertContent(expectedHtml, 'Should not have a link') + ]); + }; + + return GeneralSteps.sequence([ + sUnlinkTest('

              a

              ', [0, 0], 0, [0, 0], 1, '

              a

              '), + sUnlinkTest('

              a

              ', [0, 0, 0], 0, [0, 0, 0], 1, '

              a

              '), + sUnlinkTest('

              a

              ', [0, 0, 0], 0, [0, 0, 0], 1, '

              a

              '), + sUnlinkTest('

              ab

              ', [0, 0, 0], 0, [0, 1], 1, '

              ab

              ') + ]); + }; + + var base64ToBlob = function (base64, type) { + var buff = atob(base64); + var bytes = new Uint8Array(buff.length); + + for (var i = 0; i < bytes.length; i++) { + bytes[i] = buff.charCodeAt(i); + } + + return new Blob([bytes], {type: type}); + }; + + var sInsertBlobTests = function (editor, tinyApis) { + var sInsertBlobTest = function (inputHtml, path, offset, blob, base64, expectedHtml) { + var sInsertBlob = wrap(Actions.insertBlob, editor); + + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetCursor(path, offset), + sInsertBlob(blob, base64), + tinyApis.sAssertContent(expectedHtml, 'Should have a image') + ]); + }; + + var base64 = 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + var blob = base64ToBlob(base64, 'image/gif'); + + return GeneralSteps.sequence([ + sInsertBlobTest('

              a

              ', [0, 0], 0, base64, blob, '

              a

              ') + ]); + }; + + TinyLoader.setup(function (editor, onSuccess, onFailure) { + var tinyApis = TinyApis(editor); + + Pipeline.async({}, [ + sInsertTableTests(editor, tinyApis), + sFormatBlockTests(editor, tinyApis), + sInsertBlobTests(editor, tinyApis), + sCreateLinkTests(editor, tinyApis), + sUnlinkTests(editor, tinyApis) + ], onSuccess, onFailure); + }, { + inline: true + }, success, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/ElementMatcher.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/ElementMatcher.js new file mode 100644 index 0000000..a534804 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/ElementMatcher.js @@ -0,0 +1,69 @@ +asynctest('browser/core/ElementMatcherTest', [ + 'ephox.mcagar.api.TinyLoader', + 'ephox.mcagar.api.TinyApis', + 'ephox.agar.api.Step', + 'ephox.agar.api.Assertions', + 'tinymce/inlite/core/ElementMatcher', + 'tinymce/inlite/core/PredicateId', + 'ephox.agar.api.Pipeline' +], function (TinyLoader, TinyApis, Step, Assertions, ElementMatcher, PredicateId, Pipeline) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var eq = function (target) { + return function (elm) { + return elm === target; + }; + }; + + var constantFalse = function (/*elm*/) { + return false; + }; + + var sElementTest = function (tinyApis, editor, inputHtml, selector) { + return Step.sync(function () { + var target, result; + + editor.setContent(inputHtml); + target = editor.dom.select(selector)[0]; + + result = ElementMatcher.element(target, [ + PredicateId.create('a', constantFalse), + PredicateId.create('b', eq(target)) + ])(editor); + + Assertions.assertEq(result.id, 'b', 'Should be matching B'); + Assertions.assertEq(result.rect.w > 0, true, 'Should be have width'); + }); + }; + + var sParentTest = function (tinyApis, editor, inputHtml, selector) { + return Step.sync(function () { + var target, parents, result; + + editor.setContent(inputHtml); + target = editor.dom.select(selector)[0]; + parents = editor.dom.getParents(target); + + result = ElementMatcher.parent(parents, [ + PredicateId.create('a', constantFalse), + PredicateId.create('b', eq(parents[1])), + PredicateId.create('c', eq(parents[0])) + ])(editor); + + Assertions.assertEq(result.id, 'c', 'Should be matching C the closest one'); + Assertions.assertEq(result.rect.w > 0, true, 'Should be have width'); + }); + }; + + TinyLoader.setup(function (editor, onSuccess, onFailure) { + var tinyApis = TinyApis(editor); + + Pipeline.async({}, [ + sElementTest(tinyApis, editor, '

              a

              ', 'p'), + sParentTest(tinyApis, editor, '

              a

              ', 'em') + ], onSuccess, onFailure); + }, { + inline: true + }, success, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/LayoutTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/LayoutTest.js new file mode 100644 index 0000000..5ee5c7f --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/LayoutTest.js @@ -0,0 +1,118 @@ +test('browser/core/LayoutTest', [ + 'ephox/tinymce', + 'tinymce/inlite/core/Layout' +], function (tinymce, Layout) { + // TODO: Move this to atomic test when we can require parts of tinymce core using bolt + + var rect = function (x, y, w, h) { + return {x: x, y: y, w: w, h: h}; + }; + + var clientRect = function (x, y, w, h) { + return {left: x, top: y, width: w, height: h, bottom: y + h, right: x + w}; + }; + + var assertLayout = function (expected, rects) { + var result; + + result = Layout.calc( + rects.targetRect, + rects.contentAreaRect, + rects.panelRect + ); + + assert.eq(expected, result); + }; + + var testCalcPanelAtBottomLeft = function () { + assertLayout({ + rect: rect(0, 10, 20, 10), + position: 'bl-tl' + }, { + contentAreaRect: rect(0, 0, 100, 100), + targetRect: rect(0, 0, 10, 10), + panelRect: rect(0, 0, 20, 10) + }); + }; + + var testCalcPanelAtBottomRight = function () { + assertLayout({ + rect: rect(80, 10, 20, 10), + position: 'br-tr' + }, { + contentAreaRect: rect(0, 0, 100, 100), + targetRect: rect(90, 0, 10, 10), + panelRect: rect(0, 0, 20, 10) + }); + }; + + var testCalcPanelAtTopLeft = function () { + assertLayout({ + rect: rect(0, 10, 20, 10), + position: 'tl-bl' + }, { + contentAreaRect: rect(0, 0, 100, 100), + targetRect: rect(0, 20, 10, 10), + panelRect: rect(0, 0, 20, 10) + }); + }; + + var testCalcPanelAtTopRight = function () { + assertLayout({ + rect: rect(80, 10, 20, 10), + position: 'tr-br' + }, { + contentAreaRect: rect(0, 0, 100, 100), + targetRect: rect(90, 20, 10, 10), + panelRect: rect(0, 0, 20, 10) + }); + }; + + var testCalcPanelAtTopCenter = function () { + assertLayout({ + rect: rect(35, 10, 20, 10), + position: 'tc-bc' + }, { + contentAreaRect: rect(0, 0, 100, 100), + targetRect: rect(40, 20, 10, 10), + panelRect: rect(0, 0, 20, 10) + }); + }; + + var testCalcPanelAtBottomCenter = function () { + assertLayout({ + rect: rect(35, 10, 20, 10), + position: 'bc-tc' + }, { + contentAreaRect: rect(0, 0, 100, 100), + targetRect: rect(40, 0, 10, 10), + panelRect: rect(0, 0, 20, 10) + }); + }; + + var testUserConstrain = function () { + var targetRect, contentAreaRect, panelRect, userConstrainedPanelRect, handler; + + contentAreaRect = rect(0, 0, 100, 100); + targetRect = rect(40, 0, 10, 10); + panelRect = rect(0, 0, 20, 10); + + handler = function (rects) { + assert.eq(rects.elementRect, clientRect(40, 0, 10, 10)); + assert.eq(rects.contentAreaRect, clientRect(0, 0, 100, 100)); + assert.eq(rects.panelRect, clientRect(0, 0, 20, 10)); + return clientRect(1, 2, 3, 4); + }; + + userConstrainedPanelRect = Layout.userConstrain(handler, targetRect, contentAreaRect, panelRect); + assert.eq(userConstrainedPanelRect, rect(1, 2, 3, 4)); + }; + + testCalcPanelAtBottomLeft(); + testCalcPanelAtBottomRight(); + testCalcPanelAtTopLeft(); + testCalcPanelAtTopRight(); + testCalcPanelAtTopCenter(); + testCalcPanelAtBottomCenter(); + testUserConstrain(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/MeasureTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/MeasureTest.js new file mode 100644 index 0000000..b233870 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/MeasureTest.js @@ -0,0 +1,62 @@ +asynctest('browser/core/MeasureTest', [ + 'ephox.mcagar.api.TinyLoader', + 'tinymce/inlite/core/Measure', + 'ephox.agar.api.Pipeline', + 'ephox.mcagar.api.TinyApis', + 'ephox.agar.api.Step', + 'ephox.agar.api.Chain', + 'ephox.agar.api.UiFinder', + 'ephox.agar.api.Assertions' +], function (TinyLoader, Measure, Pipeline, TinyApis, Step, Chain, UiFinder, Assertions) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var containsXY = function (r, x, y) { + return x >= r.x && x <= r.x + r.w && y >= r.y && y <= r.y + r.h; + }; + + var contains = function (a, b) { + return containsXY(a, b.x, b.y) && containsXY(a, b.x + b.w, b.y + b.h); + }; + + var sAssertRect = function (editor, measure) { + return Step.sync(function () { + var elementRect = measure(); + var pageAreaRect = Measure.getPageAreaRect(editor); + var contentAreaRect = Measure.getContentAreaRect(editor); + + Assertions.assertEq('Rect is not in page area rect', contains(pageAreaRect, elementRect), true); + Assertions.assertEq('Rect is not in content area rect', contains(contentAreaRect, elementRect), true); + Assertions.assertEq('Rect should have width', elementRect.w > 0, true); + Assertions.assertEq('Rect should have height', elementRect.h > 0, true); + }); + }; + + var getElementRectFromSelector = function (editor, selector) { + return function () { + var elm = editor.dom.select(selector)[0]; + var rect = Measure.getElementRect(editor, elm); + return rect; + }; + }; + + var getSelectionRectFromSelector = function (editor) { + return function () { + var rect = Measure.getSelectionRect(editor); + return rect; + }; + }; + + TinyLoader.setup(function (editor, onSuccess, onFailure) { + var tinyApis = TinyApis(editor); + + Pipeline.async({}, [ + tinyApis.sSetContent('

              a

              b

              c

              '), + sAssertRect(editor, getElementRectFromSelector(editor, 'p:nth-child(1)')), + tinyApis.sSetCursor([0, 0], 0), + sAssertRect(editor, getSelectionRectFromSelector(editor)) + ], onSuccess, onFailure); + }, { + inline: true + }, success, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/PredicateIdTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/PredicateIdTest.js new file mode 100644 index 0000000..4f76b83 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/PredicateIdTest.js @@ -0,0 +1,26 @@ +test('browser/core/PredicateIdTest', [ + 'ephox/tinymce', + 'tinymce/inlite/core/PredicateId' +], function (tinymce, PredicateId) { + var testFromContextToolbars = function () { + var isTrue = function () { + return true; + }; + + var isFalse = function () { + return false; + }; + + var predIds = PredicateId.fromContextToolbars([ + {toolbar: 'a b c', predicate: isTrue, id: 'a'}, + {toolbar: 'd e', predicate: isFalse, id: 'b'} + ]); + + assert.eq([ + PredicateId.create('a', isTrue), + PredicateId.create('b', isFalse) + ], predIds); + }; + + testFromContextToolbars(); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/SelectionMatcherTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/SelectionMatcherTest.js new file mode 100644 index 0000000..6be70da --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/core/SelectionMatcherTest.js @@ -0,0 +1,76 @@ +asynctest('browser/core/SelectionMatcherTest', [ + 'ephox.mcagar.api.TinyLoader', + 'ephox.mcagar.api.TinyApis', + 'ephox.agar.api.Step', + 'ephox.agar.api.Assertions', + 'tinymce/inlite/core/SelectionMatcher', + 'tinymce/inlite/core/PredicateId', + 'ephox.agar.api.GeneralSteps', + 'ephox.agar.api.Pipeline' +], function (TinyLoader, TinyApis, Step, Assertions, SelectionMatcher, PredicateId, GeneralSteps, Pipeline) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var assertResult = function (expectedResultState, result) { + Assertions.assertEq('Should not be null', result !== null, expectedResultState); + + if (expectedResultState === true) { + Assertions.assertEq('Should be matching a', result.id, 'a'); + Assertions.assertEq('Should be have width', result.rect.w > 0, true); + } + }; + + var sTextSelectionTest = function (tinyApis, editor, inputHtml, spath, soffset, fpath, foffset, expectedResultState) { + var sAssertTextSelectionResult = Step.sync(function () { + var result = SelectionMatcher.textSelection('a')(editor); + assertResult(expectedResultState, result); + }); + + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetSelection(spath, soffset, fpath, foffset), + sAssertTextSelectionResult + ]); + }; + + var sTextSelectionTests = function (tinyApis, editor) { + return GeneralSteps.sequence([ + sTextSelectionTest(tinyApis, editor, '

              a

              ', [0], 0, [0], 1, true), + sTextSelectionTest(tinyApis, editor, '

              a

              ', [0], 0, [0], 0, false) + ]); + }; + + var sEmptyTextBlockTest = function (tinyApis, editor, inputHtml, spath, soffset, fpath, foffset, expectedResultState) { + var sAssertTextSelectionResult = Step.sync(function () { + var elements = editor.dom.getParents(editor.selection.getStart()); + var result = SelectionMatcher.emptyTextBlock(elements, 'a')(editor); + assertResult(expectedResultState, result); + }); + + return GeneralSteps.sequence([ + tinyApis.sSetContent(inputHtml), + tinyApis.sSetSelection(spath, soffset, fpath, foffset), + sAssertTextSelectionResult + ]); + }; + + var sEmptyTextBlockTests = function (tinyApis, editor) { + return GeneralSteps.sequence([ + sEmptyTextBlockTest(tinyApis, editor, '

              a

              ', [0], 0, [0], 0, false), + sEmptyTextBlockTest(tinyApis, editor, '

              a

              ', [0], 0, [0], 1, false), + sEmptyTextBlockTest(tinyApis, editor, '


              ', [0], 0, [0], 0, true), + sEmptyTextBlockTest(tinyApis, editor, '


              ', [0, 0], 0, [0, 0], 0, true) + ]); + }; + + TinyLoader.setup(function (editor, onSuccess, onFailure) { + var tinyApis = TinyApis(editor); + + Pipeline.async({}, [ + sTextSelectionTests(tinyApis, editor), + sEmptyTextBlockTests(tinyApis, editor) + ], onSuccess, onFailure); + }, { + inline: true + }, success, failure); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/file/ConversionsTest.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/file/ConversionsTest.js new file mode 100644 index 0000000..99ad1cc --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/file/ConversionsTest.js @@ -0,0 +1,41 @@ +asynctest('atomic/core/ConvertTest', [ + 'ephox/tinymce', + 'tinymce/inlite/file/Conversions', + 'ephox.agar.api.Step', + 'ephox.agar.api.Pipeline', + 'ephox.agar.api.Assertions' +], function (tinymce, Conversions, Step, Pipeline, Assertions) { + var success = arguments[arguments.length - 2]; + var failure = arguments[arguments.length - 1]; + + var base64ToBlob = function (base64, type) { + var buff = atob(base64); + var bytes = new Uint8Array(buff.length); + + for (var i = 0; i < bytes.length; i++) { + bytes[i] = buff.charCodeAt(i); + } + + return new Blob([bytes], {type: type}); + }; + + var sBlobToBase64 = function () { + return Step.async(function (next) { + var base64 = 'R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7'; + var blob = base64ToBlob(base64, 'image/gif'); + + Conversions.blobToBase64(blob).then(function (convertedBase64) { + Assertions.assertEq('Not the correct base64', base64, convertedBase64); + next(); + }); + }); + }; + + Pipeline.async({}, [ + sBlobToBase64() + ], function () { + success(); + }, function () { + failure(); + }); +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/file/SelectionMatcher.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/file/SelectionMatcher.js new file mode 100644 index 0000000..94aeb47 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/src/test/js/browser/file/SelectionMatcher.js @@ -0,0 +1,55 @@ +/** + * SelectionMatcher.js + * + * Released under LGPL License. + * Copyright (c) 1999-2016 Ephox Corp. All rights reserved + * + * License: http://www.tinymce.com/license + * Contributing: http://www.tinymce.com/contributing + */ + +define('tinymce/inlite/core/SelectionMatcher', [ + 'tinymce/inlite/core/Matcher', + 'tinymce/inlite/core/Measure' +], function (Matcher, Measure) { + // textSelection :: String -> (Editor -> Matcher.result | Null) + var textSelection = function (id) { + return function (editor) { + if (!editor.selection.isCollapsed()) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + }; + }; + + // emptyTextBlock :: [Elements], String -> (Editor -> Matcher.result | Null) + var emptyTextBlock = function (elements, id) { + return function (editor) { + var i, textBlockElementsMap = editor.schema.getTextBlockElements(); + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName === 'TABLE') { + return null; + } + } + + for (i = 0; i < elements.length; i++) { + if (elements[i].nodeName in textBlockElementsMap) { + if (editor.dom.isEmpty(elements[i])) { + return Matcher.result(id, Measure.getSelectionRect(editor)); + } + + return null; + } + } + + return null; + }; + }; + + return { + textSelection: textSelection, + emptyTextBlock: emptyTextBlock + }; +}); diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/theme.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/theme.min.js new file mode 100644 index 0000000..4d3f267 --- /dev/null +++ b/copy_this/modules/bla/bla-tinymce/tinymce/themes/inlite/theme.min.js @@ -0,0 +1 @@ +!function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;g>i;++i)h[i]=d(e[i]);var j=f.apply(null,h);if(void 0===j)throw"module ["+b+"] returned undefined";c.instance=j},c=function(b,c,d){if("string"!=typeof b)throw"module id must be a string";if(void 0===c)throw"no dependencies for "+b;if(void 0===d)throw"no definition function for "+b;a[b]={deps:c,defn:d,instance:void 0}},d=function(c){var d=a[c];if(void 0===d)throw"module ["+c+"] was undefined";return void 0===d.instance&&b(c),d.instance},e=function(a,b){for(var c=a.length,e=new Array(c),f=0;c>f;++f)e.push(d(a[f]));b.apply(null,b)},f={};f.bolt={module:{api:{define:c,require:e,demand:d}}};var g=c,h=function(a,b){g(a,[],function(){return b})};h("1",tinymce.ThemeManager),h("2",tinymce.util.Delay),h("b",tinymce.util.Tools),h("c",tinymce.ui.Factory),h("d",tinymce.DOM),g("e",["b","c"],function(a,b){var c=function(a,b){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););a.active(c&&e==b)}},d=function(a,b){var d=function(a,b){return{selector:a,handler:b}},e=function(a){b.active(a)},f=function(a){b.disabled(a)};return"bullist"==a?d("ul > li",c(b,"UL")):"numlist"==a?d("ol > li",c(b,"OL")):b.settings.stateSelector?d(b.settings.stateSelector,e):b.settings.disabledStateSelector?d(b.settings.disabledStateSelector,f):null},e=function(a,b,c){return function(){var e=d(b,c);null!==e&&a.selection.selectorChanged(e.selector,e.handler)}},f=function(c,d,f){var g,h=[];if(f)return a.each(f.split(/[ ,]/),function(a){var d;"|"==a?g=null:b.has(a)?(a={type:a},h.push(a),g=null):(g||(g={type:"buttongroup",items:[]},h.push(g)),c.buttons[a]&&(d=a,a=c.buttons[d],"function"==typeof a&&(a=a()),a.type=a.type||"button",a=b.create(a),a.on("postRender",e(c,d,a)),g.items.push(a)))}),b.create({type:"toolbar",layout:"flow",name:d,items:h})};return{create:f}}),h("m",tinymce.util.Promise),g("n",[],function(){var a=0,b=function(){var a=function(){return Math.round(4294967295*Math.random()).toString(36)};return"s"+Date.now().toString(36)+a()+a()+a()},c=function(c){return c+a++ +b()};return{uuid:c}}),g("s",[],function(){var a=function(a,b){function c(c){var e,f,g;f=b[c?"startContainer":"endContainer"],g=b[c?"startOffset":"endOffset"],1==f.nodeType&&(e=a.create("span",{"data-mce-type":"bookmark"}),f.hasChildNodes()?(g=Math.min(g,f.childNodes.length-1),c?f.insertBefore(e,f.childNodes[g]):a.insertAfter(e,f.childNodes[g])):f.appendChild(e),f=e,g=0),d[c?"startContainer":"endContainer"]=f,d[c?"startOffset":"endOffset"]=g}var d={};return c(!0),b.collapsed||c(),d},b=function(a,b){function c(c){function d(a){for(var b=a.parentNode.firstChild,c=0;b;){if(b==a)return c;1==b.nodeType&&"bookmark"==b.getAttribute("data-mce-type")||c++,b=b.nextSibling}return-1}var e,f,g;e=g=b[c?"startContainer":"endContainer"],f=b[c?"startOffset":"endOffset"],e&&(1==e.nodeType&&(f=d(e),e=e.parentNode,a.remove(g)),b[c?"startContainer":"endContainer"]=e,b[c?"startOffset":"endOffset"]=f)}c(!0),c();var d=a.createRng();return d.setStart(b.startContainer,b.startOffset),b.endContainer&&d.setEnd(b.endContainer,b.endOffset),d};return{create:a,resolve:b}}),h("t",tinymce.dom.TreeWalker),h("u",tinymce.dom.RangeUtils),g("o",["s","b","t","u"],function(a,b,c,d){var e=function(a,b,d){var e,f,g=[];for(e=new c(b,a),f=b;f&&(1===f.nodeType&&g.push(f),f!==d);f=e.next());return g},f=function(c,d){var e,f,g;f=c.dom,g=c.selection,e=a.create(f,g.getRng()),b.each(d,function(a){c.dom.remove(a,!0)}),g.setRng(a.resolve(f,e))},g=function(a){return"A"===a.nodeName&&a.hasAttribute("href")},h=function(a,b){var c=a.getParent(b,g);return c?c:b},i=function(a){var c,f,i,j,k,l,m;return k=a.selection,l=a.dom,m=k.getRng(),c=h(l,d.getNode(m.startContainer,m.startOffset)),f=d.getNode(m.endContainer,m.endOffset),i=a.getBody(),j=b.grep(e(i,c,f),g)},j=function(a){f(a,i(a))};return{unlinkSelection:j}}),g("k",["n","o"],function(a,b){var c=function(a,b){var c,d,e;for(e='',e+="",d=0;b>d;d++){for(e+="",c=0;a>c;c++)e+="";e+=""}return e+="",e+="

              "},d=function(a){var b=a.dom.select("*[data-mce-id]");return b[0]},e=function(a,b,e){a.undoManager.transact(function(){var f,g;a.insertContent(c(b,e)),f=d(a),f.removeAttribute("data-mce-id"),g=a.dom.select("td,th",f),a.selection.setCursorLocation(g[0],0)})},f=function(a,b){a.execCommand("FormatBlock",!1,b)},g=function(b,c,d){var e,f;e=b.editorUpload.blobCache,f=e.create(a.uuid("mceu"),d,c),e.add(f),b.insertContent(b.dom.createHTML("img",{src:f.blobUri()}))},h=function(a){a.selection.collapse(!1)},i=function(a){a.focus(),b.unlinkSelection(a),h(a)},j=function(a,b,c){a.focus(),a.dom.setAttrib(b,"href",c),h(a)},k=function(a,b){a.execCommand("mceInsertLink",!1,{href:b}),h(a)},l=function(a,b){var c=a.dom.getParent(a.selection.getStart(),"a[href]");c?j(a,c,b):k(a,b)},m=function(a,b){0===b.trim().length?i(a):l(a,b)};return{insertTable:e,formatBlock:f,insertBlob:g,createLink:m,unlink:i}}),g("p",[],function(){var a=function(a){return/^www\.|\.(com|org|edu|gov|uk|net|ca|de|jp|fr|au|us|ru|ch|it|nl|se|no|es|mil)$/i.test(a.trim())},b=function(a){return/^https?:\/\//.test(a.trim())};return{isDomainLike:a,isAbsolute:b}}),g("f",["b","c","m","k","p"],function(a,b,c,d,e){var f=function(a){a.find("textbox").eq(0).each(function(a){a.focus()})},g=function(c,d){var e=b.create(a.extend({type:"form",layout:"flex",direction:"row",padding:5,name:c,spacing:3},d));return e.on("show",function(){f(e)}),e},h=function(a,b){return b?a.show():a.hide()},i=function(a,b){return new c(function(c){a.windowManager.confirm("The URL you entered seems to be an external link. Do you want to add the required http:// prefix?",function(a){var d=a===!0?"http://"+b:b;c(d)})})},j=function(a,b){return!e.isAbsolute(b)&&e.isDomainLike(b)?i(a,b):c.resolve(b)},k=function(a,b){var c=function(){a.focus(),d.unlink(a),b()};return g("quicklink",{items:[{type:"button",name:"unlink",icon:"unlink",onclick:c,tooltip:"Remove link"},{type:"textbox",name:"linkurl",placeholder:"Paste or type a link"},{type:"button",icon:"checkmark",subtype:"primary",tooltip:"Ok",onclick:"submit"}],onshow:function(){var b,c="";b=a.dom.getParent(a.selection.getStart(),"a[href]"),b&&(c=a.dom.getAttrib(b,"href")),this.fromJSON({linkurl:c}),h(this.find("#unlink"),b)},onsubmit:function(c){j(a,c.data.linkurl).then(function(c){d.createLink(a,c),b()})}})};return{createQuickLinkForm:k}}),h("q",tinymce.geom.Rect),g("r",[],function(){var a=function(a){return{x:a.left,y:a.top,w:a.width,h:a.height}},b=function(a){return{left:a.x,top:a.y,width:a.w,height:a.h,right:a.x+a.w,bottom:a.y+a.h}};return{fromClientRect:a,toClientRect:b}}),g("g",["d","q","r"],function(a,b,c){var d=function(b){var c=a.getViewPort();return{x:b.x+c.x,y:b.y+c.y,w:b.w,h:b.h}},e=function(a){var b=a.getBoundingClientRect();return d({x:b.left,y:b.top,w:Math.max(a.clientWidth,a.offsetWidth),h:Math.max(a.clientHeight,a.offsetHeight)})},f=function(a,b){return e(b)},g=function(a){return e(a.getElement().ownerDocument.body)},h=function(a){return e(a.getContentAreaContainer()||a.getBody())},i=function(a){var b=a.selection.getBoundingClientRect();return b?d(c.fromClientRect(b)):null};return{getElementRect:f,getPageAreaRect:g,getContentAreaRect:h,getSelectionRect:i}}),g("h",["q","r"],function(a,b){var c=function(a,b){return{rect:a,position:b}},d=function(a,b){return{x:b.x,y:b.y,w:a.w,h:a.h}},e=function(b,e,f,g,h){var i,j,k;return i=a.findBestRelativePosition(h,f,g,b),f=a.clamp(f,g),i?(j=a.relativePosition(h,f,i),k=d(h,j),c(k,i)):(f=a.intersect(g,f),f?(i=a.findBestRelativePosition(h,f,g,e))?(j=a.relativePosition(h,f,i),k=d(h,j),c(k,i)):(k=d(h,f),c(k,i)):null)},f=function(a,b,c){return e(["cr-cl","cl-cr"],["bc-tc","bl-tl","br-tr"],a,b,c)},g=function(a,b,c){return e(["tc-bc","bc-tc","tl-bl","bl-tl","tr-br","br-tr"],["bc-tc","bl-tl","br-tr"],a,b,c)},h=function(a,c,d,e){var f;return"function"==typeof a?(f=a({elementRect:b.toClientRect(c),contentAreaRect:b.toClientRect(d),panelRect:b.toClientRect(e)}),b.fromClientRect(f)):e};return{calcInsert:f,calc:g,userConstrain:h}}),g("3",["b","c","d","e","f","g","h"],function(a,b,c,d,e,f,g){return function(){var h,i,j="bold italic | quicklink h2 h3 blockquote",k="quickimage quicktable",l=function(b,c){return a.map(c,function(a){return d.create(b,a.id,a.items)})},m=function(a){var b=a.selection_toolbar;return b?b:j},n=function(a){var b=a.insert_toolbar;return b?b:k},o=function(a,c){var f,g=a.settings;return f=l(a,c),f=f.concat([d.create(a,"text",m(g)),d.create(a,"insert",n(g)),e.createQuickLinkForm(a,x)]),b.create({type:"floatpanel",role:"dialog",classes:"tinymce tinymce-inline arrow",ariaLabel:"Inline toolbar",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!0,border:1,items:f,oncancel:function(){a.focus()}})},p=function(a){a&&a.show()},q=function(a,b){a.moveTo(b.x,b.y)},r=function(b,c){c=c?c.substr(0,2):"",a.each({t:"down",b:"up",c:"center"},function(a,d){b.classes.toggle("arrow-"+a,d===c.substr(0,1))}),"cr"===c?(b.classes.toggle("arrow-left",!0),b.classes.toggle("arrow-right",!1)):"cl"===c?(b.classes.toggle("arrow-left",!0),b.classes.toggle("arrow-right",!0)):a.each({l:"left",r:"right"},function(a,d){b.classes.toggle("arrow-"+a,d===c.substr(1,1))})},s=function(a,b){var c=a.items().filter("#"+b);c.length>0&&(c[0].show(),a.reflow())},t=function(a,b,d,e){var h,j,k,l;p(a),a.items().hide(),s(a,b),l=d.settings.inline_toolbar_position_handler,h=f.getContentAreaRect(d),j=c.getRect(a.getEl()),k="insert"===b?g.calcInsert(e,h,j):g.calc(e,h,j),k?(j=k.rect,i=e,q(a,g.userConstrain(l,e,h,j)),r(a,k.position)):x(a)},u=function(){return h.items().filter("form:visible").length>0},v=function(a,b){if(h){h.items().hide(),s(h,b);var d,e,j,k;p(h),h.items().hide(),s(h,b),k=a.settings.inline_toolbar_position_handler,d=f.getContentAreaRect(a),e=c.getRect(h.getEl()),j=g.calc(i,d,e),j&&(e=j.rect,q(h,g.userConstrain(k,i,d,e)),r(h,j.position))}},w=function(a,b,c,d){h||(h=o(a,d),h.renderTo(document.body).reflow().moveTo(c.x,c.y),a.nodeChanged()),t(h,b,a,c)},x=function(){h&&h.hide()},y=function(){h&&h.find("toolbar:visible").eq(0).each(function(a){a.focus(!0)})},z=function(){h&&(h.remove(),h=null)},A=function(){return h&&h.visible()&&u()};return{show:w,showForm:v,inForm:A,hide:x,focus:y,remove:z}}}),g("i",["m"],function(a){var b=function(b){return new a(function(a){var c=new FileReader;c.onloadend=function(){a(c.result.split(",")[1])},c.readAsDataURL(b)})};return{blobToBase64:b}}),g("j",["m"],function(a){var b=function(){return new a(function(a){var b;b=document.createElement("input"),b.type="file",b.style.position="fixed",b.style.left=0,b.style.top=0,b.style.opacity=.001,document.body.appendChild(b),b.onchange=function(b){a(Array.prototype.slice.call(b.target.files))},b.click(),b.parentNode.removeChild(b)})};return{pickFile:b}}),g("4",["3","i","j","k"],function(a,b,c,d){var e=function(a){for(var b=function(b){return function(){d.formatBlock(a,b)}},c=1;6>c;c++){var e="h"+c;a.addButton(e,{text:e.toUpperCase(),tooltip:"Heading "+c,stateSelector:e,onclick:b(e),onPostRender:function(){var a=this.getEl().firstChild.firstChild;a.style.fontWeight="bold"}})}},f=function(a,f){a.addButton("quicklink",{icon:"link",tooltip:"Insert/Edit link",stateSelector:"a[href]",onclick:function(){f.showForm(a,"quicklink")}}),a.addButton("quickimage",{icon:"image",tooltip:"Insert image",onclick:function(){c.pickFile().then(function(c){var e=c[0];b.blobToBase64(e).then(function(b){d.insertBlob(a,b,e)})})}}),a.addButton("quicktable",{icon:"table",tooltip:"Insert table",onclick:function(){f.hide(),d.insertTable(a,2,2)}}),e(a)};return{addToEditor:f}}),h("l",tinymce.EditorManager),g("5",["l","d"],function(a,b){var c=function(a,b){var c=function(){a.fire("SkinLoaded"),b()};a.initialized?c():a.on("init",c)},d=function(d,e,f){var g=a.baseURL,h=g+"/skins/"+e,i=function(){c(d,f)};b.styleSheetLoader.load(h+"/skin.min.css",i),d.contentCSS.push(h+"/content.inline.min.css")};return{load:d}}),g("8",[],function(){var a=function(a,b){return{id:a,rect:b}},b=function(a,b){for(var c=0;c li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!=d&&"UL"!=d););b.active(a&&"UL"==d)}),"numlist"==f&&c.selectorChanged("ol > li",function(a,c){for(var d,e=c.parents.length;e--&&(d=c.parents[e].nodeName,"OL"!=d&&"UL"!=d););b.active(a&&"OL"==d)}),b.settings.stateSelector&&c.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&c.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var f;"|"==b?c=null:m.has(b)?(b={type:b},l.toolbar_items_size&&(b.size=l.toolbar_items_size),d.push(b),c=null):(c||(c={type:"buttongroup",items:[]},d.push(c)),a.buttons[b]&&(f=b,b=a.buttons[f],"function"==typeof b&&(b=b()),b.type=b.type||"button",l.toolbar_items_size&&(b.size=l.toolbar_items_size),b=m.create(b),c.items.push(b),a.initialized?e():a.on("init",e)))}),{type:"toolbar",layout:"flow",items:d}}function c(){function a(a){return a?(c.push(b(a)),!0):void 0}var c=[];if(tinymce.isArray(l.toolbar)){if(0===l.toolbar.length)return;tinymce.each(l.toolbar,function(a,b){l["toolbar"+(b+1)]=a}),delete l.toolbar}for(var d=1;10>d&&a(l["toolbar"+d]);d++);return c.length||l.toolbar===!1||a(l.toolbar||s),c.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:c}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((l.removed_menuitems||"").split(/[ ,]/)),l.menu?(e=l.menu[c],g=!0):e=r[c],e){d={text:e.title},f=[],n((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||n(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var l;a.on("click keyup blur",function(){window.setTimeout(function(){var b;a.removed||(b=k(a.selection.getNode()),b?i(b):j())},0)}),a.on("ObjectResizeStart",function(){var b=k(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",g),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}})}function i(b){function f(){if(n&&n.moveRel&&n.visible()&&!n._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=o.getPos(c),g=o.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}n.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){n&&(n.show(),f(),o.addClass(a.getBody(),"mce-edit-focus"))}function i(){n&&(n.hide(),q.hideAll(),o.removeClass(a.getBody(),"mce-edit-focus"))}function j(){return n?void(n.visible()||g()):(n=k.panel=m.create({type:p?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!p,border:1,items:[l.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c()]}),a.fire("BeforeRenderUI"),n.renderTo(p||document.body).reflow(),e(n),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",i),void a.nodeChanged())}var n,p;return l.fixed_toolbar_container&&(p=o.select(l.fixed_toolbar_container)[0]),l.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,j,j):j()}),a.on("blur hide",i),a.on("remove",function(){n&&(n.remove(),n=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss),{}}function j(b){var g,i,j;return b.skinUiCss&&tinymce.DOM.loadCSS(b.skinUiCss),g=k.panel=m.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[l.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),l.resize!==!1&&(i={type:"resizehandle",direction:l.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;j={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==l.resize?f(j.width+a.deltaX,j.height+a.deltaY):f(null,j.height+a.deltaY)}}),l.statusbar!==!1&&g.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath"},i]}),l.readonly&&g.find("*").disabled(!0),a.fire("BeforeRenderUI"),g.renderBefore(b.targetNode).reflow(),l.width&&tinymce.DOM.setStyle(g.getEl(),"width",l.width),a.on("remove",function(){g.remove(),g=null}),e(g),h(),{iframeContainer:g.find("#iframe")[0].getEl(),editorContainer:g.getEl()}}var k=this,l=a.settings,m=tinymce.ui.Factory,n=tinymce.each,o=tinymce.DOM,p=tinymce.ui.Rect,q=tinymce.ui.FloatPanel,r={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},s="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";k.renderUI=function(b){var c=l.skin!==!1?l.skin||"lightgray":!1;if(c){var d=l.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,b.skinUiCss=tinymce.Env.documentMode<=7?d+"/skin.ie7.min.css":d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){k.throbber=k.throbber||new tinymce.ui.Throbber(k.panel.getEl("body")),a.state?k.throbber.show(a.time):k.throbber.hide()}),l.inline?i(b):j(b)},k.resizeTo=f,k.resizeBy=g}); \ No newline at end of file +tinymce.ThemeManager.add("modern",function(a){function b(b,c){var d,e=[];if(b)return o(b.split(/[ ,]/),function(b){function f(){function c(a){return function(c,d){for(var e,f=d.parents.length;f--&&(e=d.parents[f].nodeName,"OL"!=e&&"UL"!=e););b.active(c&&e==a)}}var d=a.selection;"bullist"==g&&d.selectorChanged("ul > li",c("UL")),"numlist"==g&&d.selectorChanged("ol > li",c("OL")),b.settings.stateSelector&&d.selectorChanged(b.settings.stateSelector,function(a){b.active(a)},!0),b.settings.disabledStateSelector&&d.selectorChanged(b.settings.disabledStateSelector,function(a){b.disabled(a)})}var g;"|"==b?d=null:n.has(b)?(b={type:b,size:c},e.push(b),d=null):(d||(d={type:"buttongroup",items:[]},e.push(d)),a.buttons[b]&&(g=b,b=a.buttons[g],"function"==typeof b&&(b=b()),b.type=b.type||"button",b.size=c,b=n.create(b),d.items.push(b),a.initialized?f():a.on("init",f)))}),{type:"toolbar",layout:"flow",items:e}}function c(a){function c(c){return c?(d.push(b(c,a)),!0):void 0}var d=[];if(tinymce.isArray(m.toolbar)){if(0===m.toolbar.length)return;tinymce.each(m.toolbar,function(a,b){m["toolbar"+(b+1)]=a}),delete m.toolbar}for(var e=1;10>e&&c(m["toolbar"+e]);e++);return d.length||m.toolbar===!1||c(m.toolbar||t),d.length?{type:"panel",layout:"stack",classes:"toolbar-grp",ariaRoot:!0,ariaRemember:!0,items:d}:void 0}function d(){function b(b){var c;return"|"==b?{text:"|"}:c=a.menuItems[b]}function c(c){var d,e,f,g,h;if(h=tinymce.makeMap((m.removed_menuitems||"").split(/[ ,]/)),m.menu?(e=m.menu[c],g=!0):e=s[c],e){d={text:e.title},f=[],o((e.items||"").split(/[ ,]/),function(a){var c=b(a);c&&!h[a]&&f.push(b(a))}),g||o(a.menuItems,function(a){a.context==c&&("before"==a.separator&&f.push({text:"|"}),a.prependToContext?f.unshift(a):f.push(a),"after"==a.separator&&f.push({text:"|"}))});for(var i=0;i=0;d--)for(e=g.length-1;e>=0;e--)if(g[e].predicate(f[d]))return{toolbar:g[e],element:f[d]};return null}var t;a.on("click keyup setContent",function(b){("setcontent"!=b.type||b.selection)&&tinymce.util.Delay.setEditorTimeout(a,function(){var b;b=s(a.selection.getNode()),b?(r(),p(b)):r()})}),a.on("blur hide",r),a.on("ObjectResizeStart",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.hide()}),a.on("nodeChange ResizeEditor ResizeWindow",k),a.on("remove",function(){tinymce.each(c(),function(a){a.panel&&a.panel.remove()}),a.contextToolbars={}}),a.shortcuts.add("ctrl+shift+e > ctrl+shift+p","",function(){var b=s(a.selection.getNode());b&&b.toolbar.panel&&b.toolbar.panel.items()[0].focus()})}function i(a){return function(){a.initialized?a.fire("SkinLoaded"):a.on("init",function(){a.fire("SkinLoaded")})}}function j(b){function f(){if(o&&o.moveRel&&o.visible()&&!o._fixed){var b=a.selection.getScrollContainer(),c=a.getBody(),d=0,e=0;if(b){var f=p.getPos(c),g=p.getPos(b);d=Math.max(0,g.x-f.x),e=Math.max(0,g.y-f.y)}o.fixed(!1).moveRel(c,a.rtl?["tr-br","br-tr"]:["tl-bl","bl-tl","tr-br"]).moveBy(d,e)}}function g(){o&&(o.show(),f(),p.addClass(a.getBody(),"mce-edit-focus"))}function j(){o&&(o.hide(),r.hideAll(),p.removeClass(a.getBody(),"mce-edit-focus"))}function k(){return o?void(o.visible()||g()):(o=l.panel=n.create({type:q?"panel":"floatpanel",role:"application",classes:"tinymce tinymce-inline",layout:"flex",direction:"column",align:"stretch",autohide:!1,autofix:!0,fixed:!!q,border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size)]}),a.fire("BeforeRenderUI"),o.renderTo(q||document.body).reflow(),e(o),g(),h(),a.on("nodeChange",f),a.on("activate",g),a.on("deactivate",j),void a.nodeChanged())}var o,q;return m.fixed_toolbar_container&&(q=p.select(m.fixed_toolbar_container)[0]),m.content_editable=!0,a.on("focus",function(){b.skinUiCss?tinymce.DOM.styleSheetLoader.load(b.skinUiCss,k,k):k()}),a.on("blur hide",j),a.on("remove",function(){o&&(o.remove(),o=null)}),b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),{}}function k(b){function g(){return function(a){"readonly"==a.mode?j.find("*").disabled(!0):j.find("*").disabled(!1)}}var j,k,o;return b.skinUiCss&&tinymce.DOM.styleSheetLoader.load(b.skinUiCss,i(a)),j=l.panel=n.create({type:"panel",role:"application",classes:"tinymce",style:"visibility: hidden",layout:"stack",border:1,items:[m.menubar===!1?null:{type:"menubar",border:"0 0 1 0",items:d()},c(m.toolbar_items_size),{type:"panel",name:"iframe",layout:"stack",classes:"edit-area",html:"",border:"1 0 0 0"}]}),m.resize!==!1&&(k={type:"resizehandle",direction:m.resize,onResizeStart:function(){var b=a.getContentAreaContainer().firstChild;o={width:b.clientWidth,height:b.clientHeight}},onResize:function(a){"both"==m.resize?f(o.width+a.deltaX,o.height+a.deltaY):f(null,o.height+a.deltaY)}}),m.statusbar!==!1&&j.add({type:"panel",name:"statusbar",classes:"statusbar",layout:"flow",border:"1 0 0 0",ariaRoot:!0,items:[{type:"elementpath",editor:a},k]}),a.fire("BeforeRenderUI"),a.on("SwitchMode",g()),j.renderBefore(b.targetNode).reflow(),m.readonly&&a.setMode("readonly"),m.width&&tinymce.DOM.setStyle(j.getEl(),"width",m.width),a.on("remove",function(){j.remove(),j=null}),e(j),h(),{iframeContainer:j.find("#iframe")[0].getEl(),editorContainer:j.getEl()}}var l=this,m=a.settings,n=tinymce.ui.Factory,o=tinymce.each,p=tinymce.DOM,q=tinymce.geom.Rect,r=tinymce.ui.FloatPanel,s={file:{title:"File",items:"newdocument"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall"},insert:{title:"Insert",items:"|"},view:{title:"View",items:"visualaid |"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript | formats | removeformat"},table:{title:"Table"},tools:{title:"Tools"}},t="undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image";l.renderUI=function(b){var c=m.skin!==!1?m.skin||"lightgray":!1;if(c){var d=m.skin_url;d=d?a.documentBaseURI.toAbsolute(d):tinymce.baseURL+"/skins/"+c,tinymce.Env.documentMode<=7?b.skinUiCss=d+"/skin.ie7.min.css":b.skinUiCss=d+"/skin.min.css",a.contentCSS.push(d+"/content"+(a.inline?".inline":"")+".min.css")}return a.on("ProgressState",function(a){l.throbber=l.throbber||new tinymce.ui.Throbber(l.panel.getEl("body")),a.state?l.throbber.show(a.time):l.throbber.hide()}),m.inline?j(b):k(b)},l.resizeTo=f,l.resizeBy=g}); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/tinymce/tinymce.min.js b/copy_this/modules/bla/bla-tinymce/tinymce/tinymce.min.js index dded14b..ddd85f7 100644 --- a/copy_this/modules/bla/bla-tinymce/tinymce/tinymce.min.js +++ b/copy_this/modules/bla/bla-tinymce/tinymce/tinymce.min.js @@ -1,12 +1,13 @@ -// 4.2.2 (2015-07-22) -!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;ir;r++)if(o=n[r],o&&o.func.call(o.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var a=this,s={},l,c,u,d,f;c=o+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},l=1,a.domLoaded=!1,a.events=s,a.bind=function(t,o,h,p){function m(e){i(n(e||_.event),g)}var g,v,y,b,x,C,w,_=window;if(t&&3!==t.nodeType&&8!==t.nodeType){for(t[c]?g=t[c]:(g=l++,t[c]=g,s[g]={}),p=p||t,o=o.split(" "),y=o.length;y--;)b=o[y],C=m,x=w=!1,"DOMContentLoaded"===b&&(b="ready"),a.domLoaded&&"ready"===b&&"complete"==t.readyState?h.call(p,n({type:b})):(d||(x=f[b],x&&(C=function(e){var t,r;if(t=e.currentTarget,r=e.relatedTarget,r&&t.contains)r=t.contains(r);else for(;r&&r!==t;)r=r.parentNode;r||(e=n(e||_.event),e.type="mouseout"===e.type?"mouseleave":"mouseenter",e.target=t,i(e,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,x="focusin"===b?"focus":"blur",C=function(e){e=n(e||_.event),e.type="focus"===e.type?"focusin":"focusout",i(e,g)}),v=s[g][b],v?"ready"===b&&a.domLoaded?h({type:b}):v.push({func:h,scope:p}):(s[g][b]=v=[{func:h,scope:p}],v.fakeName=x,v.capture=w,v.nativeHandler=C,"ready"===b?r(t,C,a):e(t,x||b,C,w)));return t=v=0,h}},a.unbind=function(e,n,r){var i,o,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return a;if(i=e[c]){if(f=s[i],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],o=f[d]){if(r)for(u=o.length;u--;)if(o[u].func===r){var h=o.nativeHandler,p=o.fakeName,m=o.capture;o=o.slice(0,u).concat(o.slice(u+1)),o.nativeHandler=h,o.fakeName=p,o.capture=m,f[d]=o}r&&0!==o.length||(delete f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture))}}else{for(d in f)o=f[d],t(e,o.fakeName||d,o.nativeHandler,o.capture);f={}}for(d in f)return a;delete s[i];try{delete e[c]}catch(g){e[c]=null}}return a},a.fire=function(e,t,r){var o;if(!e||3===e.nodeType||8===e.nodeType)return a;r=n(null,r),r.type=t,r.target=e;do o=e[c],o&&i(r,o),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow;while(e&&!r.isPropagationStopped());return a},a.clean=function(e){var t,n,r=a.unbind;if(!e||3===e.nodeType||8===e.nodeType)return a;if(e[c]&&r(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(r(e),n=e.getElementsByTagName("*"),t=n.length;t--;)e=n[t],e[c]&&r(e);return a},a.destroy=function(){s={}},a.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var o="mce-data-",a=/^(?:mouse|contextmenu)|click/,s={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1};return i.Event=new i,i.Event.bind(window,"ready",function(){}),i}),r(c,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(M&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&C.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(C.qsa&&(!H||!H.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=N(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||Y)-(~e.sourceIndex||Y);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==K&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=V++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[W,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===W&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(!n||n(o,r,i))&&(a.push(o),c&&t.push(s));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),x=W+=null==y?1:Math.random()||.1,C=b.length;for(c&&(T=a!==D&&a);p!==C&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(W=x)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(W=x,T=y),m};return i?r(a):a}var x,C,w,_,E,N,S,k,T,R,A,B,D,L,M,H,P,O,I,F="sizzle"+-new Date,z=window.document,W=0,V=0,U=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},K=typeof t,Y=1<<31,G={}.hasOwnProperty,X=[],J=X.pop,Q=X.push,Z=X.push,ee=X.slice,te=X.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,xe=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),Ce=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(X=ee.call(z.childNodes),z.childNodes),X[z.childNodes.length].nodeType}catch(we){Z={apply:X.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}C=e.support={},E=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){var t,n=e?e.ownerDocument||e:z,r=n.defaultView;return n!==D&&9===n.nodeType&&n.documentElement?(D=n,L=n.documentElement,M=!E(n),r&&r!==r.top&&(r.addEventListener?r.addEventListener("unload",function(){B()},!1):r.attachEvent&&r.attachEvent("onunload",function(){B()})),C.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),C.getElementsByTagName=i(function(e){return e.appendChild(n.createComment("")),!e.getElementsByTagName("*").length}),C.getElementsByClassName=ge.test(n.getElementsByClassName),C.getById=i(function(e){return L.appendChild(e).id=F,!n.getElementsByName||!n.getElementsByName(F).length}),C.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==K&&M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(xe,Ce);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(xe,Ce);return function(e){var n=typeof e.getAttributeNode!==K&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=C.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==K?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=C.getElementsByClassName&&function(e,t){return M?t.getElementsByClassName(e):void 0},P=[],H=[],(C.qsa=ge.test(n.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&H.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||H.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||H.push(":checked")}),i(function(e){var t=n.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&H.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||H.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),H.push(",.*:")})),(C.matchesSelector=ge.test(O=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){C.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),P.push("!=",ae)}),H=H.length&&new RegExp(H.join("|")),P=P.length&&new RegExp(P.join("|")),t=ge.test(L.compareDocumentPosition),I=t||ge.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return A=!0,0;var r=!e.compareDocumentPosition-!t.compareDocumentPosition;return r?r:(r=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&r||!C.sortDetached&&t.compareDocumentPosition(e)===r?e===n||e.ownerDocument===z&&I(z,e)?-1:t===n||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&r?-1:1)}:function(e,t){if(e===t)return A=!0,0;var r,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===n?-1:t===n?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(r=e;r=r.parentNode;)l.unshift(r);for(r=t;r=r.parentNode;)c.unshift(r);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},n):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),!(!C.matchesSelector||!M||P&&P.test(n)||H&&H.test(n)))try{var r=O.call(t,n);if(r||C.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&G.call(w.attrHandle,n.toLowerCase())?r(e,n,!M):t;return i!==t?i:C.attributes||!M?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!C.detectDuplicates,R=!C.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},_=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=_(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=_(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(xe,Ce),e[3]=(e[3]||e[4]||e[5]||"").replace(xe,Ce),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=N(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(xe,Ce).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==K&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===W&&c[1],f=c[0]===W&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[W,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===W)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[W,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(xe,Ce),function(t){return(t.textContent||t.innerText||_(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(xe,Ce).toLowerCase(),function(e){var n;do if(n=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===L},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=o[0]).type&&C.getById&&9===t.nodeType&&M&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(xe,Ce),t)||[])[0],!t)return n;c&&(t=t.parentNode),e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(xe,Ce),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!M,n,ye.test(e)&&u(t.parentNode)||t),n},C.sortStable=F.split("").sort(j).join("")===F,C.detectDuplicates=!!A,B(),C.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),C.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(u,[],function(){var e=navigator,t=e.userAgent,n,r,i,o,a,s,l,c,u,d;n=window.opera&&window.opera.buildNumber,u=/Android/.test(t),r=/WebKit/.test(t),i=!r&&!n&&/MSIE/gi.test(t)&&/Explorer/gi.test(e.appName),i=i&&/MSIE (\w+)\./.exec(t)[1],o=-1==t.indexOf("Trident/")||-1==t.indexOf("rv:")&&-1==e.appName.indexOf("Netscape")?!1:11,a=!document.msElementsFromPoint||i||o?!1:12,i=i||o||a,s=!r&&!o&&/Gecko/.test(t),l=-1!=t.indexOf("Mac"),c=/(iPad|iPhone)/.test(t),d="FormData"in window&&"FileReader"in window&&"URL"in window&&!!URL.createObjectURL,a&&(r=!1);var f=!c||d||t.match(/AppleWebKit\/(\d*)/)[1]>=534;return{opera:n,webkit:r,ie:i,gecko:s,mac:l,iOS:c,android:u,contentEditable:f,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=i,range:window.getSelection&&"Range"in window,documentMode:i&&!a?document.documentMode||7:10,fileApi:d}}),r(d,[u],function(e){function n(e){return null===e||e===t?"":(""+e).replace(y,"")}function r(e,n){return n?"array"==n&&b(e)?!0:typeof e==n:e!==t}function i(e){var t=e,n,r;if(!b(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function s(e,t){var n=[];return a(e,function(e){n.push(t(e))}),n}function l(e,t){var n=[];return a(e,function(e){(!t||t(e))&&n.push(e)}),n}function c(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function u(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function d(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function f(e,t,n,r){r=r||this,e&&(n&&(e=e[n]),a(e,function(e,i){return t.call(r,e,i,n)===!1?!1:void f(e,t,n,r)}))}function h(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function m(e,t){return!e||r(e,"array")?e:s(e.split(t||","),n)}function g(e){return function(){return e}}function v(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var y=/^\s*|\s*$/g,b=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{trim:n,isArray:b,is:r,toArray:i,makeMap:o,each:a,map:s,grep:l,filter:l,inArray:u,extend:d,create:c,walk:f,createNS:h,resolve:p,explode:m,constant:g,_addCacheSuffix:v}}),r(f,[l,c,d,u],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;ii&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function x(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function C(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,_=Array.prototype.push,E=Array.prototype.slice,N=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),R=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),A={"for":"htmlFor","class":"className",readonly:"readOnly"},B={"float":"cssFloat"},D={},L={},M=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"", -context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:N.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)_.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;it;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:_,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return x(e,"nextSibling",1)},prev:function(e){return x(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(i=f.unique(i),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),(0===e.indexOf("parents")||"prevUntil"===e)&&(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(C(D,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),C(D,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(B["float"]="styleFloat",C(L,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=D,f.cssHooks=L,f}),r(h,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return x&&(n=x.call(C,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,x=e.url_converter,C=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":("color"===v||"background-color"===v)&&(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],n&&n[e]?!1:!0)}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(!f||r(o,t))&&(i+=(i.length>0?" ":"")+o+": "+a+";");return i}}}}),r(p,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}var r=e;this.current=function(){return r},this.next=function(e){return r=n(r,"firstChild","nextSibling",e)},this.prev=function(e){return r=n(r,"lastChild","previousSibling",e)}}}),r(m,[d],function(e){function t(n){function r(){return H.createDocumentFragment()}function i(e,t){_(F,e,t)}function o(e,t){_(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[U]=M[V],M[$]=M[W]):(M[V]=M[U],M[W]=M[$]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=M[V],r=M[W],i=M[U],o=M[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){E(I)}function m(){return E(P)}function g(){return E(O)}function v(e){var t=this[V],r=this[W],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return q(new t(n),{startContainer:M[V],startOffset:M[W],endContainer:M[U],endOffset:M[$],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function x(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function C(){return M[V]==M[U]&&M[W]==M[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function _(e,t,r){var i,o;for(e?(M[V]=t,M[W]=r):(M[U]=t,M[$]=r),i=M[U];i.parentNode;)i=i.parentNode;for(o=M[V];o.parentNode;)o=o.parentNode;o==i?w(M[V],M[W],M[U],M[$])>0&&M.collapse(e):M.collapse(e),M.collapsed=C(),M.commonAncestorContainer=n.findCommonAncestor(M[V],M[U])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[V]==M[U])return N(e);for(t=M[U],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return S(t,e);++n}for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[U])return k(t,e);++r}for(o=r-n,a=M[V];o>0;)a=a.parentNode,o--;for(s=M[U];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function N(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[W]==M[$])return t;if(3==M[V].nodeType){if(n=M[V].nodeValue,i=n.substring(M[W],M[$]),e!=O&&(o=M[V],c=M[W],u=M[$]-M[W],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(H.createTextNode(i)),t}for(o=x(M[V],M[W]),a=M[$]-M[W];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&M.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[W],0>=a)return t!=O&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(M.setEndBefore(e),M.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(M.setStartAfter(e),M.collapse(F)),o}function R(e,t){var n=x(M[U],M[$]-1),r,i,o,a,s,l=n!=M[U];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=x(M[V],M[W]),r=n!=M[V],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[W],a=o.substring(l),s=o.substring(0,l)):(l=M[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var M=this,H=n.doc,P=0,O=1,I=2,F=!0,z=!1,W="startOffset",V="startContainer",U="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(M,{startContainer:H,startOffset:0,endContainer:H,endOffset:0,collapsed:F,commonAncestorContainer:H,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(g,[d],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(v,[d],function(e){return function(t,n){function r(e){t.getElementsByTagName("head")[0].appendChild(e)}function i(n,i,l){function c(){for(var e=y.passed,t=e.length;t--;)e[t]();y.status=2,y.passed=[],y.failed=[]}function u(){for(var e=y.failed,t=e.length;t--;)e[t]();y.status=3,y.passed=[],y.failed=[]}function d(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function f(e,t){e()||((new Date).getTime()-v0)return g=t.createElement("style"),g.textContent='@import "'+n+'"',p(),void r(g);h()}r(m),m.href=n}}var o=0,a={},s;n=n||{},s=n.maxLoadTime||5e3,this.load=i}}),r(y,[c,f,h,l,p,m,g,u,d,v],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!v||e.documentMode>=8,o.boxModel=!v||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var h=c.each,p=c.is,m=c.grep,g=c.trim,v=l.ie,y=/^([a-z0-9],?)+$/i,b=/^[ \t\r\n]*$/;return f.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(v&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!v||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),h(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),p(n,"string")&&(a=n,n="*"===n?function(e){return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(y.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=p(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&e.attr("data-mce-style",null)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=v?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&e.attr("data-mce-style",null)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){h(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==f.DOM&&n===document){var o=f.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,f.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==f.DOM&&n===document?void f.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void h(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),v&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),v?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="
              "+t,r.removeChild(r.firstChild)}catch(i){n("
              ").html("
              "+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("
              ").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return p(t,"array")&&(e=e.cloneNode(!0)),n&&h(m(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),h(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],h(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(v){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue} -return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!b.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:function(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n},split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=g(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.replaceChild(n,t):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},f.DOM=new f(document),f}),r(b,[y,d],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(x,[b,d],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(C,[d,p],function(e,t){function n(e,t){var n=e.childNodes;return t--,t>n.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function r(e){this.walk=function(t,r){function o(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function a(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function s(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function l(e,t,n){var i=n?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=a(g==e?g:g[i],i),y.length&&(n||y.reverse(),r(o(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td.mce-item-selected,th.mce-item-selected"),b.length>0)return void i(b,function(e){r([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=n(d,f)),c==d)return r(o([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return l(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return l(d,h);if(g===h)break}p=s(c,h)||c,m=s(d,h)||d,l(c,p,!0),y=a(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&r(o(y)),l(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return c=h,u=n?h.nodeValue.length:0,void(i=!0);if(e.isBlock(h)||p[h.nodeName.toLowerCase()])return;s=h}o&&s&&(c=s,i=!0,u=0)}var c,u,d,f=e.getRoot(),h,p,m,g;if(c=n[(r?"start":"end")+"Container"],u=n[(r?"start":"end")+"Offset"],g=1==c.nodeType&&u===c.childNodes.length,p=e.schema.getNonEmptyElements(),m=r,1==c.nodeType&&u>c.childNodes.length-1&&(m=!1),9===c.nodeType&&(c=e.getRoot(),u=0),c===f){if(m&&(h=c.childNodes[u>0?u-1:0],h&&(p[h.nodeName]||"TABLE"==h.nodeName)))return;if(c.hasChildNodes()&&(u=Math.min(!m&&u>0?u-1:u,c.childNodes.length-1),c=c.childNodes[u],u=0,c.hasChildNodes()&&!/TABLE/.test(c.nodeName))){h=c,d=new t(c,f);do{if(3===h.nodeType&&h.nodeValue.length>0){u=m?0:h.nodeValue.length,c=h,i=!0;break}if(p[h.nodeName.toLowerCase()]){u=e.nodeIndex(h),c=h.parentNode,"IMG"!=h.nodeName||m||u++,i=!0;break}}while(h=m?d.next():d.prev())}}o&&(3===c.nodeType&&0===u&&l(!0),1===c.nodeType&&(h=c.childNodes[u],h||(h=c.childNodes[u-1]),!h||"BR"!==h.nodeName||s(h,"A")||a(h)||a(h,!0)||l(!0,h))),m&&!o&&3===c.nodeType&&u===c.nodeValue.length&&l(!1),i&&n["set"+(r?"Start":"End")](c,u)}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}var i=e.each;return r.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},r.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r.collapse(t=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},r}),r(w,[C,u],function(e,t){return function(n){function r(e){var t,r;if(r=n.$(e).parentsUntil(n.getBody()).add(e),r.length===o.length){for(t=r.length;t>=0&&r[t]===o[t];t--);if(-1===t)return o=r,!0}return o=r,!1}var i,o=[];"onselectionchange"in n.getDoc()||n.on("NodeChange Click MouseUp KeyUp Focus",function(t){var r,o;r=n.selection.getRng(),o={startContainer:r.startContainer,startOffset:r.startOffset,endContainer:r.endContainer,endOffset:r.endOffset},"nodechange"!=t.type&&e.compareRanges(o,i)||n.fire("SelectionChange"),i=o}),n.on("contextmenu",function(){n.fire("SelectionChange")}),n.on("SelectionChange",function(){var e=n.selection.getStart(!0);(t.range||!n.selection.isCollapsed())&&!r(e)&&n.dom.isChildOf(e,n.getBody())&&n.nodeChanged({selectionChange:!0})}),n.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==n.selection.getNode().nodeName?setTimeout(function(){n.nodeChanged()},0):n.nodeChanged())}),this.nodeChanged=function(e){var t=n.selection,r,i,o;n.initialized&&t&&!n.settings.disable_nodechange&&!n.settings.readonly&&(o=n.getBody(),r=t.getStart()||o,r=r.ownerDocument!=n.getDoc()?n.getBody():r,"IMG"==r.nodeName&&t.isCollapsed()&&(r=r.parentNode),i=[],n.dom.getParent(r,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=r,e.parents=i,n.fire("NodeChange",e))}}}),r(_,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(E,[d],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;co;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,C,w,_,E,N,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,_=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],C=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(E in w)g[E]=w[E];v.push.apply(v,_)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],N=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:N}),c.defaultValue=N),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:N}),c.forcedValue=N),"<"===b&&(c.validValues=a(N,"?"))),T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p),l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,_=v),C&&(l.outputName=h,y[C]=l),T.test(h)?(l.pattern=d(h),x.push(l)):y[h]=l}}function h(e){y={},x=[],f(e),s(_,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],M[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i];a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(e){var n=/^([+\-]?)(\w+)\[([^\]]+)\]$/;e&&s(t(e,","),function(e){var r=n.exec(e),i,o;r&&(o=r[1],i=o?b[r[2]]:b[r[2]]={"#comment":{}},i=b[r[2]],s(t(r[3],"|"),function(e){"-"===o?(b[r[2]]=i=l({},b[r[2]]),delete i[e]):i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=x.length;n--;)if(t=x[n],t.pattern.test(e))return t}var v=this,y={},b={},x=[],C,w,_,E,N,S,k,T,R,A,B,D,L,M={},H={};e=e||{},_=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),C=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),E=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),N=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup",D),L=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){H[e]=new RegExp("]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(_,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),y.img.attributesDefault=[{name:"alt",value:""}],s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return C},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return L},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return N},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return E},v.getSpecialElements=function(){return H},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return M},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(N,[E,g,d],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in C?t:z(n||r||o||""),_&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(V[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(U.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,x,C,w,_,E,N,S,k,T,R,A,B,D,L,M,H,P,O,I,F=0,z=t.decode,W,V=n.makeMap("src,href,data,background,formaction,poster"),U=/((java|vb)script|mhtml):/i,$=/^data:/i;for(H=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),P=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,x=a.getShortEndedElements(),M=i.self_closing_elements||a.getSelfClosingElements(),C=a.getBoolAttrs(),_=i.validate,b=i.remove_internals,W=i.fix_self_closing,O=a.getSpecialElements();c=H.exec(e);){if(u0&&h[h.length-1].name===d&&o(d),!_||(E=a.getElementRule(d))){if(N=!0,_&&(T=E.attributes,R=E.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(N=!1),p=[],p.map={},k.replace(P,s)):(p=[],p.map={}),_&&!y){if(A=E.attributesRequired,B=E.attributesDefault,D=E.attributesForced,L=E.removeEmptyAttrs,L&&!p.length&&(N=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(N=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,H.lastIndex),H.lastIndex=u;continue}N=!1}}N&&l.start(d,p,w)}else N=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(N&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),N&&(g.length>0&&l.text(g,!0),l.end(d)),H.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?N&&l.end(d):h.push({name:d,valid:N}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(S,[_,E,N,d],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,x,C,w,_,E,N,S,k,T,R,A=[],B,D,L,M,H,P,O,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()), -O=l.getNonEmptyElements(),P=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,H=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=P[b.name],s&&P[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(N=p[a],N?N.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&H[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&H[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(N=d[S],x=h[S],_=x.length;_--;)x[_].parent||x.splice(_,1);for(C=0,w=N.length;w>C;C++)N[C](x,S,o)}for(C=0,w=f.length;w>C;C++)if(N=f[C],N.name in p){for(x=p[N.name],_=x.length;_--;)x[_].parent||x.splice(_,1);for(_=0,E=N.callbacks.length;E>_;_++)N.callbacks[_](x,N.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push(""),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push(""):r.push(""),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(T,[k,E],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1){for(f=[],f.map={},m=r.getElementRule(e.name),h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(R,[y,S,g,T,_,E,u,d],function(e,t,n,r,i,o,a,s){var l=s.each,c=s.trim,u=e.DOM;return function(e,i){var s,d,f;return i&&(s=i.dom,d=i.schema),s=s||u,d=d||new o(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,f=new t(e,d),f.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),f.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,l=e.url_converter,c=e.url_converter_scope,u;r--;)i=t[r],o=i.attributes.map[a],o!==u?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=s.serializeStyle(s.parseStyle(o),i.name):l&&(o=l.call(c,o,n,i.name)),i.attr(n,o.length>0?o:null))}),f.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),f.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),f.addNodeFilter("noscript",function(e){for(var t=e.length,r;t--;)r=e[t].firstChild,r&&(r.value=n.decode(r.value))}),f.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// ")):o.length>0&&(i.firstChild.value="")}),f.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),f.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&f.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,("ul"===r.name||"ol"===r.name)&&n.prev&&"li"===n.prev.name&&n.prev.append(n)}),f.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:d,addNodeFilter:f.addNodeFilter,addAttributeFilter:f.addAttributeFilter,serialize:function(t,n){var i=this,o,u,h,p,m;return a.ie&&s.select("script,style,select,map").length>0?(m=t.innerHTML,t=t.cloneNode(!1),s.setHTML(t,m)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(u=o.createHTMLDocument(""),l("BODY"==t.nodeName?t.childNodes:[t],function(e){u.body.appendChild(u.importNode(e,!0))}),t="BODY"!=t.nodeName?u.body.firstChild:u.body,h=s.doc,s.doc=u),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,i.onPreProcess(n)),p=new r(e,d),n.content=p.serialize(f.parse(c(n.getInner?t.innerHTML:s.getOuterHTML(t)),n)),n.cleanup||(n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||i.onPostProcess(n),h&&(s.doc=h),n.node=null,n.content},addRules:function(e){d.addValidElements(e)},setRules:function(e){d.setValidElements(e)},onPreProcess:function(e){i&&i.fire("PreProcess",e)},onPostProcess:function(e){i&&i.fire("PostProcess",e)}}}}),r(A,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),(t==f||t==f.documentElement)&&(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(B,[u],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(D,[B,d,u],function(e,t,n){return function(r,i){function o(e){var t=i.settings.object_resizing;return t===!1||n.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:i.dom.is(e,t))}function a(t){var n,r,o,a,s;n=t.screenX-T,r=t.screenY-R,P=n*S[2]+D,O=r*S[3]+L,P=5>P?5:P,O=5>O?5:O,o="IMG"==w.nodeName&&i.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==w.nodeName&&S[2]*S[3]!==0,o&&(W(n)>W(r)?(O=V(P*M),P=V(O/M)):(P=V(O/M),O=V(P*M))),x.setStyles(_,{width:P,height:O}),a=S.startPos.x+n,s=S.startPos.y+r,a=a>0?a:0,s=s>0?s:0,x.setStyles(E,{left:a,top:s,display:"block"}),E.innerHTML=P+" × "+O,S[2]<0&&_.clientWidth<=P&&x.setStyle(_,"left",A+(D-P)),S[3]<0&&_.clientHeight<=O&&x.setStyle(_,"top",B+(L-O)),n=U.scrollWidth-$,r=U.scrollHeight-q,n+r!==0&&x.setStyles(E,{left:a-n,top:s-r}),H||(i.fire("ObjectResizeStart",{target:w,width:D,height:L}),H=!0)}function s(){function e(e,t){t&&(w.style[e]||!i.schema.isValid(w.nodeName.toLowerCase(),e)?x.setStyle(w,e,t):x.setAttrib(w,e,t))}H=!1,e("width",P),e("height",O),x.unbind(I,"mousemove",a),x.unbind(I,"mouseup",s),F!=I&&(x.unbind(F,"mousemove",a),x.unbind(F,"mouseup",s)),x.remove(_),x.remove(E),z&&"TABLE"!=w.nodeName||l(w),i.fire("ObjectResized",{target:w,width:P,height:O}),x.setAttrib(w,"style",x.getAttrib(w,"style")),i.nodeChanged()}function l(e,t,r){var l,u,d,f,h;g(),l=x.getPos(e,U),A=l.x,B=l.y,h=e.getBoundingClientRect(),u=h.width||h.right-h.left,d=h.height||h.bottom-h.top,w!=e&&(m(),w=e,P=O=0),f=i.fire("ObjectSelected",{target:e}),o(e)&&!f.isDefaultPrevented()?C(N,function(e,i){function o(t){T=t.screenX,R=t.screenY,D=w.clientWidth,L=w.clientHeight,M=L/D,S=e,e.startPos={x:u*e[0]+A,y:d*e[1]+B},$=U.scrollWidth,q=U.scrollHeight,_=w.cloneNode(!0),x.addClass(_,"mce-clonedresizable"),x.setAttrib(_,"data-mce-bogus","all"),_.contentEditable=!1,_.unSelectabe=!0,x.setStyles(_,{left:A,top:B,margin:0}),_.removeAttribute("data-mce-selected"),U.appendChild(_),x.bind(I,"mousemove",a),x.bind(I,"mouseup",s),F!=I&&(x.bind(F,"mousemove",a),x.bind(F,"mouseup",s)),E=x.add(U,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},D+" × "+L)}var l;return t?void(i==t&&o(r)):(l=x.get("mceResizeHandle"+i),l&&x.remove(l),l=x.add(U,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),n.ie&&(l.contentEditable=!1),x.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),o(e)}),e.elm=l,void x.setStyles(l,{left:u*e[0]+A-l.offsetWidth/2,top:d*e[1]+B-l.offsetHeight/2}))}):c(),w.setAttribute("data-mce-selected","1")}function c(){var e,t;g(),w&&w.removeAttribute("data-mce-selected");for(e in N)t=x.get("mceResizeHandle"+e),t&&(x.unbind(t),x.remove(t))}function u(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,o;if(!H&&!i.removed)return C(x.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),o="mousedown"==e.type?e.target:r.getNode(),o=x.$(o).closest(z?"table":"table,img,hr")[0],t(o,U)&&(v(),n=r.getStart(!0),t(n,o)&&t(r.getEnd(!0),o)&&(!z||o!=n&&"IMG"!==n.nodeName))?void l(o):void c()}function d(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function f(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function h(e){var t=e.srcElement,n,r,o,a,s,c,u;n=t.getBoundingClientRect(),c=k.clientX-n.left,u=k.clientY-n.top;for(r in N)if(o=N[r],a=t.offsetWidth*o[0],s=t.offsetHeight*o[1],W(a-c)<8&&W(s-u)<8){S=o;break}H=!0,i.fire("ObjectResizeStart",{target:w,width:w.clientWidth,height:w.clientHeight}),i.getDoc().selection.empty(),l(t,r,k)}function p(e){var t=e.srcElement;if(t!=w){if(i.fire("ObjectSelected",{target:t}),m(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);("IMG"==t.nodeName||"TABLE"==t.nodeName)&&(c(),w=t,d(t,"resizestart",h))}}function m(){f(w,"resizestart",h)}function g(){for(var e in N){var t=N[e];t.elm&&(x.unbind(t.elm),delete t.elm)}}function v(){try{i.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function y(e){var t;if(z){t=I.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function b(){w=_=null,z&&(m(),f(U,"controlselect",p))}var x=i.dom,C=t.each,w,_,E,N,S,k,T,R,A,B,D,L,M,H,P,O,I=i.getDoc(),F=document,z=n.ie&&n.ie<11,W=Math.abs,V=Math.round,U=i.getBody(),$,q;N={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var j=".mce-content-body";return i.contentStyles.push(j+" div.mce-resizehandle {position: absolute;border: 1px solid black;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+j+" .mce-resizehandle:hover {background: #000}"+j+" img[data-mce-selected], hr[data-mce-selected] {outline: 1px solid black;resize: none}"+j+" .mce-clonedresizable {position: absolute;"+(n.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+j+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),i.on("init",function(){z?(i.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(c(),y(e.target))}),d(U,"controlselect",p),i.on("mousedown",function(e){k=e})):(v(),n.ie>=11&&(i.on("mouseup",function(e){var t=e.target.nodeName;!H&&/^(TABLE|IMG|HR)$/.test(t)&&(i.selection.select(e.target,"TABLE"==t),i.nodeChanged())}),i.dom.bind(U,"mscontrolselect",function(e){/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&window.setTimeout(function(){i.selection.select(e.target)},0))}))),i.on("nodechange ResizeEditor ResizeWindow",function(e){window.requestAnimationFrame?window.requestAnimationFrame(function(){u(e)}):u(e)}),i.on("keydown keyup",function(e){w&&"TABLE"==w.nodeName&&u(e)}),i.on("hide",c)}),i.on("remove",g),{isResizable:o,showResizeRect:l,hideResizeRect:c,updateResizeRect:u,controlSelect:y,destroy:b}}}),r(L,[u,d],function(e,t){function n(n){var r=n.dom;this.getBookmark=function(e,i){function o(e,n){var i=0;return t.each(r.select(e),function(e,t){e==n&&(i=t)}),i}function a(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function s(){function e(e,t){var n=e[t?"startContainer":"endContainer"],a=e[t?"startOffset":"endOffset"],s=[],l,c,u=0;if(3==n.nodeType){if(i)for(l=n.previousSibling;l&&3==l.nodeType;l=l.previousSibling)a+=l.nodeValue.length;s.push(a)}else c=n.childNodes,a>=c.length&&c.length&&(u=1,a=Math.max(0,c.length-1)),s.push(r.nodeIndex(c[a],i)+u);for(;n&&n!=o;n=n.parentNode)s.push(r.nodeIndex(n,i));return s}var t=n.getRng(!0),o=r.getRoot(),a={};return a.start=e(t,!0),n.isCollapsed()||(a.end=e(t)),a}var l,c,u,d,f,h,p="",m;if(2==e)return h=n.getNode(),f=h?h.nodeName:null,"IMG"==f?{name:f,index:o(f,h)}:n.tridentSel?n.tridentSel.getBookmark(e):s();if(e)return{rng:n.getRng()};if(l=n.getRng(),u=r.uniqueId(),d=n.isCollapsed(),m="overflow:hidden;line-height:0px",l.duplicate||l.item){if(l.item)return h=l.item(0),f=h.nodeName,{name:f,index:o(f,h)};c=l.duplicate();try{l.collapse(),l.pasteHTML(''+p+""),d||(c.collapse(!1),l.moveToElementText(c.parentElement()),0===l.compareEndPoints("StartToEnd",c)&&c.move("character",-1),c.pasteHTML(''+p+""))}catch(g){return null}}else{if(h=n.getNode(),f=h.nodeName,"IMG"==f)return{name:f,index:o(f,h)};c=a(l.cloneRange()),d||(c.collapse(!1),c.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_end",style:m},p))),l=a(l),l.collapse(!0),l.insertNode(r.create("span",{"data-mce-type":"bookmark",id:u+"_start",style:m},p))}return n.moveToBookmark({id:u,keep:1}),{id:u}},this.moveToBookmark=function(i){function o(e){var t=i[e?"start":"end"],n,r,o,a;if(t){for(o=t[0],r=c,n=t.length-1;n>=1;n--){if(a=r.childNodes,t[n]>a.length-1)return;r=a[t[n]]}3===r.nodeType&&(o=Math.min(t[0],r.nodeValue.length)),1===r.nodeType&&(o=Math.min(t[0],r.childNodes.length)),e?l.setStart(r,o):l.setEnd(r,o)}return!0}function a(n){var o=r.get(i.id+"_"+n),a,s,l,c,p=i.keep;if(o&&(a=o.parentNode,"start"==n?(p?(a=o.firstChild,s=1):s=r.nodeIndex(o),u=d=a,f=h=s):(p?(a=o.firstChild,s=1):s=r.nodeIndex(o),d=a,h=s),!p)){for(c=o.previousSibling,l=o.nextSibling,t.each(t.grep(o.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});o=r.get(i.id+"_"+n);)r.remove(o,1);c&&l&&c.nodeType==l.nodeType&&3==c.nodeType&&!e.opera&&(s=c.nodeValue.length,c.appendData(l.nodeValue),r.remove(l),"start"==n?(u=d=c,f=h=s):(d=c,h=s))}}function s(t){return!r.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='
              '),t}var l,c,u,d,f,h;if(i)if(i.start){if(l=r.createRng(),c=r.getRoot(),n.tridentSel)return n.tridentSel.moveToBookmark(i);o(!0)&&o()&&n.setRng(l)}else i.id?(a("start"),a("end"),u&&(l=r.createRng(),l.setStart(s(u),f),l.setEnd(s(d),h),n.setRng(l))):i.name?n.select(r.select(i.name)[i.index]):i.rng&&n.setRng(i.rng)}}return n.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},n}),r(M,[p,A,D,C,L,u,d],function(e,n,r,i,o,a,s){function l(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var c=s.each,u=s.trim,d=a.ie;return l.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
              "+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,e=t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a=n.win.document,s;if(!e&&n.lastFocusBookmark){var l=n.lastFocusBookmark;return l.startContainer?(i=a.createRange(),i.setStart(l.startContainer,l.startOffset),i.setEnd(l.endContainer,l.endOffset)):i=l,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(c){}if(d&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(c){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i;if(e)if(e.select)try{e.select()}catch(o){}else if(n.tridentSel){if(e.cloneRange)try{return void n.tridentSel.addRange(e)}catch(o){}}else{if(r=n.getSel()){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(o){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}!e.collapsed&&e.startContainer==e.endContainer&&r.setBaseAndExtent&&e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,l=t.dom.getRoot();return n?n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return a.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};c(n.selectorChangedData,function(e,t){c(o,function(n){return i.is(n,t)?(r[t]||(c(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),c(r,function(e,n){a[n]||(delete r[n],c(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e){function t(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var n,r,i=this,o=i.dom,a=o.getRoot(),s,l;if("BODY"!=a.nodeName){var c=i.getScrollContainer();if(c)return n=t(e).y-t(c).y,l=c.clientHeight,s=c.scrollTop,void((s>n||n+25>s+l)&&(c.scrollTop=s>n?n:n-l+25))}r=o.getViewPort(i.editor.getWin()),n=o.getPos(e).y,s=r.y,l=r.h,(ns+l)&&i.editor.getWin().scrollTo(0,s>n?n:n-l+25)},placeCaretAt:function(e,t){var n=this.editor.getDoc(),r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r.collapse(t=e;e++)a.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);a.addShortcut("access+7","",["FormatBlock",!1,"p"]),a.addShortcut("access+8","",["FormatBlock",!1,"div"]),a.addShortcut("access+9","",["FormatBlock",!1,"address"])}function p(e){return e?$[e]:$}function m(e,t){e&&("string"!=typeof e?le(e,function(e,t){m(t,e)}):(t=t.length?t:[t],le(t,function(e){e.deep===re&&(e.deep=!e.selector),e.split===re&&(e.split=!e.selector||e.inline),e.remove===re&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),$[e]=t))}function g(e){return e&&$[e]&&delete $[e],$}function v(e){var t;return a.dom.getParent(e,function(e){return t=a.dom.getStyle(e,"text-decoration"),t&&"none"!==t}),t}function y(e){var t;1===e.nodeType&&e.parentNode&&1===e.parentNode.nodeType&&(t=v(e.parentNode),a.dom.getStyle(e,"color")&&t?a.dom.setStyle(e,"text-decoration",t):a.dom.getStyle(e,"text-decoration")===t&&a.dom.setStyle(e,"text-decoration",null))}function b(t,n,r){function i(e,t){if(t=t||u,e){if(t.onformat&&t.onformat(e,t,n,r),le(t.styles,function(t,r){q.setStyle(e,r,D(t,n))}),t.styles){var i=q.getAttrib(e,"style");i&&e.setAttribute("data-mce-style",i)}le(t.attributes,function(t,r){q.setAttrib(e,r,D(t,n))}),le(t.classes,function(t){t=D(t,n),q.hasClass(e,t)||q.addClass(e,t)})}}function o(){function t(t,n){var i=new e(n);for(r=i.current();r;r=i.prev())if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}var n=a.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var s=t(i,o),l=3==s.nodeType?s.length:s.childNodes.length;n.setEnd(s,l)}return n}function l(e,r,o){var a=[],l,f,h=!0;l=u.inline||u.block,f=q.create(l),i(f),K.walk(e,function(e){function r(e){var g,v,y,b,x;return x=h,g=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ie(e)&&(x=h,h="true"===ie(e),b=!0),R(g,"br")?(p=0,void(u.block&&q.remove(e))):u.wrapper&&w(e,t,n)?void(p=0):h&&!b&&u.block&&!u.wrapper&&s(g)&&Y(v,l)?(e=q.rename(e,l),i(e),a.push(e),void(p=0)):u.selector&&(le(c,function(t){"collapsed"in t&&t.collapsed!==m||q.is(e,t.selector)&&!d(e)&&(i(e,t),y=!0)}),!u.inline||y)?void(p=0):void(!h||b||!Y(l,g)||!Y(v,l)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||d(e)||u.inline&&G(e)?(p=0,le(ce(e.childNodes),r),b&&(h=x),p=0):(p||(p=q.clone(f,ee),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;le(e,r)}),u.links===!0&&le(a,function(e){function t(e){"A"===e.nodeName&&i(e,u),le(ce(e.childNodes),t)}t(e)}),le(a,function(e){function r(e){var t=0;return le(e.childNodes,function(e){L(e)||se(e)||t++}),t}function o(e){var t,n;return le(e.childNodes,function(e){return 1!=e.nodeType||se(e)||d(e)?void 0:(t=e,ee)}),t&&!se(t)&&T(t,u)&&(n=q.clone(t,ee),i(n),q.replace(n,e,te),q.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!G(e))&&0===s)return void q.remove(e,1);if(u.inline||u.wrapper){if(u.exact||1!==s||(e=o(e)),le(c,function(t){le(q.select(t.inline,e),function(e){se(e)||O(t,n,e,t.exact?e:null)})}),w(e.parentNode,t,n))return q.remove(e,1),e=0,te;u.merge_with_parents&&q.getParent(e.parentNode,function(r){return w(r,t,n)?(q.remove(e,1),e=0,te):void 0}),e&&u.merge_siblings!==!1&&(e=z(F(e),e),e=z(e,F(e,te)))}})}var c=p(t),u=c[0],f,h,m=!r&&j.isCollapsed();if(u)if(r)r.nodeType?(h=q.createRng(),h.setStartBefore(r),h.setEndAfter(r),l(H(h,c),null,!0)):l(r,null,!0);else if(m&&u.inline&&!q.select("td.mce-item-selected,th.mce-item-selected").length)V("apply",t,n);else{var g=a.selection.getNode();X||!c[0].defaultBlock||q.getParent(g,q.isBlock)||b(c[0].defaultBlock),a.selection.setRng(o()),f=j.getBookmark(),l(H(j.getRng(te),c),f),u.styles&&(u.styles.color||u.styles.textDecoration)&&(ue(g,y,"childNodes"),y(g)),j.moveToBookmark(f),U(j.getRng(te)),a.nodeChanged()}}function x(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ie(e)&&(a=b,b="true"===ie(e),s=!0),n=ce(e.childNodes),b&&!s)for(r=0,o=h.length;o>r&&!O(h[r],t,e,e);r++);if(m.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(b=a)}}function o(n){var i;return le(u(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=w(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function s(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){for(a=q.clone(o,ee),c=0;c=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return te;for(i=r.length-1;i>=0;i--)if(q.is(r[i],a))return te}return ee}function S(e,t,n){var r;return ne||(ne={},r={},a.on("NodeChange",function(e){var t=u(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),le(ne,function(e,i){le(t,function(o){return w(o,i,{},e.similar)?(r[i]||(le(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):void 0})}),le(r,function(i,o){n[o]||(delete r[o],le(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),le(e.split(","),function(e){ne[e]||(ne[e]=[],ne[e].similar=n),ne[e].push(t)}),this}function k(e){return o.getCssText(a,e)}function T(e,t){return R(e,t.inline)?te:R(e,t.block)?te:t.selector?1==e.nodeType&&q.is(e,t.selector):void 0}function R(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function A(e,t){return B(q.getStyle(e,t),t)}function B(e,t){return("color"==t||"backgroundColor"==t)&&(e=q.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function D(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function L(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function M(e,t,n){var r=q.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function H(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=q.getRoot(),3==r.nodeType&&!L(r)&&(e?v>0:bo?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var s,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(s=new e(t,q.getParent(t,G)||a.getBody());l=s[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(G(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function d(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=u(e),o=0;oh?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=l(g),y=l(y),(se(g.parentNode)||se(g))&&(g=se(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(se(y.parentNode)||se(y))&&(y=se(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ee&&!n[0].inline&&(g=d(g,"previousSibling"),y=d(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(G(g)||(g=i(!0)),G(y)||(y=i()))),1==g.nodeType&&(v=J(g),g=g.parentNode),1==y.nodeType&&(b=J(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function P(e,t){return t.links&&"A"==e.tagName}function O(e,t,n,r){var i,o,a;if(!T(n,e)&&!P(n,e))return ee;if("all"!=e.remove)for(le(e.styles,function(i,o){i=B(D(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||R(A(r,o),i))&&q.setStyle(n,o,""),a=1}),a&&""===q.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),le(e.attributes,function(e,i){var o;if(e=D(e,t),"number"==typeof i&&(i=e,r=0),!r||R(q.getAttrib(r,i),e)){if("class"==i&&(e=q.getAttrib(n,i),e&&(o="",le(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void q.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),Z.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),le(e.classes,function(e){e=D(e,t),(!r||q.hasClass(r,e))&&q.removeClass(n,e)}),o=q.getAttribs(n),i=0;io?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,a.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,a.getBody()).prev()||r),r}function V(t,n,r,i){function o(e){var t=q.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(a.getDoc().createTextNode(Q)),t}function l(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==Q||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=j.getRng(!0),l(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),q.remove(e)):(n=u(e),n.nodeValue.charAt(0)===Q&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),q.remove(e,1)),j.setRng(r);else if(e=c(j.getStart()),!e)for(;e=q.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=j.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(j.getStart()),t&&(i=u(t)),d&&a>0&&a=0;h--)u.appendChild(q.clone(f[h],!1)),u=u.firstChild;u.appendChild(q.doc.createTextNode(Q)),u=u.firstChild;var g=q.getParent(d,s);g&&q.isEmpty(g)?d.parentNode.replaceChild(m,d):q.insertAfter(m,d),j.setCursorLocation(u,1),q.isEmpty(d)&&q.remove(d)}}function m(){var e;e=c(j.getStart()),e&&!q.isEmpty(e)&&ue(e,function(e){1!=e.nodeType||e.id===g||q.isEmpty(e)||q.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=a.settings.caret_debug;a._hasCaretEvents||(ae=function(){var e=[],t;if(l(c(j.getStart()),e))for(t=e.length;t--;)q.setAttrib(e[t],"data-mce-bogus","1")},oe=function(e){var t=e.keyCode;d(),(8==t&&j.isCollapsed()||37==t||39==t)&&d(c(j.getStart())),m()},a.on("SetContent",function(e){e.selection&&m()}),a._hasCaretEvents=!0),"apply"==t?f():h()}function U(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!c(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=J(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,q.getParent(n,q.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!L(a))return l=q.create("a",{"data-mce-bogus":"all"},Q),a.parentNode.insertBefore(l,a),t.setStart(a,0),j.setRng(t),void q.remove(l)}var $={},q=a.dom,j=a.selection,K=new t(q),Y=a.schema.isValidChild,G=q.isBlock,X=a.settings.forced_root_block,J=q.nodeIndex,Q="\ufeff",Z=/^(src|href|style)$/,ee=!1,te=!0,ne,re,ie=q.getContentEditable,oe,ae,se=n.isBookmarkNode,le=i.each,ce=i.grep,ue=i.walk,de=i.extend;de(this,{get:p,register:m,unregister:g,apply:b,remove:x,toggle:C,match:_,matchAll:E,matchNode:w,canApply:N,formatChanged:S,getCssText:k}),f(),h(),a.on("BeforeGetContent",function(e){ae&&"raw"!=e.format&&ae()}),a.on("mouseup keydown",function(e){oe&&oe(e)})}}),r(I,[B,u,d,N],function(e,t,n,r){var i=n.trim,o;return o=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>",'\\s?data-mce-selected="[^"]+"'].join("|"),"gi"),function(e){function n(){var t=e.getContent({format:"raw",no_events:1}),n=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,a,s,l,c,u,d=e.schema;for(t=t.replace(o,""),u=d.getShortEndedElements();c=n.exec(t);)s=n.lastIndex,l=c[0].length,a=u[c[1]]?s:r.findEndTag(d,t,s),t=t.substring(0,s-l)+t.substring(a),n.lastIndex=s-l;return i(t)}function a(t){e.isNotDirty=!t}function s(e){l.typing=!1,l.add({},e)}var l=this,c=0,u=[],d,f,h=0;return e.on("init",function(){l.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&l.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&s(e)}),e.on("ObjectResizeStart",function(){l.beforeChange()}),e.on("SaveContent ObjectResized blur",s),e.on("DragEnd",s),e.on("KeyUp",function(r){var i=r.keyCode;(i>=33&&36>=i||i>=37&&40>=i||45==i||13==i||r.ctrlKey)&&(s(),e.nodeChanged()),(46==i||8==i||t.mac&&(91==i||93==i))&&e.nodeChanged(),f&&l.typing&&(e.isDirty()||(a(u[0]&&n()!=u[0].content),e.isNotDirty||e.fire("change",{level:u[0],lastLevel:null})),e.fire("TypingUndo"),f=!1,e.nodeChanged())}),e.on("KeyDown",function(e){var t=e.keyCode;if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(l.typing&&s(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||l.typing||n||(l.beforeChange(),l.typing=!0,l.add({},e),f=!0)}),e.on("MouseDown",function(e){l.typing&&s(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),l={data:u,typing:!1,beforeChange:function(){h||(d=e.selection.getBookmark(2,!0))},add:function(t,r){var i,o=e.settings,s;if(t=t||{},t.content=n(),h||e.removed)return null;if(s=u[c],e.fire("BeforeAddUndo",{level:t,lastLevel:s,originalEvent:r}).isDefaultPrevented())return null;if(s&&s.content==t.content)return null;if(u[c]&&(u[c].beforeBookmark=d),o.custom_undo_redo_levels&&u.length>o.custom_undo_redo_levels){for(i=0;i0&&(a(!0),e.fire("change",l)),t},undo:function(){var t;return l.typing&&(l.add(),l.typing=!1),c>0&&(t=u[--c],0===c&&a(!1),e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),e.fire("undo",{level:t})),t},redo:function(){var t;return c0||l.typing&&u[0]&&n()!=u[0].content},hasRedo:function(){return cD)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function v(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function y(e){var t=R,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==O?(n=a.create(e||F),v(n)):n=B.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while(t=t.parentNode);return r||(o.innerHTML='
              '),n}function b(t){var n,r,i;if(3==R.nodeType&&(t?A>0:AR.childNodes.length-1,R=R.childNodes[Math.min(A,R.childNodes.length-1)]||R,A=z&&3==R.nodeType?R.nodeValue.length:0),T=E(R)){if(c.beforeChange(),!a.isBlock(T)&&T!=a.getRoot())return void((!F||L)&&w());if((F&&!L||!F&&L)&&(R=x(R,A)),B=a.getParent(R,a.isBlock),P=B?a.getParent(B.parentNode,a.isBlock):null,O=B?B.nodeName.toUpperCase():"",I=P?P.nodeName.toUpperCase():"","LI"!=I||o.ctrlKey||(B=P,O=I),/^(LI|DT|DD)$/.test(O)){if(!F&&L)return void w();if(a.isEmpty(B))return void C()}if("PRE"==O&&l.br_in_pre!==!1){if(!L)return void w()}else if(!F&&!L&&"LI"!=O||F&&L)return void w();F&&B===i.getBody()||(F=F||"P",b()?(M=/^(H[1-6]|PRE|FIGURE)$/.test(O)&&"HGROUP"!=I?y(F):y(),l.end_container_on_empty_block&&h(P)&&a.isEmpty(B)?M=a.split(P,B):a.insertAfter(M,B),g(M)):b(!0)?(M=B.parentNode.insertBefore(y(),B),p(M),g(B)):(k=S.cloneRange(),k.setEndAfter(B),H=k.extractContents(),_(H),M=H.firstChild,a.insertAfter(H,B),m(M),N(B),g(M)),a.setAttrib(M,"id",""),i.fire("NewBlock",{newBlock:M}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(z,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,x;if(x=n.forced_root_block,t&&1===t.nodeType&&x){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(C){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)), -v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,x.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(x,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(C){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(W,[T,u,d,H,C,p],function(e,n,r,i,o,a){var s=r.each,l=r.extend,c=r.map,u=r.inArray,d=r.explode,f=n.gecko,h=n.ie,p=n.ie&&n.ie<11,m=!0,g=!1;return function(r){function v(e,t,n,i){var o,a,c=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||r.focus(),i=l({},i),i=r.fire("BeforeExecCommand",{command:e,ui:t,value:n}),i.isDefaultPrevented())return!1;if(a=e.toLowerCase(),o=M.exec[a])return o(a,t,n),r.fire("ExecCommand",{command:e,ui:t,value:n}),!0;if(s(r.plugins,function(i){return i.execCommand&&i.execCommand(e,t,n)?(r.fire("ExecCommand",{command:e,ui:t,value:n}),c=!0,!1):void 0}),c)return c;if(r.theme&&r.theme.execCommand&&r.theme.execCommand(e,t,n))return r.fire("ExecCommand",{command:e,ui:t,value:n}),!0;try{c=r.getDoc().execCommand(e,t,n)}catch(u){}return c?(r.fire("ExecCommand",{command:e,ui:t,value:n}),!0):!1}function y(e){var t;if(!r._isHidden()){if(e=e.toLowerCase(),t=M.state[e])return t(e);try{return r.getDoc().queryCommandState(e)}catch(n){}return!1}}function b(e){var t;if(!r._isHidden()){if(e=e.toLowerCase(),t=M.value[e])return t(e);try{return r.getDoc().queryCommandValue(e)}catch(n){}}}function x(e,t){t=t||"exec",s(e,function(e,n){s(n.toLowerCase().split(","),function(n){M[t][n]=e})})}function C(e,t,n){e=e.toLowerCase(),M.exec[e]=function(e,i,o,a){return t.call(n||r,i,o,a)}}function w(e){if(e=e.toLowerCase(),M.exec[e])return!0;try{return r.getDoc().queryCommandSupported(e)}catch(t){}return!1}function _(e,t,n){e=e.toLowerCase(),M.state[e]=function(){return t.call(n||r)}}function E(e,t,n){e=e.toLowerCase(),M.value[e]=function(){return t.call(n||r)}}function N(e){return e=e.toLowerCase(),!!M.exec[e]}function S(e,n,i){return n===t&&(n=g),i===t&&(i=null),r.getDoc().execCommand(e,n,i)}function k(e){return L.match(e)}function T(e,n){L.toggle(e,n?{value:n}:t),r.nodeChanged()}function R(e){P=D.getBookmark(e)}function A(){D.moveToBookmark(P)}var B,D,L,M={state:{},exec:{},value:{}},H=r.settings,P;r.on("PreInit",function(){B=r.dom,D=r.selection,H=r.settings,L=r.formatter}),l(this,{execCommand:v,queryCommandState:y,queryCommandValue:b,queryCommandSupported:w,addCommands:x,addCommand:C,addQueryStateHandler:_,addQueryValueHandler:E,hasCustomCommand:N}),x({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){r.undoManager.add()},"Cut,Copy,Paste":function(e){var t=r.getDoc(),i;try{S(e)}catch(o){i=m}if(i||!t.queryCommandSupported(e)){var a=r.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");n.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),r.windowManager.alert(a)}},unlink:function(){if(D.isCollapsed()){var e=D.getNode();return void("A"==e.tagName&&r.dom.remove(e,!0))}L.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),s("left,center,right,justify".split(","),function(e){t!=e&&L.remove("align"+e)}),"none"!=t&&(T("align"+t),v("mceRepaint"))},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;S(e),t=B.getParent(D.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(R(),B.split(n,t),A()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){T(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){T(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=d(H.font_size_style_values),r=d(H.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),T(e,n)},RemoveFormat:function(e){L.remove(e)},mceBlockQuote:function(){T("blockquote")},FormatBlock:function(e,t,n){return T(n||"p")},mceCleanup:function(){var e=D.getBookmark();r.setContent(r.getContent({cleanup:m}),{cleanup:m}),D.moveToBookmark(e)},mceRemoveNode:function(e,t,n){var i=n||D.getNode();i!=r.getBody()&&(R(),r.dom.remove(i,m),A())},mceSelectNodeDepth:function(e,t,n){var i=0;B.getParent(D.getNode(),function(e){return 1==e.nodeType&&i++==n?(D.select(e),g):void 0},r.getBody())},mceSelectNode:function(e,t,n){D.select(n)},mceInsertContent:function(t,n,o){function a(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=D.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
              |)$/," "))),e}function l(){var e,t,n;e=D.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(o)||(o+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(o)||(o=" "+o)))}function c(e){if(_)for(x=e.firstChild;x;x=x.walk(!0))N[x.name]&&x.attr("data-mce-new","true")}function u(){if(_){var e=r.getBody(),t=new i(B);s(B.select("*[data-mce-new]"),function(n){n.removeAttribute("data-mce-new");for(var r=n.parentNode;r&&r!=e;r=r.parentNode)t.compare(r,n)&&B.remove(n,!0)})}}var d,f,p,m,g,v,y,b,x,C,w,_,E,N=r.schema.getTextInlineElements();"string"!=typeof o&&(_=o.merge,E=o.data,o=o.content),/^ | $/.test(o)&&(o=a(o)),d=r.parser,f=new e({},r.schema),w='​',v={content:o,format:"html",selection:!0},r.fire("BeforeSetContent",v),o=v.content,-1==o.indexOf("{$caret}")&&(o+="{$caret}"),o=o.replace(/\{\$caret\}/,w),b=D.getRng();var S=b.startContainer||(b.parentElement?b.parentElement():null),k=r.getBody();S===k&&D.isCollapsed()&&B.isBlock(k.firstChild)&&B.isEmpty(k.firstChild)&&(b=B.createRng(),b.setStart(k.firstChild,0),b.setEnd(k.firstChild,0),D.setRng(b)),D.isCollapsed()||(r.getDoc().execCommand("Delete",!1,null),l()),p=D.getNode();var T={context:p.nodeName.toLowerCase(),data:E};if(g=d.parse(o,T),c(g),x=g.lastChild,"mce_marker"==x.attr("id"))for(y=x,x=x.prev;x;x=x.walk(!0))if(3==x.type||!B.isBlock(x.name)){r.schema.isValidChild(x.parent.name,"span")&&x.parent.insert(y,x,"br"===x.name);break}if(T.invalid){for(D.setContent(w),p=D.getNode(),m=r.getBody(),9==p.nodeType?p=x=m:x=p;x!==m;)p=x,x=x.parentNode;o=p==m?m.innerHTML:B.getOuterHTML(p),o=f.serialize(d.parse(o.replace(//i,function(){return f.serialize(g)}))),p==m?B.setHTML(m,o):B.setOuterHTML(p,o)}else o=f.serialize(g),x=p.firstChild,C=p.lastChild,!x||x===C&&"BR"===x.nodeName?B.setHTML(p,o):D.setContent(o);u(),y=B.get("mce_marker"),D.scrollIntoView(y),b=B.createRng(),x=y.previousSibling,x&&3==x.nodeType?(b.setStart(x,x.nodeValue.length),h||(C=y.nextSibling,C&&3==C.nodeType&&(x.appendData(C.data),C.parentNode.removeChild(C)))):(b.setStartBefore(y),b.setEndBefore(y)),B.remove(y),D.setRng(b),r.fire("SetContent",v),r.addVisual()},mceInsertRawHTML:function(e,t,n){D.setContent("tiny_mce_marker"),r.setContent(r.getContent().replace(/tiny_mce_marker/g,function(){return n}))},mceToggleFormat:function(e,t,n){T(n)},mceSetContent:function(e,t,n){r.setContent(n)},"Indent,Outdent":function(e){var t,n,i;t=H.indentation,n=/[a-z%]+$/i.exec(t),t=parseInt(t,10),y("InsertUnorderedList")||y("InsertOrderedList")?S(e):(H.forced_root_block||B.getParent(D.getNode(),B.isBlock)||L.apply("div"),s(D.getSelectedBlocks(),function(o){if("LI"!=o.nodeName){var a=r.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==B.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),B.setStyle(o,a,i?i+n:"")):(i=parseInt(o.style[a]||0,10)+t+n,B.setStyle(o,a,i))}}))},mceRepaint:function(){if(f)try{R(m),D.getSel()&&D.getSel().selectAllChildren(r.getBody()),D.collapse(m),A()}catch(e){}},InsertHorizontalRule:function(){r.execCommand("mceInsertContent",!1,"
              ")},mceToggleVisualAid:function(){r.hasVisual=!r.hasVisual,r.addVisual()},mceReplaceContent:function(e,t,n){r.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,D.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=B.getParent(D.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||L.remove("link"),n.href&&L.apply("link",n,r)},selectAll:function(){var e=B.getRoot(),t;D.getRng().setStart?(t=B.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),D.setRng(t)):(t=D.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){S("Delete");var e=r.getBody();B.isEmpty(e)&&(r.setContent(""),e.firstChild&&B.isBlock(e.firstChild)?r.selection.setCursorLocation(e.firstChild,0):r.selection.setCursorLocation(e,0))},mceNewDocument:function(){r.setContent("")},InsertLineBreak:function(e,t,n){function i(){for(var e=new a(h,v),t,n=r.schema.getNonEmptyElements();t=e.next();)if(n[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=n,l,c,u,d=D.getRng(!0);new o(B).normalize(d);var f=d.startOffset,h=d.startContainer;if(1==h.nodeType&&h.hasChildNodes()){var g=f>h.childNodes.length-1;h=h.childNodes[Math.min(f,h.childNodes.length-1)]||h,f=g&&3==h.nodeType?h.nodeValue.length:0}var v=B.getParent(h,B.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?B.getParent(v.parentNode,B.isBlock):null,x=b?b.nodeName.toUpperCase():"",C=s&&s.ctrlKey;"LI"!=x||C||(v=b,y=x),h&&3==h.nodeType&&f>=h.nodeValue.length&&(p||i()||(l=B.create("br"),d.insertNode(l),d.setStartAfter(l),d.setEndAfter(l),c=!0)),l=B.create("br"),d.insertNode(l);var w=B.doc.documentMode;return p&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(B.doc.createTextNode("\r"),l),u=B.create("span",{}," "),l.parentNode.insertBefore(u,l),D.scrollIntoView(u),B.remove(u),c?(d.setStartBefore(l),d.setEndBefore(l)):(d.setStartAfter(l),d.setEndAfter(l)),D.setRng(d),r.undoManager.add(),m}}),x({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=D.isCollapsed()?[B.getParent(D.getNode(),B.isBlock)]:D.getSelectedBlocks(),r=c(n,function(e){return!!L.matchNode(e,t)});return-1!==u(r,m)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return k(e)},mceBlockQuote:function(){return k("blockquote")},Outdent:function(){var e;if(H.inline_styles){if((e=B.getParent(D.getStart(),B.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return m;if((e=B.getParent(D.getEnd(),B.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return m}return y("InsertUnorderedList")||y("InsertOrderedList")||!H.inline_styles&&!!B.getParent(D.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=B.getParent(D.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),x({"FontSize,FontName":function(e){var t=0,n;return(n=B.getParent(D.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),x({Undo:function(){r.undoManager.undo()},Redo:function(){r.undoManager.redo()}})}}),r(V,[d],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return(!n.source||e)&&(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t}),r(U,[d],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){t=t;for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r($,[d],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(q,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(j,[$],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(K,[q,j,U,d],function(e,t,n,r){function i(e,t){var n,o;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!i(e[n],t[n]))return!1}o={};for(n in t){if(!i(e[n],t[n]))return!1;o[n]=!0}for(n in e)if(!o[n]&&!i(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,o,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return i(a,n)||(this.data[t]=n,o={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,o),this.fire("change",o)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(Y,[U],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.psuedo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.psuedo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(G,[d,Y,U],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(X,[d,y],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},getRuntimeStyle:function(e,n){return t.DOM.getStyle(e,n,!0)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(J,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(Q,[d],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(Z,[],function(){function e(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;r=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;oo;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;tn.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,(r.x!==n.x||r.y!==n.y||r.w!==n.w||r.h!==n.h)&&(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a=0,s=0,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r, -!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t)}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
              '},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(te,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(ne,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||x,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||x;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=x;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t}function a(e){return o(e)&&!e.hidden?!0:/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell)$/.test(n(e))?!0:!1}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(ie,[f],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(oe,[f,ie],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('
              '),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(ae,[re,oe],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='
              '+t.renderHtml(e)+"
              ":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
              '+(e._preBodyHtml||"")+n+"
              "}})}),r(se,[X],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(le,[X],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(ce,[ae,se,le,X,f],function(e,t,n,r,i){function o(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function a(e){for(var t=g.length;t--;){var n=g[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(o(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function s(){h||(h=function(e){2!=e.button&&a(e)},i(document).on("click touchstart",h))}function l(){p||(p=function(){var e;for(e=g.length;e--;)u(g[e])},i(window).on("scroll",p))}function c(){if(!m){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;m=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,b.hideAll())},i(window).on("resize",m)}}function u(e){function t(t,n){for(var r,i=0;in&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY
              ').appendTo(t.getContainerElm())),setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")},0),y=!0),d(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='
              ',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start"))},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=g.length;t--&&g[t]!==e;);return-1===t&&g.push(e),n},hide:function(){return f(this),d(!1,this),this._super()},hideAll:function(){b.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),d(!1,e)),e},remove:function(){f(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return b.hideAll=function(){for(var e=g.length;e--;){var t=g[e];t&&t.settings.autohide&&(t.hide(),g.splice(e,1))}},b}),r(ue,[ce,ae,X,f,ie,J,u],function(e,t,n,r,i,o,a){function s(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof d&&(d=i),n.setAttribute("content",e?t:d))}function l(e){for(var t=0;tr.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='
              '+e.encode(i.title)+'
              '),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
              '+o+'
              '+s+"
              "+a+"
              "},fullscreen:function(e){var t=this,i=document.documentElement,a,s=t.classPrefix,l;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),l=t.layoutRect(),t._fullscreen=e,e){t._initial={x:l.x,y:l.y,w:l.w,h:l.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",l.deltaH-=l.headerH+2,r([i,document.body]).addClass(s+"fullscreen"),t.classes.add("fullscreen");var c=n.getWindowSize();t.moveTo(0,0).resizeTo(c.w,c.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",l.deltaH+=l.headerH,r([i,document.body]).removeClass(s+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),u.push(e),s(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=u.length;t--;)u[t]===e&&u.splice(t,1);s(u.length>0),l(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return a.desktop||c(),f}),r(de,[ue],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(fe,[ue,de],function(e,t){return function(n){function r(){return o.length?o[o.length-1]:void 0}var i=this,o=[];i.windows=o,n.on("remove",function(){for(var e=o.length;e--;)o[e].close()}),i.open=function(t,r){var i;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){i.find("form")[0].submit()}},{text:"Cancel",onclick:function(){i.close()}}]),i=new e(t),o.push(i),i.on("close",function(){for(var e=o.length;e--;)o[e]===i&&o.splice(e,1);o.length||n.focus()}),t.data&&i.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),i.features=t||{},i.params=r||{},1===o.length&&n.nodeChanged(),i.renderTo().reflow()},i.alert=function(e,r,i){t.alert(e,function(){r?r.call(i||this):n.focus()})},i.confirm=function(e,n,r){t.confirm(e,function(e){n.call(r||this,e)})},i.close=function(){r()&&r().close()},i.getParams=function(){return r()?r().params:null},i.setParams=function(e){r()&&(r().params=e)},i.getWindows=function(){return o}}}),r(he,[B,C,p,_,g,u,d],function(e,t,n,r,i,o,a){return function(s){function l(e,t){try{s.getDoc().execCommand(e,!1,t)}catch(n){}}function c(){var e=s.getDoc().documentMode;return e?e:6}function u(e){return e.isDefaultPrevented()}function d(e){var t;e.dataTransfer&&(s.selection.isCollapsed()&&"IMG"==e.target.tagName&&J.select(e.target),t=s.selection.getContent(),t.length>0&&e.dataTransfer.setData(oe,ie+escape(t)))}function f(e){var t,n;return e.dataTransfer&&(t=e.dataTransfer.getData(oe),t&&t.indexOf(ie)>=0&&(n=unescape(t.substr(ie.length)))),n}function h(e){s.queryCommandSupported("mceInsertClipboardContent")?s.execCommand("mceInsertClipboardContent",!1,{content:e}):s.execCommand("mceInsertContent",!1,e)}function p(){function r(e){var t=v.schema.getBlockElements(),n=s.getBody();if("BR"!=e.nodeName)return!1;for(e=e;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function i(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==K.trim(n.data).length)&&n!==t)return!1;return n===t}function o(e,t,i){var o,a,s;for(s=v.schema.getNonEmptyElements(),o=new n(i||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!r(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function l(e){var n,r,i,a,l;if(!e.collapsed&&(n=v.getParent(t.getNode(e.startContainer,e.startOffset),v.isBlock),r=v.getParent(t.getNode(e.endContainer,e.endOffset),v.isBlock),l=s.schema.getTextBlockElements(),n!=r&&l[n.nodeName]&&l[r.nodeName]&&"false"!==v.getContentEditable(n)&&"false"!==v.getContentEditable(r)))return e.deleteContents(),i=o(n,!1),a=o(r,!0),v.isEmpty(r)||K(n).append(r.childNodes),K(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):a&&(1==a.nodeType?(e.setStartBefore(a),e.setEndBefore(a)):(e.setStart(a,0),e.setEnd(a,0))),y.setRng(e),!0}function c(e,n){var r,a,l,c,u,d;if(!e.collapsed)return e;if(u=e.startContainer,d=e.startOffset,3==u.nodeType)if(n){if(d0)return e;if(r=t.getNode(e.startContainer,e.startOffset),l=v.getParent(r,v.isBlock),a=o(s.getBody(),n,r),c=v.getParent(a,v.isBlock),!r||!a)return e;if(c&&l!=c)if(n){if(!i(l,c))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==a.nodeType?e.setEnd(a,0):e.setEndBefore(a)}else{if(!i(c,l))return e;1==a.nodeType?"BR"==a.nodeName?e.setStartBefore(a):e.setStartAfter(a):e.setStart(a,a.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function p(e){var t=y.getRng();return t=c(t,e),l(t)?!0:void 0}function m(e){var t,n,r;p(e)||(a.each(s.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&s.dom.setAttrib(e,"style",s.dom.getAttrib(e,"style"))}),t=new b(function(){}),t.observe(s.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),s.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=s.selection.getRng(),r=n.startContainer.parentNode,a.each(t.takeRecords(),function(e){if(v.isChildOf(e.target,s.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}a.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),v.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),s.selection.setRng(n))}})}}),t.disconnect(),a.each(s.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var g=s.getDoc(),v=s.dom,y=s.selection,b=window.MutationObserver,x,C;b||(x=!0,b=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),s.on("keydown",function(e){var t=e.keyCode==G,n=e.ctrlKey||e.metaKey;if(!u(e)&&(t||e.keyCode==Y)){var r=s.selection.getRng(),i=r.startContainer,o=r.startOffset;if(!n&&r.collapsed&&3==i.nodeType&&(t?o0))return;e.preventDefault(),n&&s.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),m(t)}}),s.on("keypress",function(t){if(!u(t)&&!y.isCollapsed()&&t.charCode&&!e.metaKeyPressed(t)){var n,r,i,o,a,l;n=s.selection.getRng(),l=String.fromCharCode(t.charCode),t.preventDefault(),r=K(n.startContainer).parents().filter(function(e,t){return!!s.schema.getTextInlineElements()[t.nodeName]}),m(!0),r=r.filter(function(e,t){return!K.contains(s.getBody(),t)}),r.length?(i=v.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(s.getDoc().createTextNode(l)),o=v.getParent(n.startContainer,v.isBlock),v.isEmpty(o)?K(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),s.selection.setRng(n)):s.selection.setContent(l)}}),s.addCommand("Delete",function(){ -m()}),s.addCommand("ForwardDelete",function(){m(!0)}),x||(s.on("dragstart",function(e){C=y.getRng(),d(e)}),s.on("drop",function(e){if(!u(e)){var n=f(e);n&&(e.preventDefault(),window.setTimeout(function(){var r=t.getCaretRangeFromPoint(e.x,e.y,g);C&&(y.setRng(C),C=null),m(),y.setRng(r),h(n)},0))}}),s.on("cut",function(e){u(e)||!e.clipboardData||s.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",s.selection.getContent()),e.clipboardData.setData("text/plain",s.selection.getContent({format:"text"})),window.setTimeout(function(){m(!0)},0))}))}function m(){function e(e){var t=X.create("body"),n=e.cloneContents();return t.appendChild(n),J.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(s.getBody()),t.compareRanges(n,r)}var i=e(n),o=X.createRng();o.selectNode(s.getBody());var a=e(o);return i===a}s.on("keydown",function(e){var t=e.keyCode,r,i;if(!u(e)&&(t==G||t==Y)){if(r=s.selection.isCollapsed(),i=s.getBody(),r&&!X.isEmpty(i))return;if(!r&&!n(s.selection.getRng()))return;e.preventDefault(),s.setContent(""),i.firstChild&&X.isBlock(i.firstChild)?s.selection.setCursorLocation(i.firstChild,0):s.selection.setCursorLocation(i,0),s.nodeChanged()}})}function g(){s.shortcuts.add("meta+a",null,"SelectAll")}function v(){s.settings.content_editable||(X.bind(s.getDoc(),"focusin",function(){J.setRng(J.getRng())}),X.bind(s.getDoc(),"mousedown mouseup",function(e){e.target==s.getDoc().documentElement&&(s.getBody().focus(),"mousedown"==e.type?J.placeCaretAt(e.clientX,e.clientY):J.setRng(J.getRng()))}))}function y(){s.on("keydown",function(e){if(!u(e)&&e.keyCode===Y){if(!s.getBody().getElementsByTagName("hr").length)return;if(J.isCollapsed()&&0===J.getRng(!0).startOffset){var t=J.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return X.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(X.remove(n),e.preventDefault())}}})}function b(){window.Range.prototype.getClientRects||s.on("mousedown",function(e){if(!u(e)&&"HTML"===e.target.nodeName){var t=s.getBody();t.blur(),setTimeout(function(){t.focus()},0)}})}function x(){s.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&(e.preventDefault(),J.getSel().setBaseAndExtent(t,0,t,1),s.nodeChanged()),"A"==t.nodeName&&X.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),J.select(t))})}function C(){function e(){var e=X.getAttribs(J.getStart().cloneNode(!1));return function(){var t=J.getStart();t!==s.getBody()&&(X.setAttrib(t,"style",null),j(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!J.isCollapsed()&&X.getParent(J.getStart(),X.isBlock)!=X.getParent(J.getEnd(),X.isBlock)}s.on("keypress",function(n){var r;return u(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),s.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),X.bind(s.getDoc(),"cut",function(n){var r;!u(n)&&t()&&(r=e(),setTimeout(function(){r()},0))})}function w(){document.body.setAttribute("role","application")}function _(){s.on("keydown",function(e){if(!u(e)&&e.keyCode===Y&&J.isCollapsed()&&0===J.getRng(!0).startOffset){var t=J.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function E(){c()>7||(l("RespectVisibilityInDesign",!0),s.contentStyles.push(".mceHideBrInPre pre br {display: none}"),X.addClass(s.getBody(),"mceHideBrInPre"),Z.addNodeFilter("pre",function(e){for(var t=e.length,n,i,o,a;t--;)for(n=e[t].getAll("br"),i=n.length;i--;)o=n[i],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new r("#text",3),o,!0).value="\n"}),ee.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function N(){X.bind(s.getBody(),"mouseup",function(){var e,t=J.getNode();"IMG"==t.nodeName&&((e=X.getStyle(t,"width"))&&(X.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),X.setStyle(t,"width","")),(e=X.getStyle(t,"height"))&&(X.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),X.setStyle(t,"height","")))})}function S(){s.on("keydown",function(t){var n,r,i,o,a;if(!u(t)&&t.keyCode==e.BACKSPACE&&(n=J.getRng(),r=n.startContainer,i=n.startOffset,o=X.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(s.formatter.toggle("blockquote",null,a),n=X.createRng(),n.setStart(r,0),n.setEnd(r,0),J.setRng(n))}})}function k(){function e(){s._refreshContentEditable(),l("StyleWithCSS",!1),l("enableInlineTableEditing",!1),Q.object_resizing||l("enableObjectResizing",!1)}Q.readonly||s.on("BeforeExecCommand MouseDown",e)}function T(){function e(){j(X.select("a"),function(e){var t=e.parentNode,n=X.getRoot();if(t.lastChild===e){for(;t&&!X.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}X.add(t,"br",{"data-mce-bogus":1})}})}s.on("SetContent ExecCommand",function(t){("setcontent"==t.type||"mceInsertLink"===t.command)&&e()})}function R(){Q.forced_root_block&&s.on("init",function(){l("DefaultParagraphSeparator",Q.forced_root_block)})}function A(){s.on("Undo Redo SetContent",function(e){e.initial||s.execCommand("mceRepaint")})}function B(){s.on("keydown",function(e){var t;u(e)||e.keyCode!=Y||(t=s.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),s.undoManager.beforeChange(),X.remove(t.item(0)),s.undoManager.add()))})}function D(){var e;c()>=10&&(e="",j("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),s.contentStyles.push(e+"{padding-right: 1px !important}"))}function L(){c()<9&&(Z.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),ee.addNodeFilter("noscript",function(e){for(var t=e.length,n,o,a;t--;)n=e[t],o=e[t].firstChild,o?o.value=i.decode(o.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),o=new r("#text",3),o.value=a,o.raw=!0,n.append(o)))}))}function M(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),X.unbind(r,"mouseup",n),X.unbind(r,"mousemove",t),a=o=0}var r=X.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,X.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(X.bind(r,"mouseup",n),X.bind(r,"mousemove",t),X.getRoot().focus(),a.select())}})}function H(){s.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||J.normalize()},!0)}function P(){s.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function O(){s.inline||s.on("keydown",function(){document.activeElement==document.body&&s.getWin().focus()})}function I(){s.inline||(s.contentStyles.push("body {min-height: 150px}"),s.on("click",function(e){if("HTML"==e.target.nodeName){var t;t=s.selection.getRng(),s.getBody().focus(),s.selection.setRng(t),s.selection.normalize(),s.nodeChanged()}}))}function F(){o.mac&&s.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),s.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function z(){l("AutoUrlDetect",!1)}function W(){s.inline||s.on("focus blur beforegetcontent",function(){var e=s.dom.create("br");s.getBody().appendChild(e),e.parentNode.removeChild(e)},!0)}function V(){s.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),s.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function U(){s.on("init",function(){s.dom.bind(s.getBody(),"submit",function(e){e.preventDefault()})})}function $(){Z.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function q(){s.on("dragstart",function(e){d(e)}),s.on("drop",function(e){if(!u(e)){var n=f(e);if(n){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,s.getDoc());J.setRng(r),h(n)}}})}var j=a.each,K=s.$,Y=e.BACKSPACE,G=e.DELETE,X=s.dom,J=s.selection,Q=s.settings,Z=s.parser,ee=s.serializer,te=o.gecko,ne=o.ie,re=o.webkit,ie="data:text/mce-internal,",oe=ne?"Text":"URL";S(),m(),H(),re&&(p(),v(),x(),R(),U(),_(),$(),o.iOS?(O(),I(),V()):g()),ne&&o.ie<11&&(y(),w(),E(),N(),B(),D(),L(),M()),o.ie>=11&&(I(),W(),_()),o.ie&&(g(),z(),q()),te&&(y(),b(),C(),k(),T(),A(),P(),F(),_())}}),r(pe,[j,y,d],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){var n=r(e,t),i;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;i=function(n){for(var r=n.target,i=e.editorManager.editors,a=i.length;a--;){var s=i[a].getBody();(s===r||o.isChildOf(r,s))&&(i[a].hidden||i[a].fire(t,n))}},a[t]=i,o.bind(n,t,i)}else i=function(n){e.hidden||e.fire(t,n)},o.bind(n,t,i),e.delegates[t]=i}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;n.settings.readonly||"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(me,[d,u],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e,s,l,c){var u,d,f;f={func:l,scope:c||a,desc:a.translate(s)},n(r(e,"+"),function(e){e in o?f[e]=!0:/^[0-9]{2,}$/.test(e)?f.keyCode=parseInt(e,10):(f.charCode=e.charCodeAt(0),f.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),u=[f.keyCode];for(d in o)f[d]?u.push(d):f[d]=!1;return f.id=u.join(","),f.access&&(f.alt=!0,t.mac?f.ctrl=!0:f.shift=!0),f.meta&&(t.mac?f.meta=!0:(f.ctrl=!0,f.meta=!1)),f}var l=this,c={};a.on("keyup keypress keydown",function(e){(e.altKey||e.ctrlKey||e.metaKey)&&!e.isDefaultPrevented()&&n(c,function(t){return t.ctrl==e.ctrlKey&&t.meta==e.metaKey&&t.alt==e.altKey&&t.shift==e.shiftKey&&(e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode)?(e.preventDefault(),"keydown"==e.type&&t.func.call(t.scope),!0):void 0})}),l.add=function(t,i,o,l){var u;return u=o,"string"==typeof o?o=function(){a.execCommand(u,!1,null)}:e.isArray(u)&&(o=function(){a.execCommand(u[0],u[1],u[2])}),n(r(t.toLowerCase()),function(e){var t=s(e,i,o,l);c[t.id]=t}),!0},l.remove=function(e){var t=s(e);return c[t.id]?(delete c[t.id],!0):!1}}}),r(ge,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;or;r++)e[r].then(t,n)})},t}),r(ve,[ge,d],function(e,t){return function(n){function r(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function i(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function o(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:t.constant(r(e))}}function a(e,t,o){var a,s;a=new XMLHttpRequest,a.withCredentials=n.credentials,a.open("POST",n.url),a.onload=function(){var e;return 200!=a.status?void o("HTTP Error: "+a.status):(e=JSON.parse(a.responseText),e&&"string"==typeof e.location?void t(i(n.basePath,e.location)):void o("Invalid JSON: "+a.responseText))},s=new FormData,s.append("file",e.blob(),r(e)),a.send(s)}function s(r){return new e(function(e,i){function s(){var t,n=c[u++];return n?(t=d[n.blobInfo.id()])?(n.url=t,n.status=!0,void s()):void l(o(n.blobInfo),function(e){d[n.blobInfo.id()]=e,n.url=e,n.status=!0,s()},function(e){n.status=!1,i(e)}):void e(c)}var l=n.handler,c,u=0,d={};return n.url||l!==a?(c=t.map(r,function(e){return{status:!1,blobInfo:e,url:""}}),void s()):void e([])})}return n=t.extend({credentials:!1,handler:a},n),{upload:s}}}),r(ye,[ge],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},t),r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.isNotDirty=!0,o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new E(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,t.cache_suffix&&(C.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(C.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var k=e.DOM,T=r.ThemeManager,R=r.PluginManager,A=w.extend,B=w.each,D=w.explode,L=w.inArray,M=w.trim,H=w.resolve,P=g.Event,O=C.gecko,I=C.ie;return S.prototype={render:function(){function e(){k.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!T.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",T.load(r.theme,t)}w.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),B(r.external_plugins,function(e,t){R.load(t,e),r.plugins+=" "+t}),B(r.plugins.split(/[ ,]/),function(e){if(e=M(e),e&&!R.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=R.dependencies(e);B(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=R.createUrl(t,e),R.load(e.resource,e)})}else R.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!P.domLoaded)return void k.bind(window,"ready",e);if(n.getElement()&&C.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||k.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(k.insertAfter(k.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},k.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.isNotDirty=!0,a._mceOldSubmit(a)})),n.windowManager=new v(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=k.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),t()}},init:function(){function e(n){var r=R.get(n),i,o;i=R.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=M(n),r&&-1===L(m,n)&&(B(R.dependencies(n),function(t){e(t)}),o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n)))}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(this.editorManager.i18n.setCode(n.language),t.rtl=n.rtl_ui||this.editorManager.i18n.rtl,t.editorManager.add(t),n.aria_label=n.aria_label||k.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=T.get(n.theme),t.theme=new c(t,T.urls[n.theme]),t.theme.init&&t.theme.init(t,T.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),B(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&B(D(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();for(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!C.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',p=0;p',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+=''),t.iframeHTML+='
              ';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&(u=v);var y=k.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},k.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=k.add(l.iframeContainer,y),I)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(k.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=k.isHidden(l.editorContainer)),t.getElement().style.display="none",k.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();k.removeClass(e,"mce-content-body"),k.removeClass(e,"mce-edit-focus"),k.setAttrib(e,"contentEditable",null)}),k.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,r.readonly||(n.inline&&"static"==k.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new N(n),n.schema=new y(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new b(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n;t--;)n=e[t],n.attr("type","mce-"+(n.attr("type")||"no/type"))}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,k.setAttrib(p,"spellcheck","false")),n.fire("PostRender"),n.quirks=new x(n),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){B(r.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
              [\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.contentStyles.length>0&&(m="",B(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),B(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&setTimeout(function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){var t=this,n=t.selection,r=t.settings.content_editable,i,o,a=t.getDoc(),s;if(!e){if(i=n.getRng(),i.item&&(o=i.item(0)),t._refreshContentEditable(),r||(C.opera||t.getBody().focus(),t.getWin().focus()),O||r){if(s=t.getBody(),s.setActive)try{s.setActive()}catch(l){s.focus()}else s.focus();r&&n.normalize()}o&&o.ownerDocument==a&&(i=a.body.createControlRange(),i.addElement(o),i.select())}t.editorManager.setActive(t)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?H(r):0,n=H(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?B(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[M(e[0])]=M(e[1]):i[M(e[0])]=M(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)}, -execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(k.show(e.getContainer()),k.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(I&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(k.hide(e.getContainer()),k.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=k.getParent(t.id,"form"))&&B(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&(t.isNotDirty=!0),r},setContent:function(e,t){var n=this,r=n.getBody(),i;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=I&&11>I?"":'
              ',e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):I||(e='
              '),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=M(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?r.innerHTML:"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=M(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=A({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},getContainer:function(){var e=this;return e.container||(e.container=k.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=k.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),B(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&k.remove(e.getElement().nextSibling),e.inline||(I&&10>I&&e.getDoc().execCommand("SelectAll",!1,null),k.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),k.remove(e.getContainer()),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),k.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()},_refreshContentEditable:function(){var e=this,t,n;e._isHidden()&&(t=e.getBody(),n=t.parentNode,n.removeChild(t),n.appendChild(t),t.focus())},_isHidden:function(){var e;return O?(e=this.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}},A(S.prototype,_),S}),r(_e,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(Ee,[y,u],function(e,t){function n(e){function s(){try{return document.activeElement}catch(e){return document.body}}function l(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function c(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function u(e){return!!a.getParent(e,n.isEditorUIElement)}function d(n){var d=n.editor;d.on("init",function(){(d.inline||t.ie)&&("onbeforedeactivate"in document&&t.ie<9?d.dom.bind(d.getBody(),"beforedeactivate",function(e){if(e.target==d.getBody())try{d.lastRng=d.selection.getRng()}catch(t){}}):d.on("nodechange mouseup keyup",function(e){var t=s();"nodechange"==e.type&&e.selectionChange||(t&&t.id==d.id+"_ifr"&&(t=d.getBody()),d.dom.isChildOf(t,d.getBody())&&(d.lastRng=d.selection.getRng()))}),t.webkit&&!r&&(r=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(d.lastRng=n)}},a.bind(document,"selectionchange",r)))}),d.on("setcontent",function(){d.lastRng=null}),d.on("mousedown",function(){d.selection.lastFocusBookmark=null}),d.on("focusin",function(){var t=e.focusedEditor;d.selection.lastFocusBookmark&&(d.selection.setRng(c(d,d.selection.lastFocusBookmark)),d.selection.lastFocusBookmark=null),t!=d&&(t&&t.fire("blur",{focusedEditor:d}),e.setActive(d),e.focusedEditor=d,d.fire("focus",{blurredEditor:t}),d.focus(!0)),d.lastRng=null}),d.on("focusout",function(){window.setTimeout(function(){var t=e.focusedEditor;u(s())||t!=d||(d.fire("blur",{focusedEditor:null}),e.focusedEditor=null,d.selection&&(d.selection.lastFocusBookmark=null))},0)}),i||(i=function(t){var n=e.activeEditor;n&&t.target.ownerDocument==document&&(n.selection&&t.target!=n.getBody()&&(n.selection.lastFocusBookmark=l(n.dom,n.lastRng)),t.target==document.body||u(t.target)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},a.bind(document,"focusin",i)),d.inline&&!o&&(o=function(t){var n=e.activeEditor;if(n.inline&&!n.dom.isChildOf(t.target,n.getBody())){var r=n.selection.getRng();r.collapsed||(n.lastRng=r)}},a.bind(document,"mouseup",o))}function f(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(a.unbind(document,"selectionchange",r),a.unbind(document,"focusin",i),a.unbind(document,"mouseup",o),r=i=o=null)}e.on("AddEditor",d),e.on("RemoveEditor",f)}var r,i,o,a=e.DOM;return n.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},n}),r(Ne,[we,f,y,V,u,d,j,_e,Ee],function(e,t,n,r,i,o,a,s,l){function c(e){m(b.editors,function(t){t.fire("ResizeWindow",e)})}function u(e,n){n!==x&&(n?t(window).on("resize",c):t(window).off("resize",c),x=n)}function d(e){var t=b.editors,n;delete t[e.id];for(var r=0;r0&&m(p(e),function(e){var n;(n=h.get(e))?r(e,t,n):m(document.forms,function(n){m(n.elements,function(n){n.name===e&&(e="mce_editor_"+v++,h.setAttrib(n,"id",e),r(e,t,n))})})});break;case"textareas":case"specific_textareas":m(h.select("textarea"),function(e){t.editor_deselector&&o(e,t.editor_deselector)||(!t.editor_selector||o(e,t.editor_selector))&&r(n(e),t,e)})}t.oninit&&(e=s=0,m(l,function(t){s++,t.initialized?e++:t.on("init",function(){e++,e==s&&i("oninit")}),e==s&&i("oninit")}))}var s=this,l=[];s.settings=t,h.bind(window,"ready",a)},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),u(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),y||(y=function(){t.fire("BeforeUnload")},h.bind(window,"beforeunload",y)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void m(h.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(d(i)&&t.fire("RemoveEditor",{editor:i}),r.length||h.unbind(window,"beforeunload",y),i.remove(),u(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){m(this.editors,function(e){e.save()})},addI18n:function(e,t){s.add(e,t)},translate:function(e){return s.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},g(b,a),b.setup(),window.tinymce=window.tinyMCE=b,b}),r(Se,[Ne,d],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(ke,[j,d],function(e,t){var n={send:function(e){function t(){!e.async||4==r.readyState||i++>1e4?(e.success&&1e4>i&&200==r.status?e.success.call(e.success_scope,""+r.responseText,r,e):e.error&&e.error.call(e.error_scope,i>1e4?"TIMED_OUT":"GENERAL",r,e),r=null):setTimeout(t,10)}var r,i=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async===!1?!1:!0,e.data=e.data||"",r=new XMLHttpRequest){if(r.overrideMimeType&&r.overrideMimeType(e.content_type),r.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(r.withCredentials=!0),e.content_type&&r.setRequestHeader("Content-Type",e.content_type),r.setRequestHeader("X-Requested-With","XMLHttpRequest"),r=n.fire("beforeSend",{xhr:r,settings:e}).xhr,r.send(e.data),!e.async)return t();setTimeout(t,10)}}};return t.extend(n,e),n}),r(Te,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(Re,[Te,ke,d],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(Ae,[y],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(Be,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(De,[y,l,b,x,d,u],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(Le,[U,d],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(Me,[Le],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
              '+this._super(e)}})}),r(He,[ee,se],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Pe,[ee,He],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Oe,[Pe],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild.style;e.width=e.height="100%",this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text");return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&e.classes.add("btn-has-text"),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'
              "},bindStates:function(){function e(e){for(var n=t.getEl().firstChild.firstChild;n;n=n.nextSibling)3==n.nodeType&&(n.data=t.translate(e));t.classes.toggle("btn-has-text",!!e)}var t=this;return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(Ie,[re],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "}})}),r(Fe,[Pe],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
              '+e.encode(e.state.get("text"))+"
              "},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(ze,[Pe,te,X,f],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='
              ",e.classes.add("has-open")),'
              '+s+"
              "},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(We,[ze],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e._rendered&&e.repaintColor(t.value)}),e._super()}})}),r(Ve,[Oe,ce],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(Ue,[Ve,y],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"";return'
              '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r($e,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(qe,[Pe,ie,X,$e],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{ -start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='
              ';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='
              '+e()+'
              ','
              '+i+"
              "}})}),r(je,[Pe],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'
              '+e._getDataPathHtml(e.state.get("row"))+"
              "},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?'":"")+'
              '+n[r].name+"
              ";return o||(o='
              \xa0
              '),o}})}),r(Ke,[je,Ne],function(e,t){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var n=this,r=t.activeEditor;return r.settings.elementpath!==!1&&(n.on("select",function(e){r.focus(),r.selection.select(this.row()[e.index].element),r.nodeChanged()}),r.on("nodeChange",function(t){for(var i=[],o=t.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=r.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}n.row(i)})),n._super()}})}),r(Ye,[re],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'
              '+(e.settings.title?'
              '+e.settings.title+"
              ":"")+'
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "}})}),r(Ge,[re,Ye,d],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(Xe,[Ge],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
              '+(e.settings.title?''+e.settings.title+"":"")+'
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "}})}),r(Je,[ze,d],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),(!s||s[e.filetype])&&(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Qe,[Me],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Ze,[Me],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,x,C,w,_,E,N,S,k,T,R,A,B,D,L,M,H,P,O,I,F,z=Math.max,W=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,("row-reversed"==f||"column-reverse"==f)&&(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",E="h",N="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",P="left",M="w",D="x",L="innerW",H="minW",O="right",I="deltaW",F="contentW"):(S="x",E="w",N="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",P="top",M="h",D="y",L="innerH",H="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],_=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[N],y=o[P]+p[H]+o[O],y>_&&(_=y);if(C={},0>d?C[N]=i[N]-d+i[A]:C[N]=i[R]-d+i[A],C[H]=_+i[I],C[B]=i[R]-d,C[F]=_,C.minW=W(C.minW,i.maxW),C.minH=W(C.minH,i.maxH),C.minW=z(C.minW,i.startMinWidth),C.minH=z(C.minH,i.startMinHeight),!i.autoResize||C.minW==i.minW&&C.minH==i.minH){for(x=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[N]+p.flex*x,y>b?(d-=p[k]-p[N],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(x=d/u,w=o[T],C={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),C[D]=o[P],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[N],"center"===s?C[D]=Math.round(i[L]/2-p[M]/2):"stretch"===s?(C[M]=z(p[H]||0,i[L]-o[P]-o[O]),C[D]=o[P]):"end"===s&&(C[D]=i[L]-p[M]-o.top),p.flex>0&&(y+=p.flex*x),C[E]=y,C[S]=w,h.layoutRect(C),h.recalc&&h.recalc(),w+=y+c}else if(C.w=C.minW,C.h=C.minH,e.layoutRect(C),this.recalc(e),null===e._lastRect){var V=e.parent();V&&(V._lastRect=null,V.recalc())}}})}),r(et,[Le],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(tt,[ee,Pe,ce,d,Ne,u],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&l(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos",function(){r.disabled(!n())})}}function a(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function l(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var c;c=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})},onclick:function(){l(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:function(){var t=this;e.formatter?e.formatter.formatChanged(n,function(e){t.active(e)}):e.on("init",function(){e.formatter.formatChanged(n,function(e){t.active(e)})})}})}),e.addButton("undo",{tooltip:"Undo",onPostRender:o("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:o("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:o("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:o("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:a,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:c}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:l,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:c})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(nt,[Me],function(e){return e.extend({recalc:function(e){var t=e.settings,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,x,C,w,_,E=[],N=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,x=t.alignH||t.align,C=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),x&&"string"==typeof x&&(x=[x]),C&&"string"==typeof C&&(C=[C]);for(d=0;r>d;d++)E.push(0);for(f=0;n>f;f++)N.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,E[d]=S>E[d]?S:E[d],N[f]=k>N[f]?k:N[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=E[d]+(d>0?y:0),T-=(d>0?y:0)+E[d];for(R=o.innerH-g.top-g.bottom,_=0,f=0;n>f;f++)_+=N[f]+(f>0?b:0),R-=(f>0?b:0)+N[f];if(w+=g.left+g.right,_+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=_+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var L=0,M=t.flexWidths;if(M)for(d=0;dd;d++)E[d]+=M?M[d]*H:H;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=N[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(E[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(x?x[d]||x[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(C?C[d]||C[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var P=e.parent();P&&(P._lastRect=null,P.recalc())}}})}),r(rt,[Pe],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,t){var n=this,r=this.getEl().contentWindow.document.body;return r?(r.innerHTML=e,t&&t()):setTimeout(function(){n.html(e)},0),this}})}),r(it,[Pe,X],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},renderHtml:function(){var e=this,t=e.settings.forId;return'"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value))}),e._super()}})}),r(ot,[re],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(at,[ot],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(st,[Oe,te,at],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text");return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),'
              '},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(lt,[Pe,te,u],function(e,t,n){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),("-"===n||"|"===n)&&(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},e=e.split("+"),t=0;t'+("-"!==a?'\xa0":"")+("-"!==a?''+a+"":"")+(c?'
              '+c+"
              ":"")+(i.menu?'
              ':"")+""},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var r=e.getEl("text");r&&r.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),e.parent().hideAll()))}),e._super(),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(ct,[ce,lt,d],function(e,t,n){var r=e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,e.itemDefaults)for(var r=e.items,i=r.length;i--;)r[i]=n.extend({},e.itemDefaults,r[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e._super()}});return r}),r(ut,[st,ct],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o||r[0].text),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a]}function n(e,t,n){return{x:e.x-t,y:e.y-n,w:e.w+2*t,h:e.h+2*n}}function r(e,t){var n,r,i,s;return n=a(e.x,t.x),r=a(e.y,t.y),i=o(e.x+e.w,t.x+t.w),s=o(e.y+e.h,t.y+t.h),0>i-n||0>s-r?null:{x:n,y:r,w:i-n,h:s-r}}function i(e,t,n){var r,i,o,s,l,c,u,d,f,h;return l=e.x,c=e.y,u=e.x+e.w,d=e.y+e.h,f=t.x+t.w,h=t.y+t.h,r=a(0,t.x-l),i=a(0,t.y-c),o=a(0,u-f),s=a(0,d-h),l+=r,c+=i,n&&(u+=r,d+=i,l-=o,c-=s),u-=o,d-=s,{x:l,y:c,w:u-l,h:d-c}}var o=Math.min,a=Math.max,s=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i}}),r(ht,[Pe,ie],function(e,t){return e.extend({renderHtml:function(){var e=this,t=e.classPrefix;return e.classes.add("resizehandle"),"both"==e.settings.direction&&e.classes.add("resizehandle-both"),e.canFocus=!1,'
              '},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(pt,[Pe,ie,X],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t){var r,i,o,a,s;"v"==e.settings.orientation?(a="top",o="height",i="h"):(a="left",o="width",i="w"),r=(e.layoutRect()[i]||100)-n.getSize(e.getEl("handle"))[o],s=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",e.getEl("handle").style[a]=s,e.getEl("handle").style.height=e.layoutRect().h+"px"}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
              '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){var e=this,i,o,a=0,s,l,c,u,d,f,h,p;l=e._minValue,c=e._maxValue,s=e.value(),"v"==e.settings.orientation?(d="screenY",f="top",h="height",p="h"):(d="screenX",f="left",h="width",p="w"),e._super(),e._dragHelper=new t(e._id,{handle:e._id+"-handle",start:function(t){i=t[d],o=parseInt(e.getEl("handle").style[f],10),u=(e.layoutRect()[p]||100)-n.getSize(e.getEl("handle"))[h],e.fire("dragstart",{value:s})},drag:function(t){var n=t[d]-i,h=e.getEl("handle");a=r(o+n,0,u),h.style[f]=a+"px",s=l+a/u*(c-l),e.value(s),e.tooltip().text(""+e.settings.previewFilter(s)).show().moveRel(h,"bc tc"),e.fire("drag",{value:s})},stop:function(){e.tooltip().hide(),e.fire("dragend",{value:s})}})},repaint:function(){this._super(),i(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){i(e,t.value)}),e._super()}})}),r(mt,[Pe],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'
              '}})}),r(gt,[st,X,f],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text");return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",'
              '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e)); -n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(vt,[et],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(yt,[ae,f,X],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
              '+n+'
              '+t.renderHtml(e)+"
              "},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(bt,[Pe],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i=0,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.encode(e.state.get("value"),!1),i="";return"spellcheck"in n&&(i+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(i+=' maxlength="'+n.maxLength+'"'),n.size&&(i+=' size="'+n.size+'"'),n.subtype&&(i+=' type="'+n.subtype+'"'),e.disabled()&&(i+=' disabled="disabled"'),n.multiline?'":'"},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(xt,[f,ee],function(e,t){return function(n,r){var i=this,o,a=t.classPrefix;i.show=function(t,s){return i.hide(),o=!0,window.setTimeout(function(){o&&(e(n).append('
              '),s&&s())},t||0),i},i.hide=function(){var e=n.lastChild;return e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),o=!1,i}}}),a([l,c,u,d,f,h,p,m,g,y,b,x,C,_,E,N,S,k,T,R,A,B,D,L,M,H,O,I,F,z,W,V,U,$,q,j,K,Y,G,X,J,Q,Z,ee,te,ne,re,ie,oe,ae,se,le,ce,ue,de,fe,he,pe,me,ge,ye,we,_e,Ee,Ne,Se,ke,Te,Re,Ae,Be,De,Le,Me,He,Pe,Oe,Ie,Fe,ze,We,Ve,Ue,$e,qe,je,Ke,Ye,Ge,Xe,Je,Qe,Ze,et,tt,nt,rt,it,ot,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,xt])}(this); \ No newline at end of file +// 4.4.1 (2016-07-26) +!function(e,t){"use strict";function n(e,t){for(var n,r=[],i=0;i=r.x&&o.x+o.w<=r.w+r.x&&o.y>=r.y&&o.y+o.h<=r.h+r.y)return i[a];return null}function n(e,t,n){return o(e.x-t,e.y-n,e.w+2*t,e.h+2*n)}function r(e,t){var n,r,i,a;return n=l(e.x,t.x),r=l(e.y,t.y),i=s(e.x+e.w,t.x+t.w),a=s(e.y+e.h,t.y+t.h),0>i-n||0>a-r?null:o(n,r,i-n,a-r)}function i(e,t,n){var r,i,a,s,c,u,d,f,h,p;return c=e.x,u=e.y,d=e.x+e.w,f=e.y+e.h,h=t.x+t.w,p=t.y+t.h,r=l(0,t.x-c),i=l(0,t.y-u),a=l(0,d-h),s=l(0,f-p),c+=r,u+=i,n&&(d+=r,f+=i,c-=a,u-=s),d-=a,f-=s,o(c,u,d-c,f-u)}function o(e,t,n,r){return{x:e,y:t,w:n,h:r}}function a(e){return o(e.left,e.top,e.width,e.height)}var s=Math.min,l=Math.max,c=Math.round;return{inflate:n,relativePosition:e,findBestRelativePosition:t,intersect:r,clamp:i,create:o,fromClientRect:a}}),r(c,[],function(){function e(e,t){return function(){e.apply(t,arguments)}}function t(t){if("object"!=typeof this)throw new TypeError("Promises must be constructed via new");if("function"!=typeof t)throw new TypeError("not a function");this._state=null,this._value=null,this._deferreds=[],s(t,e(r,this),e(i,this))}function n(e){var t=this;return null===this._state?void this._deferreds.push(e):void l(function(){var n=t._state?e.onFulfilled:e.onRejected;if(null===n)return void(t._state?e.resolve:e.reject)(t._value);var r;try{r=n(t._value)}catch(i){return void e.reject(i)}e.resolve(r)})}function r(t){try{if(t===this)throw new TypeError("A promise cannot be resolved with itself.");if(t&&("object"==typeof t||"function"==typeof t)){var n=t.then;if("function"==typeof n)return void s(e(n,t),e(r,this),e(i,this))}this._state=!0,this._value=t,o.call(this)}catch(a){i.call(this,a)}}function i(e){this._state=!1,this._value=e,o.call(this)}function o(){for(var e=0,t=this._deferreds.length;t>e;e++)n.call(this,this._deferreds[e]);this._deferreds=null}function a(e,t,n,r){this.onFulfilled="function"==typeof e?e:null,this.onRejected="function"==typeof t?t:null,this.resolve=n,this.reject=r}function s(e,t,n){var r=!1;try{e(function(e){r||(r=!0,t(e))},function(e){r||(r=!0,n(e))})}catch(i){if(r)return;r=!0,n(i)}}if(window.Promise)return window.Promise;var l=t.immediateFn||"function"==typeof setImmediate&&setImmediate||function(e){setTimeout(e,1)},c=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return t.prototype["catch"]=function(e){return this.then(null,e)},t.prototype.then=function(e,r){var i=this;return new t(function(t,o){n.call(i,new a(e,r,t,o))})},t.all=function(){var e=Array.prototype.slice.call(1===arguments.length&&c(arguments[0])?arguments[0]:arguments);return new t(function(t,n){function r(o,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){r(o,e)},n)}e[o]=a,0===--i&&t(e)}catch(l){n(l)}}if(0===e.length)return t([]);for(var i=e.length,o=0;or;r++)e[r].then(t,n)})},t}),r(u,[c],function(e){function t(e,t){function n(e){window.setTimeout(e,0)}var r,i=window.requestAnimationFrame,o=["ms","moz","webkit"];for(r=0;r=534;return{opera:r,webkit:i,ie:o,gecko:l,mac:c,iOS:u,android:d,contentEditable:g,transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",caretAfter:8!=o,range:window.getSelection&&"Range"in window,documentMode:o&&!s?document.documentMode||7:10,fileApi:f,ceFalse:o===!1||o>8,desktop:!h&&!p,windowsPhone:m}}),r(f,[u,d],function(e,t){function n(e,t,n,r){e.addEventListener?e.addEventListener(t,n,r||!1):e.attachEvent&&e.attachEvent("on"+t,n)}function r(e,t,n,r){e.removeEventListener?e.removeEventListener(t,n,r||!1):e.detachEvent&&e.detachEvent("on"+t,n)}function i(e,t){var n,r=t;return n=e.path,n&&n.length>0&&(r=n[0]),e.deepPath&&(n=e.deepPath(),n&&n.length>0&&(r=n[0])),r}function o(e,n){function r(){return!1}function o(){return!0}var a,s=n||{},l;for(a in e)u[a]||(s[a]=e[a]);if(s.target||(s.target=s.srcElement||document),t.experimentalShadowDom&&(s.target=i(e,s.target)),e&&c.test(e.type)&&e.pageX===l&&e.clientX!==l){var d=s.target.ownerDocument||document,f=d.documentElement,h=d.body;s.pageX=e.clientX+(f&&f.scrollLeft||h&&h.scrollLeft||0)-(f&&f.clientLeft||h&&h.clientLeft||0),s.pageY=e.clientY+(f&&f.scrollTop||h&&h.scrollTop||0)-(f&&f.clientTop||h&&h.clientTop||0)}return s.preventDefault=function(){s.isDefaultPrevented=o,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},s.stopPropagation=function(){s.isPropagationStopped=o,e&&(e.stopPropagation?e.stopPropagation():e.cancelBubble=!0)},s.stopImmediatePropagation=function(){s.isImmediatePropagationStopped=o,s.stopPropagation()},s.isDefaultPrevented||(s.isDefaultPrevented=r,s.isPropagationStopped=r,s.isImmediatePropagationStopped=r),"undefined"==typeof s.metaKey&&(s.metaKey=!1),s}function a(t,i,o){function a(){o.domLoaded||(o.domLoaded=!0,i(u))}function s(){("complete"===c.readyState||"interactive"===c.readyState&&c.body)&&(r(c,"readystatechange",s),a())}function l(){try{c.documentElement.doScroll("left")}catch(t){return void e.setTimeout(l)}a()}var c=t.document,u={type:"ready"};return o.domLoaded?void i(u):(c.addEventListener?"complete"===c.readyState?a():n(t,"DOMContentLoaded",a):(n(c,"readystatechange",s),c.documentElement.doScroll&&t.self===t.top&&l()),void n(t,"load",a))}function s(){function e(e,t){var n,r,o,a,s=i[t];if(n=s&&s[e.type])for(r=0,o=n.length;o>r;r++)if(a=n[r],a&&a.func.call(a.scope,e)===!1&&e.preventDefault(),e.isImmediatePropagationStopped())return}var t=this,i={},s,c,u,d,f;c=l+(+new Date).toString(32),d="onmouseenter"in document.documentElement,u="onfocusin"in document.documentElement,f={mouseenter:"mouseover",mouseleave:"mouseout"},s=1,t.domLoaded=!1,t.events=i,t.bind=function(r,l,h,p){function m(t){e(o(t||N.event),g)}var g,v,y,b,C,x,w,N=window;if(r&&3!==r.nodeType&&8!==r.nodeType){for(r[c]?g=r[c]:(g=s++,r[c]=g,i[g]={}),p=p||r,l=l.split(" "),y=l.length;y--;)b=l[y],x=m,C=w=!1,"DOMContentLoaded"===b&&(b="ready"),t.domLoaded&&"ready"===b&&"complete"==r.readyState?h.call(p,o({type:b})):(d||(C=f[b],C&&(x=function(t){var n,r;if(n=t.currentTarget,r=t.relatedTarget,r&&n.contains)r=n.contains(r);else for(;r&&r!==n;)r=r.parentNode;r||(t=o(t||N.event),t.type="mouseout"===t.type?"mouseleave":"mouseenter",t.target=n,e(t,g))})),u||"focusin"!==b&&"focusout"!==b||(w=!0,C="focusin"===b?"focus":"blur",x=function(t){t=o(t||N.event),t.type="focus"===t.type?"focusin":"focusout",e(t,g)}),v=i[g][b],v?"ready"===b&&t.domLoaded?h({type:b}):v.push({func:h,scope:p}):(i[g][b]=v=[{func:h,scope:p}],v.fakeName=C,v.capture=w,v.nativeHandler=x,"ready"===b?a(r,x,t):n(r,C||b,x,w)));return r=v=0,h}},t.unbind=function(e,n,o){var a,s,l,u,d,f;if(!e||3===e.nodeType||8===e.nodeType)return t;if(a=e[c]){if(f=i[a],n){for(n=n.split(" "),l=n.length;l--;)if(d=n[l],s=f[d]){if(o)for(u=s.length;u--;)if(s[u].func===o){var h=s.nativeHandler,p=s.fakeName,m=s.capture;s=s.slice(0,u).concat(s.slice(u+1)),s.nativeHandler=h,s.fakeName=p,s.capture=m,f[d]=s}o&&0!==s.length||(delete f[d],r(e,s.fakeName||d,s.nativeHandler,s.capture))}}else{for(d in f)s=f[d],r(e,s.fakeName||d,s.nativeHandler,s.capture);f={}}for(d in f)return t;delete i[a];try{delete e[c]}catch(g){e[c]=null}}return t},t.fire=function(n,r,i){var a;if(!n||3===n.nodeType||8===n.nodeType)return t;i=o(null,i),i.type=r,i.target=n;do a=n[c],a&&e(i,a),n=n.parentNode||n.ownerDocument||n.defaultView||n.parentWindow;while(n&&!i.isPropagationStopped());return t},t.clean=function(e){var n,r,i=t.unbind;if(!e||3===e.nodeType||8===e.nodeType)return t;if(e[c]&&i(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName)for(i(e),r=e.getElementsByTagName("*"),n=r.length;n--;)e=r[n],e[c]&&i(e);return t},t.destroy=function(){i={}},t.cancel=function(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}}var l="mce-data-",c=/^(?:mouse|contextmenu)|click/,u={keyLocation:1,layerX:1,layerY:1,returnValue:1,webkitMovementX:1,webkitMovementY:1,keyIdentifier:1};return s.Event=new s,s.Event.bind(window,"ready",function(){}),s}),r(h,[],function(){function e(e,t,n,r){var i,o,a,s,l,c,d,h,p,m;if((t?t.ownerDocument||t:z)!==D&&B(t),t=t||D,n=n||[],!e||"string"!=typeof e)return n;if(1!==(s=t.nodeType)&&9!==s)return[];if(M&&!r){if(i=ve.exec(e))if(a=i[1]){if(9===s){if(o=t.getElementById(a),!o||!o.parentNode)return n;if(o.id===a)return n.push(o),n}else if(t.ownerDocument&&(o=t.ownerDocument.getElementById(a))&&I(t,o)&&o.id===a)return n.push(o),n}else{if(i[2])return Z.apply(n,t.getElementsByTagName(e)),n;if((a=i[3])&&x.getElementsByClassName)return Z.apply(n,t.getElementsByClassName(a)),n}if(x.qsa&&(!P||!P.test(e))){if(h=d=F,p=t,m=9===s&&e,1===s&&"object"!==t.nodeName.toLowerCase()){for(c=_(e),(d=t.getAttribute("id"))?h=d.replace(be,"\\$&"):t.setAttribute("id",h),h="[id='"+h+"'] ",l=c.length;l--;)c[l]=h+f(c[l]);p=ye.test(e)&&u(t.parentNode)||t,m=c.join(",")}if(m)try{return Z.apply(n,p.querySelectorAll(m)),n}catch(g){}finally{d||t.removeAttribute("id")}}}return k(e.replace(se,"$1"),t,n,r)}function n(){function e(n,r){return t.push(n+" ")>w.cacheLength&&delete e[t.shift()],e[n+" "]=r}var t=[];return e}function r(e){return e[F]=!0,e}function i(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function o(e,t){for(var n=e.split("|"),r=e.length;r--;)w.attrHandle[n[r]]=t}function a(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function s(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function l(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function c(e){return r(function(t){return t=+t,r(function(n,r){for(var i,o=e([],n.length,t),a=o.length;a--;)n[i=o[a]]&&(n[i]=!(r[i]=n[i]))})})}function u(e){return e&&typeof e.getElementsByTagName!==Y&&e}function d(){}function f(e){for(var t=0,n=e.length,r="";n>t;t++)r+=e[t].value;return r}function h(e,t,n){var r=t.dir,i=n&&"parentNode"===r,o=W++;return t.first?function(t,n,o){for(;t=t[r];)if(1===t.nodeType||i)return e(t,n,o)}:function(t,n,a){var s,l,c=[U,o];if(a){for(;t=t[r];)if((1===t.nodeType||i)&&e(t,n,a))return!0}else for(;t=t[r];)if(1===t.nodeType||i){if(l=t[F]||(t[F]={}),(s=l[r])&&s[0]===U&&s[1]===o)return c[2]=s[2];if(l[r]=c,c[2]=e(t,n,a))return!0}}}function p(e){return e.length>1?function(t,n,r){for(var i=e.length;i--;)if(!e[i](t,n,r))return!1;return!0}:e[0]}function m(t,n,r){for(var i=0,o=n.length;o>i;i++)e(t,n[i],r);return r}function g(e,t,n,r,i){for(var o,a=[],s=0,l=e.length,c=null!=t;l>s;s++)(o=e[s])&&(n&&!n(o,r,i)||(a.push(o),c&&t.push(s)));return a}function v(e,t,n,i,o,a){return i&&!i[F]&&(i=v(i)),o&&!o[F]&&(o=v(o,a)),r(function(r,a,s,l){var c,u,d,f=[],h=[],p=a.length,v=r||m(t||"*",s.nodeType?[s]:s,[]),y=!e||!r&&t?v:g(v,f,e,s,l),b=n?o||(r?e:p||i)?[]:a:y;if(n&&n(y,b,s,l),i)for(c=g(b,h),i(c,[],s,l),u=c.length;u--;)(d=c[u])&&(b[h[u]]=!(y[h[u]]=d));if(r){if(o||e){if(o){for(c=[],u=b.length;u--;)(d=b[u])&&c.push(y[u]=d);o(null,b=[],c,l)}for(u=b.length;u--;)(d=b[u])&&(c=o?te.call(r,d):f[u])>-1&&(r[c]=!(a[c]=d))}}else b=g(b===a?b.splice(p,b.length):b),o?o(null,a,b,l):Z.apply(a,b)})}function y(e){for(var t,n,r,i=e.length,o=w.relative[e[0].type],a=o||w.relative[" "],s=o?1:0,l=h(function(e){return e===t},a,!0),c=h(function(e){return te.call(t,e)>-1},a,!0),u=[function(e,n,r){return!o&&(r||n!==T)||((t=n).nodeType?l(e,n,r):c(e,n,r))}];i>s;s++)if(n=w.relative[e[s].type])u=[h(p(u),n)];else{if(n=w.filter[e[s].type].apply(null,e[s].matches),n[F]){for(r=++s;i>r&&!w.relative[e[r].type];r++);return v(s>1&&p(u),s>1&&f(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(se,"$1"),n,r>s&&y(e.slice(s,r)),i>r&&y(e=e.slice(r)),i>r&&f(e))}u.push(n)}return p(u)}function b(t,n){var i=n.length>0,o=t.length>0,a=function(r,a,s,l,c){var u,d,f,h=0,p="0",m=r&&[],v=[],y=T,b=r||o&&w.find.TAG("*",c),C=U+=null==y?1:Math.random()||.1,x=b.length;for(c&&(T=a!==D&&a);p!==x&&null!=(u=b[p]);p++){if(o&&u){for(d=0;f=t[d++];)if(f(u,a,s)){l.push(u);break}c&&(U=C)}i&&((u=!f&&u)&&h--,r&&m.push(u))}if(h+=p,i&&p!==h){for(d=0;f=n[d++];)f(m,v,a,s);if(r){if(h>0)for(;p--;)m[p]||v[p]||(v[p]=J.call(l));v=g(v)}Z.apply(l,v),c&&!r&&v.length>0&&h+n.length>1&&e.uniqueSort(l)}return c&&(U=C,T=y),m};return i?r(a):a}var C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,H,O,I,F="sizzle"+-new Date,z=window.document,U=0,W=0,V=n(),$=n(),q=n(),j=function(e,t){return e===t&&(A=!0),0},Y=typeof t,X=1<<31,K={}.hasOwnProperty,G=[],J=G.pop,Q=G.push,Z=G.push,ee=G.slice,te=G.indexOf||function(e){for(var t=0,n=this.length;n>t;t++)if(this[t]===e)return t;return-1},ne="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",re="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+re+"*("+ie+")(?:"+re+"*([*^$|!~]?=)"+re+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+re+"*\\]",ae=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp("^"+re+"+|((?:^|[^\\\\])(?:\\\\.)*)"+re+"+$","g"),le=new RegExp("^"+re+"*,"+re+"*"),ce=new RegExp("^"+re+"*([>+~]|"+re+")"+re+"*"),ue=new RegExp("="+re+"*([^\\]'\"]*?)"+re+"*\\]","g"),de=new RegExp(ae),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+ae),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+re+"*(even|odd|(([+-]|)(\\d*)n|)"+re+"*(?:([+-]|)"+re+"*(\\d+)|))"+re+"*\\)|)","i"),bool:new RegExp("^(?:"+ne+")$","i"),needsContext:new RegExp("^"+re+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+re+"*((?:-\\d)?\\d*)"+re+"*\\)|)(?=[^-]|$)","i")},pe=/^(?:input|select|textarea|button)$/i,me=/^h\d$/i,ge=/^[^{]+\{\s*\[native \w/,ve=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ye=/[+~]/,be=/'|\\/g,Ce=new RegExp("\\\\([\\da-f]{1,6}"+re+"?|("+re+")|.)","ig"),xe=function(e,t,n){var r="0x"+t-65536;return r!==r||n?t:0>r?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)};try{Z.apply(G=ee.call(z.childNodes),z.childNodes),G[z.childNodes.length].nodeType}catch(we){Z={apply:G.length?function(e,t){Q.apply(e,ee.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}x=e.support={},E=e.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},B=e.setDocument=function(e){function t(e){try{return e.top}catch(t){}return null}var n,r=e?e.ownerDocument||e:z,o=r.defaultView;return r!==D&&9===r.nodeType&&r.documentElement?(D=r,L=r.documentElement,M=!E(r),o&&o!==t(o)&&(o.addEventListener?o.addEventListener("unload",function(){B()},!1):o.attachEvent&&o.attachEvent("onunload",function(){B()})),x.attributes=i(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=i(function(e){return e.appendChild(r.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=ge.test(r.getElementsByClassName),x.getById=i(function(e){return L.appendChild(e).id=F,!r.getElementsByName||!r.getElementsByName(F).length}),x.getById?(w.find.ID=function(e,t){if(typeof t.getElementById!==Y&&M){var n=t.getElementById(e);return n&&n.parentNode?[n]:[]}},w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){return e.getAttribute("id")===t}}):(delete w.find.ID,w.filter.ID=function(e){var t=e.replace(Ce,xe);return function(e){var n=typeof e.getAttributeNode!==Y&&e.getAttributeNode("id");return n&&n.value===t}}),w.find.TAG=x.getElementsByTagName?function(e,t){return typeof t.getElementsByTagName!==Y?t.getElementsByTagName(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},w.find.CLASS=x.getElementsByClassName&&function(e,t){return M?t.getElementsByClassName(e):void 0},H=[],P=[],(x.qsa=ge.test(r.querySelectorAll))&&(i(function(e){e.innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&P.push("[*^$]="+re+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||P.push("\\["+re+"*(?:value|"+ne+")"),e.querySelectorAll(":checked").length||P.push(":checked")}),i(function(e){var t=r.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&P.push("name"+re+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||P.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),P.push(",.*:")})),(x.matchesSelector=ge.test(O=L.matches||L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&i(function(e){x.disconnectedMatch=O.call(e,"div"),O.call(e,"[s!='']:x"),H.push("!=",ae)}),P=P.length&&new RegExp(P.join("|")),H=H.length&&new RegExp(H.join("|")),n=ge.test(L.compareDocumentPosition),I=n||ge.test(L.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},j=n?function(e,t){if(e===t)return A=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===r||e.ownerDocument===z&&I(z,e)?-1:t===r||t.ownerDocument===z&&I(z,t)?1:R?te.call(R,e)-te.call(R,t):0:4&n?-1:1)}:function(e,t){if(e===t)return A=!0,0;var n,i=0,o=e.parentNode,s=t.parentNode,l=[e],c=[t];if(!o||!s)return e===r?-1:t===r?1:o?-1:s?1:R?te.call(R,e)-te.call(R,t):0;if(o===s)return a(e,t);for(n=e;n=n.parentNode;)l.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;l[i]===c[i];)i++;return i?a(l[i],c[i]):l[i]===z?-1:c[i]===z?1:0},r):D},e.matches=function(t,n){return e(t,null,null,n)},e.matchesSelector=function(t,n){if((t.ownerDocument||t)!==D&&B(t),n=n.replace(ue,"='$1']"),x.matchesSelector&&M&&(!H||!H.test(n))&&(!P||!P.test(n)))try{var r=O.call(t,n);if(r||x.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return e(n,D,null,[t]).length>0},e.contains=function(e,t){return(e.ownerDocument||e)!==D&&B(e),I(e,t)},e.attr=function(e,n){(e.ownerDocument||e)!==D&&B(e);var r=w.attrHandle[n.toLowerCase()],i=r&&K.call(w.attrHandle,n.toLowerCase())?r(e,n,!M):t;return i!==t?i:x.attributes||!M?e.getAttribute(n):(i=e.getAttributeNode(n))&&i.specified?i.value:null},e.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},e.uniqueSort=function(e){var t,n=[],r=0,i=0;if(A=!x.detectDuplicates,R=!x.sortStable&&e.slice(0),e.sort(j),A){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return R=null,e},N=e.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=N(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=N(t);return n},w=e.selectors={cacheLength:50,createPseudo:r,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(Ce,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(Ce,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||e.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&e.error(t[0]),t},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&de.test(n)&&(t=_(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(Ce,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=V[e+" "];return t||(t=new RegExp("(^|"+re+")"+e+"("+re+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==Y&&e.getAttribute("class")||"")})},ATTR:function(t,n,r){return function(i){var o=e.attr(i,t);return null==o?"!="===n:n?(o+="","="===n?o===r:"!="===n?o!==r:"^="===n?r&&0===o.indexOf(r):"*="===n?r&&o.indexOf(r)>-1:"$="===n?r&&o.slice(-r.length)===r:"~="===n?(" "+o+" ").indexOf(r)>-1:"|="===n?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,l){var c,u,d,f,h,p,m=o!==a?"nextSibling":"previousSibling",g=t.parentNode,v=s&&t.nodeName.toLowerCase(),y=!l&&!s;if(g){if(o){for(;m;){for(d=t;d=d[m];)if(s?d.nodeName.toLowerCase()===v:1===d.nodeType)return!1;p=m="only"===e&&!p&&"nextSibling"}return!0}if(p=[a?g.firstChild:g.lastChild],a&&y){for(u=g[F]||(g[F]={}),c=u[e]||[],h=c[0]===U&&c[1],f=c[0]===U&&c[2],d=h&&g.childNodes[h];d=++h&&d&&d[m]||(f=h=0)||p.pop();)if(1===d.nodeType&&++f&&d===t){u[e]=[U,h,f];break}}else if(y&&(c=(t[F]||(t[F]={}))[e])&&c[0]===U)f=c[1];else for(;(d=++h&&d&&d[m]||(f=h=0)||p.pop())&&((s?d.nodeName.toLowerCase()!==v:1!==d.nodeType)||!++f||(y&&((d[F]||(d[F]={}))[e]=[U,f]),d!==t)););return f-=i,f===r||f%r===0&&f/r>=0}}},PSEUDO:function(t,n){var i,o=w.pseudos[t]||w.setFilters[t.toLowerCase()]||e.error("unsupported pseudo: "+t);return o[F]?o(n):o.length>1?(i=[t,t,"",n],w.setFilters.hasOwnProperty(t.toLowerCase())?r(function(e,t){for(var r,i=o(e,n),a=i.length;a--;)r=te.call(e,i[a]),e[r]=!(t[r]=i[a])}):function(e){return o(e,0,i)}):o}},pseudos:{not:r(function(e){var t=[],n=[],i=S(e.replace(se,"$1"));return i[F]?r(function(e,t,n,r){for(var o,a=i(e,null,r,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,r,o){return t[0]=e,i(t,null,o,n),!n.pop()}}),has:r(function(t){return function(n){return e(t,n).length>0}}),contains:r(function(e){return e=e.replace(Ce,xe),function(t){return(t.textContent||t.innerText||N(t)).indexOf(e)>-1}}),lang:r(function(t){return fe.test(t||"")||e.error("unsupported lang: "+t),t=t.replace(Ce,xe).toLowerCase(),function(e){var n;do if(n=M?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=window.location&&window.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===L},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!w.pseudos.empty(e)},header:function(e){return me.test(e.nodeName)},input:function(e){return pe.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:c(function(){return[0]}),last:c(function(e,t){return[t-1]}),eq:c(function(e,t,n){return[0>n?n+t:n]}),even:c(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:c(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:c(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:c(function(e,t,n){for(var r=0>n?n+t:n;++r2&&"ID"===(a=o[0]).type&&x.getById&&9===t.nodeType&&M&&w.relative[o[1].type]){if(t=(w.find.ID(a.matches[0].replace(Ce,xe),t)||[])[0],!t)return n;c&&(t=t.parentNode), +e=e.slice(o.shift().value.length)}for(i=he.needsContext.test(e)?0:o.length;i--&&(a=o[i],!w.relative[s=a.type]);)if((l=w.find[s])&&(r=l(a.matches[0].replace(Ce,xe),ye.test(o[0].type)&&u(t.parentNode)||t))){if(o.splice(i,1),e=r.length&&f(o),!e)return Z.apply(n,r),n;break}}return(c||S(e,d))(r,t,!M,n,ye.test(e)&&u(t.parentNode)||t),n},x.sortStable=F.split("").sort(j).join("")===F,x.detectDuplicates=!!A,B(),x.sortDetached=i(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),i(function(e){return e.innerHTML="","#"===e.firstChild.getAttribute("href")})||o("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&i(function(e){return e.innerHTML="",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||o("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),i(function(e){return null==e.getAttribute("disabled")})||o(ne,function(e,t,n){var r;return n?void 0:e[t]===!0?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),e}),r(p,[],function(){function e(e){var t=e,n,r;if(!u(e))for(t=[],n=0,r=e.length;r>n;n++)t[n]=e[n];return t}function n(e,n,r){var i,o;if(!e)return 0;if(r=r||e,e.length!==t){for(i=0,o=e.length;o>i;i++)if(n.call(r,e[i],i,e)===!1)return 0}else for(i in e)if(e.hasOwnProperty(i)&&n.call(r,e[i],i,e)===!1)return 0;return 1}function r(e,t){var r=[];return n(e,function(n,i){r.push(t(n,i,e))}),r}function i(e,t){var r=[];return n(e,function(n,i){t&&!t(n,i,e)||r.push(n)}),r}function o(e,t){var n,r;if(e)for(n=0,r=e.length;r>n;n++)if(e[n]===t)return n;return-1}function a(e,t,n,r){var i=0;for(arguments.length<3&&(n=e[0]);ir;r++)if(t.call(n,e[r],r,e))return r;return-1}function l(e,n,r){var i=s(e,n,r);return-1!==i?e[i]:t}function c(e){return e[e.length-1]}var u=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)};return{isArray:u,toArray:e,each:n,map:r,filter:i,indexOf:o,reduce:a,findIndex:s,find:l,last:c}}),r(m,[d,p],function(e,n){function r(e){return null===e||e===t?"":(""+e).replace(h,"")}function i(e,r){return r?"array"==r&&n.isArray(e)?!0:typeof e==r:e!==t}function o(e,t,n){var r;for(e=e||[],t=t||",","string"==typeof e&&(e=e.split(t)),n=n||{},r=e.length;r--;)n[e[r]]={};return n}function a(e,t,n){var r=this,i,o,a,s,l,c=0;if(e=/^((static) )?([\w.]+)(:([\w.]+))?/.exec(e),a=e[3].match(/(^|\.)(\w+)$/i)[2],o=r.createNS(e[3].replace(/\.\w+$/,""),n),!o[a]){if("static"==e[2])return o[a]=t,void(this.onCreate&&this.onCreate(e[2],e[3],o[a]));t[a]||(t[a]=function(){},c=1),o[a]=t[a],r.extend(o[a].prototype,t),e[5]&&(i=r.resolve(e[5]).prototype,s=e[5].match(/\.(\w+)$/i)[1],l=o[a],c?o[a]=function(){return i[s].apply(this,arguments)}:o[a]=function(){return this.parent=i[s],l.apply(this,arguments)},o[a].prototype[a]=o[a],r.each(i,function(e,t){o[a].prototype[t]=i[t]}),r.each(t,function(e,t){i[t]?o[a].prototype[t]=function(){return this.parent=i[t],e.apply(this,arguments)}:t!=a&&(o[a].prototype[t]=e)})),r.each(t["static"],function(e,t){o[a][t]=e})}}function s(e,n){var r,i,o,a=arguments,s;for(r=1,i=a.length;i>r;r++){n=a[r];for(o in n)n.hasOwnProperty(o)&&(s=n[o],s!==t&&(e[o]=s))}return e}function l(e,t,r,i){i=i||this,e&&(r&&(e=e[r]),n.each(e,function(e,n){return t.call(i,e,n,r)===!1?!1:void l(e,t,r,i)}))}function c(e,t){var n,r;for(t=t||window,e=e.split("."),n=0;nn&&(t=t[e[n]],t);n++);return t}function d(e,t){return!e||i(e,"array")?e:n.map(e.split(t||","),r)}function f(t){var n=e.cacheSuffix;return n&&(t+=(-1===t.indexOf("?")?"?":"&")+n),t}var h=/^\s*|\s*$/g;return{trim:r,isArray:n.isArray,is:i,toArray:n.toArray,makeMap:o,each:n.each,map:n.map,grep:n.filter,inArray:n.indexOf,extend:s,create:a,walk:l,createNS:c,resolve:u,explode:d,_addCacheSuffix:f}}),r(g,[f,h,m,d],function(e,n,r,i){function o(e){return"undefined"!=typeof e}function a(e){return"string"==typeof e}function s(e){return e&&e==e.window}function l(e,t){var n,r,i;for(t=t||w,i=t.createElement("div"),n=t.createDocumentFragment(),i.innerHTML=e;r=i.firstChild;)n.appendChild(r);return n}function c(e,t,n,r){var i;if(a(t))t=l(t,v(e[0]));else if(t.length&&!t.nodeType){if(t=f.makeArray(t),r)for(i=t.length-1;i>=0;i--)c(e,t[i],n,r);else for(i=0;ii&&(a=e[i],t.call(a,i,a)!==!1);i++);return e}function g(e,t){var n=[];return m(e,function(e,r){t(r,e)&&n.push(r)}),n}function v(e){return e?9==e.nodeType?e:e.ownerDocument:w}function y(e,n,r){var i=[],o=e[n];for("string"!=typeof r&&r instanceof f&&(r=r[0]);o&&9!==o.nodeType;){if(r!==t){if(o===r)break;if("string"==typeof r&&f(o).is(r))break}1===o.nodeType&&i.push(o),o=o[n]}return i}function b(e,n,r,i){var o=[];for(i instanceof f&&(i=i[0]);e;e=e[n])if(!r||e.nodeType===r){if(i!==t){if(e===i)break;if("string"==typeof i&&f(e).is(i))break}o.push(e)}return o}function C(e,t,n){for(e=e[t];e;e=e[t])if(e.nodeType==n)return e;return null}function x(e,t,n){m(n,function(n,r){e[n]=e[n]||{},e[n][t]=r})}var w=document,N=Array.prototype.push,E=Array.prototype.slice,_=/^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,S=e.Event,k,T=r.makeMap("children,contents,next,prev"),R=r.makeMap("fillOpacity fontWeight lineHeight opacity orphans widows zIndex zoom"," "),A=r.makeMap("checked compact declare defer disabled ismap multiple nohref noshade nowrap readonly selected"," "),B={"for":"htmlFor","class":"className",readonly:"readOnly"},D={"float":"cssFloat"},L={},M={},P=/^\s*|\s*$/g;return f.fn=f.prototype={constructor:f,selector:"",context:null,length:0,init:function(e,t){var n=this,r,i;if(!e)return n;if(e.nodeType)return n.context=n[0]=e,n.length=1,n;if(t&&t.nodeType)n.context=t;else{if(t)return f(e).attr(t);n.context=t=document}if(a(e)){if(n.selector=e,r="<"===e.charAt(0)&&">"===e.charAt(e.length-1)&&e.length>=3?[null,e,null]:_.exec(e),!r)return f(t).find(e);if(r[1])for(i=l(e,v(t)).firstChild;i;)N.call(n,i),i=i.nextSibling;else{if(i=v(t).getElementById(r[2]),!i)return n;if(i.id!==r[2])return n.find(e);n.length=1,n[0]=i}}else this.add(e,!1);return n},toArray:function(){return r.toArray(this)},add:function(e,t){var n=this,r,i;if(a(e))return n.add(f(e));if(t!==!1)for(r=f.unique(n.toArray().concat(f.makeArray(e))),n.length=r.length,i=0;it;t++)f.find(e,this[t],r);return f(r)},filter:function(e){return f("function"==typeof e?g(this.toArray(),function(t,n){return e(n,t)}):f.filter(e,this.toArray()))},closest:function(e){var t=[];return e instanceof f&&(e=e[0]),this.each(function(n,r){for(;r;){if("string"==typeof e&&f(r).is(e)){t.push(r);break}if(r==e){t.push(r);break}r=r.parentNode}}),f(t)},offset:function(e){var t,n,r,i=0,o=0,a;return e?this.css(e):(t=this[0],t&&(n=t.ownerDocument,r=n.documentElement,t.getBoundingClientRect&&(a=t.getBoundingClientRect(),i=a.left+(r.scrollLeft||n.body.scrollLeft)-r.clientLeft,o=a.top+(r.scrollTop||n.body.scrollTop)-r.clientTop)),{left:i,top:o})},push:N,sort:[].sort,splice:[].splice},r.extend(f,{extend:r.extend,makeArray:function(e){return s(e)||e.nodeType?[e]:r.toArray(e)},inArray:h,isArray:r.isArray,each:m,trim:p,grep:g,find:n,expr:n.selectors,unique:n.uniqueSort,text:n.getText,contains:n.contains,filter:function(e,t,n){var r=t.length;for(n&&(e=":not("+e+")");r--;)1!=t[r].nodeType&&t.splice(r,1);return t=1===t.length?f.find.matchesSelector(t[0],e)?[t[0]]:[]:f.find.matches(e,t)}}),m({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return y(e,"parentNode")},next:function(e){return C(e,"nextSibling",1)},prev:function(e){return C(e,"previousSibling",1)},children:function(e){return b(e.firstChild,"nextSibling",1)},contents:function(e){return r.toArray(("iframe"===e.nodeName?e.contentDocument||e.contentWindow.document:e).childNodes)}},function(e,t){f.fn[e]=function(n){var r=this,i=[];return r.each(function(){var e=t.call(i,this,n,i);e&&(f.isArray(e)?i.push.apply(i,e):i.push(e))}),this.length>1&&(T[e]||(i=f.unique(i)),0===e.indexOf("parents")&&(i=i.reverse())),i=f(i),n?i.filter(n):i}}),m({parentsUntil:function(e,t){return y(e,"parentNode",t)},nextUntil:function(e,t){return b(e,"nextSibling",1,t).slice(1)},prevUntil:function(e,t){return b(e,"previousSibling",1,t).slice(1)}},function(e,t){f.fn[e]=function(n,r){var i=this,o=[];return i.each(function(){var e=t.call(o,this,n,o);e&&(f.isArray(e)?o.push.apply(o,e):o.push(e))}),this.length>1&&(o=f.unique(o),0!==e.indexOf("parents")&&"prevUntil"!==e||(o=o.reverse())),o=f(o),r?o.filter(r):o}}),f.fn.is=function(e){return!!e&&this.filter(e).length>0},f.fn.init.prototype=f.fn,f.overrideDefaults=function(e){function t(r,i){return n=n||e(),0===arguments.length&&(r=n.element),i||(i=n.context),new t.fn.init(r,i)}var n;return f.extend(t,this),t},i.ie&&i.ie<8&&(x(L,"get",{maxlength:function(e){var t=e.maxLength;return 2147483647===t?k:t},size:function(e){var t=e.size;return 20===t?k:t},"class":function(e){return e.className},style:function(e){var t=e.style.cssText;return 0===t.length?k:t}}),x(L,"set",{"class":function(e,t){e.className=t},style:function(e,t){e.style.cssText=t}})),i.ie&&i.ie<9&&(D["float"]="styleFloat",x(M,"set",{opacity:function(e,t){var n=e.style;null===t||""===t?n.removeAttribute("filter"):(n.zoom=1,n.filter="alpha(opacity="+100*t+")")}})),f.attrHooks=L,f.cssHooks=M,f}),r(v,[],function(){return function(e,t){function n(e,t,n,r){function i(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+i(t)+i(n)+i(r)}var r=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,i=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,o=/\s*([^:]+):\s*([^;]+);?/g,a=/\s+$/,s,l,c={},u,d,f,h="\ufeff";for(e=e||{},t&&(d=t.getValidStyles(),f=t.getInvalidStyles()),u=("\\\" \\' \\; \\: ; : "+h).split(" "),l=0;l-1&&n||(m[e+t]=-1==l?s[0]:s.join(" "),delete m[e+"-top"+t],delete m[e+"-right"+t],delete m[e+"-bottom"+t],delete m[e+"-left"+t])}}function u(e){var t=m[e],n;if(t){for(t=t.split(" "),n=t.length;n--;)if(t[n]!==t[0])return!1;return m[e]=t[0],!0}}function d(e,t,n,r){u(t)&&u(n)&&u(r)&&(m[e]=m[t]+" "+m[n]+" "+m[r],delete m[t],delete m[n],delete m[r])}function f(e){return b=!0,c[e]}function h(e,t){return b&&(e=e.replace(/\uFEFF[0-9]/g,function(e){return c[e]})),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e}function p(t,n,r,i,o,a){if(o=o||a)return o=h(o),"'"+o.replace(/\'/g,"\\'")+"'";if(n=h(n||r||i),!e.allow_script_urls){var s=n.replace(/[\s\r\n]+/,"");if(/(java|vb)script:/i.test(s))return"";if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(s))return""}return C&&(n=C.call(x,n,"style")),"url('"+n.replace(/\'/g,"\\'")+"')"}var m={},g,v,y,b,C=e.url_converter,x=e.url_converter_scope||this;if(t){for(t=t.replace(/[\u0000-\u001F]/g,""),t=t.replace(/\\[\"\';:\uFEFF]/g,f).replace(/\"[^\"]+\"|\'[^\']+\'/g,function(e){return e.replace(/[;:]/g,f)});g=o.exec(t);){if(v=g[1].replace(a,"").toLowerCase(),y=g[2].replace(a,""),y=y.replace(/\\[0-9a-f]+/g,function(e){return String.fromCharCode(parseInt(e.substr(1),16))}),v&&y.length>0){if(!e.allow_script_urls&&("behavior"==v||/expression\s*\(|\/\*|\*\//.test(y)))continue;"font-weight"===v&&"700"===y?y="bold":"color"!==v&&"background-color"!==v||(y=y.toLowerCase()),y=y.replace(r,n),y=y.replace(i,p),m[v]=b?h(y,!0):y}o.lastIndex=g.index+g[0].length}s("border","",!0),s("border","-width"),s("border","-color"),s("border","-style"),s("padding",""),s("margin",""),d("border","border-width","border-style","border-color"),"medium none"===m.border&&delete m.border,"none"===m["border-image"]&&delete m["border-image"]}return m},serialize:function(e,t){function n(t){var n,r,o,a;if(n=d[t])for(r=0,o=n.length;o>r;r++)t=n[r],a=e[t],a!==s&&a.length>0&&(i+=(i.length>0?" ":"")+t+": "+a+";")}function r(e,t){var n;return n=f["*"],n&&n[e]?!1:(n=f[t],!n||!n[e])}var i="",o,a;if(t&&d)n("*"),n(t);else for(o in e)a=e[o],a!==s&&a.length>0&&(f&&!r(o,t)||(i+=(i.length>0?" ":"")+o+": "+a+";"));return i}}}}),r(y,[],function(){return function(e,t){function n(e,n,r,i){var o,a;if(e){if(!i&&e[n])return e[n];if(e!=t){if(o=e[r])return o;for(a=e.parentNode;a&&a!=t;a=a.parentNode)if(o=a[r])return o}}}function r(e,n,r,i){var o,a,s;if(e){if(o=e[r],t&&o===t)return;if(o){if(!i)for(s=o[n];s;s=s[n])if(!s[n])return s;return o}if(a=e.parentNode,a&&a!==t)return a}}var i=e;this.current=function(){return i},this.next=function(e){return i=n(i,"firstChild","nextSibling",e)},this.prev=function(e){return i=n(i,"lastChild","previousSibling",e)},this.prev2=function(e){return i=r(i,"lastChild","previousSibling",e)}}}),r(b,[m],function(e){function t(n){function r(){return P.createDocumentFragment()}function i(e,t){N(F,e,t)}function o(e,t){N(z,e,t)}function a(e){i(e.parentNode,j(e))}function s(e){i(e.parentNode,j(e)+1)}function l(e){o(e.parentNode,j(e))}function c(e){o(e.parentNode,j(e)+1)}function u(e){e?(M[V]=M[W],M[$]=M[U]):(M[W]=M[V],M[U]=M[$]),M.collapsed=F}function d(e){a(e),c(e)}function f(e){i(e,0),o(e,1===e.nodeType?e.childNodes.length:e.nodeValue.length)}function h(e,t){var n=M[W],r=M[U],i=M[V],o=M[$],a=t.startContainer,s=t.startOffset,l=t.endContainer,c=t.endOffset;return 0===e?w(n,r,a,s):1===e?w(i,o,a,s):2===e?w(i,o,l,c):3===e?w(n,r,l,c):void 0}function p(){E(I)}function m(){return E(H)}function g(){return E(O)}function v(e){var t=this[W],r=this[U],i,o;3!==t.nodeType&&4!==t.nodeType||!t.nodeValue?(t.childNodes.length>0&&(o=t.childNodes[r]),o?t.insertBefore(e,o):3==t.nodeType?n.insertAfter(e,t):t.appendChild(e)):r?r>=t.nodeValue.length?n.insertAfter(e,t):(i=t.splitText(r),t.parentNode.insertBefore(e,i)):t.parentNode.insertBefore(e,t)}function y(e){var t=M.extractContents();M.insertNode(e),e.appendChild(t),M.selectNode(e)}function b(){return q(new t(n),{startContainer:M[W],startOffset:M[U],endContainer:M[V],endOffset:M[$],collapsed:M.collapsed,commonAncestorContainer:M.commonAncestorContainer})}function C(e,t){var n;if(3==e.nodeType)return e;if(0>t)return e;for(n=e.firstChild;n&&t>0;)--t,n=n.nextSibling;return n?n:e}function x(){return M[W]==M[V]&&M[U]==M[$]}function w(e,t,r,i){var o,a,s,l,c,u;if(e==r)return t==i?0:i>t?-1:1;for(o=r;o&&o.parentNode!=e;)o=o.parentNode;if(o){for(a=0,s=e.firstChild;s!=o&&t>a;)a++,s=s.nextSibling;return a>=t?-1:1}for(o=e;o&&o.parentNode!=r;)o=o.parentNode;if(o){for(a=0,s=r.firstChild;s!=o&&i>a;)a++,s=s.nextSibling;return i>a?-1:1}for(l=n.findCommonAncestor(e,r),c=e;c&&c.parentNode!=l;)c=c.parentNode;for(c||(c=l),u=r;u&&u.parentNode!=l;)u=u.parentNode;if(u||(u=l),c==u)return 0;for(s=l.firstChild;s;){if(s==c)return-1;if(s==u)return 1;s=s.nextSibling}}function N(e,t,r){var i,o;for(e?(M[W]=t,M[U]=r):(M[V]=t,M[$]=r),i=M[V];i.parentNode;)i=i.parentNode;for(o=M[W];o.parentNode;)o=o.parentNode;o==i?w(M[W],M[U],M[V],M[$])>0&&M.collapse(e):M.collapse(e),M.collapsed=x(),M.commonAncestorContainer=n.findCommonAncestor(M[W],M[V])}function E(e){var t,n=0,r=0,i,o,a,s,l,c;if(M[W]==M[V])return _(e);for(t=M[V],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[W])return S(t,e);++n}for(t=M[W],i=t.parentNode;i;t=i,i=i.parentNode){if(i==M[V])return k(t,e);++r}for(o=r-n,a=M[W];o>0;)a=a.parentNode,o--;for(s=M[V];0>o;)s=s.parentNode,o++;for(l=a.parentNode,c=s.parentNode;l!=c;l=l.parentNode,c=c.parentNode)a=l,s=c;return T(a,s,e)}function _(e){var t,n,i,o,a,s,l,c,u;if(e!=I&&(t=r()),M[U]==M[$])return t;if(3==M[W].nodeType){if(n=M[W].nodeValue,i=n.substring(M[U],M[$]),e!=O&&(o=M[W],c=M[U],u=M[$]-M[U],0===c&&u>=o.nodeValue.length-1?o.parentNode.removeChild(o):o.deleteData(c,u),M.collapse(F)),e==I)return;return i.length>0&&t.appendChild(P.createTextNode(i)),t}for(o=C(M[W],M[U]),a=M[$]-M[U];o&&a>0;)s=o.nextSibling,l=D(o,e),t&&t.appendChild(l),--a,o=s;return e!=O&&M.collapse(F),t}function S(e,t){var n,i,o,a,s,l;if(t!=I&&(n=r()),i=R(e,t),n&&n.appendChild(i),o=j(e),a=o-M[U],0>=a)return t!=O&&(M.setEndBefore(e),M.collapse(z)),n;for(i=e.previousSibling;a>0;)s=i.previousSibling,l=D(i,t),n&&n.insertBefore(l,n.firstChild),--a,i=s;return t!=O&&(M.setEndBefore(e),M.collapse(z)),n}function k(e,t){var n,i,o,a,s,l;for(t!=I&&(n=r()),o=A(e,t),n&&n.appendChild(o),i=j(e),++i,a=M[$]-i,o=e.nextSibling;o&&a>0;)s=o.nextSibling,l=D(o,t),n&&n.appendChild(l),--a,o=s;return t!=O&&(M.setStartAfter(e),M.collapse(F)),n}function T(e,t,n){var i,o,a,s,l,c,u;for(n!=I&&(o=r()),i=A(e,n),o&&o.appendChild(i),a=j(e),s=j(t),++a,l=s-a,c=e.nextSibling;l>0;)u=c.nextSibling,i=D(c,n),o&&o.appendChild(i),c=u,--l;return i=R(t,n),o&&o.appendChild(i),n!=O&&(M.setStartAfter(e),M.collapse(F)),o}function R(e,t){var n=C(M[V],M[$]-1),r,i,o,a,s,l=n!=M[V];if(n==e)return B(n,l,z,t);for(r=n.parentNode,i=B(r,z,z,t);r;){for(;n;)o=n.previousSibling,a=B(n,l,z,t),t!=I&&i.insertBefore(a,i.firstChild),l=F,n=o;if(r==e)return i;n=r.previousSibling,r=r.parentNode,s=B(r,z,z,t),t!=I&&s.appendChild(i),i=s}}function A(e,t){var n=C(M[W],M[U]),r=n!=M[W],i,o,a,s,l;if(n==e)return B(n,r,F,t);for(i=n.parentNode,o=B(i,z,F,t);i;){for(;n;)a=n.nextSibling,s=B(n,r,F,t),t!=I&&o.appendChild(s),r=F,n=a;if(i==e)return o;n=i.nextSibling,i=i.parentNode,l=B(i,z,F,t),t!=I&&l.appendChild(o),o=l}}function B(e,t,r,i){var o,a,s,l,c;if(t)return D(e,i);if(3==e.nodeType){if(o=e.nodeValue,r?(l=M[U],a=o.substring(l),s=o.substring(0,l)):(l=M[$],a=o.substring(0,l),s=o.substring(l)),i!=O&&(e.nodeValue=s),i==I)return;return c=n.clone(e,z),c.nodeValue=a,c}if(i!=I)return n.clone(e,z)}function D(e,t){return t!=I?t==O?n.clone(e,F):e:void e.parentNode.removeChild(e)}function L(){return n.create("body",null,g()).outerText}var M=this,P=n.doc,H=0,O=1,I=2,F=!0,z=!1,U="startOffset",W="startContainer",V="endContainer",$="endOffset",q=e.extend,j=n.nodeIndex;return q(M,{startContainer:P,startOffset:0,endContainer:P,endOffset:0,collapsed:F,commonAncestorContainer:P,START_TO_START:0,START_TO_END:1,END_TO_END:2,END_TO_START:3,setStart:i,setEnd:o,setStartBefore:a,setStartAfter:s,setEndBefore:l,setEndAfter:c,collapse:u,selectNode:d,selectNodeContents:f,compareBoundaryPoints:h,deleteContents:p,extractContents:m,cloneContents:g,insertNode:v,surroundContents:y,cloneRange:b,toStringIE:L}),M}return t.prototype.toString=function(){return this.toStringIE()},t}),r(C,[m],function(e){function t(e){var t;return t=document.createElement("div"),t.innerHTML=e,t.textContent||t.innerText||e}function n(e,t){var n,r,i,a={};if(e){for(e=e.split(","),t=t||10,n=0;n\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,l=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,c=/[<>&\"\']/g,u=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,d={128:"\u20ac",130:"\u201a",131:"\u0192",132:"\u201e",133:"\u2026",134:"\u2020",135:"\u2021",136:"\u02c6",137:"\u2030",138:"\u0160",139:"\u2039",140:"\u0152",142:"\u017d",145:"\u2018",146:"\u2019",147:"\u201c",148:"\u201d",149:"\u2022",150:"\u2013",151:"\u2014",152:"\u02dc",153:"\u2122",154:"\u0161",155:"\u203a",156:"\u0153",158:"\u017e",159:"\u0178"};o={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"},a={"<":"<",">":">","&":"&",""":'"',"'":"'"},i=n("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);var f={encodeRaw:function(e,t){return e.replace(t?s:l,function(e){return o[e]||e})},encodeAllRaw:function(e){return(""+e).replace(c,function(e){return o[e]||e})},encodeNumeric:function(e,t){return e.replace(t?s:l,function(e){return e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":o[e]||"&#"+e.charCodeAt(0)+";"})},encodeNamed:function(e,t,n){return n=n||i,e.replace(t?s:l,function(e){return o[e]||n[e]||e})},getEncodeFunc:function(e,t){function a(e,n){return e.replace(n?s:l,function(e){return o[e]||t[e]||"&#"+e.charCodeAt(0)+";"||e})}function c(e,n){return f.encodeNamed(e,n,t)}return t=n(t)||i,e=r(e.replace(/\+/g,",")),e.named&&e.numeric?a:e.named?t?c:f.encodeNamed:e.numeric?f.encodeNumeric:f.encodeRaw},decode:function(e){return e.replace(u,function(e,n){return n?(n="x"===n.charAt(0).toLowerCase()?parseInt(n.substr(1),16):parseInt(n,10),n>65535?(n-=65536,String.fromCharCode(55296+(n>>10),56320+(1023&n))):d[n]||String.fromCharCode(n)):a[e]||i[e]||t(e)})}};return f}),r(x,[m,u],function(e,t){return function(n,r){function i(e){n.getElementsByTagName("head")[0].appendChild(e)}function o(r,o,c){function u(){for(var e=b.passed,t=e.length;t--;)e[t]();b.status=2,b.passed=[],b.failed=[]}function d(){for(var e=b.failed,t=e.length;t--;)e[t]();b.status=3,b.passed=[],b.failed=[]}function f(){var e=navigator.userAgent.match(/WebKit\/(\d*)/);return!!(e&&e[1]<536)}function h(e,n){e()||((new Date).getTime()-y0)return v=n.createElement("style"),v.textContent='@import "'+r+'"',m(),void i(v);p()}i(g),g.href=r}}var a=0,s={},l;r=r||{},l=r.maxLoadTime||5e3,this.load=o}}),r(w,[h,g,v,f,y,b,C,d,m,x],function(e,n,r,i,o,a,s,l,c,u){function d(e,t){var n={},r=t.keep_values,i;return i={set:function(n,r,i){t.url_converter&&(r=t.url_converter.call(t.url_converter_scope||e,r,i,n[0])),n.attr("data-mce-"+i,r).attr(i,r)},get:function(e,t){return e.attr("data-mce-"+t)||e.attr(t)}},n={style:{set:function(e,t){return null!==t&&"object"==typeof t?void e.css(t):(r&&e.attr("data-mce-style",t),void e.attr("style",t))},get:function(t){var n=t.attr("data-mce-style")||t.attr("style");return n=e.serializeStyle(e.parseStyle(n),t[0].nodeName)}}},r&&(n.href=n.src=i),n}function f(e,t){var n=t.attr("style");n=e.serializeStyle(e.parseStyle(n),t[0].nodeName),n||(n=null),t.attr("data-mce-style",n)}function h(e,t){var n=0,r,i;if(e)for(r=e.nodeType,e=e.previousSibling;e;e=e.previousSibling)i=e.nodeType,(!t||3!=i||i!=r&&e.nodeValue.length)&&(n++,r=i);return n}function p(e,t){var o=this,a;o.doc=e,o.win=window,o.files={},o.counter=0,o.stdMode=!b||e.documentMode>=8,o.boxModel=!b||"CSS1Compat"==e.compatMode||o.stdMode,o.styleSheetLoader=new u(e),o.boundEvents=[],o.settings=t=t||{},o.schema=t.schema,o.styles=new r({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),o.fixDoc(e),o.events=t.ownEvents?new i(t.proxy):i.Event,o.attrHooks=d(o,t),a=t.schema?t.schema.getBlockElements():{},o.$=n.overrideDefaults(function(){return{context:e,element:o.getRoot()}}),o.isBlock=function(e){if(!e)return!1;var t=e.nodeType;return t?!(1!==t||!a[e.nodeName]):!!a[e]}}var m=c.each,g=c.is,v=c.grep,y=c.trim,b=l.ie,C=/^([a-z0-9],?)+$/i,x=/^[ \t\r\n]*$/;return p.prototype={$$:function(e){return"string"==typeof e&&(e=this.get(e)),this.$(e)},root:null,fixDoc:function(e){var t=this.settings,n;if(b&&t.schema){"abbr article aside audio canvas details figcaption figure footer header hgroup mark menu meter nav output progress section summary time video".replace(/\w+/g,function(t){e.createElement(t)});for(n in t.schema.getCustomElements())e.createElement(n)}},clone:function(e,t){var n=this,r,i;return!b||1!==e.nodeType||t?e.cloneNode(t):(i=n.doc,t?r.firstChild:(r=i.createElement(e.nodeName),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),r))},getRoot:function(){var e=this;return e.settings.root_element||e.doc.body},getViewPort:function(e){var t,n;return e=e?e:this.win,t=e.document,n=this.boxModel?t.documentElement:t.body,{x:e.pageXOffset||n.scrollLeft,y:e.pageYOffset||n.scrollTop,w:e.innerWidth||n.clientWidth,h:e.innerHeight||n.clientHeight}},getRect:function(e){var t=this,n,r;return e=t.get(e),n=t.getPos(e),r=t.getSize(e),{x:n.x,y:n.y,w:r.w,h:r.h}},getSize:function(e){var t=this,n,r;return e=t.get(e),n=t.getStyle(e,"width"),r=t.getStyle(e,"height"),-1===n.indexOf("px")&&(n=0),-1===r.indexOf("px")&&(r=0),{w:parseInt(n,10)||e.offsetWidth||e.clientWidth,h:parseInt(r,10)||e.offsetHeight||e.clientHeight}},getParent:function(e,t,n){return this.getParents(e,t,n,!1)},getParents:function(e,n,r,i){var o=this,a,s=[];for(e=o.get(e),i=i===t,r=r||("BODY"!=o.getRoot().nodeName?o.getRoot().parentNode:null),g(n,"string")&&(a=n,n="*"===n?function(e){ +return 1==e.nodeType}:function(e){return o.is(e,a)});e&&e!=r&&e.nodeType&&9!==e.nodeType;){if(!n||n(e)){if(!i)return e;s.push(e)}e=e.parentNode}return i?s:null},get:function(e){var t;return e&&this.doc&&"string"==typeof e&&(t=e,e=this.doc.getElementById(e),e&&e.id!==t)?this.doc.getElementsByName(t)[1]:e},getNext:function(e,t){return this._findSib(e,t,"nextSibling")},getPrev:function(e,t){return this._findSib(e,t,"previousSibling")},select:function(t,n){var r=this;return e(t,r.get(n)||r.settings.root_element||r.doc,[])},is:function(n,r){var i;if(n.length===t){if("*"===r)return 1==n.nodeType;if(C.test(r)){for(r=r.toLowerCase().split(/,/),n=n.nodeName.toLowerCase(),i=r.length-1;i>=0;i--)if(r[i]==n)return!0;return!1}}if(n.nodeType&&1!=n.nodeType)return!1;var o=n.nodeType?[n]:n;return e(r,o[0].ownerDocument||o[0],null,o).length>0},add:function(e,t,n,r,i){var o=this;return this.run(e,function(e){var a;return a=g(t,"string")?o.doc.createElement(t):t,o.setAttribs(a,n),r&&(r.nodeType?a.appendChild(r):o.setHTML(a,r)),i?a:e.appendChild(a)})},create:function(e,t,n){return this.add(this.doc.createElement(e),e,t,n,1)},createHTML:function(e,t,n){var r="",i;r+="<"+e;for(i in t)t.hasOwnProperty(i)&&null!==t[i]&&"undefined"!=typeof t[i]&&(r+=" "+i+'="'+this.encode(t[i])+'"');return"undefined"!=typeof n?r+">"+n+"":r+" />"},createFragment:function(e){var t,n,r=this.doc,i;for(i=r.createElement("div"),t=r.createDocumentFragment(),e&&(i.innerHTML=e);n=i.firstChild;)t.appendChild(n);return t},remove:function(e,t){return e=this.$$(e),t?e.each(function(){for(var e;e=this.firstChild;)3==e.nodeType&&0===e.data.length?this.removeChild(e):this.parentNode.insertBefore(e,this)}).remove():e.remove(),e.length>1?e.toArray():e[0]},setStyle:function(e,t,n){e=this.$$(e).css(t,n),this.settings.update_styles&&f(this,e)},getStyle:function(e,n,r){return e=this.$$(e),r?e.css(n):(n=n.replace(/-(\D)/g,function(e,t){return t.toUpperCase()}),"float"==n&&(n=l.ie&&l.ie<12?"styleFloat":"cssFloat"),e[0]&&e[0].style?e[0].style[n]:t)},setStyles:function(e,t){e=this.$$(e).css(t),this.settings.update_styles&&f(this,e)},removeAllAttribs:function(e){return this.run(e,function(e){var t,n=e.attributes;for(t=n.length-1;t>=0;t--)e.removeAttributeNode(n.item(t))})},setAttrib:function(e,t,n){var r=this,i,o,a=r.settings;""===n&&(n=null),e=r.$$(e),i=e.attr(t),e.length&&(o=r.attrHooks[t],o&&o.set?o.set(e,n,t):e.attr(t,n),i!=n&&a.onSetAttrib&&a.onSetAttrib({attrElm:e,attrName:t,attrValue:n}))},setAttribs:function(e,t){var n=this;n.$$(e).each(function(e,r){m(t,function(e,t){n.setAttrib(r,t,e)})})},getAttrib:function(e,t,n){var r=this,i,o;return e=r.$$(e),e.length&&(i=r.attrHooks[t],o=i&&i.get?i.get(e,t):e.attr(t)),"undefined"==typeof o&&(o=n||""),o},getPos:function(e,t){var r=this,i=0,o=0,a,s=r.doc,l=s.body,c;if(e=r.get(e),t=t||l,e){if(t===l&&e.getBoundingClientRect&&"static"===n(l).css("position"))return c=e.getBoundingClientRect(),t=r.boxModel?s.documentElement:l,i=c.left+(s.documentElement.scrollLeft||l.scrollLeft)-t.clientLeft,o=c.top+(s.documentElement.scrollTop||l.scrollTop)-t.clientTop,{x:i,y:o};for(a=e;a&&a!=t&&a.nodeType;)i+=a.offsetLeft||0,o+=a.offsetTop||0,a=a.offsetParent;for(a=e.parentNode;a&&a!=t&&a.nodeType;)i-=a.scrollLeft||0,o-=a.scrollTop||0,a=a.parentNode}return{x:i,y:o}},parseStyle:function(e){return this.styles.parse(e)},serializeStyle:function(e,t){return this.styles.serialize(e,t)},addStyle:function(e){var t=this,n=t.doc,r,i;if(t!==p.DOM&&n===document){var o=p.DOM.addedStyles;if(o=o||[],o[e])return;o[e]=!0,p.DOM.addedStyles=o}i=n.getElementById("mceDefaultStyles"),i||(i=n.createElement("style"),i.id="mceDefaultStyles",i.type="text/css",r=n.getElementsByTagName("head")[0],r.firstChild?r.insertBefore(i,r.firstChild):r.appendChild(i)),i.styleSheet?i.styleSheet.cssText+=e:i.appendChild(n.createTextNode(e))},loadCSS:function(e){var t=this,n=t.doc,r;return t!==p.DOM&&n===document?void p.DOM.loadCSS(e):(e||(e=""),r=n.getElementsByTagName("head")[0],void m(e.split(","),function(e){var i;e=c._addCacheSuffix(e),t.files[e]||(t.files[e]=!0,i=t.create("link",{rel:"stylesheet",href:e}),b&&n.documentMode&&n.recalc&&(i.onload=function(){n.recalc&&n.recalc(),i.onload=null}),r.appendChild(i))}))},addClass:function(e,t){this.$$(e).addClass(t)},removeClass:function(e,t){this.toggleClass(e,t,!1)},hasClass:function(e,t){return this.$$(e).hasClass(t)},toggleClass:function(e,t,r){this.$$(e).toggleClass(t,r).each(function(){""===this.className&&n(this).attr("class",null)})},show:function(e){this.$$(e).show()},hide:function(e){this.$$(e).hide()},isHidden:function(e){return"none"==this.$$(e).css("display")},uniqueId:function(e){return(e?e:"mce_")+this.counter++},setHTML:function(e,t){e=this.$$(e),b?e.each(function(e,r){if(r.canHaveHTML!==!1){for(;r.firstChild;)r.removeChild(r.firstChild);try{r.innerHTML="
              "+t,r.removeChild(r.firstChild)}catch(i){n("
              ").html("
              "+t).contents().slice(1).appendTo(r)}return t}}):e.html(t)},getOuterHTML:function(e){return e=this.get(e),1==e.nodeType&&"outerHTML"in e?e.outerHTML:n("
              ").append(n(e).clone()).html()},setOuterHTML:function(e,t){var r=this;r.$$(e).each(function(){try{if("outerHTML"in this)return void(this.outerHTML=t)}catch(e){}r.remove(n(this).html(t),!0)})},decode:s.decode,encode:s.encodeAllRaw,insertAfter:function(e,t){return t=this.get(t),this.run(e,function(e){var n,r;return n=t.parentNode,r=t.nextSibling,r?n.insertBefore(e,r):n.appendChild(e),e})},replace:function(e,t,n){var r=this;return r.run(t,function(t){return g(t,"array")&&(e=e.cloneNode(!0)),n&&m(v(t.childNodes),function(t){e.appendChild(t)}),t.parentNode.replaceChild(e,t)})},rename:function(e,t){var n=this,r;return e.nodeName!=t.toUpperCase()&&(r=n.create(t),m(n.getAttribs(e),function(t){n.setAttrib(r,t.nodeName,n.getAttrib(e,t.nodeName))}),n.replace(r,e,1)),r||e},findCommonAncestor:function(e,t){for(var n=e,r;n;){for(r=t;r&&n!=r;)r=r.parentNode;if(n==r)break;n=n.parentNode}return!n&&e.ownerDocument?e.ownerDocument.documentElement:n},toHex:function(e){return this.styles.toHex(c.trim(e))},run:function(e,t,n){var r=this,i;return"string"==typeof e&&(e=r.get(e)),e?(n=n||this,e.nodeType||!e.length&&0!==e.length?t.call(n,e):(i=[],m(e,function(e,o){e&&("string"==typeof e&&(e=r.get(e)),i.push(t.call(n,e,o)))}),i)):!1},getAttribs:function(e){var t;if(e=this.get(e),!e)return[];if(b){if(t=[],"OBJECT"==e.nodeName)return e.attributes;"OPTION"===e.nodeName&&this.getAttrib(e,"selected")&&t.push({specified:1,nodeName:"selected"});var n=/<\/?[\w:\-]+ ?|=[\"][^\"]+\"|=\'[^\']+\'|=[\w\-]+|>/gi;return e.cloneNode(!1).outerHTML.replace(n,"").replace(/[\w:\-]+/gi,function(e){t.push({specified:1,nodeName:e})}),t}return e.attributes},isEmpty:function(e,t){var n=this,r,i,a,s,l,c=0;if(e=e.firstChild){s=new o(e,e.parentNode),t=t||(n.schema?n.schema.getNonEmptyElements():null);do{if(a=e.nodeType,1===a){if(e.getAttribute("data-mce-bogus"))continue;if(l=e.nodeName.toLowerCase(),t&&t[l]){if("br"===l){c++;continue}return!1}for(i=n.getAttribs(e),r=i.length;r--;)if(l=i[r].nodeName,"name"===l||"data-mce-bookmark"===l)return!1}if(8==a)return!1;if(3===a&&!x.test(e.nodeValue))return!1}while(e=s.next())}return 1>=c},createRng:function(){var e=this.doc;return e.createRange?e.createRange():new a(this)},nodeIndex:h,split:function(e,t,n){function r(e){function t(e){var t=e.previousSibling&&"SPAN"==e.previousSibling.nodeName,n=e.nextSibling&&"SPAN"==e.nextSibling.nodeName;return t&&n}var n,o=e.childNodes,a=e.nodeType;if(1!=a||"bookmark"!=e.getAttribute("data-mce-type")){for(n=o.length-1;n>=0;n--)r(o[n]);if(9!=a){if(3==a&&e.nodeValue.length>0){var s=y(e.nodeValue).length;if(!i.isBlock(e.parentNode)||s>0||0===s&&t(e))return}else if(1==a&&(o=e.childNodes,1==o.length&&o[0]&&1==o[0].nodeType&&"bookmark"==o[0].getAttribute("data-mce-type")&&e.parentNode.insertBefore(o[0],e),o.length||/^(br|hr|input|img)$/i.test(e.nodeName)))return;i.remove(e)}return e}}var i=this,o=i.createRng(),a,s,l;return e&&t?(o.setStart(e.parentNode,i.nodeIndex(e)),o.setEnd(t.parentNode,i.nodeIndex(t)),a=o.extractContents(),o=i.createRng(),o.setStart(t.parentNode,i.nodeIndex(t)+1),o.setEnd(e.parentNode,i.nodeIndex(e)+1),s=o.extractContents(),l=e.parentNode,l.insertBefore(r(a),e),n?l.insertBefore(n,e):l.insertBefore(t,e),l.insertBefore(r(s),e),i.remove(e),n||t):void 0},bind:function(e,t,n,r){var i=this;if(c.isArray(e)){for(var o=e.length;o--;)e[o]=i.bind(e[o],t,n,r);return e}return!i.settings.collect||e!==i.doc&&e!==i.win||i.boundEvents.push([e,t,n,r]),i.events.bind(e,t,n,r||i)},unbind:function(e,t,n){var r=this,i;if(c.isArray(e)){for(i=e.length;i--;)e[i]=r.unbind(e[i],t,n);return e}if(r.boundEvents&&(e===r.doc||e===r.win))for(i=r.boundEvents.length;i--;){var o=r.boundEvents[i];e!=o[0]||t&&t!=o[1]||n&&n!=o[2]||this.events.unbind(o[0],o[1],o[2])}return this.events.unbind(e,t,n)},fire:function(e,t,n){return this.events.fire(e,t,n)},getContentEditable:function(e){var t;return e&&1==e.nodeType?(t=e.getAttribute("data-mce-contenteditable"),t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null):null},getContentEditableParent:function(e){for(var t=this.getRoot(),n=null;e&&e!==t&&(n=this.getContentEditable(e),null===n);e=e.parentNode);return n},destroy:function(){var t=this;if(t.boundEvents){for(var n=t.boundEvents.length;n--;){var r=t.boundEvents[n];this.events.unbind(r[0],r[1],r[2])}t.boundEvents=null}e.setDocument&&e.setDocument(),t.win=t.doc=t.root=t.events=t.frag=null},isChildOf:function(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1},dumpRng:function(e){return"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},_findSib:function(e,t,n){var r=this,i=t;if(e)for("string"==typeof i&&(i=function(e){return r.is(e,t)}),e=e[n];e;e=e[n])if(i(e))return e;return null}},p.DOM=new p(document),p.nodeIndex=h,p}),r(N,[w,m],function(e,t){function n(){function e(e,n){function i(){a.remove(l),s&&(s.onreadystatechange=s.onload=s=null),n()}function o(){"undefined"!=typeof console&&console.log&&console.log("Failed to load: "+e)}var a=r,s,l;l=a.uniqueId(),s=document.createElement("script"),s.id=l,s.type="text/javascript",s.src=t._addCacheSuffix(e),"onreadystatechange"in s?s.onreadystatechange=function(){/loaded|complete/.test(s.readyState)&&i()}:s.onload=i,s.onerror=o,(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}var n=0,a=1,s=2,l={},c=[],u={},d=[],f=0,h;this.isDone=function(e){return l[e]==s},this.markDone=function(e){l[e]=s},this.add=this.load=function(e,t,r){var i=l[e];i==h&&(c.push(e),l[e]=n),t&&(u[e]||(u[e]=[]),u[e].push({func:t,scope:r||this}))},this.remove=function(e){delete l[e],delete u[e]},this.loadQueue=function(e,t){this.loadScripts(c,e,t)},this.loadScripts=function(t,n,r){function c(e){i(u[e],function(e){e.func.call(e.scope)}),u[e]=h}var p;d.push({func:n,scope:r||this}),(p=function(){var n=o(t);t.length=0,i(n,function(t){return l[t]==s?void c(t):void(l[t]!=a&&(l[t]=a,f++,e(t,function(){l[t]=s,f--,c(t),p()})))}),f||(i(d,function(e){e.func.call(e.scope)}),d.length=0)})()}}var r=e.DOM,i=t.each,o=t.grep;return n.ScriptLoader=new n,n}),r(E,[N,m],function(e,n){function r(){var e=this;e.items=[],e.urls={},e.lookup={}}var i=n.each;return r.prototype={get:function(e){return this.lookup[e]?this.lookup[e].instance:t},dependencies:function(e){var t;return this.lookup[e]&&(t=this.lookup[e].dependencies),t||[]},requireLangPack:function(t,n){var i=r.language;if(i&&r.languageLoad!==!1){if(n)if(n=","+n+",",-1!=n.indexOf(","+i.substr(0,2)+","))i=i.substr(0,2);else if(-1==n.indexOf(","+i+","))return;e.ScriptLoader.add(this.urls[t]+"/langs/"+i+".js")}},add:function(e,t,n){return this.items.push(t),this.lookup[e]={instance:t,dependencies:n},t},remove:function(e){delete this.urls[e],delete this.lookup[e]},createUrl:function(e,t){return"object"==typeof t?t:{prefix:e.prefix,resource:t,suffix:e.suffix}},addComponents:function(t,n){var r=this.urls[t];i(n,function(t){e.ScriptLoader.add(r+"/"+t)})},load:function(n,o,a,s){function l(){var r=c.dependencies(n);i(r,function(e){var n=c.createUrl(o,e);c.load(n.resource,n,t,t)}),a&&(s?a.call(s):a.call(e))}var c=this,u=o;c.urls[n]||("object"==typeof o&&(u=o.prefix+o.resource+o.suffix),0!==u.indexOf("/")&&-1==u.indexOf("://")&&(u=r.baseURL+"/"+u),c.urls[n]=u.substring(0,u.lastIndexOf("/")),c.lookup[n]?l():e.ScriptLoader.add(u,l,s))}},r.PluginManager=new r,r.ThemeManager=new r,r}),r(_,[],function(){function e(e){return function(t){return!!t&&t.nodeType==e}}function t(e){return e=e.toLowerCase().split(" "),function(t){var n,r;if(t&&t.nodeType)for(r=t.nodeName.toLowerCase(),n=0;nn.length-1?t=n.length-1:0>t&&(t=0),n[t]||e}function a(e){this.walk=function(t,n){function r(e){var t;return t=e[0],3===t.nodeType&&t===c&&u>=t.nodeValue.length&&e.splice(0,1),t=e[e.length-1],0===f&&e.length>0&&t===d&&3===t.nodeType&&e.splice(e.length-1,1),e}function i(e,t,n){for(var r=[];e&&e!=n;e=e[t])r.push(e);return r}function a(e,t){do{if(e.parentNode==t)return e;e=e.parentNode}while(e)}function s(e,t,o){var a=o?"nextSibling":"previousSibling";for(g=e,v=g.parentNode;g&&g!=t;g=v)v=g.parentNode,y=i(g==e?g:g[a],a),y.length&&(o||y.reverse(),n(r(y)))}var c=t.startContainer,u=t.startOffset,d=t.endContainer,f=t.endOffset,h,p,m,g,v,y,b;if(b=e.select("td[data-mce-selected],th[data-mce-selected]"),b.length>0)return void l(b,function(e){n([e])});if(1==c.nodeType&&c.hasChildNodes()&&(c=c.childNodes[u]),1==d.nodeType&&d.hasChildNodes()&&(d=o(d,f)),c==d)return n(r([c]));for(h=e.findCommonAncestor(c,d),g=c;g;g=g.parentNode){if(g===d)return s(c,h,!0);if(g===h)break}for(g=d;g;g=g.parentNode){if(g===c)return s(d,h);if(g===h)break}p=a(c,h)||c,m=a(d,h)||d,s(c,p,!0),y=i(p==c?p:p.nextSibling,"nextSibling",m==d?m.nextSibling:m),y.length&&n(r(y)),s(d,m)},this.split=function(e){function t(e,t){return e.splitText(t)}var n=e.startContainer,r=e.startOffset,i=e.endContainer,o=e.endOffset;return n==i&&3==n.nodeType?r>0&&rr?(o-=r,n=i=t(i,o).previousSibling,o=i.nodeValue.length,r=0):o=0):(3==n.nodeType&&r>0&&r0&&o0)return h=v,p=n?v.nodeValue.length:0,void(i=!0);if(e.isBlock(v)||y[v.nodeName.toLowerCase()])return;s=v}o&&s&&(h=s,i=!0,p=0)}var h,p,m,g=e.getRoot(),v,y,b,C;if(h=n[(r?"start":"end")+"Container"],p=n[(r?"start":"end")+"Offset"],C=1==h.nodeType&&p===h.childNodes.length,y=e.schema.getNonEmptyElements(),b=r,!u(h)){if(1==h.nodeType&&p>h.childNodes.length-1&&(b=!1),9===h.nodeType&&(h=e.getRoot(),p=0),h===g){if(b&&(v=h.childNodes[p>0?p-1:0])){if(u(v))return;if(y[v.nodeName]||"TABLE"==v.nodeName)return}if(h.hasChildNodes()){if(p=Math.min(!b&&p>0?p-1:p,h.childNodes.length-1),h=h.childNodes[p],p=0,!o&&h===g.lastChild&&"TABLE"===h.nodeName)return;if(l(h)||u(h))return;if(h.hasChildNodes()&&!/TABLE/.test(h.nodeName)){v=h,m=new t(h,g);do{if(c(v)||u(v)){i=!1;break}if(3===v.nodeType&&v.nodeValue.length>0){p=b?0:v.nodeValue.length,h=v,i=!0;break}if(y[v.nodeName.toLowerCase()]&&!a(v)){p=e.nodeIndex(v),h=v.parentNode,"IMG"!=v.nodeName||b||p++,i=!0;break}}while(v=b?m.next():m.prev())}}}o&&(3===h.nodeType&&0===p&&f(!0),1===h.nodeType&&(v=h.childNodes[p],v||(v=h.childNodes[p-1]),!v||"BR"!==v.nodeName||d(v,"A")||s(v)||s(v,!0)||f(!0,v))),b&&!o&&3===h.nodeType&&p===h.nodeValue.length&&f(!1),i&&n["set"+(r?"Start":"End")](h,p)}}var i,o;return o=n.collapsed,r(!0),o||r(),i&&o&&n.collapse(!0),i}}function s(t,n,r){var i,o,a;if(i=r.elementFromPoint(t,n),o=r.body.createTextRange(),i&&"HTML"!=i.tagName||(i=r.body),o.moveToElementText(i),a=e.toArray(o.getClientRects()),a=a.sort(function(e,t){return e=Math.abs(Math.max(e.top-n,e.bottom-n)),t=Math.abs(Math.max(t.top-n,t.bottom-n)),e-t}),a.length>0){n=(a[0].bottom+a[0].top)/2;try{return o.moveToPoint(t,n),o.collapse(!0),o}catch(s){}}return null}var l=e.each,c=n.isContentEditableFalse,u=i.isCaretContainer;return a.compareRanges=function(e,t){if(e&&t){if(!e.item&&!e.duplicate)return e.startContainer==t.startContainer&&e.startOffset==t.startOffset;if(e.item&&t.item&&e.item(0)===t.item(0))return!0;if(e.isEqual&&t.isEqual&&t.isEqual(e))return!0}return!1},a.getCaretRangeFromPoint=function(e,t,n){var r,i;if(n.caretPositionFromPoint)i=n.caretPositionFromPoint(e,t),r=n.createRange(),r.setStart(i.offsetNode,i.offset),r.collapse(!0);else if(n.caretRangeFromPoint)r=n.caretRangeFromPoint(e,t);else if(n.body.createTextRange){r=n.body.createTextRange();try{r.moveToPoint(e,t),r.collapse(!0)}catch(o){r=s(e,t,n)}}return r},a.getSelectedNode=function(e){var t=e.startContainer,n=e.startOffset;return t.hasChildNodes()&&e.endOffset==n+1?t.childNodes[n]:null},a.getNode=function(e,t){return 1==e.nodeType&&e.hasChildNodes()&&(t>=e.childNodes.length&&(t=e.childNodes.length-1),e=e.childNodes[t]),e},a}),r(R,[T,d,u],function(e,t,n){return function(r){function i(e){var t,n;if(n=r.$(e).parentsUntil(r.getBody()).add(e),n.length===a.length){for(t=n.length;t>=0&&n[t]===a[t];t--);if(-1===t)return a=n,!0}return a=n,!1}var o,a=[];"onselectionchange"in r.getDoc()||r.on("NodeChange Click MouseUp KeyUp Focus",function(t){var n,i;n=r.selection.getRng(),i={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset},"nodechange"!=t.type&&e.compareRanges(i,o)||r.fire("SelectionChange"),o=i}),r.on("contextmenu",function(){r.fire("SelectionChange")}),r.on("SelectionChange",function(){var e=r.selection.getStart(!0);!t.range&&r.selection.isCollapsed()||!i(e)&&r.dom.isChildOf(e,r.getBody())&&r.nodeChanged({selectionChange:!0})}),r.on("MouseUp",function(e){e.isDefaultPrevented()||("IMG"==r.selection.getNode().nodeName?n.setEditorTimeout(r,function(){r.nodeChanged()}):r.nodeChanged())}),this.nodeChanged=function(e){var t=r.selection,n,i,o;r.initialized&&t&&!r.settings.disable_nodechange&&!r.readonly&&(o=r.getBody(),n=t.getStart()||o,n.ownerDocument==r.getDoc()&&r.dom.isChildOf(n,o)||(n=o),"IMG"==n.nodeName&&t.isCollapsed()&&(n=n.parentNode),i=[],r.dom.getParent(n,function(e){return e===o?!0:void i.push(e)}),e=e||{},e.element=n,e.parents=i,r.fire("NodeChange",e))}}}),r(A,[],function(){function e(e,t,n){var r,i,o=n?"lastChild":"firstChild",a=n?"prev":"next";if(e[o])return e[o];if(e!==t){if(r=e[a])return r;for(i=e.parent;i&&i!==t;i=i.parent)if(r=i[a])return r}}function t(e,t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}var n=/^[ \t\r\n]*$/,r={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};return t.prototype={replace:function(e){var t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t},attr:function(e,t){var n=this,r,i,o;if("string"!=typeof e){for(i in e)n.attr(i,e[i]);return n}if(r=n.attributes){if(t!==o){if(null===t){if(e in r.map)for(delete r.map[e],i=r.length;i--;)if(r[i].name===e)return r=r.splice(i,1),n;return n}if(e in r.map){for(i=r.length;i--;)if(r[i].name===e){r[i].value=t;break}}else r.push({name:e,value:t});return r.map[e]=t,n}return r.map[e]}},clone:function(){var e=this,n=new t(e.name,e.type),r,i,o,a,s;if(o=e.attributes){for(s=[],s.map={},r=0,i=o.length;i>r;r++)a=o[r],"id"!==a.name&&(s[s.length]={name:a.name,value:a.value},s.map[a.name]=a.value);n.attributes=s}return n.value=e.value,n.shortEnded=e.shortEnded,n},wrap:function(e){var t=this;return t.parent.insert(e,t),e.append(t),t},unwrap:function(){var e=this,t,n;for(t=e.firstChild;t;)n=t.next,e.insert(t,e,!0),t=n;e.remove()},remove:function(){var e=this,t=e.parent,n=e.next,r=e.prev;return t&&(t.firstChild===e?(t.firstChild=n,n&&(n.prev=null)):r.next=n,t.lastChild===e?(t.lastChild=r,r&&(r.next=null)):n.prev=r,e.parent=e.next=e.prev=null),e},append:function(e){var t=this,n;return e.parent&&e.remove(),n=t.lastChild,n?(n.next=e,e.prev=n,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e},insert:function(e,t,n){var r;return e.parent&&e.remove(),r=t.parent||this,n?(t===r.firstChild?r.firstChild=e:t.prev.next=e,e.prev=t.prev,e.next=t,t.prev=e):(t===r.lastChild?r.lastChild=e:t.next.prev=e,e.next=t.next,e.prev=t,t.next=e),e.parent=r,e},getAll:function(t){var n=this,r,i=[];for(r=n.firstChild;r;r=e(r,n))r.name===t&&i.push(r);return i},empty:function(){var t=this,n,r,i;if(t.firstChild){for(n=[],i=t.firstChild;i;i=e(i,t))n.push(i);for(r=n.length;r--;)i=n[r],i.parent=i.firstChild=i.lastChild=i.next=i.prev=null}return t.firstChild=t.lastChild=null,t},isEmpty:function(t){var r=this,i=r.firstChild,o,a;if(i)do{if(1===i.type){if(i.attributes.map["data-mce-bogus"])continue;if(t[i.name])return!1;for(o=i.attributes.length;o--;)if(a=i.attributes[o].name,"name"===a||0===a.indexOf("data-mce-bookmark"))return!1}if(8===i.type)return!1;if(3===i.type&&!n.test(i.value))return!1}while(i=e(i,r));return!0},walk:function(t){return e(this,null,t)}},t.create=function(e,n){var i,o;if(i=new t(e,r[e]||1),n)for(o in n)i.attr(o,n[o]);return i},t}),r(B,[m],function(e){function t(e,t){return e?e.split(t||" "):[]}function n(e){function n(e,n,r){function i(e,t){var n={},r,i;for(r=0,i=e.length;i>r;r++)n[e[r]]=t||{};return n}var s,c,u,d=arguments;for(r=r||[],n=n||"","string"==typeof r&&(r=t(r)),c=3;co;o++)i.attributes[n[o]]={},i.attributesOrder.push(n[o])}var a={},l,c,u,d,f,h;return i[e]?i[e]:(l=t("id accesskey class dir lang style tabindex title"),c=t("address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul"),u=t("a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd label map noscript object q s samp script select small span strong sub sup textarea u var #text #comment"),"html4"!=e&&(l.push.apply(l,t("contenteditable contextmenu draggable dropzone hidden spellcheck translate")),c.push.apply(c,t("article aside details dialog figure header footer hgroup section nav")),u.push.apply(u,t("audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"))),"html5-strict"!=e&&(l.push("xml:lang"),h=t("acronym applet basefont big font strike tt"),u.push.apply(u,h),s(h,function(e){n(e,"",u)}),f=t("center dir isindex noframes"),c.push.apply(c,f),d=[].concat(c,u),s(f,function(e){n(e,"",d)})),d=d||[].concat(c,u),n("html","manifest","head body"),n("head","","base command link meta noscript script style title"),n("title hr noscript br"),n("base","href target"),n("link","href rel media hreflang type sizes hreflang"),n("meta","name http-equiv content charset"),n("style","media type scoped"),n("script","src async defer type charset"),n("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",d),n("address dt dd div caption","",d),n("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",u),n("blockquote","cite",d),n("ol","reversed start type","li"),n("ul","","li"),n("li","value",d),n("dl","","dt dd"),n("a","href target rel media hreflang type",u),n("q","cite",u),n("ins del","cite datetime",d),n("img","src sizes srcset alt usemap ismap width height"),n("iframe","src name width height",d),n("embed","src type width height"),n("object","data type typemustmatch name usemap form width height",d,"param"),n("param","name value"),n("map","name",d,"area"),n("area","alt coords shape href target rel media hreflang type"),n("table","border","caption colgroup thead tfoot tbody tr"+("html4"==e?" col":"")),n("colgroup","span","col"),n("col","span"),n("tbody thead tfoot","","tr"),n("tr","","td th"),n("td","colspan rowspan headers",d),n("th","colspan rowspan headers scope abbr",d),n("form","accept-charset action autocomplete enctype method name novalidate target",d),n("fieldset","disabled form name",d,"legend"),n("label","form for",u),n("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate formtarget height list max maxlength min multiple name pattern readonly required size src step type value width"),n("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"==e?d:u),n("select","disabled form multiple name required size","option optgroup"),n("optgroup","disabled label","option"),n("option","disabled label selected value"),n("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),n("menu","type label",d,"li"),n("noscript","",d),"html4"!=e&&(n("wbr"),n("ruby","",u,"rt rp"),n("figcaption","",d),n("mark rt rp summary bdi","",u),n("canvas","width height",d),n("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",d,"track source"),n("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",d,"track source"),n("picture","","img source"),n("source","src srcset type media sizes"),n("track","kind src srclang label default"),n("datalist","",u,"option"),n("article section nav aside header footer","",d),n("hgroup","","h1 h2 h3 h4 h5 h6"),n("figure","",d,"figcaption"),n("time","datetime",u),n("dialog","open",d),n("command","type label icon disabled checked radiogroup command"),n("output","for form name",u),n("progress","value max",u),n("meter","value min max low high optimum",u),n("details","open",d,"summary"),n("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!=e&&(r("script","language xml:space"),r("style","xml:space"),r("object","declare classid code codebase codetype archive standby align border hspace vspace"),r("embed","align name hspace vspace"),r("param","valuetype type"),r("a","charset name rev shape coords"),r("br","clear"),r("applet","codebase archive code object alt name width height align hspace vspace"),r("img","name longdesc align border hspace vspace"),r("iframe","longdesc frameborder marginwidth marginheight scrolling align"),r("font basefont","size color face"),r("input","usemap align"),r("select","onchange"),r("textarea"),r("h1 h2 h3 h4 h5 h6 div p legend caption","align"),r("ul","type compact"),r("li","type"),r("ol dl menu dir","compact"),r("pre","width xml:space"),r("hr","align noshade size width"),r("isindex","prompt"),r("table","summary width frame rules cellspacing cellpadding align bgcolor"),r("col","width align char charoff valign"),r("colgroup","width align char charoff valign"),r("thead","align char charoff valign"),r("tr","align char charoff valign bgcolor"),r("th","axis align char charoff valign nowrap bgcolor width height"),r("form","accept"),r("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),r("tfoot","align char charoff valign"),r("tbody","align char charoff valign"),r("area","nohref"),r("body","background bgcolor text link vlink alink")),"html4"!=e&&(r("input button select textarea","autofocus"),r("input textarea","placeholder"),r("a","download"),r("link script img","crossorigin"),r("iframe","sandbox seamless allowfullscreen")),s(t("a form meter progress dfn"),function(e){a[e]&&delete a[e].children[e]}),delete a.caption.children.table,delete a.script,i[e]=a,a)}function r(e,t){var n;return e&&(n={},"string"==typeof e&&(e={"*":e}),s(e,function(e,r){n[r]=n[r.toUpperCase()]="map"==t?a(e,/[, ]/):c(e,/[, ]/)})),n}var i={},o={},a=e.makeMap,s=e.each,l=e.extend,c=e.explode,u=e.inArray;return function(e){function o(t,n,r){var o=e[t];return o?o=a(o,/[, ]/,a(o.toUpperCase(),/[, ]/)):(o=i[t],o||(o=a(n," ",a(n.toUpperCase()," ")),o=l(o,r),i[t]=o)),o}function d(e){return new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$")}function f(e){var n,r,i,o,s,l,c,f,h,p,m,g,v,b,x,w,N,E,_,S=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)\])?$/,k=/^([!\-])?(\w+::\w+|[^=:<]+)?(?:([=:<])(.*))?$/,T=/[*?+]/;if(e)for(e=t(e,","),y["@"]&&(w=y["@"].attributes,N=y["@"].attributesOrder),n=0,r=e.length;r>n;n++)if(s=S.exec(e[n])){if(b=s[1],h=s[2],x=s[3],f=s[5],g={},v=[],l={attributes:g,attributesOrder:v},"#"===b&&(l.paddEmpty=!0),"-"===b&&(l.removeEmpty=!0),"!"===s[4]&&(l.removeEmptyAttrs=!0),w){for(E in w)g[E]=w[E];v.push.apply(v,N)}if(f)for(f=t(f,"|"),i=0,o=f.length;o>i;i++)if(s=k.exec(f[i])){if(c={},m=s[1],p=s[2].replace(/::/g,":"),b=s[3],_=s[4],"!"===m&&(l.attributesRequired=l.attributesRequired||[],l.attributesRequired.push(p),c.required=!0),"-"===m){delete g[p],v.splice(u(v,p),1);continue}b&&("="===b&&(l.attributesDefault=l.attributesDefault||[],l.attributesDefault.push({name:p,value:_}),c.defaultValue=_),":"===b&&(l.attributesForced=l.attributesForced||[],l.attributesForced.push({name:p,value:_}),c.forcedValue=_),"<"===b&&(c.validValues=a(_,"?"))),T.test(p)?(l.attributePatterns=l.attributePatterns||[],c.pattern=d(p), +l.attributePatterns.push(c)):(g[p]||v.push(p),g[p]=c)}w||"@"!=h||(w=g,N=v),x&&(l.outputName=h,y[x]=l),T.test(h)?(l.pattern=d(h),C.push(l)):y[h]=l}}function h(e){y={},C=[],f(e),s(N,function(e,t){b[t]=e.children})}function p(e){var n=/^(~)?(.+)$/;e&&(i.text_block_elements=i.block_elements=null,s(t(e,","),function(e){var t=n.exec(e),r="~"===t[1],i=r?"span":"div",o=t[2];if(b[o]=b[i],M[o]=i,r||(R[o.toUpperCase()]={},R[o]={}),!y[o]){var a=y[i];a=l({},a),delete a.removeEmptyAttrs,delete a.removeEmpty,y[o]=a}s(b,function(e,t){e[i]&&(b[t]=e=l({},b[t]),e[o]=e[i])})}))}function m(n){var r=/^([+\-]?)(\w+)\[([^\]]+)\]$/;i[e.schema]=null,n&&s(t(n,","),function(e){var n=r.exec(e),i,o;n&&(o=n[1],i=o?b[n[2]]:b[n[2]]={"#comment":{}},i=b[n[2]],s(t(n[3],"|"),function(e){"-"===o?delete i[e]:i[e]={}}))})}function g(e){var t=y[e],n;if(t)return t;for(n=C.length;n--;)if(t=C[n],t.pattern.test(e))return t}var v=this,y={},b={},C=[],x,w,N,E,_,S,k,T,R,A,B,D,L,M={},P={};e=e||{},N=n(e.schema),e.verify_html===!1&&(e.valid_elements="*[*]"),x=r(e.valid_styles),w=r(e.invalid_styles,"map"),T=r(e.valid_classes,"map"),E=o("whitespace_elements","pre script noscript style textarea video audio iframe object"),_=o("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),S=o("short_ended_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),k=o("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls"),A=o("non_empty_elements","td th iframe video audio object script",S),B=o("move_caret_before_on_enter_elements","table",A),D=o("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form blockquote center dir fieldset header footer article section hgroup aside nav figure"),R=o("block_elements","hr table tbody thead tfoot th tr td li ol ul caption dl dt dd noscript menu isindex option datalist select optgroup figcaption",D),L=o("text_inline_elements","span strong b em i font strike u var cite dfn code mark q sup sub samp"),s((e.special||"script noscript style textarea").split(" "),function(e){P[e]=new RegExp("]*>","gi")}),e.valid_elements?h(e.valid_elements):(s(N,function(e,t){y[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},b[t]=e.children}),"html5"!=e.schema&&s(t("strong/b em/i"),function(e){e=t(e,"/"),y[e[1]].outputName=e[0]}),s(t("ol ul sub sup blockquote span font a table tbody tr strong em b i"),function(e){y[e]&&(y[e].removeEmpty=!0)}),s(t("p h1 h2 h3 h4 h5 h6 th td pre div address caption"),function(e){y[e].paddEmpty=!0}),s(t("span"),function(e){y[e].removeEmptyAttrs=!0})),p(e.custom_elements),m(e.valid_children),f(e.extended_valid_elements),m("+ol[ul|ol],+ul[ul|ol]"),e.invalid_elements&&s(c(e.invalid_elements),function(e){y[e]&&delete y[e]}),g("span")||f("span[!data-mce-type|*]"),v.children=b,v.getValidStyles=function(){return x},v.getInvalidStyles=function(){return w},v.getValidClasses=function(){return T},v.getBoolAttrs=function(){return k},v.getBlockElements=function(){return R},v.getTextBlockElements=function(){return D},v.getTextInlineElements=function(){return L},v.getShortEndedElements=function(){return S},v.getSelfClosingElements=function(){return _},v.getNonEmptyElements=function(){return A},v.getMoveCaretBeforeOnEnterElements=function(){return B},v.getWhiteSpaceElements=function(){return E},v.getSpecialElements=function(){return P},v.isValidChild=function(e,t){var n=b[e];return!(!n||!n[t])},v.isValid=function(e,t){var n,r,i=g(e);if(i){if(!t)return!0;if(i.attributes[t])return!0;if(n=i.attributePatterns)for(r=n.length;r--;)if(n[r].pattern.test(e))return!0}return!1},v.getElementRule=g,v.getCustomElements=function(){return M},v.addValidElements=f,v.setValidElements=h,v.addCustomElements=p,v.addValidChildren=m,v.elements=y}}),r(D,[B,C,m],function(e,t,n){function r(e,t,n){var r=1,i,o,a,s;for(s=e.getShortEndedElements(),a=/<([!?\/])?([A-Za-z0-9\-_\:\.]+)((?:\s+[^"\'>]+(?:(?:"[^"]*")|(?:\'[^\']*\')|[^>]*))*|\/|\s+)>/g,a.lastIndex=i=n;o=a.exec(t);){if(i=a.lastIndex,"/"===o[1])r--;else if(!o[1]){if(o[2]in s)continue;r++}if(0===r)break}return i}function i(i,a){function s(){}var l=this;i=i||{},l.schema=a=a||new e,i.fix_self_closing!==!1&&(i.fix_self_closing=!0),o("comment cdata text start end pi doctype".split(" "),function(e){e&&(l[e]=i[e]||s)}),l.parse=function(e){function o(e){var t,n;for(t=h.length;t--&&h[t].name!==e;);if(t>=0){for(n=h.length-1;n>=t;n--)e=h[n],e.valid&&l.end(e.name);h.length=t}}function s(e,t,n,r,o){var a,s,l=/[\s\u0000-\u001F]+/g;if(t=t.toLowerCase(),n=t in x?t:z(n||r||o||""),N&&!y&&0!==t.indexOf("data-")){if(a=T[t],!a&&R){for(s=R.length;s--&&(a=R[s],!a.pattern.test(t)););-1===s&&(a=null)}if(!a)return;if(a.validValues&&!(n in a.validValues))return}if(W[t]&&!i.allow_script_urls){var c=n.replace(l,"");try{c=decodeURIComponent(c)}catch(u){c=unescape(c)}if(V.test(c))return;if(!i.allow_html_data_urls&&$.test(c)&&!/^data:image\//i.test(c))return}p.map[t]=n,p.push({name:t,value:n})}var l=this,c,u=0,d,f,h=[],p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,H,O,I,F=0,z=t.decode,U,W=n.makeMap("src,href,data,background,formaction,poster"),V=/((java|vb)script|mhtml):/i,$=/^data:/i;for(P=new RegExp("<(?:(?:!--([\\w\\W]*?)-->)|(?:!\\[CDATA\\[([\\w\\W]*?)\\]\\]>)|(?:!DOCTYPE([\\w\\W]*?)>)|(?:\\?([^\\s\\/<>]+) ?([\\w\\W]*?)[?/]>)|(?:\\/([^>]+)>)|(?:([A-Za-z0-9\\-_\\:\\.]+)((?:\\s+[^\"'>]+(?:(?:\"[^\"]*\")|(?:'[^']*')|[^>]*))*|\\/|\\s+)>))","g"),H=/([\w:\-]+)(?:\s*=\s*(?:(?:\"((?:[^\"])*)\")|(?:\'((?:[^\'])*)\')|([^>\s]+)))?/g,C=a.getShortEndedElements(),M=i.self_closing_elements||a.getSelfClosingElements(),x=a.getBoolAttrs(),N=i.validate,b=i.remove_internals,U=i.fix_self_closing,O=a.getSpecialElements();c=P.exec(e);){if(u0&&h[h.length-1].name===d&&o(d),!N||(E=a.getElementRule(d))){if(_=!0,N&&(T=E.attributes,R=E.attributePatterns),(k=c[8])?(y=-1!==k.indexOf("data-mce-type"),y&&b&&(_=!1),p=[],p.map={},k.replace(H,s)):(p=[],p.map={}),N&&!y){if(A=E.attributesRequired,B=E.attributesDefault,D=E.attributesForced,L=E.removeEmptyAttrs,L&&!p.length&&(_=!1),D)for(m=D.length;m--;)S=D[m],v=S.name,I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I});if(B)for(m=B.length;m--;)S=B[m],v=S.name,v in p.map||(I=S.value,"{$uid}"===I&&(I="mce_"+F++),p.map[v]=I,p.push({name:v,value:I}));if(A){for(m=A.length;m--&&!(A[m]in p.map););-1===m&&(_=!1)}if(S=p.map["data-mce-bogus"]){if("all"===S){u=r(a,e,P.lastIndex),P.lastIndex=u;continue}_=!1}}_&&l.start(d,p,w)}else _=!1;if(f=O[d]){f.lastIndex=u=c.index+c[0].length,(c=f.exec(e))?(_&&(g=e.substr(u,c.index-u)),u=c.index+c[0].length):(g=e.substr(u),u=e.length),_&&(g.length>0&&l.text(g,!0),l.end(d)),P.lastIndex=u;continue}w||(k&&k.indexOf("/")==k.length-1?_&&l.end(d):h.push({name:d,valid:_}))}else(d=c[1])?(">"===d.charAt(0)&&(d=" "+d),i.allow_conditional_comments||"[if"!==d.substr(0,3)||(d=" "+d),l.comment(d)):(d=c[2])?l.cdata(d):(d=c[3])?l.doctype(d):(d=c[4])&&l.pi(d,c[5]);u=c.index+c[0].length}for(u=0;m--)d=h[m],d.valid&&l.end(d.name)}}var o=n.each;return i.findEndTag=r,i}),r(L,[A,B,D,m],function(e,t,n,r){var i=r.makeMap,o=r.each,a=r.explode,s=r.extend;return function(r,l){function c(t){var n,r,o,a,s,c,d,f,h,p,m,g,v,y,b;for(m=i("tr,td,th,tbody,thead,tfoot,table"),p=l.getNonEmptyElements(),g=l.getTextBlockElements(),v=l.getSpecialElements(),n=0;n1){for(a.reverse(),s=c=u.filterNode(a[0].clone()),h=0;h0)return void(t.value=r);if(n=t.next){if(3==n.type&&n.value.length){t=t.prev;continue}if(!o[n.name]&&"script"!=n.name&&"style"!=n.name){t=t.prev;continue}}i=t.prev,t.remove(),t=i}}function g(e){var t,n={};for(t in e)"li"!==t&&"p"!=t&&(n[t]=e[t]);return n}var v,y,b,C,x,w,N,E,_,S,k,T,R,A=[],B,D,L,M,P,H,O,I;if(o=o||{},h={},p={},T=s(i("script,style,head,html,body,title,meta,param"),l.getBlockElements()),O=l.getNonEmptyElements(),H=l.children,k=r.validate,I="forced_root_block"in o?o.forced_root_block:r.forced_root_block,P=l.getWhiteSpaceElements(),R=/^[ \t\r\n]+/,D=/[ \t\r\n]+$/,L=/[ \t\r\n]+/g,M=/^[ \t\r\n]+$/,v=new n({validate:k,allow_script_urls:r.allow_script_urls,allow_conditional_comments:r.allow_conditional_comments,self_closing_elements:g(l.getSelfClosingElements()),cdata:function(e){b.append(u("#cdata",4)).value=e},text:function(e,t){var n;B||(e=e.replace(L," "),b.lastChild&&T[b.lastChild.name]&&(e=e.replace(R,""))),0!==e.length&&(n=u("#text",3),n.raw=!!t,b.append(n).value=e)},comment:function(e){b.append(u("#comment",8)).value=e},pi:function(e,t){b.append(u(e,7)).value=t,m(b)},doctype:function(e){var t;t=b.append(u("#doctype",10)),t.value=e,m(b)},start:function(e,t,n){var r,i,o,a,s;if(o=k?l.getElementRule(e):{}){for(r=u(o.outputName||e,1),r.attributes=t,r.shortEnded=n,b.append(r),s=H[b.name],s&&H[r.name]&&!s[r.name]&&A.push(r),i=f.length;i--;)a=f[i].name,a in t.map&&(_=p[a],_?_.push(r):p[a]=[r]);T[e]&&m(r),n||(b=r),!B&&P[e]&&(B=!0)}},end:function(t){var n,r,i,o,a;if(r=k?l.getElementRule(t):{}){if(T[t]&&!B){if(n=b.firstChild,n&&3===n.type)if(i=n.value.replace(R,""),i.length>0)n.value=i,n=n.next;else for(o=n.next,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.next,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o;if(n=b.lastChild,n&&3===n.type)if(i=n.value.replace(D,""),i.length>0)n.value=i,n=n.prev;else for(o=n.prev,n.remove(),n=o;n&&3===n.type;)i=n.value,o=n.prev,(0===i.length||M.test(i))&&(n.remove(),n=o),n=o}if(B&&P[t]&&(B=!1),(r.removeEmpty||r.paddEmpty)&&b.isEmpty(O))if(r.paddEmpty)b.empty().append(new e("#text","3")).value="\xa0";else if(!b.attributes.map.name&&!b.attributes.map.id)return a=b.parent,T[b.name]?b.empty().remove():b.unwrap(),void(b=a);b=b.parent}}},l),y=b=new e(o.context||r.root_name,11),v.parse(t),k&&A.length&&(o.context?o.invalid=!0:c(A)),I&&("body"==y.name||o.isRootContent)&&a(),!o.invalid){for(S in h){for(_=d[S],C=h[S],N=C.length;N--;)C[N].parent||C.splice(N,1);for(x=0,w=_.length;w>x;x++)_[x](C,S,o)}for(x=0,w=f.length;w>x;x++)if(_=f[x],_.name in p){for(C=p[_.name],N=C.length;N--;)C[N].parent||C.splice(N,1);for(N=0,E=_.callbacks.length;E>N;N++)_.callbacks[N](C,_.name,o)}}return y},r.remove_trailing_brs&&u.addNodeFilter("br",function(t){var n,r=t.length,i,o=s({},l.getBlockElements()),a=l.getNonEmptyElements(),c,u,d,f,h,p;for(o.body=1,n=0;r>n;n++)if(i=t[n],c=i.parent,o[i.parent.name]&&i===c.lastChild){for(d=i.prev;d;){if(f=d.name,"span"!==f||"bookmark"!==d.attr("data-mce-type")){if("br"!==f)break;if("br"===f){i=null;break}}d=d.prev}i&&(i.remove(),c.isEmpty(a)&&(h=l.getElementRule(c.name),h&&(h.removeEmpty?c.remove():h.paddEmpty&&(c.empty().append(new e("#text",3)).value="\xa0"))))}else{for(u=i;c&&c.firstChild===u&&c.lastChild===u&&(u=c,!o[c.name]);)c=c.parent;u===c&&(p=new e("#text",3),p.value="\xa0",i.replace(p))}}),r.allow_html_in_named_anchor||u.addAttributeFilter("id,name",function(e){for(var t=e.length,n,r,i,o;t--;)if(o=e[t],"a"===o.name&&o.firstChild&&!o.attr("href")){i=o.parent,n=o.lastChild;do r=n.prev,i.insert(n,o),n=r;while(n)}}),r.validate&&l.getValidClasses()&&u.addAttributeFilter("class",function(e){for(var t=e.length,n,r,i,o,a,s=l.getValidClasses(),c,u;t--;){for(n=e[t],r=n.attr("class").split(" "),a="",i=0;i0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n")),r.push("<",e),t)for(c=0,u=t.length;u>c;c++)d=t[c],r.push(" ",d.name,'="',s(d.value,!0),'"');!n||l?r[r.length]=">":r[r.length]=" />",n&&i&&a[e]&&r.length>0&&(f=r[r.length-1],f.length>0&&"\n"!==f&&r.push("\n"))},end:function(e){var t;r.push(""),i&&a[e]&&r.length>0&&(t=r[r.length-1],t.length>0&&"\n"!==t&&r.push("\n"))},text:function(e,t){e.length>0&&(r[r.length]=t?e:s(e))},cdata:function(e){r.push("")},comment:function(e){r.push("")},pi:function(e,t){t?r.push(""):r.push(""),i&&r.push("\n")},doctype:function(e){r.push("",i?"\n":"")},reset:function(){r.length=0},getContent:function(){return r.join("").replace(/\n$/,"")}}}}),r(P,[M,B],function(e,t){return function(n,r){var i=this,o=new e(n);n=n||{},n.validate="validate"in n?n.validate:!0,i.schema=r=r||new t,i.writer=o,i.serialize=function(e){function t(e){var n=i[e.type],s,l,c,u,d,f,h,p,m;if(n)n(e);else{if(s=e.name,l=e.shortEnded,c=e.attributes,a&&c&&c.length>1&&(f=[],f.map={},m=r.getElementRule(e.name))){for(h=0,p=m.attributesOrder.length;p>h;h++)u=m.attributesOrder[h],u in c.map&&(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));for(h=0,p=c.length;p>h;h++)u=c[h].name,u in f.map||(d=c.map[u],f.map[u]=d,f.push({name:u,value:d}));c=f}if(o.start(e.name,c,l),!l){if(e=e.firstChild)do t(e);while(e=e.next);o.end(s)}}}var i,a;return a=n.validate,i={3:function(e){o.text(e.value,e.raw)},8:function(e){o.comment(e.value)},7:function(e){o.pi(e.name,e.value)},10:function(e){o.doctype(e.value)},4:function(e){o.cdata(e.value)},11:function(e){if(e=e.firstChild)do t(e);while(e=e.next)}},o.reset(),1!=e.type||n.inner?i[11](e):t(e),o.getContent()}}}),r(H,[w,L,D,C,P,A,B,d,m,S],function(e,t,n,r,i,o,a,s,l,c){function u(e){function t(e){return e&&"br"===e.name}var n,r;n=e.lastChild,t(n)&&(r=n.prev,t(r)&&(n.remove(),r.remove()))}var d=l.each,f=l.trim,h=e.DOM,p=["data-mce-selected"];return function(e,o){function m(e){var t=new RegExp(["]+data-mce-bogus[^>]+>[\u200b\ufeff]+<\\/span>","\\s?("+p.join("|")+')="[^"]+"'].join("|"),"gi");return e=c.trim(e.replace(t,""))}function g(){var e=o.getBody().innerHTML,t=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,r,i,a,s,l,c=o.schema;for(e=m(e),l=c.getShortEndedElements();s=t.exec(e);)i=t.lastIndex,a=s[0].length,r=l[s[1]]?i:n.findEndTag(c,e,i),e=e.substring(0,i-a)+e.substring(r),t.lastIndex=i-a;return f(e)}function v(e){-1===l.inArray(p,e)&&(C.addAttributeFilter(e,function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),p.push(e))}var y,b,C;return o&&(y=o.dom,b=o.schema),y=y||h,b=b||new a(e),e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:!0,C=new t(e,b),C.addAttributeFilter("data-mce-tabindex",function(e,t){for(var n=e.length,r;n--;)r=e[n],r.attr("tabindex",r.attributes.map["data-mce-tabindex"]),r.attr(t,null)}),C.addAttributeFilter("src,href,style",function(t,n){for(var r=t.length,i,o,a="data-mce-"+n,s=e.url_converter,l=e.url_converter_scope,c;r--;)i=t[r],o=i.attributes.map[a],o!==c?(i.attr(n,o.length>0?o:null),i.attr(a,null)):(o=i.attributes.map[n],"style"===n?o=y.serializeStyle(y.parseStyle(o),i.name):s&&(o=s.call(l,o,n,i.name)),i.attr(n,o.length>0?o:null))}),C.addAttributeFilter("class",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("class"),r&&(r=n.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,""),n.attr("class",r.length>0?r:null))}),C.addAttributeFilter("data-mce-type",function(e,t,n){for(var r=e.length,i;r--;)i=e[r],"bookmark"!==i.attributes.map["data-mce-type"]||n.cleanup||i.remove()}),C.addNodeFilter("noscript",function(e){for(var t=e.length,n;t--;)n=e[t].firstChild,n&&(n.value=r.decode(n.value))}),C.addNodeFilter("script,style",function(e,t){function n(e){return e.replace(/()/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*(()?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"")}for(var r=e.length,i,o,a;r--;)i=e[r],o=i.firstChild?i.firstChild.value:"","script"===t?(a=i.attr("type"),a&&i.attr("type","mce-no/type"==a?null:a.replace(/^mce\-/,"")),o.length>0&&(i.firstChild.value="// ")):o.length>0&&(i.firstChild.value="")}),C.addNodeFilter("#comment",function(e){for(var t=e.length,n;t--;)n=e[t],0===n.value.indexOf("[CDATA[")?(n.name="#cdata",n.type=4,n.value=n.value.replace(/^\[CDATA\[|\]\]$/g,"")):0===n.value.indexOf("mce:protected ")&&(n.name="#text",n.type=3,n.raw=!0,n.value=unescape(n.value).substr(14))}),C.addNodeFilter("xml:namespace,input",function(e,t){for(var n=e.length,r;n--;)r=e[n],7===r.type?r.remove():1===r.type&&("input"!==t||"type"in r.attributes.map||r.attr("type","text"))}),e.fix_list_elements&&C.addNodeFilter("ul,ol",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.parent,"ul"!==r.name&&"ol"!==r.name||n.prev&&"li"===n.prev.name&&n.prev.append(n)}),C.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-type,data-mce-resize",function(e,t){for(var n=e.length;n--;)e[n].attr(t,null)}),{schema:b,addNodeFilter:C.addNodeFilter,addAttributeFilter:C.addAttributeFilter,serialize:function(t,n){var r=this,o,a,l,h,p,m;return s.ie&&y.select("script,style,select,map").length>0?(p=t.innerHTML,t=t.cloneNode(!1),y.setHTML(t,p)):t=t.cloneNode(!0),o=t.ownerDocument.implementation,o.createHTMLDocument&&(a=o.createHTMLDocument(""),d("BODY"==t.nodeName?t.childNodes:[t],function(e){a.body.appendChild(a.importNode(e,!0))}),t="BODY"!=t.nodeName?a.body.firstChild:a.body,l=y.doc,y.doc=a),n=n||{},n.format=n.format||"html",n.selection&&(n.forced_root_block=""),n.no_events||(n.node=t,r.onPreProcess(n)),m=C.parse(f(n.getInner?t.innerHTML:y.getOuterHTML(t)),n),u(m),h=new i(e,b),n.content=h.serialize(m),n.cleanup||(n.content=c.trim(n.content),n.content=n.content.replace(/\uFEFF/g,"")),n.no_events||r.onPostProcess(n),l&&(y.doc=l),n.node=null,n.content},addRules:function(e){b.addValidElements(e)},setRules:function(e){b.setValidElements(e)},onPreProcess:function(e){o&&o.fire("PreProcess",e)},onPostProcess:function(e){o&&o.fire("PostProcess",e)},addTempAttr:v,trimHtml:m,getTrimmedContent:g}}}),r(O,[],function(){function e(e){function t(t,n){var r,i=0,o,a,s,l,c,u,d=-1,f;if(r=t.duplicate(),r.collapse(n),f=r.parentElement(),f.ownerDocument===e.dom.doc){for(;"false"===f.contentEditable;)f=f.parentNode;if(!f.hasChildNodes())return{node:f,inside:1};for(s=f.children,o=s.length-1;o>=i;)if(u=Math.floor((i+o)/2),l=s[u],r.moveToElementText(l),d=r.compareEndPoints(n?"StartToStart":"EndToEnd",t),d>0)o=u-1;else{if(!(0>d))return{node:l};i=u+1}if(0>d)for(l?r.collapse(!1):(r.moveToElementText(f),r.collapse(!0),l=f,a=!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",1)&&f==r.parentElement();)c++;else for(r.collapse(!0),c=0;0!==r.compareEndPoints(n?"StartToStart":"StartToEnd",t)&&0!==r.move("character",-1)&&f==r.parentElement();)c++;return{node:l,position:d,offset:c,inside:a}}}function n(){function n(e){var n=t(o,e),r,i,s=0,l,c,u;if(r=n.node,i=n.offset,n.inside&&!r.hasChildNodes())return void a[e?"setStart":"setEnd"](r,0);if(i===c)return void a[e?"setStartBefore":"setEndAfter"](r);if(n.position<0){if(l=n.inside?r.firstChild:r.nextSibling,!l)return void a[e?"setStartAfter":"setEndAfter"](r);if(!i)return void(3==l.nodeType?a[e?"setStart":"setEnd"](l,0):a[e?"setStartBefore":"setEndBefore"](l));for(;l;){if(3==l.nodeType&&(u=l.nodeValue,s+=u.length,s>=i)){r=l,s-=i,s=u.length-s;break}l=l.nextSibling}}else{if(l=r.previousSibling,!l)return a[e?"setStartBefore":"setEndBefore"](r);if(!i)return void(3==r.nodeType?a[e?"setStart":"setEnd"](l,r.nodeValue.length):a[e?"setStartAfter":"setEndAfter"](l));for(;l;){if(3==l.nodeType&&(s+=l.nodeValue.length,s>=i)){r=l,s-=i;break}l=l.previousSibling}}a[e?"setStart":"setEnd"](r,s)}var o=e.getRng(),a=i.createRng(),s,l,c,u,d;if(s=o.item?o.item(0):o.parentElement(),s.ownerDocument!=i.doc)return a;if(l=e.isCollapsed(),o.item)return a.setStart(s.parentNode,i.nodeIndex(s)),a.setEnd(a.startContainer,a.startOffset+1),a;try{n(!0),l||n()}catch(f){if(-2147024809!=f.number)throw f;d=r.getBookmark(2),c=o.duplicate(),c.collapse(!0),s=c.parentElement(),l||(c=o.duplicate(),c.collapse(!1),u=c.parentElement(),u.innerHTML=u.innerHTML),s.innerHTML=s.innerHTML,r.moveToBookmark(d),o=e.getRng(),n(!0),l||n()}return a}var r=this,i=e.dom,o=!1;this.getBookmark=function(n){function r(e){var t,n,r,o,a=[];for(t=e.parentNode,n=i.getRoot().parentNode;t!=n&&9!==t.nodeType;){for(r=t.children,o=r.length;o--;)if(e===r[o]){a.push(o);break}e=t,t=t.parentNode}return a}function o(e){var n;return n=t(a,e),n?{position:n.position,offset:n.offset,indexes:r(n.node),inside:n.inside}:void 0}var a=e.getRng(),s={};return 2===n&&(a.item?s.start={ctrl:!0,indexes:r(a.item(0))}:(s.start=o(!0),e.isCollapsed()||(s.end=o()))),s},this.moveToBookmark=function(e){function t(e){var t,n,r,o;for(t=i.getRoot(),n=e.length-1;n>=0;n--)o=t.children,r=e[n],r<=o.length-1&&(t=o[r]);return t}function n(n){var i=e[n?"start":"end"],a,s,l,c;i&&(a=i.position>0,s=o.createTextRange(),s.moveToElementText(t(i.indexes)),c=i.offset,c!==l?(s.collapse(i.inside||a),s.moveStart("character",a?-c:c)):s.collapse(n),r.setEndPoint(n?"StartToStart":"EndToStart",s),n&&r.collapse(!0))}var r,o=i.doc.body;e.start&&(e.start.ctrl?(r=o.createControlRange(),r.addElement(t(e.start.indexes)),r.select()):(r=o.createTextRange(),n(!0),n(),r.select()))},this.addRange=function(t){function n(e){var t,n,a,d,p;a=i.create("a"),t=e?s:c,n=e?l:u,d=r.duplicate(),t!=f&&t!=f.documentElement||(t=h,n=0),3==t.nodeType?(t.parentNode.insertBefore(a,t),d.moveToElementText(a),d.moveStart("character",n),i.remove(a),r.setEndPoint(e?"StartToStart":"EndToEnd",d)):(p=t.childNodes,p.length?(n>=p.length?i.insertAfter(a,p[p.length-1]):t.insertBefore(a,p[n]),d.moveToElementText(a)):t.canHaveHTML&&(t.innerHTML="",a=t.firstChild,d.moveToElementText(a),d.collapse(o)),r.setEndPoint(e?"StartToStart":"EndToEnd",d),i.remove(a))}var r,a,s,l,c,u,d,f=e.dom.doc,h=f.body,p,m;if(s=t.startContainer,l=t.startOffset,c=t.endContainer,u=t.endOffset,r=h.createTextRange(),s==c&&1==s.nodeType){if(l==u&&!s.hasChildNodes()){if(s.canHaveHTML)return d=s.previousSibling,d&&!d.hasChildNodes()&&i.isBlock(d)?d.innerHTML="":d=null,s.innerHTML="",r.moveToElementText(s.lastChild),r.select(),i.doc.selection.clear(),s.innerHTML="",void(d&&(d.innerHTML=""));l=i.nodeIndex(s),s=s.parentNode}if(l==u-1)try{if(m=s.childNodes[l],a=h.createControlRange(),a.addElement(m),a.select(),p=e.getRng(),p.item&&m===p.item(0))return}catch(g){}}n(!0),n(),r.select()},this.getRangeAt=n}return e}),r(I,[d],function(e){return{BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,modifierPressed:function(e){return e.shiftKey||e.ctrlKey||e.altKey||this.metaKeyPressed(e)},metaKeyPressed:function(t){return e.mac?t.metaKey:t.ctrlKey&&!t.altKey}}}),r(F,[I,m,u,d,_],function(e,t,n,r,i){function o(e,t){for(;t&&t!=e;){if(s(t)||a(t))return t;t=t.parentNode}return null}var a=i.isContentEditableFalse,s=i.isContentEditableTrue;return function(i,s){function l(e){var t=s.settings.object_resizing;return t===!1||r.iOS?!1:("string"!=typeof t&&(t="table,img,div"),"false"===e.getAttribute("data-mce-resize")?!1:e==s.getBody()?!1:s.dom.is(e,t))}function c(t){var n,r,i,o,a;n=t.screenX-L,r=t.screenY-M,U=n*B[2]+O,W=r*B[3]+I,U=5>U?5:U,W=5>W?5:W,i="IMG"==k.nodeName&&s.settings.resize_img_proportional!==!1?!e.modifierPressed(t):e.modifierPressed(t)||"IMG"==k.nodeName&&B[2]*B[3]!==0,i&&(j(n)>j(r)?(W=Y(U*F),U=Y(W/F)):(U=Y(W/F),W=Y(U*F))),_.setStyles(T,{width:U,height:W}),o=B.startPos.x+n,a=B.startPos.y+r,o=o>0?o:0,a=a>0?a:0,_.setStyles(R,{left:o,top:a,display:"block"}),R.innerHTML=U+" × "+W,B[2]<0&&T.clientWidth<=U&&_.setStyle(T,"left",P+(O-U)),B[3]<0&&T.clientHeight<=W&&_.setStyle(T,"top",H+(I-W)),n=X.scrollWidth-K,r=X.scrollHeight-G,n+r!==0&&_.setStyles(R,{left:o-n,top:a-r}),z||(s.fire("ObjectResizeStart",{target:k,width:O,height:I}),z=!0)}function u(){function e(e,t){t&&(k.style[e]||!s.schema.isValid(k.nodeName.toLowerCase(),e)?_.setStyle(k,e,t):_.setAttrib(k,e,t))}z=!1,e("width",U),e("height",W),_.unbind(V,"mousemove",c),_.unbind(V,"mouseup",u),$!=V&&(_.unbind($,"mousemove",c),_.unbind($,"mouseup",u)),_.remove(T),_.remove(R),q&&"TABLE"!=k.nodeName||d(k),s.fire("ObjectResized",{target:k,width:U,height:W}),_.setAttrib(k,"style",_.getAttrib(k,"style")),s.nodeChanged()}function d(e,t,n){var i,o,a,d,h;f(),x(),i=_.getPos(e,X),P=i.x,H=i.y,h=e.getBoundingClientRect(),o=h.width||h.right-h.left,a=h.height||h.bottom-h.top,k!=e&&(C(),k=e,U=W=0),d=s.fire("ObjectSelected",{target:e}),l(e)&&!d.isDefaultPrevented()?S(A,function(e,i){function s(t){L=t.screenX,M=t.screenY,O=k.clientWidth,I=k.clientHeight,F=I/O,B=e,e.startPos={x:o*e[0]+P,y:a*e[1]+H},K=X.scrollWidth,G=X.scrollHeight,T=k.cloneNode(!0),_.addClass(T,"mce-clonedresizable"),_.setAttrib(T,"data-mce-bogus","all"),T.contentEditable=!1,T.unSelectabe=!0,_.setStyles(T,{left:P,top:H,margin:0}),T.removeAttribute("data-mce-selected"),X.appendChild(T),_.bind(V,"mousemove",c),_.bind(V,"mouseup",u),$!=V&&(_.bind($,"mousemove",c),_.bind($,"mouseup",u)),R=_.add(X,"div",{"class":"mce-resize-helper","data-mce-bogus":"all"},O+" × "+I)}var l;return t?void(i==t&&s(n)):(l=_.get("mceResizeHandle"+i),l&&_.remove(l),l=_.add(X,"div",{id:"mceResizeHandle"+i,"data-mce-bogus":"all","class":"mce-resizehandle",unselectable:!0,style:"cursor:"+i+"-resize; margin:0; padding:0"}),r.ie&&(l.contentEditable=!1),_.bind(l,"mousedown",function(e){e.stopImmediatePropagation(),e.preventDefault(),s(e)}),e.elm=l,void _.setStyles(l,{left:o*e[0]+P-l.offsetWidth/2,top:a*e[1]+H-l.offsetHeight/2}))}):f(),k.setAttribute("data-mce-selected","1")}function f(){var e,t;x(),k&&k.removeAttribute("data-mce-selected");for(e in A)t=_.get("mceResizeHandle"+e),t&&(_.unbind(t),_.remove(t))}function h(e){function t(e,t){if(e)do if(e===t)return!0;while(e=e.parentNode)}var n,r;if(!z&&!s.removed)return S(_.select("img[data-mce-selected],hr[data-mce-selected]"),function(e){e.removeAttribute("data-mce-selected")}),r="mousedown"==e.type?e.target:i.getNode(),r=_.$(r).closest(q?"table":"table,img,hr")[0],t(r,X)&&(w(),n=i.getStart(!0),t(n,r)&&t(i.getEnd(!0),r)&&(!q||r!=n&&"IMG"!==n.nodeName))?void d(r):void f()}function p(e,t,n){e&&e.attachEvent&&e.attachEvent("on"+t,n)}function m(e,t,n){e&&e.detachEvent&&e.detachEvent("on"+t,n)}function g(e){var t=e.srcElement,n,r,i,o,a,l,c;n=t.getBoundingClientRect(),l=D.clientX-n.left,c=D.clientY-n.top;for(r in A)if(i=A[r],o=t.offsetWidth*i[0],a=t.offsetHeight*i[1],j(o-l)<8&&j(a-c)<8){B=i;break}z=!0,s.fire("ObjectResizeStart",{target:k,width:k.clientWidth,height:k.clientHeight}),s.getDoc().selection.empty(),d(t,r,D)}function v(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function y(e){return a(o(s.getBody(),e))}function b(e){var t=e.srcElement;if(y(t))return void v(e);if(t!=k){if(s.fire("ObjectSelected",{target:t}),C(),0===t.id.indexOf("mceResizeHandle"))return void(e.returnValue=!1);"IMG"!=t.nodeName&&"TABLE"!=t.nodeName||(f(),k=t,p(t,"resizestart",g))}}function C(){m(k,"resizestart",g)}function x(){for(var e in A){var t=A[e];t.elm&&(_.unbind(t.elm),delete t.elm)}}function w(){try{s.getDoc().execCommand("enableObjectResizing",!1,!1)}catch(e){}}function N(e){var t;if(q){t=V.body.createControlRange();try{return t.addElement(e),t.select(),!0}catch(n){}}}function E(){k=T=null,q&&(C(),m(X,"controlselect",b))}var _=s.dom,S=t.each,k,T,R,A,B,D,L,M,P,H,O,I,F,z,U,W,V=s.getDoc(),$=document,q=r.ie&&r.ie<11,j=Math.abs,Y=Math.round,X=s.getBody(),K,G;A={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};var J=".mce-content-body";return s.contentStyles.push(J+" div.mce-resizehandle {position: absolute;border: 1px solid black;box-sizing: box-sizing;background: #FFF;width: 7px;height: 7px;z-index: 10000}"+J+" .mce-resizehandle:hover {background: #000}"+J+" img[data-mce-selected],"+J+" hr[data-mce-selected] {outline: 1px solid black;resize: none}"+J+" .mce-clonedresizable {position: absolute;"+(r.gecko?"":"outline: 1px dashed black;")+"opacity: .5;filter: alpha(opacity=50);z-index: 10000}"+J+" .mce-resize-helper {background: #555;background: rgba(0,0,0,0.75);border-radius: 3px;border: 1px;color: white;display: none;font-family: sans-serif;font-size: 12px;white-space: nowrap;line-height: 14px;margin: 5px 10px;padding: 5px;position: absolute;z-index: 10001}"),s.on("init",function(){q?(s.on("ObjectResized",function(e){"TABLE"!=e.target.nodeName&&(f(),N(e.target))}),p(X,"controlselect",b),s.on("mousedown",function(e){D=e})):(w(),r.ie>=11&&(s.on("mousedown click",function(e){var t=e.target,n=t.nodeName;z||!/^(TABLE|IMG|HR)$/.test(n)||y(t)||(s.selection.select(t,"TABLE"==n),"mousedown"==e.type&&s.nodeChanged())}),s.dom.bind(X,"mscontrolselect",function(e){function t(e){n.setEditorTimeout(s,function(){s.selection.select(e)})}return y(e.target)?(e.preventDefault(),void t(e.target)):void(/^(TABLE|IMG|HR)$/.test(e.target.nodeName)&&(e.preventDefault(),"IMG"==e.target.tagName&&t(e.target)))})));var e=n.throttle(function(e){s.composing||h(e)});s.on("nodechange ResizeEditor ResizeWindow drop",e),s.on("keyup compositionend",function(t){k&&"TABLE"==k.nodeName&&e(t)}),s.on("hide blur",f)}),s.on("remove",x),{isResizable:l,showResizeRect:d,hideResizeRect:f,updateResizeRect:h,controlSelect:N,destroy:E}}}),r(z,[],function(){function e(e){return function(){return e}}function t(e){return function(t){return!e(t)}}function n(e,t){return function(n){return e(t(n))}}function r(){var e=a.call(arguments);return function(t){for(var n=0;n=e.length?e.apply(this,t.slice(1)):function(){var e=t.concat([].slice.call(arguments));return o.apply(this,e)}}var a=[].slice;return{constant:e,negate:t,and:i,or:r,curry:o,compose:n}}),r(U,[_,p,k],function(e,t,n){function r(e){return m(e)?!1:d(e)?!f(e.parentNode):h(e)||u(e)||p(e)||c(e)}function i(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode){if(c(e))return!1;if(l(e))return!0}return!0}function o(e){return c(e)?t.reduce(e.getElementsByTagName("*"),function(e,t){return e||l(t)},!1)!==!0:!1}function a(e){return h(e)||o(e)}function s(e,t){return r(e)&&i(e,t)}var l=e.isContentEditableTrue,c=e.isContentEditableFalse,u=e.isBr,d=e.isText,f=e.matchNodeNames("script style textarea"),h=e.matchNodeNames("img input textarea hr iframe video audio object"),p=e.matchNodeNames("table"),m=n.isCaretContainer;return{isCaretCandidate:r,isInEditable:i,isAtomic:a,isEditableCaretCandidate:s}}),r(W,[],function(){function e(e){return e?{left:u(e.left),top:u(e.top),bottom:u(e.bottom),right:u(e.right),width:u(e.width),height:u(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0}}function t(t,n){return t=e(t),n?t.right=t.left:(t.left=t.left+t.width,t.right=t.left),t.width=0,t}function n(e,t){return e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right}function r(e,t,n){return e>=0&&e<=Math.min(t.height,n.height)/2}function i(e,t){return e.bottomt.bottom?!1:r(t.top-e.bottom,e,t)}function o(e,t){return e.top>t.bottom?!0:e.bottomt.right}function l(e,t){return i(e,t)?-1:o(e,t)?1:a(e,t)?-1:s(e,t)?1:0}function c(e,t,n){return t>=e.left&&t<=e.right&&n>=e.top&&n<=e.bottom}var u=Math.round;return{clone:e,collapse:t,isEqual:n,isAbove:i,isBelow:o,isLeft:a,isRight:s,compare:l,containsXY:c}}),r(V,[],function(){function e(e){return"string"==typeof e&&e.charCodeAt(0)>=768&&t.test(e)}var t=new RegExp("[\u0300-\u036f\u0483-\u0487\u0488-\u0489\u0591-\u05bd\u05bf\u05c1-\u05c2\u05c4-\u05c5\u05c7\u0610-\u061a\u064b-\u065f\u0670\u06d6-\u06dc\u06df-\u06e4\u06e7-\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0859-\u085b\u08e3-\u0902\u093a\u093c\u0941-\u0948\u094d\u0951-\u0957\u0962-\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2-\u09e3\u0a01-\u0a02\u0a3c\u0a41-\u0a42\u0a47-\u0a48\u0a4b-\u0a4d\u0a51\u0a70-\u0a71\u0a75\u0a81-\u0a82\u0abc\u0ac1-\u0ac5\u0ac7-\u0ac8\u0acd\u0ae2-\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62-\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c00\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55-\u0c56\u0c62-\u0c63\u0c81\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc-\u0ccd\u0cd5-\u0cd6\u0ce2-\u0ce3\u0d01\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62-\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb-\u0ebc\u0ec8-\u0ecd\u0f18-\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86-\u0f87\u0f8d-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039-\u103a\u103d-\u103e\u1058-\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085-\u1086\u108d\u109d\u135d-\u135f\u1712-\u1714\u1732-\u1734\u1752-\u1753\u1772-\u1773\u17b4-\u17b5\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927-\u1928\u1932\u1939-\u193b\u1a17-\u1a18\u1a1b\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1ab0-\u1abd\u1abe\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80-\u1b81\u1ba2-\u1ba5\u1ba8-\u1ba9\u1bab-\u1bad\u1be6\u1be8-\u1be9\u1bed\u1bef-\u1bf1\u1c2c-\u1c33\u1c36-\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1cf4\u1cf8-\u1cf9\u1dc0-\u1df5\u1dfc-\u1dff\u200c-\u200d\u20d0-\u20dc\u20dd-\u20e0\u20e1\u20e2-\u20e4\u20e5-\u20f0\u2cef-\u2cf1\u2d7f\u2de0-\u2dff\u302a-\u302d\u302e-\u302f\u3099-\u309a\ua66f\ua670-\ua672\ua674-\ua67d\ua69e-\ua69f\ua6f0-\ua6f1\ua802\ua806\ua80b\ua825-\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\ua9e5\uaa29-\uaa2e\uaa31-\uaa32\uaa35-\uaa36\uaa43\uaa4c\uaa7c\uaab0\uaab2-\uaab4\uaab7-\uaab8\uaabe-\uaabf\uaac1\uaaec-\uaaed\uaaf6\uabe5\uabe8\uabed\ufb1e\ufe00-\ufe0f\ufe20-\ufe2f\uff9e-\uff9f]");return{isExtendingChar:e}}),r($,[z,_,w,T,U,W,V],function(e,t,n,r,i,o,a){function s(e){return"createRange"in e?e.createRange():n.DOM.createRng()}function l(e){return e&&/[\r\n\t ]/.test(e)}function c(e){var t=e.startContainer,n=e.startOffset,r;return!!(l(e.toString())&&v(t.parentNode)&&(r=t.data,l(r[n-1])||l(r[n+1])))}function u(e){function t(e){var t=e.ownerDocument,n=s(t),r=t.createTextNode("\xa0"),i=e.parentNode,a;return i.insertBefore(r,e),n.setStart(r,0),n.setEnd(r,1),a=o.clone(n.getBoundingClientRect()),i.removeChild(r),a}function n(e){var n,r;return r=e.getClientRects(),n=r.length>0?o.clone(r[0]):o.clone(e.getBoundingClientRect()),b(e)&&0===n.left?t(e):n}function r(e,t){return e=o.collapse(e,t),e.width=1,e.right=e.left+1,e}function i(e){0!==e.height&&(u.length>0&&o.isEqual(e,u[u.length-1])||u.push(e))}function l(e,t){var o=s(e.ownerDocument);if(t0&&(o.setStart(e,t-1),o.setEnd(e,t),c(o)||i(r(n(o),!1))),t=t.data.length:n>=t.childNodes.length}function a(){var e;return e=s(t.ownerDocument),e.setStart(t,n),e.setEnd(t,n),e}function l(){return r||(r=u(new d(t,n))),r}function c(){return l().length>0}function f(e){return e&&t===e.container()&&n===e.offset()}function h(e){return x(t,e?n-1:n)}return{container:e.constant(t),offset:e.constant(n),toRange:a,getClientRects:l,isVisible:c,isAtStart:i,isAtEnd:o,isEqual:f,getNode:h}}var f=t.isElement,h=i.isCaretCandidate,p=t.matchStyleValues("display","block table"),m=t.matchStyleValues("float","left right"),g=e.and(f,h,e.negate(m)),v=e.negate(t.matchStyleValues("white-space","pre pre-line pre-wrap")),y=t.isText,b=t.isBr,C=n.nodeIndex,x=r.getNode;return d.fromRangeStart=function(e){return new d(e.startContainer,e.startOffset)},d.fromRangeEnd=function(e){return new d(e.endContainer,e.endOffset)},d.after=function(e){return new d(e.parentNode,C(e)+1)},d.before=function(e){return new d(e.parentNode,C(e))},d}),r(q,[_,w,z,p,$],function(e,t,n,r,i){function o(e){var t=e.parentNode;return v(t)?o(t):t}function a(e){return e?r.reduce(e.childNodes,function(e,t){return v(t)&&"BR"!=t.nodeName?e=e.concat(a(t)):e.push(t),e},[]):[]}function s(e,t){for(;(e=e.previousSibling)&&g(e);)t+=e.data.length;return t}function l(e){return function(t){return e===t}}function c(t){var n,i,s;return n=a(o(t)),i=r.findIndex(n,l(t),t),n=n.slice(0,i+1),s=r.reduce(n,function(e,t,r){return g(t)&&g(n[r-1])&&e++,e},0),n=r.filter(n,e.matchNodeNames(t.nodeName)),i=r.findIndex(n,l(t),t),i-s}function u(e){var t;return t=g(e)?"text()":e.nodeName.toLowerCase(),t+"["+c(e)+"]"}function d(e,t,n){var r=[];for(t=t.parentNode;t!=e&&(!n||!n(t));t=t.parentNode)r.push(t);return r}function f(t,i){var o,a,l=[],c,f,h;return o=i.container(),a=i.offset(),g(o)?c=s(o,a):(f=o.childNodes,a>=f.length?(c="after",a=f.length-1):c="before",o=f[a]),l.push(u(o)),h=d(t,o),h=r.filter(h,n.negate(e.isBogus)),l=l.concat(r.map(h,function(e){return u(e)})),l.reverse().join("/")+","+c}function h(t,n,i){var o=a(t);return o=r.filter(o,function(e,t){return!g(e)||!g(o[t-1])}),o=r.filter(o,e.matchNodeNames(n)),o[i]}function p(e,t){for(var n=e,r=0,o;g(n);){if(o=n.data.length,t>=r&&r+o>=t){e=n,t-=r;break}if(!g(n.nextSibling)){e=n,t=o;break}r+=o,n=n.nextSibling}return t>e.data.length&&(t=e.data.length),new i(e,t)}function m(e,t){var n,o,a;return t?(n=t.split(","),t=n[0].split("/"),a=n.length>1?n[1]:"before",o=r.reduce(t,function(e,t){return(t=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t))?("text()"===t[1]&&(t[1]="#text"),h(e,t[1],parseInt(t[2],10))):null},e),o?g(o)?p(o,parseInt(a,10)):(a="after"===a?y(o)+1:y(o),new i(o.parentNode,a)):null):null}var g=e.isText,v=e.isBogus,y=t.nodeIndex;return{create:f,resolve:m}}),r(j,[d,m,k,q,$,_],function(e,t,n,r,i,o){function a(a){var l=a.dom;this.getBookmark=function(e,c){function u(e,n){var r=0;return t.each(l.select(e),function(e){return"all"!==e.getAttribute("data-mce-bogus")?e==n?!1:void r++:void 0}),r}function d(e){function t(t){var n,r,i,o=t?"start":"end";n=e[o+"Container"],r=e[o+"Offset"],1==n.nodeType&&"TR"==n.nodeName&&(i=n.childNodes,n=i[Math.min(t?r:r-1,i.length-1)],n&&(r=t?0:n.childNodes.length,e["set"+(t?"Start":"End")](n,r)))}return t(!0),t(),e}function f(e){function t(e,t){var r=e[t?"startContainer":"endContainer"],i=e[t?"startOffset":"endOffset"],o=[],a,s,u=0;if(3==r.nodeType){if(c)for(a=r.previousSibling;a&&3==a.nodeType;a=a.previousSibling)i+=a.nodeValue.length;o.push(i)}else s=r.childNodes,i>=s.length&&s.length&&(u=1,i=Math.max(0,s.length-1)),o.push(l.nodeIndex(s[i],c)+u);for(;r&&r!=n;r=r.parentNode)o.push(l.nodeIndex(r,c));return o}var n=l.getRoot(),r={};return r.start=t(e,!0),a.isCollapsed()||(r.end=t(e)),r}function h(e){function t(e){var t;if(n.isCaretContainer(e)){if(o.isText(e)&&n.isCaretContainerBlock(e)&&(e=e.parentNode),t=e.previousSibling,s(t))return t;if(t=e.nextSibling,s(t))return t}}return t(e.startContainer)||t(e.endContainer)}var p,m,g,v,y,b,C="",x;if(2==e)return b=a.getNode(),y=b?b.nodeName:null,p=a.getRng(),s(b)||"IMG"==y?{name:y,index:u(y,b)}:a.tridentSel?a.tridentSel.getBookmark(e):(b=h(p),b?(y=b.tagName,{name:y,index:u(y,b)}):f(p));if(3==e)return p=a.getRng(),{start:r.create(l.getRoot(),i.fromRangeStart(p)),end:r.create(l.getRoot(),i.fromRangeEnd(p))};if(e)return{rng:a.getRng()};if(p=a.getRng(),g=l.uniqueId(),v=a.isCollapsed(),x="overflow:hidden;line-height:0px",p.duplicate||p.item){if(p.item)return b=p.item(0),y=b.nodeName,{name:y,index:u(y,b)};m=p.duplicate();try{p.collapse(),p.pasteHTML(''+C+""),v||(m.collapse(!1),p.moveToElementText(m.parentElement()),0===p.compareEndPoints("StartToEnd",m)&&m.move("character",-1),m.pasteHTML(''+C+""))}catch(w){return null}}else{if(b=a.getNode(),y=b.nodeName,"IMG"==y)return{name:y,index:u(y,b)};m=d(p.cloneRange()),v||(m.collapse(!1),m.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_end",style:x},C))),p=d(p),p.collapse(!0),p.insertNode(l.create("span",{"data-mce-type":"bookmark",id:g+"_start",style:x},C))}return a.moveToBookmark({id:g,keep:1}),{id:g}},this.moveToBookmark=function(n){function i(e){var t=n[e?"start":"end"],r,i,o,a;if(t){for(o=t[0],i=d,r=t.length-1;r>=1;r--){if(a=i.childNodes,t[r]>a.length-1)return;i=a[t[r]]}3===i.nodeType&&(o=Math.min(t[0],i.nodeValue.length)),1===i.nodeType&&(o=Math.min(t[0],i.childNodes.length)),e?u.setStart(i,o):u.setEnd(i,o)}return!0}function o(r){var i=l.get(n.id+"_"+r),o,a,s,c,u=n.keep;if(i&&(o=i.parentNode,"start"==r?(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),f=h=o,p=m=a):(u?(o=i.firstChild,a=1):a=l.nodeIndex(i),h=o,m=a),!u)){for(c=i.previousSibling,s=i.nextSibling,t.each(t.grep(i.childNodes),function(e){3==e.nodeType&&(e.nodeValue=e.nodeValue.replace(/\uFEFF/g,""))});i=l.get(n.id+"_"+r);)l.remove(i,1);c&&s&&c.nodeType==s.nodeType&&3==c.nodeType&&!e.opera&&(a=c.nodeValue.length,c.appendData(s.nodeValue),l.remove(s),"start"==r?(f=h=c,p=m=a):(h=c,m=a))}}function s(t){return!l.isBlock(t)||t.innerHTML||e.ie||(t.innerHTML='
              '),t}function c(){var e,t;return e=l.createRng(),t=r.resolve(l.getRoot(),n.start),e.setStart(t.container(),t.offset()),t=r.resolve(l.getRoot(),n.end),e.setEnd(t.container(),t.offset()),e}var u,d,f,h,p,m;if(n)if(t.isArray(n.start)){if(u=l.createRng(),d=l.getRoot(),a.tridentSel)return a.tridentSel.moveToBookmark(n);i(!0)&&i()&&a.setRng(u)}else"string"==typeof n.start?a.setRng(c(n)):n.id?(o("start"),o("end"),f&&(u=l.createRng(),u.setStart(s(f),p),u.setEnd(s(h),m),a.setRng(u))):n.name?a.select(l.select(n.name)[n.index]):n.rng&&a.setRng(n.rng)}}var s=o.isContentEditableFalse;return a.isBookmarkNode=function(e){return e&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type")},a}),r(Y,[y,O,F,T,j,_,d,m,$],function(e,n,r,i,o,a,s,l,c){function u(e,t,i,a){var s=this;s.dom=e,s.win=t,s.serializer=i,s.editor=a,s.bookmarkManager=new o(s),s.controlSelection=new r(s,a),s.win.getSelection||(s.tridentSel=new n(s))}var d=l.each,f=l.trim,h=s.ie;return u.prototype={setCursorLocation:function(e,t){var n=this,r=n.dom.createRng();e?(r.setStart(e,t),r.setEnd(e,t),n.setRng(r),n.collapse(!1)):(n._moveEndPoint(r,n.editor.getBody(),!0),n.setRng(r))},getContent:function(e){var n=this,r=n.getRng(),i=n.dom.create("body"),o=n.getSel(),a,s,l;return e=e||{},a=s="",e.get=!0,e.format=e.format||"html",e.selection=!0,n.editor.fire("BeforeGetContent",e),"text"==e.format?n.isCollapsed()?"":r.text||(o.toString?o.toString():""):(r.cloneContents?(l=r.cloneContents(),l&&i.appendChild(l)):r.item!==t||r.htmlText!==t?(i.innerHTML="
              "+(r.item?r.item(0).outerHTML:r.htmlText),i.removeChild(i.firstChild)):i.innerHTML=r.toString(),/^\s/.test(i.innerHTML)&&(a=" "),/\s+$/.test(i.innerHTML)&&(s=" "),e.getInner=!0,e.content=n.isCollapsed()?"":a+n.serializer.serialize(i,e)+s,n.editor.fire("GetContent",e),e.content)},setContent:function(e,t){var n=this,r=n.getRng(),i,o=n.win.document,a,s;if(t=t||{format:"html"},t.set=!0,t.selection=!0,t.content=e,t.no_events||n.editor.fire("BeforeSetContent",t),e=t.content,r.insertNode){e+='_',r.startContainer==o&&r.endContainer==o?o.body.innerHTML=e:(r.deleteContents(),0===o.body.childNodes.length?o.body.innerHTML=e:r.createContextualFragment?r.insertNode(r.createContextualFragment(e)):(a=o.createDocumentFragment(),s=o.createElement("div"),a.appendChild(s),s.outerHTML=e,r.insertNode(a))),i=n.dom.get("__caret"),r=o.createRange(),r.setStartBefore(i),r.setEndBefore(i),n.setRng(r),n.dom.remove("__caret");try{n.setRng(r)}catch(l){}}else r.item&&(o.execCommand("Delete",!1,null),r=n.getRng()),/^\s+/.test(e)?(r.pasteHTML('_'+e),n.dom.remove("__mce_tmp")):r.pasteHTML(e);t.no_events||n.editor.fire("SetContent",t)},getStart:function(e){var t=this,n=t.getRng(),r,i,o,a;if(n.duplicate||n.item){if(n.item)return n.item(0);for(o=n.duplicate(),o.collapse(1),r=o.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),i=a=n.parentElement();a=a.parentNode;)if(a==r){r=i;break}return r}return r=n.startContainer,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[Math.min(r.childNodes.length-1,n.startOffset)])),r&&3==r.nodeType?r.parentNode:r},getEnd:function(e){var t=this,n=t.getRng(),r,i;return n.duplicate||n.item?n.item?n.item(0):(n=n.duplicate(),n.collapse(0),r=n.parentElement(),r.ownerDocument!==t.dom.doc&&(r=t.dom.getRoot()),r&&"BODY"==r.nodeName?r.lastChild||r:r):(r=n.endContainer,i=n.endOffset,1==r.nodeType&&r.hasChildNodes()&&(e&&n.collapsed||(r=r.childNodes[i>0?i-1:i])),r&&3==r.nodeType?r.parentNode:r)},getBookmark:function(e,t){return this.bookmarkManager.getBookmark(e,t)},moveToBookmark:function(e){return this.bookmarkManager.moveToBookmark(e)},select:function(e,t){var n=this,r=n.dom,i=r.createRng(),o;if(n.lastFocusBookmark=null,e){if(!t&&n.controlSelection.controlSelect(e))return;o=r.nodeIndex(e),i.setStart(e.parentNode,o),i.setEnd(e.parentNode,o+1),t&&(n._moveEndPoint(i,e,!0),n._moveEndPoint(i,e)),n.setRng(i)}return e},isCollapsed:function(){var e=this,t=e.getRng(),n=e.getSel();return!t||t.item?!1:t.compareEndPoints?0===t.compareEndPoints("StartToEnd",t):!n||t.collapsed},collapse:function(e){var t=this,n=t.getRng(),r;n.item&&(r=n.item(0),n=t.win.document.body.createTextRange(),n.moveToElementText(r)),n.collapse(!!e),t.setRng(n)},getSel:function(){var e=this.win;return e.getSelection?e.getSelection():e.document.selection},getRng:function(e){function t(e,t,n){try{return t.compareBoundaryPoints(e,n)}catch(r){return-1}}var n=this,r,i,o,a,s,l;if(!n.win)return null;if(a=n.win.document,!e&&n.lastFocusBookmark){var c=n.lastFocusBookmark;return c.startContainer?(i=a.createRange(),i.setStart(c.startContainer,c.startOffset),i.setEnd(c.endContainer,c.endOffset)):i=c,i}if(e&&n.tridentSel)return n.tridentSel.getRangeAt(0);try{(r=n.getSel())&&(i=r.rangeCount>0?r.getRangeAt(0):r.createRange?r.createRange():a.createRange())}catch(u){}if(l=n.editor.fire("GetSelectionRange",{range:i}),l.range!==i)return l.range;if(h&&i&&i.setStart&&a.selection){try{s=a.selection.createRange()}catch(u){}s&&s.item&&(o=s.item(0),i=a.createRange(),i.setStartBefore(o),i.setEndAfter(o))}return i||(i=a.createRange?a.createRange():a.body.createTextRange()),i.setStart&&9===i.startContainer.nodeType&&i.collapsed&&(o=n.dom.getRoot(),i.setStart(o,0),i.setEnd(o,0)),n.selectedRange&&n.explicitRange&&(0===t(i.START_TO_START,i,n.selectedRange)&&0===t(i.END_TO_END,i,n.selectedRange)?i=n.explicitRange:(n.selectedRange=null,n.explicitRange=null)),i},setRng:function(e,t){var n=this,r,i,o;if(e)if(e.select){n.explicitRange=null;try{e.select()}catch(a){}}else if(n.tridentSel){if(e.cloneRange)try{n.tridentSel.addRange(e)}catch(a){}}else{if(r=n.getSel(),o=n.editor.fire("SetSelectionRange",{range:e}),e=o.range,r){n.explicitRange=e;try{r.removeAllRanges(),r.addRange(e)}catch(a){}t===!1&&r.extend&&(r.collapse(e.endContainer,e.endOffset),r.extend(e.startContainer,e.startOffset)),n.selectedRange=r.rangeCount>0?r.getRangeAt(0):null}e.collapsed||e.startContainer!=e.endContainer||!r.setBaseAndExtent||s.ie||e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()&&(i=e.startContainer.childNodes[e.startOffset],i&&"IMG"==i.tagName&&n.getSel().setBaseAndExtent(i,0,i,1))}},setNode:function(e){var t=this;return t.setContent(t.dom.getOuterHTML(e)),e},getNode:function(){function e(e,t){for(var n=e;e&&3===e.nodeType&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||n}var t=this,n=t.getRng(),r,i,o,a,s,l=t.dom.getRoot();return n?(i=n.startContainer,o=n.endContainer,a=n.startOffset,s=n.endOffset,n.setStart?(r=n.commonAncestorContainer,!n.collapsed&&(i==o&&2>s-a&&i.hasChildNodes()&&(r=i.childNodes[a]),3===i.nodeType&&3===o.nodeType&&(i=i.length===a?e(i.nextSibling,!0):i.parentNode,o=0===s?e(o.previousSibling,!1):o.parentNode,i&&i===o))?i:r&&3==r.nodeType?r.parentNode:r):(r=n.item?n.item(0):n.parentElement(),r.ownerDocument!==t.win.document&&(r=l),r)):l},getSelectedBlocks:function(t,n){var r=this,i=r.dom,o,a,s=[];if(a=i.getRoot(),t=i.getParent(t||r.getStart(),i.isBlock),n=i.getParent(n||r.getEnd(),i.isBlock),t&&t!=a&&s.push(t),t&&n&&t!=n){o=t;for(var l=new e(t,a);(o=l.next())&&o!=n;)i.isBlock(o)&&s.push(o)}return n&&t!=n&&n!=a&&s.push(n),s},isForward:function(){var e=this.dom,t=this.getSel(),n,r;return t&&t.anchorNode&&t.focusNode?(n=e.createRng(),n.setStart(t.anchorNode,t.anchorOffset),n.collapse(!0),r=e.createRng(),r.setStart(t.focusNode,t.focusOffset),r.collapse(!0),n.compareBoundaryPoints(n.START_TO_START,r)<=0):!0},normalize:function(){var e=this,t=e.getRng();return s.range&&new i(e.dom).normalize(t)&&e.setRng(t,e.isForward()),t},selectorChanged:function(e,t){var n=this,r;return n.selectorChangedData||(n.selectorChangedData={},r={},n.editor.on("NodeChange",function(e){var t=e.element,i=n.dom,o=i.getParents(t,null,i.getRoot()),a={};d(n.selectorChangedData,function(e,t){d(o,function(n){return i.is(n,t)?(r[t]||(d(e,function(e){e(!0,{node:n,selector:t,parents:o})}),r[t]=e),a[t]=e,!1):void 0})}),d(r,function(e,n){a[n]||(delete r[n],d(e,function(e){e(!1,{node:t,selector:n,parents:o})}))})})),n.selectorChangedData[e]||(n.selectorChangedData[e]=[]),n.selectorChangedData[e].push(t),n},getScrollContainer:function(){for(var e,t=this.dom.getRoot();t&&"BODY"!=t.nodeName;){if(t.scrollHeight>t.clientHeight){e=t;break}t=t.parentNode}return e},scrollIntoView:function(e,t){function n(e){for(var t=0,n=0,r=e;r&&r.nodeType;)t+=r.offsetLeft||0,n+=r.offsetTop||0,r=r.offsetParent;return{x:t,y:n}}var r,i,o=this,s=o.dom,l=s.getRoot(),c,u,d=0;if(a.isElement(e)){if(t===!1&&(d=e.offsetHeight),"BODY"!=l.nodeName){var f=o.getScrollContainer();if(f)return r=n(e).y-n(f).y+d,u=f.clientHeight,c=f.scrollTop,void((c>r||r+25>c+u)&&(f.scrollTop=c>r?r:r-u+25))}i=s.getViewPort(o.editor.getWin()),r=s.getPos(e).y+d,c=i.y,u=i.h,(rc+u)&&o.editor.getWin().scrollTo(0,c>r?r:r-u+25)}},placeCaretAt:function(e,t){this.setRng(i.getCaretRangeFromPoint(e,t,this.editor.getDoc()))},_moveEndPoint:function(t,n,r){var i=n,o=new e(n,i),a=this.dom.schema.getNonEmptyElements();do{if(3==n.nodeType&&0!==f(n.nodeValue).length)return void(r?t.setStart(n,0):t.setEnd(n,n.nodeValue.length));if(a[n.nodeName]&&!/^(TD|TH)$/.test(n.nodeName))return void(r?t.setStartBefore(n):"BR"==n.nodeName?t.setEndBefore(n):t.setEndAfter(n));if(s.ie&&s.ie<11&&this.dom.isBlock(n)&&this.dom.isEmpty(n))return void(r?t.setStart(n,0):t.setEnd(n,0))}while(n=r?o.next():o.prev());"BODY"==i.nodeName&&(r?t.setStart(i,0):t.setEnd(i,i.childNodes.length))},getBoundingClientRect:function(){var e=this.getRng();return e.collapsed?c.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:function(){this.win=null,this.controlSelection.destroy()}},u}),r(X,[j,m],function(e,t){function n(t){this.compare=function(n,i){function o(e){var n={};return r(t.getAttribs(e),function(r){var i=r.nodeName.toLowerCase();0!==i.indexOf("_")&&"style"!==i&&"data-mce-style"!==i&&"data-mce-fragment"!=i&&(n[i]=t.getAttrib(e,i))}),n}function a(e,t){var n,r;for(r in e)if(e.hasOwnProperty(r)){if(n=t[r],"undefined"==typeof n)return!1;if(e[r]!=n)return!1;delete t[r]}for(r in t)if(t.hasOwnProperty(r))return!1;return!0}return n.nodeName!=i.nodeName?!1:a(o(n),o(i))&&a(t.parseStyle(t.getAttrib(n,"style")),t.parseStyle(t.getAttrib(i,"style")))?!e.isBookmarkNode(n)&&!e.isBookmarkNode(i):!1}}var r=t.each;return n}),r(K,[m],function(e){function t(e,t){function r(e){return e.replace(/%(\w+)/g,"")}var i,o,a=e.dom,s="",l,c;if(c=e.settings.preview_styles,c===!1)return"";if(c||(c="font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"),"string"==typeof t){if(t=e.formatter.get(t),!t)return;t=t[0]}return i=t.block||t.inline||"span",o=a.create(i),n(t.styles,function(e,t){e=r(e),e&&a.setStyle(o,t,e)}),n(t.attributes,function(e,t){e=r(e),e&&a.setAttrib(o,t,e)}),n(t.classes,function(e){e=r(e),a.hasClass(o,e)||a.addClass(o,e)}),e.fire("PreviewFormats"),a.setStyles(o,{position:"absolute",left:-65535}),e.getBody().appendChild(o),l=a.getStyle(e.getBody(),"fontSize",!0),l=/px$/.test(l)?parseInt(l,10):0,n(c.split(" "),function(t){var n=a.getStyle(o,t,!0);if(!("background-color"==t&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(n)&&(n=a.getStyle(e.getBody(),t,!0),"#ffffff"==a.toHex(n).toLowerCase())||"color"==t&&"#000000"==a.toHex(n).toLowerCase())){if("font-size"==t&&/em|%$/.test(n)){if(0===l)return;n=parseFloat(n,10)/(/%$/.test(n)?100:1),n=n*l+"px"}"border"==t&&n&&(s+="padding:0 2px;"),s+=t+":"+n+";"}}),e.fire("AfterPreviewFormats"),a.remove(o),s}var n=e.each;return{getCssText:t}}),r(G,[p,_,g],function(e,t,n){function r(e,t){var n=o[e];n||(o[e]=n=[]),o[e].push(t)}function i(e,t){s(o[e],function(e){e(t)})}var o=[],a=e.filter,s=e.each;return r("pre",function(r){function i(t){return c(t.previousSibling)&&-1!=e.indexOf(u,t.previousSibling)}function o(e,t){n(t).remove(),n(e).append("

              ").append(t.childNodes)}var l=r.selection.getRng(),c,u;c=t.matchNodeNames("pre"),l.collapsed||(u=r.selection.getSelectedBlocks(),s(a(a(u,c),i),function(e){o(e.previousSibling,e)}))}),{postProcess:i}}),r(J,[y,T,j,X,m,K,G],function(e,t,n,r,i,o,a){return function(s){function l(e){return e.nodeType&&(e=e.nodeName),!!s.schema.getTextBlockElements()[e.toLowerCase()]}function c(e){return/^(TH|TD)$/.test(e.nodeName)}function u(e){return e&&/^(IMG)$/.test(e.nodeName)}function d(e,t){return Y.getParents(e,t,Y.getRoot())}function f(e){return 1===e.nodeType&&"_mce_caret"===e.id}function h(){g({valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:!1,classes:"align-left",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:!1,defaultBlock:"div"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0},{selector:"img",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"}},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"}}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:!1,defaultBlock:"div"},{selector:"img,table",collapsed:!1,styles:{"float":"right"}}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:!1,defaultBlock:"div"}],bold:[{inline:"strong",remove:"all"},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all"}],italic:[{inline:"em",remove:"all"},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all"}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:!0},{inline:"u",remove:"all"}],strikethrough:[{inline:"span",styles:{textDecoration:"line-through"},exact:!0},{inline:"strike",remove:"all"}],forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0},fontname:{inline:"span",styles:{fontFamily:"%value"}},fontsize:{inline:"span",styles:{fontSize:"%value"}},fontsize_class:{inline:"span",attributes:{"class":"%value"}},blockquote:{block:"blockquote",wrapper:1,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:function(){return!0},onformat:function(e,t,n){ue(n,function(t,n){Y.setAttrib(e,n,t)})}},removeformat:[{selector:"b,strong,em,i,font,u,strike,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins",remove:"all",split:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]}),ue("p h1 h2 h3 h4 h5 h6 div address pre div dt dd samp".split(/\s/),function(e){g(e,{block:e,remove:"all"})}),g(s.settings.formats)}function p(){s.addShortcut("meta+b","bold_desc","Bold"),s.addShortcut("meta+i","italic_desc","Italic"),s.addShortcut("meta+u","underline_desc","Underline");for(var e=1;6>=e;e++)s.addShortcut("access+"+e,"",["FormatBlock",!1,"h"+e]);s.addShortcut("access+7","",["FormatBlock",!1,"p"]),s.addShortcut("access+8","",["FormatBlock",!1,"div"]),s.addShortcut("access+9","",["FormatBlock",!1,"address"])}function m(e){return e?j[e]:j}function g(e,t){e&&("string"!=typeof e?ue(e,function(e,t){g(t,e)}):(t=t.length?t:[t],ue(t,function(e){e.deep===oe&&(e.deep=!e.selector),e.split===oe&&(e.split=!e.selector||e.inline),e.remove===oe&&e.selector&&!e.inline&&(e.remove="none"),e.selector&&e.inline&&(e.mixed=!0,e.block_expand=!0),"string"==typeof e.classes&&(e.classes=e.classes.split(/\s+/))}),j[e]=t))}function v(e){return e&&j[e]&&delete j[e],j}function y(e,t){var n=m(t);if(n)for(var r=0;r0)return r;if(r.childNodes.length>1||r==t||"BR"==r.tagName)return r}}var n=s.selection.getRng(),i=n.startContainer,o=n.endContainer;if(i!=o&&0===n.endOffset){var a=t(i,o),l=3==a.nodeType?a.data.length:a.childNodes.length;n.setEnd(a,l)}return n}function c(e,r,o){var a=[],s,c,h=!0;s=d.inline||d.block,c=Y.create(s),i(c),K.walk(e,function(e){function r(e){var m,v,y,b,C;return C=h,m=e.nodeName.toLowerCase(),v=e.parentNode.nodeName.toLowerCase(),1===e.nodeType&&ae(e)&&(C=h,h="true"===ae(e),b=!0),B(m,"br")?(p=0,void(d.block&&Y.remove(e))):d.wrapper&&E(e,t,n)?void(p=0):h&&!b&&d.block&&!d.wrapper&&l(m)&&G(v,s)?(e=Y.rename(e,s),i(e),a.push(e),void(p=0)):d.selector&&(ue(u,function(t){return"collapsed"in t&&t.collapsed!==g?void 0:Y.is(e,t.selector)&&!f(e)?(i(e,t),y=!0,!1):void 0}),!d.inline||y)?void(p=0):void(!h||b||!G(s,m)||!G(v,s)||!o&&3===e.nodeType&&1===e.nodeValue.length&&65279===e.nodeValue.charCodeAt(0)||f(e)||d.inline&&J(e)?(p=0,ue(de(e.childNodes),r),b&&(h=C),p=0):(p||(p=Y.clone(c,ne),e.parentNode.insertBefore(p,e),a.push(p)),p.appendChild(e)))}var p;ue(e,r)}),d.links===!0&&ue(a,function(e){function t(e){"A"===e.nodeName&&i(e,d),ue(de(e.childNodes),t)}t(e)}),ue(a,function(e){function r(e){var t=0;return ue(e.childNodes,function(e){P(e)||ce(e)||t++}),t}function o(e){var t,n;return ue(e.childNodes,function(e){return 1!=e.nodeType||ce(e)||f(e)?void 0:(t=e,ne)}),t&&!ce(t)&&A(t,d)&&(n=Y.clone(t,ne),i(n),Y.replace(n,e,re),Y.remove(t,1)),n||e}var s;if(s=r(e),(a.length>1||!J(e))&&0===s)return void Y.remove(e,1);if(d.inline||d.wrapper){if(d.exact||1!==s||(e=o(e)),ue(u,function(t){ue(Y.select(t.inline,e),function(e){ce(e)||F(t,n,e,t.exact?e:null)})}),E(e.parentNode,t,n))return Y.remove(e,1),e=0,re;d.merge_with_parents&&Y.getParent(e.parentNode,function(r){return E(r,t,n)?(Y.remove(e,1),e=0,re):void 0}),e&&d.merge_siblings!==!1&&(e=W(U(e),e),e=W(e,U(e,re)))}})}var u=m(t),d=u[0],h,p,g=!r&&X.isCollapsed();if("false"!==ae(X.getNode())){if(d){if(r)r.nodeType?(p=Y.createRng(),p.setStartBefore(r),p.setEndAfter(r),c(O(p,u),null,!0)):c(r,null,!0);else if(g&&d.inline&&!Y.select("td[data-mce-selected],th[data-mce-selected]").length)$("apply",t,n);else{var v=s.selection.getNode();Q||!u[0].defaultBlock||Y.getParent(v,Y.isBlock)||x(u[0].defaultBlock),s.selection.setRng(o()),h=X.getBookmark(),c(O(X.getRng(re),u),h),d.styles&&(d.styles.color||d.styles.textDecoration)&&(fe(v,C,"childNodes"),C(v)),X.moveToBookmark(h),q(X.getRng(re)),s.nodeChanged()}a.postProcess(t,s)}}else{r=X.getNode();for(var y=0,b=u.length;b>y;y++)if(u[y].ceFalseOverride&&Y.is(r,u[y].selector))return void i(r,u[y])}}function w(e,t,n,r){function i(e){var n,r,o,a,s;if(1===e.nodeType&&ae(e)&&(a=y,y="true"===ae(e),s=!0),n=de(e.childNodes),y&&!s)for(r=0,o=h.length;o>r&&!F(h[r],t,e,e);r++);if(p.deep&&n.length){for(r=0,o=n.length;o>r;r++)i(n[r]);s&&(y=a)}}function o(n){var i;return ue(d(n.parentNode).reverse(),function(n){var o;i||"_start"==n.id||"_end"==n.id||(o=E(n,e,t,r),o&&o.split!==!1&&(i=n))}),i}function a(e,n,r,i){var o,a,s,l,c,u;if(e){for(u=e.parentNode,o=n.parentNode;o&&o!=u;o=o.parentNode){ +for(a=Y.clone(o,ne),c=0;cC&&(!h[C].ceFalseOverride||!F(h[C],t,n,n));C++);}}function N(e,t,n){var r=m(e);!_(e,t,n)||"toggle"in r[0]&&!r[0].toggle?x(e,t,n):w(e,t,n)}function E(e,t,n,r){function i(e,t,i){var o,a,s=t[i],l;if(t.onmatch)return t.onmatch(e,t,i);if(s)if(s.length===oe){for(o in s)if(s.hasOwnProperty(o)){if(a="attributes"===i?Y.getAttrib(e,o):D(e,o),r&&!a&&!t.exact)return;if((!r||t.exact)&&!B(a,L(M(s[o],n),o)))return}}else for(l=0;l=0;o--){if(a=t[o].selector,!a||t[o].defaultBlock)return re;for(i=r.length-1;i>=0;i--)if(Y.is(r[i],a))return re}return ne}function T(e,t,n){var r;return ie||(ie={},r={},s.on("NodeChange",function(e){var t=d(e.element),n={};t=i.grep(t,function(e){return 1==e.nodeType&&!e.getAttribute("data-mce-bogus")}),ue(ie,function(e,i){ue(t,function(o){return E(o,i,{},e.similar)?(r[i]||(ue(e,function(e){e(!0,{node:o,format:i,parents:t})}),r[i]=e),n[i]=e,!1):y(o,i)?!1:void 0})}),ue(r,function(i,o){n[o]||(delete r[o],ue(i,function(n){n(!1,{node:e.element,format:o,parents:t})}))})})),ue(e.split(","),function(e){ie[e]||(ie[e]=[],ie[e].similar=n),ie[e].push(t)}),this}function R(e){return o.getCssText(s,e)}function A(e,t){return B(e,t.inline)?re:B(e,t.block)?re:t.selector?1==e.nodeType&&Y.is(e,t.selector):void 0}function B(e,t){return e=e||"",t=t||"",e=""+(e.nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()==t.toLowerCase()}function D(e,t){return L(Y.getStyle(e,t),t)}function L(e,t){return"color"!=t&&"backgroundColor"!=t||(e=Y.toHex(e)),"fontWeight"==t&&700==e&&(e="bold"),"fontFamily"==t&&(e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),""+e}function M(e,t){return"string"!=typeof e?e=e(t):t&&(e=e.replace(/%(\w+)/g,function(e,n){return t[n]||e})),e}function P(e){return e&&3===e.nodeType&&/^([\t \r\n]+|)$/.test(e.nodeValue)}function H(e,t,n){var r=Y.create(t,n);return e.parentNode.insertBefore(r,e),r.appendChild(e),r}function O(t,n,r){function i(e){function t(e){return"BR"==e.nodeName&&e.getAttribute("data-mce-bogus")&&!e.nextSibling}var r,i,o,a,s;if(r=i=e?g:y,a=e?"previousSibling":"nextSibling",s=Y.getRoot(),3==r.nodeType&&!P(r)&&(e?v>0:bo?n:o,-1===n||r||n++):(n=a.indexOf(" ",t),o=a.indexOf("\xa0",t),n=-1!==n&&(-1===o||o>n)?n:o),n}var a,l,c,u;if(3===t.nodeType){if(c=o(t,n),-1!==c)return{container:t,offset:c};u=t}for(a=new e(t,Y.getParent(t,J)||s.getBody());l=a[i?"prev":"next"]();)if(3===l.nodeType){if(u=l,c=o(l),-1!==c)return{container:l,offset:c}}else if(J(l))break;return u?(n=i?0:u.length,{container:u,offset:n}):void 0}function u(e,r){var i,o,a,s;for(3==e.nodeType&&0===e.nodeValue.length&&e[r]&&(e=e[r]),i=d(e),o=0;oh?h:v],3==g.nodeType&&(v=0)),1==y.nodeType&&y.hasChildNodes()&&(h=y.childNodes.length-1,y=y.childNodes[b>h?h:b-1],3==y.nodeType&&(b=y.nodeValue.length)),g=a(g),y=a(y),(ce(g.parentNode)||ce(g))&&(g=ce(g)?g:g.parentNode,g=g.nextSibling||g,3==g.nodeType&&(v=0)),(ce(y.parentNode)||ce(y))&&(y=ce(y)?y:y.parentNode,y=y.previousSibling||y,3==y.nodeType&&(b=y.length)),n[0].inline&&(t.collapsed&&(m=c(g,v,!0),m&&(g=m.container,v=m.offset),m=c(y,b),m&&(y=m.container,b=m.offset)),p=o(y,b),p.node)){for(;p.node&&0===p.offset&&p.node.previousSibling;)p=o(p.node.previousSibling);p.node&&p.offset>0&&3===p.node.nodeType&&" "===p.node.nodeValue.charAt(p.offset-1)&&p.offset>1&&(y=p.node,y.splitText(p.offset-1))}return(n[0].inline||n[0].block_expand)&&(n[0].inline&&3==g.nodeType&&0!==v||(g=i(!0)),n[0].inline&&3==y.nodeType&&b!==y.nodeValue.length||(y=i())),n[0].selector&&n[0].expand!==ne&&!n[0].inline&&(g=u(g,"previousSibling"),y=u(y,"nextSibling")),(n[0].block||n[0].selector)&&(g=f(g,"previousSibling"),y=f(y,"nextSibling"),n[0].block&&(J(g)||(g=i(!0)),J(y)||(y=i()))),1==g.nodeType&&(v=Z(g),g=g.parentNode),1==y.nodeType&&(b=Z(y)+1,y=y.parentNode),{startContainer:g,startOffset:v,endContainer:y,endOffset:b}}function I(e,t){return t.links&&"A"==e.tagName}function F(e,t,n,r){var i,o,a;if(!A(n,e)&&!I(n,e))return ne;if("all"!=e.remove)for(ue(e.styles,function(i,o){i=L(M(i,t),o),"number"==typeof o&&(o=i,r=0),(e.remove_similar||!r||B(D(r,o),i))&&Y.setStyle(n,o,""),a=1}),a&&""===Y.getAttrib(n,"style")&&(n.removeAttribute("style"),n.removeAttribute("data-mce-style")),ue(e.attributes,function(e,i){var o;if(e=M(e,t),"number"==typeof i&&(i=e,r=0),!r||B(Y.getAttrib(r,i),e)){if("class"==i&&(e=Y.getAttrib(n,i),e&&(o="",ue(e.split(/\s+/),function(e){/mce\-\w+/.test(e)&&(o+=(o?" ":"")+e)}),o)))return void Y.setAttrib(n,i,o);"class"==i&&n.removeAttribute("className"),te.test(i)&&n.removeAttribute("data-mce-"+i),n.removeAttribute(i)}}),ue(e.classes,function(e){e=M(e,t),r&&!Y.hasClass(r,e)||Y.removeClass(n,e)}),o=Y.getAttribs(n),i=0;io?o:i]),3===r.nodeType&&n&&i>=r.nodeValue.length&&(r=new e(r,s.getBody()).next()||r),3!==r.nodeType||n||0!==i||(r=new e(r,s.getBody()).prev()||r),r}function $(t,n,r,i){function o(e){var t=Y.create("span",{id:g,"data-mce-bogus":!0,style:v?"color:red":""});return e&&t.appendChild(s.getDoc().createTextNode(ee)),t}function a(e,t){for(;e;){if(3===e.nodeType&&e.nodeValue!==ee||e.childNodes.length>1)return!1;t&&1===e.nodeType&&t.push(e),e=e.firstChild}return!0}function c(e){for(;e;){if(e.id===g)return e;e=e.parentNode}}function u(t){var n;if(t)for(n=new e(t,t),t=n.current();t;t=n.next())if(3===t.nodeType)return t}function d(e,t){var n,r;if(e)r=X.getRng(!0),a(e)?(t!==!1&&(r.setStartBefore(e),r.setEndBefore(e)),Y.remove(e)):(n=u(e),n.nodeValue.charAt(0)===ee&&(n.deleteData(0,1),r.startContainer==n&&r.startOffset>0&&r.setStart(n,r.startOffset-1),r.endContainer==n&&r.endOffset>0&&r.setEnd(n,r.endOffset-1)),Y.remove(e,1)),X.setRng(r);else if(e=c(X.getStart()),!e)for(;e=Y.get(g);)d(e,!1)}function f(){var e,t,i,a,s,l,d;e=X.getRng(!0),a=e.startOffset,l=e.startContainer,d=l.nodeValue,t=c(X.getStart()),t&&(i=u(t)),d&&a>0&&a=0;h--)u.appendChild(Y.clone(f[h],!1)),u=u.firstChild;u.appendChild(Y.doc.createTextNode(ee)),u=u.firstChild;var g=Y.getParent(d,l);g&&Y.isEmpty(g)?d.parentNode.replaceChild(p,d):Y.insertAfter(p,d),X.setCursorLocation(u,1),Y.isEmpty(d)&&Y.remove(d)}}function p(){var e;e=c(X.getStart()),e&&!Y.isEmpty(e)&&fe(e,function(e){1!=e.nodeType||e.id===g||Y.isEmpty(e)||Y.setAttrib(e,"data-mce-bogus",null)},"childNodes")}var g="_mce_caret",v=s.settings.caret_debug;s._hasCaretEvents||(le=function(){var e=[],t;if(a(c(X.getStart()),e))for(t=e.length;t--;)Y.setAttrib(e[t],"data-mce-bogus","1")},se=function(e){var t=e.keyCode;d(),8==t&&X.isCollapsed()&&X.getStart().innerHTML==ee&&d(c(X.getStart())),37!=t&&39!=t||d(c(X.getStart())),p()},s.on("SetContent",function(e){e.selection&&p()}),s._hasCaretEvents=!0),"apply"==t?f():h()}function q(t){var n=t.startContainer,r=t.startOffset,i,o,a,s,l;if((t.startContainer!=t.endContainer||!u(t.startContainer.childNodes[t.startOffset]))&&(3==n.nodeType&&r>=n.nodeValue.length&&(r=Z(n),n=n.parentNode,i=!0),1==n.nodeType))for(s=n.childNodes,n=s[Math.min(r,s.length-1)],o=new e(n,Y.getParent(n,Y.isBlock)),(r>s.length-1||i)&&o.next(),a=o.current();a;a=o.next())if(3==a.nodeType&&!P(a))return l=Y.create("a",{"data-mce-bogus":"all"},ee),a.parentNode.insertBefore(l,a),t.setStart(a,0),X.setRng(t),void Y.remove(l)}var j={},Y=s.dom,X=s.selection,K=new t(Y),G=s.schema.isValidChild,J=Y.isBlock,Q=s.settings.forced_root_block,Z=Y.nodeIndex,ee="\ufeff",te=/^(src|href|style)$/,ne=!1,re=!0,ie,oe,ae=Y.getContentEditable,se,le,ce=n.isBookmarkNode,ue=i.each,de=i.grep,fe=i.walk,he=i.extend;he(this,{get:m,register:g,unregister:v,apply:x,remove:w,toggle:N,match:_,matchAll:S,matchNode:E,canApply:k,formatChanged:T,getCssText:R}),h(),p(),s.on("BeforeGetContent",function(e){le&&"raw"!=e.format&&le()}),s.on("mouseup keydown",function(e){se&&se(e)})}}),r(Q,[I,d],function(e,t){return function(e){function n(){return e.serializer.getTrimmedContent()}function r(t){e.setDirty(t)}function i(e){o.typing=!1,o.add({},e)}var o=this,a=0,s=[],l,c,u=0;return e.on("init",function(){o.add()}),e.on("BeforeExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&o.beforeChange()}),e.on("ExecCommand",function(e){var t=e.command;"Undo"!=t&&"Redo"!=t&&"mceRepaint"!=t&&i(e)}),e.on("ObjectResizeStart Cut",function(){o.beforeChange()}),e.on("SaveContent ObjectResized blur",i),e.on("DragEnd",i),e.on("KeyUp",function(a){var l=a.keyCode;a.isDefaultPrevented()||((l>=33&&36>=l||l>=37&&40>=l||45==l||13==l||a.ctrlKey)&&(i(),e.nodeChanged()),(46==l||8==l||t.mac&&(91==l||93==l))&&e.nodeChanged(),c&&o.typing&&(e.isDirty()||(r(s[0]&&n()!=s[0].content),e.isDirty()&&e.fire("change",{level:s[0],lastLevel:null})),e.fire("TypingUndo"),c=!1,e.nodeChanged()))}),e.on("KeyDown",function(e){var t=e.keyCode;if(!e.isDefaultPrevented()){if(t>=33&&36>=t||t>=37&&40>=t||45==t)return void(o.typing&&i(e));var n=e.ctrlKey&&!e.altKey||e.metaKey;!(16>t||t>20)||224==t||91==t||o.typing||n||(o.beforeChange(),o.typing=!0,o.add({},e),c=!0)}}),e.on("MouseDown",function(e){o.typing&&i(e)}),e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo"),e.on("AddUndo Undo Redo ClearUndos",function(t){t.isDefaultPrevented()||e.nodeChanged()}),o={data:s,typing:!1,beforeChange:function(){u||(l=e.selection.getBookmark(2,!0))},add:function(t,i){var o,c=e.settings,d;if(t=t||{},t.content=n(),u||e.removed)return null;if(d=s[a],e.fire("BeforeAddUndo",{level:t,lastLevel:d,originalEvent:i}).isDefaultPrevented())return null;if(d&&d.content==t.content)return null;if(s[a]&&(s[a].beforeBookmark=l),c.custom_undo_redo_levels&&s.length>c.custom_undo_redo_levels){for(o=0;o0&&(r(!0),e.fire("change",f)),t},undo:function(){var t;return o.typing&&(o.add(),o.typing=!1),a>0&&(t=s[--a],e.setContent(t.content,{format:"raw"}),e.selection.moveToBookmark(t.beforeBookmark),r(!0),e.fire("undo",{level:t})),t},redo:function(){var t;return a0||o.typing&&s[0]&&n()!=s[0].content},hasRedo:function(){return aP)&&(u=a.create("br"),t.parentNode.insertBefore(u,t)),l.setStartBefore(t),l.setEndBefore(t)):(l.setStartAfter(t),l.setEndAfter(t)):(l.setStart(t,0),l.setEnd(t,0));s.setRng(l),a.remove(u),s.scrollIntoView(t)}}function y(e){var t=l.forced_root_block;t&&t.toLowerCase()===e.tagName.toLowerCase()&&a.setAttribs(e,l.forced_root_block_attrs)}function b(e){e.innerHTML=r?"":'
              '}function C(e){var t=D,n,i,o,s=u.getTextInlineElements();if(e||"TABLE"==z?(n=a.create(e||W),y(n)):n=M.cloneNode(!1),o=n,l.keep_styles!==!1)do if(s[t.nodeName]){if("_mce_caret"==t.id)continue;i=t.cloneNode(!1),a.setAttrib(i,"id",""),n.hasChildNodes()?(i.appendChild(n.firstChild),n.appendChild(i)):(o=i,n.appendChild(i))}while((t=t.parentNode)&&t!=B);return r||(o.innerHTML='
              '),n}function x(t){var n,r,i;if(3==D.nodeType&&(t?L>0:LD.childNodes.length-1,D=D.childNodes[Math.min(L,D.childNodes.length-1)]||D,L=V&&3==D.nodeType?D.nodeValue.length:0),B=S(D)){if(c.beforeChange(),!a.isBlock(B)&&B!=a.getRoot())return void(W&&!H||E());if((W&&!H||!W&&H)&&(D=w(D,L)),M=a.getParent(D,a.isBlock),F=M?a.getParent(M.parentNode,a.isBlock):null,z=M?M.nodeName.toUpperCase():"",U=F?F.nodeName.toUpperCase():"","LI"!=U||o.ctrlKey||(M=F,z=U),/^(LI|DT|DD)$/.test(z)){if(!W&&H)return void E();if(a.isEmpty(M))return void N()}if("PRE"==z&&l.br_in_pre!==!1){if(!H)return void E()}else if(!W&&!H&&"LI"!=z||W&&H)return void E();W&&M===i.getBody()||(W=W||"P",x()?T():x(!0)?(O=M.parentNode.insertBefore(C(),M),m(O),v(M)):(A=R.cloneRange(),A.setEndAfter(M),I=A.extractContents(),_(I),O=I.firstChild,a.insertAfter(I,M),g(O),k(M),a.isEmpty(M)&&b(M),O.normalize(),a.isEmpty(O)?(a.remove(O),T()):v(O)),a.setAttrib(O,"id",""),i.fire("NewBlock",{newBlock:O}),c.add())}}}var a=i.dom,s=i.selection,l=i.settings,c=i.undoManager,u=i.schema,d=u.getNonEmptyElements(),f=u.getMoveCaretBeforeOnEnterElements();i.on("keydown",function(e){13==e.keyCode&&o(e)!==!1&&e.preventDefault()})}}),r(ee,[],function(){return function(e){function t(){var t=i.getStart(),s=e.getBody(),l,c,u,d,f,h,p,m=-16777215,g,v,y,b,C;if(C=n.forced_root_block,t&&1===t.nodeType&&C){for(;t&&t!=s;){if(a[t.nodeName])return;t=t.parentNode}if(l=i.getRng(),l.setStart){c=l.startContainer,u=l.startOffset,d=l.endContainer,f=l.endOffset;try{v=e.getDoc().activeElement===s}catch(x){}}else l.item&&(t=l.item(0),l=e.getDoc().body.createTextRange(),l.moveToElementText(t)),v=l.parentElement().ownerDocument===e.getDoc(),y=l.duplicate(),y.collapse(!0),u=-1*y.move("character",m),y.collapsed||(y=l.duplicate(),y.collapse(!1),f=-1*y.move("character",m)-u);for(t=s.firstChild,b=s.nodeName.toLowerCase();t;)if((3===t.nodeType||1==t.nodeType&&!a[t.nodeName])&&o.isValidChild(b,C.toLowerCase())){if(3===t.nodeType&&0===t.nodeValue.length){p=t,t=t.nextSibling,r.remove(p);continue}h||(h=r.create(C,e.settings.forced_root_block_attrs),t.parentNode.insertBefore(h,t),g=!0),p=t,t=t.nextSibling,h.appendChild(p)}else h=null,t=t.nextSibling;if(g&&v){if(l.setStart)l.setStart(c,u),l.setEnd(d,f),i.setRng(l);else try{l=e.getDoc().body.createTextRange(),l.moveToElementText(s),l.collapse(!0),l.moveStart("character",u),f>0&&l.moveEnd("character",f),l.select()}catch(x){}e.nodeChanged()}}}var n=e.settings,r=e.dom,i=e.selection,o=e.schema,a=o.getBlockElements();n.forced_root_block&&e.on("NodeChange",t)}}),r(te,[z,y,_,$,k,U],function(e,t,n,r,i,o){function a(e){return e>0}function s(e){return 0>e}function l(e,n,r,i,o){var l=new t(e,i);if(s(n)){if(C(e)&&(e=l.prev(!0),r(e)))return e;for(;e=l.prev(o);)if(r(e))return e}if(a(n)){if(C(e)&&(e=l.next(!0),r(e)))return e;for(;e=l.next(o);)if(r(e))return e}return null}function c(e,t){for(e=e.parentNode;e&&e!=t;e=e.parentNode)if(b(e))return e;return t}function u(e,t){for(;e&&e!=t;){if(x(e))return e;e=e.parentNode}return null}function d(e,t,n){return u(e.container(),n)==u(t.container(),n)}function f(e,t,n){return c(e.container(),n)==c(t.container(),n)}function h(e,t){var n,r;return t?(n=t.container(),r=t.offset(),E(n)?n.childNodes[r+e]:null):null}function p(e,t){var n=t.ownerDocument.createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n}function m(e,t,n){return u(t,e)==u(n,e)}function g(e,t,n){var r,i;for(i=e?"previousSibling":"nextSibling";n&&n!=t;){if(r=n[i],w(r)&&(r=r[i]),C(r)){if(m(t,r,n))return r;break}if(_(r))break;n=n.parentNode}return null}function v(e,t,r){var o,a,s,l,c=N(g,!0,t),u=N(g,!1,t);if(a=r.startContainer,s=r.startOffset,i.isCaretContainerBlock(a)){if(E(a)||(a=a.parentNode),l=a.getAttribute("data-mce-caret"),"before"==l&&(o=a.nextSibling,C(o)))return S(o);if("after"==l&&(o=a.previousSibling,C(o)))return k(o)}if(!r.collapsed)return r;if(n.isText(a)){if(w(a)){if(1===e){if(o=u(a))return S(o);if(o=c(a))return k(o)}if(-1===e){if(o=c(a))return k(o);if(o=u(a))return S(o)}return r}if(i.endsWithCaretContainer(a)&&s>=a.data.length-1)return 1===e&&(o=u(a))?S(o):r;if(i.startsWithCaretContainer(a)&&1>=s)return-1===e&&(o=c(a))?k(o):r;if(s===a.data.length)return o=u(a),o?S(o):r;if(0===s)return o=c(a),o?k(o):r}return r}function y(e,t){return C(h(e,t))}var b=n.isContentEditableTrue,C=n.isContentEditableFalse,x=n.matchStyleValues("display","block table table-cell table-caption"),w=i.isCaretContainer,N=e.curry,E=n.isElement,_=o.isCaretCandidate,S=N(p,!0),k=N(p,!1);return{isForwards:a,isBackwards:s,findNode:l,getEditingHost:c,getParentBlock:u,isInSameBlock:d,isInSameEditingHost:f,isBeforeContentEditableFalse:N(y,0),isAfterContentEditableFalse:N(y,-1),normalizeRange:v}}),r(ne,[_,U,$,te,p,z],function(e,t,n,r,i,o){function a(e,t){for(var n=[];e&&e!=t;)n.push(e),e=e.parentNode;return n}function s(e,t){return e.hasChildNodes()&&t0)return n(C,--x);if(m(e)&&x0&&(N=s(C,x-1),v(N)))return!y(N)&&(E=r.findNode(N,e,b,N))?f(E)?n(E,E.data.length):n.after(E):f(N)?n(N,N.data.length):n.before(N);if(m(e)&&x0&&s(e[e.length-1])?e.slice(0,-1):e},c=function(e,t){var n=e.getParent(t,e.isBlock);return n&&"LI"===n.nodeName?n:null},u=function(e,t){return!!c(e,t)},d=function(e,t){var n=t.cloneRange(),r=t.cloneRange();return n.setStartBefore(e),r.setEndAfter(e),[n.cloneContents(),r.cloneContents()]},f=function(e,r){var i=n.before(e),o=new t(r),a=o.next(i);return a?a.toRange():null},h=function(e,r){var i=n.after(e),o=new t(r),a=o.prev(i);return a?a.toRange():null},p=function(t,n,r,i){var o=d(t,i),a=t.parentNode;return a.insertBefore(o[0],t),e.each(n,function(e){a.insertBefore(e,t)}),a.insertBefore(o[1],t),a.removeChild(t),h(n[n.length-1],r)},m=function(t,n,r){var i=t.parentNode;return e.each(n,function(e){i.insertBefore(e,t)}),f(t,r)},g=function(e,t,n,r){return r.insertAfter(t.reverse(),e),h(t[0],n)},v=function(e,r,i,s){var u=o(r,e,s),d=c(r,i.startContainer),f=l(a(u.firstChild)),h=1,v=2,y=r.getRoot(),b=function(e){var o=n.fromRangeStart(i),a=new t(r.getRoot()),s=e===h?a.prev(o):a.next(o);return s?c(r,s.getNode())!==d:!0};return b(h)?m(d,f,y):b(v)?g(d,f,y,r):p(d,f,y,i)};return{isListFragment:r,insertAtCaret:v,isParentBlockLi:u,trimListItems:l,listItems:a}}),r(ie,[d,m,P,ne,$,X,_,re],function(e,t,n,r,i,o,a,s){var l=a.matchNodeNames("td th"),c=function(a,c,u){function d(e){function t(e){return r[e]&&3==r[e].nodeType}var n,r,i;return n=D.getRng(!0),r=n.startContainer,i=n.startOffset,3==r.nodeType&&(i>0?e=e.replace(/^ /," "):t("previousSibling")||(e=e.replace(/^ /," ")),i|)$/," "):t("nextSibling")||(e=e.replace(/( | )(
              |)$/," "))),e}function f(){var e,t,n;e=D.getRng(!0),t=e.startContainer,n=e.startOffset,3==t.nodeType&&e.collapsed&&("\xa0"===t.data[n]?(t.deleteData(n,1),/[\u00a0| ]$/.test(c)||(c+=" ")):"\xa0"===t.data[n-1]&&(t.deleteData(n-1,1),/[\u00a0| ]$/.test(c)||(c=" "+c)))}function h(){if(A){var e=a.getBody(),n=new o(L);t.each(L.select("*[data-mce-fragment]"),function(t){for(var r=t.parentNode;r&&r!=e;r=r.parentNode)B[t.nodeName.toLowerCase()]&&n.compare(r,t)&&L.remove(t,!0)})}}function p(e){for(var t=e;t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")}function m(e){t.each(e.getElementsByTagName("*"),function(e){e.removeAttribute("data-mce-fragment")})}function g(e){return!!e.getAttribute("data-mce-fragment")}function v(e){return e&&!a.schema.getShortEndedElements()[e.nodeName]}function y(t){function n(e){for(var t=a.getBody();e&&e!==t;e=e.parentNode)if("false"===a.dom.getContentEditable(e))return e;return null}function o(e){var t=i.fromRangeStart(e),n=new r(a.getBody());return t=n.next(t),t?t.toRange():void 0}var s,c,u;if(t){if(D.scrollIntoView(t),s=n(t))return L.remove(t),void D.select(s);S=L.createRng(),k=t.previousSibling,k&&3==k.nodeType?(S.setStart(k,k.nodeValue.length),e.ie||(T=t.nextSibling,T&&3==T.nodeType&&(k.appendData(T.data),T.parentNode.removeChild(T)))):(S.setStartBefore(t),S.setEndBefore(t)),c=L.getParent(t,L.isBlock),L.remove(t),c&&L.isEmpty(c)&&(a.$(c).empty(),S.setStart(c,0),S.setEnd(c,0),l(c)||g(c)||!(u=o(S))?L.add(c,L.create("br",{"data-mce-bogus":"1"})):(S=u,L.remove(c))),D.setRng(S)}}var b,C,x,w,N,E,_,S,k,T,R,A,B=a.schema.getTextInlineElements(),D=a.selection,L=a.dom;/^ | $/.test(c)&&(c=d(c)),b=a.parser,A=u.merge,C=new n({validate:a.settings.validate},a.schema),R='​',E={content:c,format:"html",selection:!0},a.fire("BeforeSetContent",E),c=E.content,-1==c.indexOf("{$caret}")&&(c+="{$caret}"),c=c.replace(/\{\$caret\}/,R),S=D.getRng();var M=S.startContainer||(S.parentElement?S.parentElement():null),P=a.getBody();M===P&&D.isCollapsed()&&L.isBlock(P.firstChild)&&v(P.firstChild)&&L.isEmpty(P.firstChild)&&(S=L.createRng(),S.setStart(P.firstChild,0),S.setEnd(P.firstChild,0),D.setRng(S)),D.isCollapsed()||(a.selection.setRng(a.selection.getRng()),a.getDoc().execCommand("Delete",!1,null),f()),x=D.getNode();var H={context:x.nodeName.toLowerCase(), +data:u.data};if(N=b.parse(c,H),u.paste===!0&&s.isListFragment(N)&&s.isParentBlockLi(L,x))return S=s.insertAtCaret(C,L,a.selection.getRng(!0),N),a.selection.setRng(S),void a.fire("SetContent",E);if(p(N),k=N.lastChild,"mce_marker"==k.attr("id"))for(_=k,k=k.prev;k;k=k.walk(!0))if(3==k.type||!L.isBlock(k.name)){a.schema.isValidChild(k.parent.name,"span")&&k.parent.insert(_,k,"br"===k.name);break}if(a._selectionOverrides.showBlockCaretContainer(x),H.invalid){for(D.setContent(R),x=D.getNode(),w=a.getBody(),9==x.nodeType?x=k=w:k=x;k!==w;)x=k,k=k.parentNode;c=x==w?w.innerHTML:L.getOuterHTML(x),c=C.serialize(b.parse(c.replace(//i,function(){return C.serialize(N)}))),x==w?L.setHTML(w,c):L.setOuterHTML(x,c)}else c=C.serialize(N),k=x.firstChild,T=x.lastChild,!k||k===T&&"BR"===k.nodeName?L.setHTML(x,c):D.setContent(c);h(),y(L.get("mce_marker")),m(a.getBody()),a.fire("SetContent",E),a.addVisual()},u=function(e){var n;return"string"!=typeof e?(n=t.extend({paste:e.paste,data:{paste:e.paste}},e),{content:e.content,details:n}):{content:e,details:{}}},d=function(e,t){var n=u(t);c(e,n.content,n.details)};return{insertAtCaret:d}}),r(oe,[d,m,T,y,ie],function(e,n,r,i,o){var a=n.each,s=n.extend,l=n.map,c=n.inArray,u=n.explode,d=e.ie&&e.ie<11,f=!0,h=!1;return function(n){function p(e,t,r,i){var o,s,l=0;if(/^(mceAddUndoLevel|mceEndUndoLevel|mceBeginUndoLevel|mceRepaint)$/.test(e)||i&&i.skip_focus||n.focus(),i=n.fire("BeforeExecCommand",{command:e,ui:t,value:r}),i.isDefaultPrevented())return!1;if(s=e.toLowerCase(),o=B.exec[s])return o(s,t,r),n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;if(a(n.plugins,function(i){return i.execCommand&&i.execCommand(e,t,r)?(n.fire("ExecCommand",{command:e,ui:t,value:r}),l=!0,!1):void 0}),l)return l;if(n.theme&&n.theme.execCommand&&n.theme.execCommand(e,t,r))return n.fire("ExecCommand",{command:e,ui:t,value:r}),!0;try{l=n.getDoc().execCommand(e,t,r)}catch(c){}return l?(n.fire("ExecCommand",{command:e,ui:t,value:r}),!0):!1}function m(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=B.state[e])return t(e);try{return n.getDoc().queryCommandState(e)}catch(r){}return!1}}function g(e){var t;if(!n.quirks.isHidden()){if(e=e.toLowerCase(),t=B.value[e])return t(e);try{return n.getDoc().queryCommandValue(e)}catch(r){}}}function v(e,t){t=t||"exec",a(e,function(e,n){a(n.toLowerCase().split(","),function(n){B[t][n]=e})})}function y(e,t,r){e=e.toLowerCase(),B.exec[e]=function(e,i,o,a){return t.call(r||n,i,o,a)}}function b(e){if(e=e.toLowerCase(),B.exec[e])return!0;try{return n.getDoc().queryCommandSupported(e)}catch(t){}return!1}function C(e,t,r){e=e.toLowerCase(),B.state[e]=function(){return t.call(r||n)}}function x(e,t,r){e=e.toLowerCase(),B.value[e]=function(){return t.call(r||n)}}function w(e){return e=e.toLowerCase(),!!B.exec[e]}function N(e,r,i){return r===t&&(r=h),i===t&&(i=null),n.getDoc().execCommand(e,r,i)}function E(e){return A.match(e)}function _(e,r){A.toggle(e,r?{value:r}:t),n.nodeChanged()}function S(e){L=R.getBookmark(e)}function k(){R.moveToBookmark(L)}var T,R,A,B={state:{},exec:{},value:{}},D=n.settings,L;n.on("PreInit",function(){T=n.dom,R=n.selection,D=n.settings,A=n.formatter}),s(this,{execCommand:p,queryCommandState:m,queryCommandValue:g,queryCommandSupported:b,addCommands:v,addCommand:y,addQueryStateHandler:C,addQueryValueHandler:x,hasCustomCommand:w}),v({"mceResetDesignMode,mceBeginUndoLevel":function(){},"mceEndUndoLevel,mceAddUndoLevel":function(){n.undoManager.add()},"Cut,Copy,Paste":function(t){var r=n.getDoc(),i;try{N(t)}catch(o){i=f}if("paste"!==t||r.queryCommandEnabled(t)||(i=!0),i||!r.queryCommandSupported(t)){var a=n.translate("Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.");e.mac&&(a=a.replace(/Ctrl\+/g,"\u2318+")),n.notificationManager.open({text:a,type:"error"})}},unlink:function(){if(R.isCollapsed()){var e=R.getNode();return void("A"==e.tagName&&n.dom.remove(e,!0))}A.remove("link")},"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull,JustifyNone":function(e){var t=e.substring(7);"full"==t&&(t="justify"),a("left,center,right,justify".split(","),function(e){t!=e&&A.remove("align"+e)}),"none"!=t&&_("align"+t)},"InsertUnorderedList,InsertOrderedList":function(e){var t,n;N(e),t=T.getParent(R.getNode(),"ol,ul"),t&&(n=t.parentNode,/^(H[1-6]|P|ADDRESS|PRE)$/.test(n.nodeName)&&(S(),T.split(n,t),k()))},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){_(e)},"ForeColor,HiliteColor,FontName":function(e,t,n){_(e,n)},FontSize:function(e,t,n){var r,i;n>=1&&7>=n&&(i=u(D.font_size_style_values),r=u(D.font_size_classes),n=r?r[n-1]||n:i[n-1]||n),_(e,n)},RemoveFormat:function(e){A.remove(e)},mceBlockQuote:function(){_("blockquote")},FormatBlock:function(e,t,n){return _(n||"p")},mceCleanup:function(){var e=R.getBookmark();n.setContent(n.getContent({cleanup:f}),{cleanup:f}),R.moveToBookmark(e)},mceRemoveNode:function(e,t,r){var i=r||R.getNode();i!=n.getBody()&&(S(),n.dom.remove(i,f),k())},mceSelectNodeDepth:function(e,t,r){var i=0;T.getParent(R.getNode(),function(e){return 1==e.nodeType&&i++==r?(R.select(e),h):void 0},n.getBody())},mceSelectNode:function(e,t,n){R.select(n)},mceInsertContent:function(e,t,r){o.insertAtCaret(n,r)},mceInsertRawHTML:function(e,t,r){R.setContent("tiny_mce_marker"),n.setContent(n.getContent().replace(/tiny_mce_marker/g,function(){return r}))},mceToggleFormat:function(e,t,n){_(n)},mceSetContent:function(e,t,r){n.setContent(r)},"Indent,Outdent":function(e){var t,r,i;t=D.indentation,r=/[a-z%]+$/i.exec(t),t=parseInt(t,10),m("InsertUnorderedList")||m("InsertOrderedList")?N(e):(D.forced_root_block||T.getParent(R.getNode(),T.isBlock)||A.apply("div"),a(R.getSelectedBlocks(),function(o){if("false"!==T.getContentEditable(o)&&"LI"!=o.nodeName){var a=n.getParam("indent_use_margin",!1)?"margin":"padding";a+="rtl"==T.getStyle(o,"direction",!0)?"Right":"Left","outdent"==e?(i=Math.max(0,parseInt(o.style[a]||0,10)-t),T.setStyle(o,a,i?i+r:"")):(i=parseInt(o.style[a]||0,10)+t+r,T.setStyle(o,a,i))}}))},mceRepaint:function(){},InsertHorizontalRule:function(){n.execCommand("mceInsertContent",!1,"
              ")},mceToggleVisualAid:function(){n.hasVisual=!n.hasVisual,n.addVisual()},mceReplaceContent:function(e,t,r){n.execCommand("mceInsertContent",!1,r.replace(/\{\$selection\}/g,R.getContent({format:"text"})))},mceInsertLink:function(e,t,n){var r;"string"==typeof n&&(n={href:n}),r=T.getParent(R.getNode(),"a"),n.href=n.href.replace(" ","%20"),r&&n.href||A.remove("link"),n.href&&A.apply("link",n,r)},selectAll:function(){var e=T.getRoot(),t;R.getRng().setStart?(t=T.createRng(),t.setStart(e,0),t.setEnd(e,e.childNodes.length),R.setRng(t)):(t=R.getRng(),t.item||(t.moveToElementText(e),t.select()))},"delete":function(){N("Delete");var e=n.getBody();T.isEmpty(e)&&(n.setContent(""),e.firstChild&&T.isBlock(e.firstChild)?n.selection.setCursorLocation(e.firstChild,0):n.selection.setCursorLocation(e,0))},mceNewDocument:function(){n.setContent("")},InsertLineBreak:function(e,t,o){function a(){for(var e=new i(m,v),t,r=n.schema.getNonEmptyElements();t=e.next();)if(r[t.nodeName.toLowerCase()]||t.length>0)return!0}var s=o,l,c,u,h=R.getRng(!0);new r(T).normalize(h);var p=h.startOffset,m=h.startContainer;if(1==m.nodeType&&m.hasChildNodes()){var g=p>m.childNodes.length-1;m=m.childNodes[Math.min(p,m.childNodes.length-1)]||m,p=g&&3==m.nodeType?m.nodeValue.length:0}var v=T.getParent(m,T.isBlock),y=v?v.nodeName.toUpperCase():"",b=v?T.getParent(v.parentNode,T.isBlock):null,C=b?b.nodeName.toUpperCase():"",x=s&&s.ctrlKey;"LI"!=C||x||(v=b,y=C),m&&3==m.nodeType&&p>=m.nodeValue.length&&(d||a()||(l=T.create("br"),h.insertNode(l),h.setStartAfter(l),h.setEndAfter(l),c=!0)),l=T.create("br"),h.insertNode(l);var w=T.doc.documentMode;return d&&"PRE"==y&&(!w||8>w)&&l.parentNode.insertBefore(T.doc.createTextNode("\r"),l),u=T.create("span",{}," "),l.parentNode.insertBefore(u,l),R.scrollIntoView(u),T.remove(u),c?(h.setStartBefore(l),h.setEndBefore(l)):(h.setStartAfter(l),h.setEndAfter(l)),R.setRng(h),n.undoManager.add(),f}}),v({"JustifyLeft,JustifyCenter,JustifyRight,JustifyFull":function(e){var t="align"+e.substring(7),n=R.isCollapsed()?[T.getParent(R.getNode(),T.isBlock)]:R.getSelectedBlocks(),r=l(n,function(e){return!!A.matchNode(e,t)});return-1!==c(r,f)},"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":function(e){return E(e)},mceBlockQuote:function(){return E("blockquote")},Outdent:function(){var e;if(D.inline_styles){if((e=T.getParent(R.getStart(),T.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return f;if((e=T.getParent(R.getEnd(),T.isBlock))&&parseInt(e.style.paddingLeft,10)>0)return f}return m("InsertUnorderedList")||m("InsertOrderedList")||!D.inline_styles&&!!T.getParent(R.getNode(),"BLOCKQUOTE")},"InsertUnorderedList,InsertOrderedList":function(e){var t=T.getParent(R.getNode(),"ul,ol");return t&&("insertunorderedlist"===e&&"UL"===t.tagName||"insertorderedlist"===e&&"OL"===t.tagName)}},"state"),v({"FontSize,FontName":function(e){var t=0,n;return(n=T.getParent(R.getNode(),"span"))&&(t="fontsize"==e?n.style.fontSize:n.style.fontFamily.replace(/, /g,",").replace(/[\'\"]/g,"").toLowerCase()),t}},"value"),v({Undo:function(){n.undoManager.undo()},Redo:function(){n.undoManager.redo()}})}}),r(ae,[m],function(e){function t(e,o){var a=this,s,l;if(e=r(e),o=a.settings=o||{},s=o.base_uri,/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(a.source=e);var c=0===e.indexOf("//");0!==e.indexOf("/")||c||(e=(s?s.protocol||"http":"http")+"://mce_host"+e),/^[\w\-]*:?\/\//.test(e)||(l=o.base_uri?o.base_uri.path:new t(location.href).directory,""===o.base_uri.protocol?e="//mce_host"+a.toAbsPath(l,e):(e=/([^#?]*)([#?]?.*)/.exec(e),e=(s&&s.protocol||"http")+"://mce_host"+a.toAbsPath(l,e[1])+e[2])),e=e.replace(/@@/g,"(mce_at)"),e=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?([^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e),n(i,function(t,n){var r=e[n];r&&(r=r.replace(/\(mce_at\)/g,"@@")),a[t]=r}),s&&(a.protocol||(a.protocol=s.protocol),a.userInfo||(a.userInfo=s.userInfo),a.port||"mce_host"!==a.host||(a.port=s.port),a.host&&"mce_host"!==a.host||(a.host=s.host),a.source=""),c&&(a.protocol="")}var n=e.each,r=e.trim,i="source protocol authority userInfo user password host port relative path directory file query anchor".split(" "),o={ftp:21,http:80,https:443,mailto:25};return t.prototype={setPath:function(e){var t=this;e=/^(.*?)\/?(\w+)?$/.exec(e),t.path=e[0],t.directory=e[1],t.file=e[2],t.source="",t.getURI()},toRelative:function(e){var n=this,r;if("./"===e)return e;if(e=new t(e,{base_uri:n}),"mce_host"!=e.host&&n.host!=e.host&&e.host||n.port!=e.port||n.protocol!=e.protocol&&""!==e.protocol)return e.getURI();var i=n.getURI(),o=e.getURI();return i==o||"/"==i.charAt(i.length-1)&&i.substr(0,i.length-1)==o?i:(r=n.toRelPath(n.path,e.path),e.query&&(r+="?"+e.query),e.anchor&&(r+="#"+e.anchor),r)},toAbsolute:function(e,n){return e=new t(e,{base_uri:this}),e.getURI(n&&this.isSameOrigin(e))},isSameOrigin:function(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port)return!0;var t=o[this.protocol];if(t&&(this.port||t)==(e.port||t))return!0}return!1},toRelPath:function(e,t){var n,r=0,i="",o,a;if(e=e.substring(0,e.lastIndexOf("/")),e=e.split("/"),n=t.split("/"),e.length>=n.length)for(o=0,a=e.length;a>o;o++)if(o>=n.length||e[o]!=n[o]){r=o+1;break}if(e.lengtho;o++)if(o>=e.length||e[o]!=n[o]){r=o+1;break}if(1===r)return t;for(o=0,a=e.length-(r-1);a>o;o++)i+="../";for(o=r-1,a=n.length;a>o;o++)i+=o!=r-1?"/"+n[o]:n[o];return i},toAbsPath:function(e,t){var r,i=0,o=[],a,s;for(a=/\/$/.test(t)?"/":"",e=e.split("/"),t=t.split("/"),n(e,function(e){e&&o.push(e)}),e=o,r=t.length-1,o=[];r>=0;r--)0!==t[r].length&&"."!==t[r]&&(".."!==t[r]?i>0?i--:o.push(t[r]):i++);return r=e.length-i,s=0>=r?o.reverse().join("/"):e.slice(0,r).join("/")+"/"+o.reverse().join("/"),0!==s.indexOf("/")&&(s="/"+s),a&&s.lastIndexOf("/")!==s.length-1&&(s+=a),s},getURI:function(e){var t,n=this;return n.source&&!e||(t="",e||(t+=n.protocol?n.protocol+"://":"//",n.userInfo&&(t+=n.userInfo+"@"),n.host&&(t+=n.host),n.port&&(t+=":"+n.port)),n.path&&(t+=n.path),n.query&&(t+="?"+n.query),n.anchor&&(t+="#"+n.anchor),n.source=t),n.source}},t.parseDataUri=function(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}},t.getDocumentBaseUrl=function(e){var t;return t=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?e.href:e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(t)&&(t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(t)||(t+="/")),t},t}),r(se,[m],function(e){function t(){}var n=e.each,r=e.extend,i,o;return t.extend=i=function(e){function t(){var e,t,n,r=this;if(!o&&(r.init&&r.init.apply(r,arguments),t=r.Mixins))for(e=t.length;e--;)n=t[e],n.init&&n.init.apply(r,arguments)}function a(){return this}function s(e,t){return function(){var n=this,r=n._super,i;return n._super=c[e],i=t.apply(n,arguments),n._super=r,i}}var l=this,c=l.prototype,u,d,f;o=!0,u=new l,o=!1,e.Mixins&&(n(e.Mixins,function(t){for(var n in t)"init"!==n&&(e[n]=t[n])}),c.Mixins&&(e.Mixins=c.Mixins.concat(e.Mixins))),e.Methods&&n(e.Methods.split(","),function(t){e[t]=a}),e.Properties&&n(e.Properties.split(","),function(t){var n="_"+t;e[t]=function(e){var t=this,r;return e!==r?(t[n]=e,t):t[n]}}),e.Statics&&n(e.Statics,function(e,n){t[n]=e}),e.Defaults&&c.Defaults&&(e.Defaults=r({},c.Defaults,e.Defaults));for(d in e)f=e[d],"function"==typeof f&&c[d]?u[d]=s(d,f):u[d]=f;return t.prototype=u,t.constructor=t,t.extend=i,t},t}),r(le,[m],function(e){function t(t){function n(){return!1}function r(){return!0}function i(e,i){var o,s,l,c;if(e=e.toLowerCase(),i=i||{},i.type=e,i.target||(i.target=u),i.preventDefault||(i.preventDefault=function(){i.isDefaultPrevented=r},i.stopPropagation=function(){i.isPropagationStopped=r},i.stopImmediatePropagation=function(){i.isImmediatePropagationStopped=r},i.isDefaultPrevented=n,i.isPropagationStopped=n,i.isImmediatePropagationStopped=n),t.beforeFire&&t.beforeFire(i),o=d[e])for(s=0,l=o.length;l>s;s++){if(c=o[s],c.once&&a(e,c.func),i.isImmediatePropagationStopped())return i.stopPropagation(),i;if(c.func.call(u,i)===!1)return i.preventDefault(),i}return i}function o(t,r,i,o){var a,s,l;if(r===!1&&(r=n),r)for(r={func:r},o&&e.extend(r,o),s=t.toLowerCase().split(" "),l=s.length;l--;)t=s[l],a=d[t],a||(a=d[t]=[],f(t,!0)),i?a.unshift(r):a.push(r);return c}function a(e,t){var n,r,i,o,a;if(e)for(o=e.toLowerCase().split(" "),n=o.length;n--;){if(e=o[n],r=d[e],!e){for(i in d)f(i,!1),delete d[i];return c}if(r){if(t)for(a=r.length;a--;)r[a].func===t&&(r=r.slice(0,a).concat(r.slice(a+1)),d[e]=r);else r.length=0;r.length||(f(e,!1),delete d[e])}}else{for(e in d)f(e,!1);d={}}return c}function s(e,t,n){return o(e,t,n,{once:!0})}function l(e){return e=e.toLowerCase(),!(!d[e]||0===d[e].length)}var c=this,u,d={},f;t=t||{},u=t.scope||c,f=t.toggleEvent||n,c.fire=i,c.on=o,c.off=a,c.once=s,c.has=l}var n=e.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange mouseout mouseenter mouseleave wheel keydown keypress keyup input contextmenu dragstart dragend dragover draggesture dragdrop drop drag submit compositionstart compositionend compositionupdate touchstart touchmove touchend"," ");return t.isNative=function(e){return!!n[e.toLowerCase()]},t}),r(ce,[],function(){function e(e){this.create=e.create}return e.create=function(t,n){return new e({create:function(e,r){function i(t){e.set(r,t.value)}function o(e){t.set(n,e.value)}var a;return e.on("change:"+r,o),t.on("change:"+n,i),a=e._bindings,a||(a=e._bindings=[],e.on("destroy",function(){for(var e=a.length;e--;)a[e]()})),a.push(function(){t.off("change:"+n,i)}),t.get(n)}})},e}),r(ue,[le],function(e){function t(t){return t._eventDispatcher||(t._eventDispatcher=new e({scope:t,toggleEvent:function(n,r){e.isNative(n)&&t.toggleNativeEvent&&t.toggleNativeEvent(n,r)}})),t._eventDispatcher}return{fire:function(e,n,r){var i=this;if(i.removed&&"remove"!==e)return n;if(n=t(i).fire(e,n,r),r!==!1&&i.parent)for(var o=i.parent();o&&!n.isPropagationStopped();)o.fire(e,n,!1),o=o.parent();return n},on:function(e,n,r){return t(this).on(e,n,r)},off:function(e,n){return t(this).off(e,n)},once:function(e,n){return t(this).once(e,n)},hasEventListeners:function(e){return t(this).has(e)}}}),r(de,[ce,ue,se,m],function(e,t,n,r){function i(e){return e.nodeType>0}function o(e,t){var n,a;if(e===t)return!0;if(null===e||null===t)return e===t;if("object"!=typeof e||"object"!=typeof t)return e===t;if(r.isArray(t)){if(e.length!==t.length)return!1;for(n=e.length;n--;)if(!o(e[n],t[n]))return!1}if(i(e)||i(t))return e===t;a={};for(n in t){if(!o(e[n],t[n]))return!1;a[n]=!0}for(n in e)if(!a[n]&&!o(e[n],t[n]))return!1;return!0}return n.extend({Mixins:[t],init:function(t){var n,r;t=t||{};for(n in t)r=t[n],r instanceof e&&(t[n]=r.create(this,n));this.data=t},set:function(t,n){var r,i,a=this.data[t];if(n instanceof e&&(n=n.create(this,t)),"object"==typeof t){for(r in t)this.set(r,t[r]);return this}return o(a,n)||(this.data[t]=n,i={target:this,name:t,value:n,oldValue:a},this.fire("change:"+t,i),this.fire("change",i)),this},get:function(e){return this.data[e]},has:function(e){return e in this.data},bind:function(t){return e.create(this,t)},destroy:function(){this.fire("destroy")}})}),r(fe,[se],function(e){function t(e){for(var t=[],n=e.length,r;n--;)r=e[n],r.__checked||(t.push(r),r.__checked=1);for(n=t.length;n--;)delete t[n].__checked;return t}var n=/^([\w\\*]+)?(?:#([\w\-\\]+))?(?:\.([\w\\\.]+))?(?:\[\@?([\w\\]+)([\^\$\*!~]?=)([\w\\]+)\])?(?:\:(.+))?/i,r=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,i=/^\s*|\s*$/g,o,a=e.extend({init:function(e){function t(e){return e?(e=e.toLowerCase(),function(t){return"*"===e||t.type===e}):void 0}function o(e){return e?function(t){return t._name===e}:void 0}function a(e){return e?(e=e.split("."),function(t){for(var n=e.length;n--;)if(!t.classes.contains(e[n]))return!1;return!0}):void 0}function s(e,t,n){return e?function(r){var i=r[e]?r[e]():"";return t?"="===t?i===n:"*="===t?i.indexOf(n)>=0:"~="===t?(" "+i+" ").indexOf(" "+n+" ")>=0:"!="===t?i!=n:"^="===t?0===i.indexOf(n):"$="===t?i.substr(i.length-n.length)===n:!1:!!n}:void 0}function l(e){var t;return e?(e=/(?:not\((.+)\))|(.+)/i.exec(e),e[1]?(t=u(e[1],[]),function(e){return!d(e,t)}):(e=e[2],function(t,n,r){return"first"===e?0===n:"last"===e?n===r-1:"even"===e?n%2===0:"odd"===e?n%2===1:t[e]?t[e]():!1})):void 0}function c(e,r,c){function u(e){e&&r.push(e)}var d;return d=n.exec(e.replace(i,"")),u(t(d[1])),u(o(d[2])),u(a(d[3])),u(s(d[4],d[5],d[6])),u(l(d[7])),r.pseudo=!!d[7],r.direct=c,r}function u(e,t){var n=[],i,o,a;do if(r.exec(""),o=r.exec(e),o&&(e=o[3],n.push(o[1]),o[2])){i=o[3];break}while(o);for(i&&u(i,t),e=[],a=0;a"!=n[a]&&e.push(c(n[a],[],">"===n[a-1]));return t.push(e),t}var d=this.match;this._selectors=u(e,[])},match:function(e,t){var n,r,i,o,a,s,l,c,u,d,f,h,p;for(t=t||this._selectors,n=0,r=t.length;r>n;n++){for(a=t[n],o=a.length,p=e,h=0,i=o-1;i>=0;i--)for(c=a[i];p;){if(c.pseudo)for(f=p.parent().items(),u=d=f.length;u--&&f[u]!==p;);for(s=0,l=c.length;l>s;s++)if(!c[s](p,u,d)){s=l+1;break}if(s===l){h++;break}if(i===o-1)break;p=p.parent()}if(h===o)return!0}return!1},find:function(e){function n(e,t,i){var o,a,s,l,c,u=t[i];for(o=0,a=e.length;a>o;o++){for(c=e[o],s=0,l=u.length;l>s;s++)if(!u[s](c,o,a)){s=l+1;break}if(s===l)i==t.length-1?r.push(c):c.items&&n(c.items(),t,i+1);else if(u.direct)return;c.items&&n(c.items(),t,i)}}var r=[],i,s,l=this._selectors;if(e.items){for(i=0,s=l.length;s>i;i++)n(e.items(),l[i],0);s>1&&(r=t(r))}return o||(o=a.Collection),new o(r)}});return a}),r(he,[m,fe,se],function(e,t,n){var r,i,o=Array.prototype.push,a=Array.prototype.slice;return i={length:0,init:function(e){e&&this.add(e)},add:function(t){var n=this;return e.isArray(t)?o.apply(n,t):t instanceof r?n.add(t.toArray()):o.call(n,t),n},set:function(e){var t=this,n=t.length,r;for(t.length=0,t.add(e),r=t.length;n>r;r++)delete t[r];return t},filter:function(e){var n=this,i,o,a=[],s,l;for("string"==typeof e?(e=new t(e),l=function(t){return e.match(t)}):l=e,i=0,o=n.length;o>i;i++)s=n[i],l(s)&&a.push(s);return new r(a)},slice:function(){return new r(a.apply(this,arguments))},eq:function(e){return-1===e?this.slice(e):this.slice(e,+e+1)},each:function(t){return e.each(this,t),this},toArray:function(){return e.toArray(this)},indexOf:function(e){for(var t=this,n=t.length;n--&&t[n]!==e;);return n},reverse:function(){return new r(e.toArray(this).reverse())},hasClass:function(e){return this[0]?this[0].classes.contains(e):!1},prop:function(e,t){var n=this,r,i;return t!==r?(n.each(function(n){n[e]&&n[e](t)}),n):(i=n[0],i&&i[e]?i[e]():void 0)},exec:function(t){var n=this,r=e.toArray(arguments).slice(1);return n.each(function(e){e[t]&&e[t].apply(e,r)}),n},remove:function(){for(var e=this.length;e--;)this[e].remove();return this},addClass:function(e){return this.each(function(t){t.classes.add(e)})},removeClass:function(e){return this.each(function(t){t.classes.remove(e)})}},e.each("fire on off show hide append prepend before after reflow".split(" "),function(t){i[t]=function(){var n=e.toArray(arguments);return this.each(function(e){t in e&&e[t].apply(e,n)}),this}}),e.each("text name disabled active selected checked visible parent value data".split(" "),function(e){i[e]=function(t){return this.prop(e,t)}}),r=n.extend(i),t.Collection=r,r}),r(pe,[m,w],function(e,t){var n=0;return{id:function(){return"mceu_"+n++},create:function(n,r,i){var o=document.createElement(n);return t.DOM.setAttribs(o,r),"string"==typeof i?o.innerHTML=i:e.each(i,function(e){e.nodeType&&o.appendChild(e)}),o},createFragment:function(e){return t.DOM.createFragment(e)},getWindowSize:function(){return t.DOM.getViewPort()},getSize:function(e){var t,n;if(e.getBoundingClientRect){var r=e.getBoundingClientRect();t=Math.max(r.width||r.right-r.left,e.offsetWidth),n=Math.max(r.height||r.bottom-r.bottom,e.offsetHeight)}else t=e.offsetWidth,n=e.offsetHeight;return{width:t,height:n}},getPos:function(e,n){return t.DOM.getPos(e,n)},getViewPort:function(e){return t.DOM.getViewPort(e)},get:function(e){return document.getElementById(e)},addClass:function(e,n){return t.DOM.addClass(e,n)},removeClass:function(e,n){return t.DOM.removeClass(e,n)},hasClass:function(e,n){return t.DOM.hasClass(e,n)},toggleClass:function(e,n,r){return t.DOM.toggleClass(e,n,r)},css:function(e,n,r){return t.DOM.setStyle(e,n,r)},getRuntimeStyle:function(e,n){return t.DOM.getStyle(e,n,!0)},on:function(e,n,r,i){return t.DOM.bind(e,n,r,i)},off:function(e,n,r){return t.DOM.unbind(e,n,r)},fire:function(e,n,r){return t.DOM.fire(e,n,r)},innerHtml:function(e,n){t.DOM.setHTML(e,n)}}}),r(me,[],function(){return{parseBox:function(e){var t,n=10;if(e)return"number"==typeof e?(e=e||0,{top:e,left:e,bottom:e,right:e}):(e=e.split(" "),t=e.length,1===t?e[1]=e[2]=e[3]=e[0]:2===t?(e[2]=e[0],e[3]=e[1]):3===t&&(e[3]=e[1]),{top:parseInt(e[0],n)||0,right:parseInt(e[1],n)||0,bottom:parseInt(e[2],n)||0,left:parseInt(e[3],n)||0})},measureBox:function(e,t){function n(t){var n=document.defaultView;return n?(t=t.replace(/[A-Z]/g,function(e){return"-"+e}),n.getComputedStyle(e,null).getPropertyValue(t)):e.currentStyle[t]}function r(e){var t=parseFloat(n(e),10);return isNaN(t)?0:t}return{top:r(t+"TopWidth"),right:r(t+"RightWidth"),bottom:r(t+"BottomWidth"),left:r(t+"LeftWidth")}}}}),r(ge,[m],function(e){function t(){}function n(e){this.cls=[],this.cls._map={},this.onchange=e||t,this.prefix=""}return e.extend(n.prototype,{add:function(e){return e&&!this.contains(e)&&(this.cls._map[e]=!0,this.cls.push(e),this._change()),this},remove:function(e){if(this.contains(e)){for(var t=0;t0&&(e+=" "),e+=this.prefix+this.cls[t];return e},n}),r(ve,[u],function(e){var t={},n;return{add:function(r){var i=r.parent();if(i){if(!i._layout||i._layout.isNative())return;t[i._id]||(t[i._id]=i),n||(n=!0,e.requestAnimationFrame(function(){var e,r;n=!1;for(e in t)r=t[e],r.state.get("rendered")&&r.reflow();t={}},document.body))}},remove:function(e){t[e._id]&&delete t[e._id]}}}),r(ye,[se,m,le,de,he,pe,g,me,ge,ve],function(e,t,n,r,i,o,a,s,l,c){function u(e){return e._eventDispatcher||(e._eventDispatcher=new n({scope:e,toggleEvent:function(t,r){r&&n.isNative(t)&&(e._nativeEvents||(e._nativeEvents={}),e._nativeEvents[t]=!0,e.state.get("rendered")&&d(e))}})),e._eventDispatcher}function d(e){function t(t){var n=e.getParentCtrl(t.target);n&&n.fire(t.type,t)}function n(){var e=c._lastHoverCtrl;e&&(e.fire("mouseleave",{target:e.getEl()}),e.parents().each(function(e){e.fire("mouseleave",{target:e.getEl()})}),c._lastHoverCtrl=null)}function r(t){var n=e.getParentCtrl(t.target),r=c._lastHoverCtrl,i=0,o,a,s;if(n!==r){if(c._lastHoverCtrl=n,a=n.parents().toArray().reverse(),a.push(n),r){for(s=r.parents().toArray().reverse(),s.push(r),i=0;i=i;o--)r=s[o],r.fire("mouseleave",{target:r.getEl()})}for(o=i;oo;o++)c=l[o]._eventsRoot;for(c||(c=l[l.length-1]||e),e._eventsRoot=c,s=o,o=0;s>o;o++)l[o]._eventsRoot=c;var p=c._delegates;p||(p=c._delegates={});for(d in u){if(!u)return!1;"wheel"!==d||h?("mouseenter"===d||"mouseleave"===d?c._hasMouseEnter||(a(c.getEl()).on("mouseleave",n).on("mouseover",r),c._hasMouseEnter=1):p[d]||(a(c.getEl()).on(d,t),p[d]=!0),u[d]=!1):f?a(e.getEl()).on("mousewheel",i):a(e.getEl()).on("DOMMouseScroll",i)}}}var f="onmousewheel"in document,h=!1,p="mce-",m,g=0,v={Statics:{classPrefix:p},isRtl:function(){return m.rtl},classPrefix:p,init:function(e){function n(e){var t;for(e=e.split(" "),t=0;tn.maxW?n.maxW:i,n.w=i,n.innerW=i-o),i=e.h,i!==s&&(i=in.maxH?n.maxH:i,n.h=i,n.innerH=i-a),i=e.innerW,i!==s&&(i=in.maxW-o?n.maxW-o:i,n.innerW=i,n.w=i+o),i=e.innerH,i!==s&&(i=in.maxH-a?n.maxH-a:i,n.innerH=i,n.h=i+a),e.contentW!==s&&(n.contentW=e.contentW),e.contentH!==s&&(n.contentH=e.contentH),r=t._lastLayoutRect,r.x===n.x&&r.y===n.y&&r.w===n.w&&r.h===n.h||(l=m.repaintControls,l&&l.map&&!l.map[t._id]&&(l.push(t),l.map[t._id]=!0),r.x=n.x,r.y=n.y,r.w=n.w,r.h=n.h),t):n},repaint:function(){var e=this,t,n,r,i,o,a,s,l,c,u;c=document.createRange?function(e){return e}:Math.round,t=e.getEl().style,i=e._layoutRect,l=e._lastRepaintRect||{},o=e.borderBox,a=o.left+o.right,s=o.top+o.bottom,i.x!==l.x&&(t.left=c(i.x)+"px",l.x=i.x),i.y!==l.y&&(t.top=c(i.y)+"px",l.y=i.y),i.w!==l.w&&(u=c(i.w-a),t.width=(u>=0?u:0)+"px",l.w=i.w),i.h!==l.h&&(u=c(i.h-s),t.height=(u>=0?u:0)+"px",l.h=i.h),e._hasBody&&i.innerW!==l.innerW&&(u=c(i.innerW),r=e.getEl("body"),r&&(n=r.style,n.width=(u>=0?u:0)+"px"),l.innerW=i.innerW),e._hasBody&&i.innerH!==l.innerH&&(u=c(i.innerH),r=r||e.getEl("body"),r&&(n=n||r.style,n.height=(u>=0?u:0)+"px"),l.innerH=i.innerH),e._lastRepaintRect=l,e.fire("repaint",{},!1)},updateLayoutRect:function(){var e=this;e.parent()._lastRect=null,o.css(e.getEl(),{width:"",height:""}),e._layoutRect=e._lastRepaintRect=e._lastLayoutRect=null,e.initLayoutRect()},on:function(e,t){function n(e){var t,n;return"string"!=typeof e?e:function(i){return t||r.parentsAndSelf().each(function(r){var i=r.settings.callbacks;return i&&(t=i[e])?(n=r,!1):void 0}),t?t.call(n,i):(i.action=e,void this.fire("execute",i))}}var r=this;return u(r).on(e,n(t)),r},off:function(e,t){return u(this).off(e,t),this},fire:function(e,t,n){var r=this;if(t=t||{},t.control||(t.control=r),t=u(r).fire(e,t),n!==!1&&r.parent)for(var i=r.parent();i&&!t.isPropagationStopped();)i.fire(e,t,!1),i=i.parent();return t},hasEventListeners:function(e){return u(this).has(e)},parents:function(e){var t=this,n,r=new i;for(n=t.parent();n;n=n.parent())r.add(n);return e&&(r=r.filter(e)),r},parentsAndSelf:function(e){return new i(this).add(this.parents(e))},next:function(){var e=this.parent().items();return e[e.indexOf(this)+1]},prev:function(){var e=this.parent().items();return e[e.indexOf(this)-1]},innerHtml:function(e){return this.$el.html(e),this},getEl:function(e){var t=e?this._id+"-"+e:this._id;return this._elmCache[t]||(this._elmCache[t]=a("#"+t)[0]),this._elmCache[t]},show:function(){return this.visible(!0)},hide:function(){return this.visible(!1)},focus:function(){try{this.getEl().focus()}catch(e){}return this},blur:function(){return this.getEl().blur(),this},aria:function(e,t){var n=this,r=n.getEl(n.ariaTarget);return"undefined"==typeof t?n._aria[e]:(n._aria[e]=t,n.state.get("rendered")&&r.setAttribute("role"==e?e:"aria-"+e,t),n)},encode:function(e,t){return t!==!1&&(e=this.translate(e)),(e||"").replace(/[&<>"]/g,function(e){return"&#"+e.charCodeAt(0)+";"})},translate:function(e){return m.translate?m.translate(e):e},before:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t),!0),t},after:function(e){var t=this,n=t.parent();return n&&n.insert(e,n.items().indexOf(t)),t},remove:function(){var e=this,t=e.getEl(),n=e.parent(),r,i;if(e.items){var o=e.items().toArray();for(i=o.length;i--;)o[i].remove()}n&&n.items&&(r=[],n.items().each(function(t){t!==e&&r.push(t); +}),n.items().set(r),n._lastRect=null),e._eventsRoot&&e._eventsRoot==e&&a(t).off();var s=e.getRoot().controlIdLookup;return s&&delete s[e._id],t&&t.parentNode&&t.parentNode.removeChild(t),e.state.set("rendered",!1),e.state.destroy(),e.fire("remove"),e},renderBefore:function(e){return a(e).before(this.renderHtml()),this.postRender(),this},renderTo:function(e){return a(e||this.getContainerElm()).append(this.renderHtml()),this.postRender(),this},preRender:function(){},render:function(){},renderHtml:function(){return'
              '},postRender:function(){var e=this,t=e.settings,n,r,i,o,s;e.$el=a(e.getEl()),e.state.set("rendered",!0);for(o in t)0===o.indexOf("on")&&e.on(o.substr(2),t[o]);if(e._eventsRoot){for(i=e.parent();!s&&i;i=i.parent())s=i._eventsRoot;if(s)for(o in s._nativeEvents)e._nativeEvents[o]=!0}d(e),t.style&&(n=e.getEl(),n&&(n.setAttribute("style",t.style),n.style.cssText=t.style)),e.settings.border&&(r=e.borderBox,e.$el.css({"border-top-width":r.top,"border-right-width":r.right,"border-bottom-width":r.bottom,"border-left-width":r.left}));var l=e.getRoot();l.controlIdLookup||(l.controlIdLookup={}),l.controlIdLookup[e._id]=e;for(var u in e._aria)e.aria(u,e._aria[u]);e.state.get("visible")===!1&&(e.getEl().style.display="none"),e.bindStates(),e.state.on("change:visible",function(t){var n=t.value,r;e.state.get("rendered")&&(e.getEl().style.display=n===!1?"none":"",e.getEl().getBoundingClientRect()),r=e.parent(),r&&(r._lastRect=null),e.fire(n?"show":"hide"),c.add(e)}),e.fire("postrender",{},!1)},bindStates:function(){},scrollIntoView:function(e){function t(e,t){var n,r,i=e;for(n=r=0;i&&i!=t&&i.nodeType;)n+=i.offsetLeft||0,r+=i.offsetTop||0,i=i.offsetParent;return{x:n,y:r}}var n=this.getEl(),r=n.parentNode,i,o,a,s,l,c,u=t(n,r);return i=u.x,o=u.y,a=n.offsetWidth,s=n.offsetHeight,l=r.clientWidth,c=r.clientHeight,"end"==e?(i-=l-a,o-=c-s):"center"==e&&(i-=l/2-a/2,o-=c/2-s/2),r.scrollLeft=i,r.scrollTop=o,this},getRoot:function(){for(var e=this,t,n=[];e;){if(e.rootControl){t=e.rootControl;break}n.push(e),t=e,e=e.parent()}t||(t=this);for(var r=n.length;r--;)n[r].rootControl=t;return t},reflow:function(){c.remove(this);var e=this.parent();return e._layout&&!e._layout.isNative()&&e.reflow(),this}};return t.each("text title visible disabled active value".split(" "),function(e){v[e]=function(t){return 0===arguments.length?this.state.get(e):("undefined"!=typeof t&&this.state.set(e,t),this)}}),m=e.extend(v)}),r(be,[],function(){var e={},t;return{add:function(t,n){e[t.toLowerCase()]=n},has:function(t){return!!e[t.toLowerCase()]},create:function(n,r){var i,o,a;if(!t){a=tinymce.ui;for(o in a)e[o.toLowerCase()]=a[o];t=!0}if("string"==typeof n?(r=r||{},r.type=n):(r=n,n=r.type),n=n.toLowerCase(),i=e[n],!i)throw new Error("Could not find control by type: "+n);return i=new i(r),i.type=n,i}}}),r(Ce,[],function(){return function(e){function t(e){return e&&1===e.nodeType}function n(e){return e=e||C,t(e)?e.getAttribute("role"):null}function r(e){for(var t,r=e||C;r=r.parentNode;)if(t=n(r))return t}function i(e){var n=C;return t(n)?n.getAttribute("aria-"+e):void 0}function o(e){var t=e.tagName.toUpperCase();return"INPUT"==t||"TEXTAREA"==t||"SELECT"==t}function a(e){return o(e)&&!e.hidden?!0:!!/^(button|menuitem|checkbox|tab|menuitemcheckbox|option|gridcell|slider)$/.test(n(e))}function s(e){function t(e){if(1==e.nodeType&&"none"!=e.style.display){a(e)&&n.push(e);for(var r=0;re?e=t.length-1:e>=t.length&&(e=0),t[e]&&t[e].focus(),e}function d(e,t){var n=-1,r=l();t=t||s(r.getEl());for(var i=0;i=0&&(n=t.getEl(),n&&n.parentNode.removeChild(n),n=e.getEl(),n&&n.parentNode.removeChild(n)),t.parent(this)},create:function(t){var n=this,i,a=[];return o.isArray(t)||(t=[t]),o.each(t,function(t){t&&(t instanceof e||("string"==typeof t&&(t={type:t}),i=o.extend({},n.settings.defaults,t),t.type=i.type=i.type||t.type||n.settings.defaultType||(i.defaults?i.defaults.type:null),t=r.create(i)),a.push(t))}),a},renderNew:function(){var e=this;return e.items().each(function(t,n){var r;t.parent(e),t.state.get("rendered")||(r=e.getEl("body"),r.hasChildNodes()&&n<=r.childNodes.length-1?a(r.childNodes[n]).before(t.renderHtml()):a(r).append(t.renderHtml()),t.postRender(),l.add(t))}),e._layout.applyClasses(e.items().filter(":visible")),e._lastRect=null,e},append:function(e){return this.add(e).renderNew()},prepend:function(e){var t=this;return t.items().set(t.create(e).concat(t.items().toArray())),t.renderNew()},insert:function(e,t,n){var r=this,i,o,a;return e=r.create(e),i=r.items(),!n&&t=0&&t
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "},postRender:function(){var e=this,t;return e.items().exec("postRender"),e._super(),e._layout.postRender(e),e.state.set("rendered",!0),e.settings.style&&e.$el.css(e.settings.style),e.settings.border&&(t=e.borderBox,e.$el.css({"border-top-width":t.top,"border-right-width":t.right,"border-bottom-width":t.bottom,"border-left-width":t.left})),e.parent()||(e.keyboardNav=new i({root:e})),e},initLayoutRect:function(){var e=this,t=e._super();return e._layout.recalc(e),t},recalc:function(){var e=this,t=e._layoutRect,n=e._lastRect;return n&&n.w==t.w&&n.h==t.h?void 0:(e._layout.recalc(e),t=e.layoutRect(),e._lastRect={x:t.x,y:t.y,w:t.w,h:t.h},!0)},reflow:function(){var t;if(l.remove(this),this.visible()){for(e.repaintControls=[],e.repaintControls.map={},this.recalc(),t=e.repaintControls.length;t--;)e.repaintControls[t].repaint();"flow"!==this.settings.layout&&"stack"!==this.settings.layout&&this.repaint(),e.repaintControls=[]}return this}})}),r(we,[g],function(e){function t(e){var t,n,r,i,o,a,s,l,c=Math.max;return t=e.documentElement,n=e.body,r=c(t.scrollWidth,n.scrollWidth),i=c(t.clientWidth,n.clientWidth),o=c(t.offsetWidth,n.offsetWidth),a=c(t.scrollHeight,n.scrollHeight),s=c(t.clientHeight,n.clientHeight),l=c(t.offsetHeight,n.offsetHeight),{width:o>r?i:r,height:l>a?s:a}}function n(e){var t,n;if(e.changedTouches)for(t="screenX screenY pageX pageY clientX clientY".split(" "),n=0;n").css({position:"absolute",top:0,left:0,width:c.width,height:c.height,zIndex:2147483647,opacity:1e-4,cursor:m}).appendTo(s.body),e(s).on("mousemove touchmove",d).on("mouseup touchend",u),i.start(r)},d=function(e){return n(e),e.button!==l?u(e):(e.deltaX=e.screenX-f,e.deltaY=e.screenY-h,e.preventDefault(),void i.drag(e))},u=function(t){n(t),e(s).off("mousemove touchmove",d).off("mouseup touchend",u),a.remove(),i.stop&&i.stop(t)},this.destroy=function(){e(o()).off()},e(o()).on("mousedown touchstart",c)}}),r(Ne,[g,we],function(e,t){return{init:function(){var e=this;e.on("repaint",e.renderScroll)},renderScroll:function(){function n(){function t(t,a,s,l,c,u){var d,f,h,p,m,g,v,y,b;if(f=i.getEl("scroll"+t)){if(y=a.toLowerCase(),b=s.toLowerCase(),e(i.getEl("absend")).css(y,i.layoutRect()[l]-1),!c)return void e(f).css("display","none");e(f).css("display","block"),d=i.getEl("body"),h=i.getEl("scroll"+t+"t"),p=d["client"+s]-2*o,p-=n&&r?f["client"+u]:0,m=d["scroll"+s],g=p/m,v={},v[y]=d["offset"+a]+o,v[b]=p,e(f).css(v),v={},v[y]=d["scroll"+a]*g,v[b]=p*g,e(h).css(v)}}var n,r,a;a=i.getEl("body"),n=a.scrollWidth>a.clientWidth,r=a.scrollHeight>a.clientHeight,t("h","Left","Width","contentW",n,"Height"),t("v","Top","Height","contentH",r,"Width")}function r(){function n(n,r,a,s,l){var c,u=i._id+"-scroll"+n,d=i.classPrefix;e(i.getEl()).append('
              '),i.draghelper=new t(u+"t",{start:function(){c=i.getEl("body")["scroll"+r],e("#"+u).addClass(d+"active")},drag:function(e){var t,u,d,f,h=i.layoutRect();u=h.contentW>h.innerW,d=h.contentH>h.innerH,f=i.getEl("body")["client"+a]-2*o,f-=u&&d?i.getEl("scroll"+n)["client"+l]:0,t=f/i.getEl("body")["scroll"+a],i.getEl("body")["scroll"+r]=c+e["delta"+s]/t},stop:function(){e("#"+u).removeClass(d+"active")}})}i.classes.add("scroll"),n("v","Top","Height","Y","Width"),n("h","Left","Width","X","Height")}var i=this,o=2;i.settings.autoScroll&&(i._hasScroll||(i._hasScroll=!0,r(),i.on("wheel",function(e){var t=i.getEl("body");t.scrollLeft+=10*(e.deltaX||0),t.scrollTop+=10*e.deltaY,n()}),e(i.getEl("body")).on("scroll",n)),n())}}}),r(Ee,[xe,Ne],function(e,t){return e.extend({Defaults:{layout:"fit",containerCls:"panel"},Mixins:[t],renderHtml:function(){var e=this,t=e._layout,n=e.settings.html;return e.preRender(),t.preRender(e),"undefined"==typeof n?n='
              '+t.renderHtml(e)+"
              ":("function"==typeof n&&(n=n.call(e)),e._hasBody=!1),'
              '+(e._preBodyHtml||"")+n+"
              "}})}),r(_e,[pe],function(e){function t(t,n,r){var i,o,a,s,l,c,u,d,f,h;return f=e.getViewPort(),o=e.getPos(n),a=o.x,s=o.y,t.state.get("fixed")&&"static"==e.getRuntimeStyle(document.body,"position")&&(a-=f.x,s-=f.y),i=t.getEl(),h=e.getSize(i),l=h.width,c=h.height,h=e.getSize(n),u=h.width,d=h.height,r=(r||"").split(""),"b"===r[0]&&(s+=d),"r"===r[1]&&(a+=u),"c"===r[0]&&(s+=Math.round(d/2)),"c"===r[1]&&(a+=Math.round(u/2)),"b"===r[3]&&(s-=c),"r"===r[4]&&(a-=l),"c"===r[3]&&(s-=Math.round(c/2)),"c"===r[4]&&(a-=Math.round(l/2)),{x:a,y:s,w:l,h:c}}return{testMoveRel:function(n,r){for(var i=e.getViewPort(),o=0;o0&&a.x+a.w0&&a.y+a.hi.x&&a.x+a.wi.y&&a.y+a.he?0:e+n>t?(e=t-n,0>e?0:e):e}var i=this;if(i.settings.constrainToViewport){var o=e.getViewPort(window),a=i.layoutRect();t=r(t,o.w+o.x,a.w),n=r(n,o.h+o.y,a.h)}return i.state.get("rendered")?i.layoutRect({x:t,y:n}).repaint():(i.settings.x=t,i.settings.y=n),i.fire("move",{x:t,y:n}),i}}}),r(Se,[pe],function(e){return{resizeToContent:function(){this._layoutRect.autoResize=!0,this._lastRect=null,this.reflow()},resizeTo:function(t,n){if(1>=t||1>=n){var r=e.getWindowSize();t=1>=t?t*r.w:t,n=1>=n?n*r.h:n}return this._layoutRect.autoResize=!1,this.layoutRect({minW:t,minH:n,w:t,h:n}).reflow()},resizeBy:function(e,t){var n=this,r=n.layoutRect();return n.resizeTo(r.w+e,r.h+t)}}}),r(ke,[Ee,_e,Se,pe,g,u],function(e,t,n,r,i,o){function a(e,t){for(;e;){if(e==t)return!0;e=e.parent()}}function s(e){for(var t=v.length;t--;){var n=v[t],r=n.getParentCtrl(e.target);if(n.settings.autohide){if(r&&(a(r,n)||n.parent()===r))continue;e=n.fire("autohide",{target:e.target}),e.isDefaultPrevented()||n.hide()}}}function l(){p||(p=function(e){2!=e.button&&s(e)},i(document).on("click touchstart",p))}function c(){m||(m=function(){var e;for(e=v.length;e--;)d(v[e])},i(window).on("scroll",m))}function u(){if(!g){var e=document.documentElement,t=e.clientWidth,n=e.clientHeight;g=function(){document.all&&t==e.clientWidth&&n==e.clientHeight||(t=e.clientWidth,n=e.clientHeight,C.hideAll())},i(window).on("resize",g)}}function d(e){function t(t,n){for(var r,i=0;in&&(e.fixed(!1).layoutRect({y:e._autoFixY}).repaint(),t(!1,e._autoFixY-n)):(e._autoFixY=e.layoutRect().y,e._autoFixY
              ').appendTo(t.getContainerElm())),o.setTimeout(function(){n.addClass(r+"in"),i(t.getEl()).addClass(r+"in")}),b=!0),f(!0,t)}}),t.on("show",function(){t.parents().each(function(e){return e.state.get("fixed")?(t.fixed(!0),!1):void 0})}),e.popover&&(t._preBodyHtml='
              ',t.classes.add("popover").add("bottom").add(t.isRtl()?"end":"start")),t.aria("label",e.ariaLabel),t.aria("labelledby",t._id),t.aria("describedby",t.describedBy||t._id+"-none")},fixed:function(e){var t=this;if(t.state.get("fixed")!=e){if(t.state.get("rendered")){var n=r.getViewPort();e?t.layoutRect().y-=n.y:t.layoutRect().y+=n.y}t.classes.toggle("fixed",e),t.state.set("fixed",e)}return t},show:function(){var e=this,t,n=e._super();for(t=v.length;t--&&v[t]!==e;);return-1===t&&v.push(e),n},hide:function(){return h(this),f(!1,this),this._super()},hideAll:function(){C.hideAll()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||(e.remove(),f(!1,e)),e},remove:function(){h(this),this._super()},postRender:function(){var e=this;return e.settings.bodyRole&&this.getEl("body").setAttribute("role",e.settings.bodyRole),e._super()}});return C.hideAll=function(){for(var e=v.length;e--;){var t=v[e];t&&t.settings.autohide&&(t.hide(),v.splice(e,1))}},C}),r(Te,[ke,Ee,pe,g,we,me,d,u],function(e,t,n,r,i,o,a,s){function l(e){var t="width=device-width,initial-scale=1.0,user-scalable=0,minimum-scale=1.0,maximum-scale=1.0",n=r("meta[name=viewport]")[0],i;a.overrideViewPort!==!1&&(n||(n=document.createElement("meta"),n.setAttribute("name","viewport"),document.getElementsByTagName("head")[0].appendChild(n)),i=n.getAttribute("content"),i&&"undefined"!=typeof f&&(f=i),n.setAttribute("content",e?t:f))}function c(e){for(var t=0;tr.w&&(o=r.x-Math.max(0,i/2),e.layoutRect({w:i,x:o}),a=!0)),t&&(t.layoutRect({w:e.layoutRect().innerW}).recalc(),i=t.layoutRect().minW+r.deltaW,i>r.w&&(o=r.x-Math.max(0,i-r.w),e.layoutRect({w:i,x:o}),a=!0)),a&&e.recalc()},initLayoutRect:function(){var e=this,t=e._super(),r=0,i;if(e.settings.title&&!e._fullscreen){i=e.getEl("head");var o=n.getSize(i);t.headerW=o.width,t.headerH=o.height,r+=t.headerH}e.statusbar&&(r+=e.statusbar.layoutRect().h),t.deltaH+=r,t.minH+=r,t.h+=r;var a=n.getWindowSize();return t.x=e.settings.x||Math.max(0,a.w/2-t.w/2),t.y=e.settings.y||Math.max(0,a.h/2-t.h/2),t},renderHtml:function(){var e=this,t=e._layout,n=e._id,r=e.classPrefix,i=e.settings,o="",a="",s=i.html;return e.preRender(),t.preRender(e),i.title&&(o='
              '+e.encode(i.title)+'
              '),i.url&&(s=''),"undefined"==typeof s&&(s=t.renderHtml(e)),e.statusbar&&(a=e.statusbar.renderHtml()),'
              '+o+'
              '+s+"
              "+a+"
              "},fullscreen:function(e){var t=this,i=document.documentElement,a,l=t.classPrefix,c;if(e!=t._fullscreen)if(r(window).on("resize",function(){var e;if(t._fullscreen)if(a)t._timer||(t._timer=s.setTimeout(function(){var e=n.getWindowSize();t.moveTo(0,0).resizeTo(e.w,e.h),t._timer=0},50));else{e=(new Date).getTime();var r=n.getWindowSize();t.moveTo(0,0).resizeTo(r.w,r.h),(new Date).getTime()-e>50&&(a=!0)}}),c=t.layoutRect(),t._fullscreen=e,e){t._initial={x:c.x,y:c.y,w:c.w,h:c.h},t.borderBox=o.parseBox("0"),t.getEl("head").style.display="none",c.deltaH-=c.headerH+2,r([i,document.body]).addClass(l+"fullscreen"),t.classes.add("fullscreen");var u=n.getWindowSize();t.moveTo(0,0).resizeTo(u.w,u.h)}else t.borderBox=o.parseBox(t.settings.border),t.getEl("head").style.display="",c.deltaH+=c.headerH,r([i,document.body]).removeClass(l+"fullscreen"),t.classes.remove("fullscreen"),t.moveTo(t._initial.x,t._initial.y).resizeTo(t._initial.w,t._initial.h);return t.reflow()},postRender:function(){var e=this,t;setTimeout(function(){e.classes.add("in"),e.fire("open")},0),e._super(),e.statusbar&&e.statusbar.postRender(),e.focus(),this.dragHelper=new i(e._id+"-dragh",{start:function(){t={x:e.layoutRect().x,y:e.layoutRect().y}},drag:function(n){e.moveTo(t.x+n.deltaX,t.y+n.deltaY)}}),e.on("submit",function(t){t.isDefaultPrevented()||e.close()}),d.push(e),l(!0)},submit:function(){return this.fire("submit",{data:this.toJSON()})},remove:function(){var e=this,t;for(e.dragHelper.destroy(),e._super(),e.statusbar&&this.statusbar.remove(),t=d.length;t--;)d[t]===e&&d.splice(t,1);l(d.length>0),c(e.classPrefix)},getContentWindow:function(){var e=this.getEl().getElementsByTagName("iframe")[0];return e?e.contentWindow:null}});return u(),h}),r(Re,[Te],function(e){var t=e.extend({init:function(e){e={border:1,padding:20,layout:"flex",pack:"center",align:"center",containerCls:"panel",autoScroll:!0,buttons:{type:"button",text:"Ok",action:"ok"},items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200}},this._super(e)},Statics:{OK:1,OK_CANCEL:2,YES_NO:3,YES_NO_CANCEL:4,msgBox:function(n){function r(e,t,n){return{type:"button",text:e,subtype:n?"primary":"",onClick:function(e){e.control.parents()[1].close(),o(t)}}}var i,o=n.callback||function(){};switch(n.buttons){case t.OK_CANCEL:i=[r("Ok",!0,!0),r("Cancel",!1)];break;case t.YES_NO:case t.YES_NO_CANCEL:i=[r("Yes",1,!0),r("No",0)],n.buttons==t.YES_NO_CANCEL&&i.push(r("Cancel",-1));break;default:i=[r("Ok",!0,!0)]}return new e({padding:20,x:n.x,y:n.y,minWidth:300,minHeight:100,layout:"flex",pack:"center",align:"center",buttons:i,title:n.title,role:"alertdialog",items:{type:"label",multiline:!0,maxWidth:500,maxHeight:200,text:n.text},onPostRender:function(){this.aria("describedby",this.items()[0]._id)},onClose:n.onClose,onCancel:function(){o(!1)}}).renderTo(document.body).reflow()},alert:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,t.msgBox(e)},confirm:function(e,n){return"string"==typeof e&&(e={text:e}),e.callback=n,e.buttons=t.OK_CANCEL,t.msgBox(e)}}});return t}),r(Ae,[Te,Re],function(e,t){return function(n){function r(){return s.length?s[s.length-1]:void 0}function i(e){n.fire("OpenWindow",{win:e})}function o(e){n.fire("CloseWindow",{win:e})}var a=this,s=[];a.windows=s,n.on("remove",function(){for(var e=s.length;e--;)s[e].close()}),a.open=function(t,r){var a;return n.editorManager.setActive(n),t.title=t.title||" ",t.url=t.url||t.file,t.url&&(t.width=parseInt(t.width||320,10),t.height=parseInt(t.height||240,10)),t.body&&(t.items={defaults:t.defaults,type:t.bodyType||"form",items:t.body,data:t.data,callbacks:t.commands}),t.url||t.buttons||(t.buttons=[{text:"Ok",subtype:"primary",onclick:function(){a.find("form")[0].submit()}},{text:"Cancel",onclick:function(){a.close()}}]),a=new e(t),s.push(a),a.on("close",function(){for(var e=s.length;e--;)s[e]===a&&s.splice(e,1);s.length||n.focus(),o(a)}),t.data&&a.on("postRender",function(){this.find("*").each(function(e){var n=e.name();n in t.data&&e.value(t.data[n])})}),a.features=t||{},a.params=r||{},1===s.length&&n.nodeChanged(),a=a.renderTo().reflow(),i(a),a},a.alert=function(e,r,a){var s;s=t.alert(e,function(){r?r.call(a||this):n.focus()}),s.on("close",function(){o(s)}),i(s)},a.confirm=function(e,n,r){var a;a=t.confirm(e,function(e){n.call(r||this,e)}),a.on("close",function(){o(a)}),i(a)},a.close=function(){r()&&r().close()},a.getParams=function(){return r()?r().params:null},a.setParams=function(e){r()&&(r().params=e)},a.getWindows=function(){return s}}}),r(Be,[ye,_e],function(e,t){return e.extend({Mixins:[t],Defaults:{classes:"widget tooltip tooltip-n"},renderHtml:function(){var e=this,t=e.classPrefix;return'"},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().lastChild.innerHTML=e.encode(t.value)}),e._super()},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(De,[ye,Be],function(e,t){var n,r=e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.canFocus=!0,e.tooltip&&r.tooltips!==!1&&(t.on("mouseenter",function(n){var r=t.tooltip().moveTo(-65535);if(n.control==t){var i=r.text(e.tooltip).show().testMoveRel(t.getEl(),["bc-tc","bc-tl","bc-tr"]);r.classes.toggle("tooltip-n","bc-tc"==i),r.classes.toggle("tooltip-nw","bc-tl"==i),r.classes.toggle("tooltip-ne","bc-tr"==i),r.moveRel(t.getEl(),i)}else r.hide()}),t.on("mouseleave mousedown click",function(){t.tooltip().hide()})),t.aria("label",e.ariaLabel||e.tooltip)},tooltip:function(){return n||(n=new t({type:"tooltip"}),n.renderTo()),n},postRender:function(){var e=this,t=e.settings;e._super(),e.parent()||!t.width&&!t.height||(e.initLayoutRect(),e.repaint()),t.autofocus&&e.focus()},bindStates:function(){function e(e){n.aria("disabled",e),n.classes.toggle("disabled",e)}function t(e){n.aria("pressed",e),n.classes.toggle("active",e)}var n=this;return n.state.on("change:disabled",function(t){e(t.value)}),n.state.on("change:active",function(e){t(e.value)}),n.state.get("disabled")&&e(!0),n.state.get("active")&&t(!0),n._super()},remove:function(){this._super(),n&&(n.remove(),n=null)}});return r}),r(Le,[De],function(e){return e.extend({Defaults:{value:0},init:function(e){var t=this;t._super(e),t.classes.add("progress"),t.settings.filter||(t.settings.filter=function(e){return Math.round(e)})},renderHtml:function(){var e=this,t=e._id,n=this.classPrefix;return'
              0%
              '},postRender:function(){var e=this;return e._super(),e.value(e.settings.value),e},bindStates:function(){function e(e){e=t.settings.filter(e),t.getEl().lastChild.innerHTML=e+"%",t.getEl().firstChild.firstChild.style.width=e+"%"}var t=this;return t.state.on("change:value",function(t){e(t.value)}),e(t.state.get("value")),t._super()}})}),r(Me,[ye,_e,Le,u],function(e,t,n,r){return e.extend({Mixins:[t],Defaults:{classes:"widget notification"},init:function(e){var t=this;t._super(e),e.text&&t.text(e.text),e.icon&&(t.icon=e.icon),e.color&&(t.color=e.color),e.type&&t.classes.add("notification-"+e.type),e.timeout&&(e.timeout<0||e.timeout>0)&&!e.closeButton?t.closeButton=!1:(t.classes.add("has-close"),t.closeButton=!0),e.progressBar&&(t.progressBar=new n),t.on("click",function(e){-1!=e.target.className.indexOf(t.classPrefix+"close")&&t.close()})},renderHtml:function(){var e=this,t=e.classPrefix,n="",r="",i="",o="";return e.icon&&(n=''),e.color&&(o=' style="background-color: '+e.color+'"'),e.closeButton&&(r=''),e.progressBar&&(i=e.progressBar.renderHtml()),'"},postRender:function(){var e=this;return r.setTimeout(function(){e.$el.addClass(e.classPrefix+"in")}),e._super()},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl().childNodes[1].innerHTML=t.value}),e.progressBar&&e.progressBar.bindStates(),e._super()},close:function(){var e=this;return e.fire("close").isDefaultPrevented()||e.remove(),e},repaint:function(){var e=this,t,n;t=e.getEl().style,n=e._layoutRect,t.left=n.x+"px",t.top=n.y+"px",t.zIndex=131070}})}),r(Pe,[Me,u],function(e,t){return function(n){function r(){return l.length?l[l.length-1]:void 0}function i(){t.requestAnimationFrame(function(){o(),a()})}function o(){for(var e=0;e0){var e=l.slice(0,1)[0],t=n.inline?n.getElement():n.getContentAreaContainer();if(e.moveRel(t,"tc-tc"),l.length>1)for(var r=1;r0&&(r.timer=setTimeout(function(){r.close()},t.timeout)),r.on("close",function(){var e=l.length;for(r.timer&&n.getWin().clearTimeout(r.timer);e--;)l[e]===r&&l.splice(e,1);a()}),r.renderTo(),a(),r},s.close=function(){r()&&r().close()},s.getNotifications=function(){return l},n.on("SkinLoaded",function(){var e=n.settings.service_message;e&&n.notificationManager.open({text:e,type:"warning",timeout:0,icon:""})})}}),r(He,[w],function(e){function t(t,n,r){for(var i=[];n&&n!=t;n=n.parentNode)i.push(e.nodeIndex(n,r));return i}function n(e,t){var n,r,i;for(r=e,n=t.length-1;n>=0;n--){if(i=r.childNodes,t[n]>i.length-1)return null;r=i[t[n]]}return r}return{create:t,resolve:n}}),r(Oe,[I,T,y,He,A,C,d,m,u,k,$,ne],function(e,t,n,r,i,o,a,s,l,c,u,d){return function(f){function h(e,t){try{f.getDoc().execCommand(e,!1,t)}catch(n){}}function p(){var e=f.getDoc().documentMode;return e?e:6}function m(e){return e.isDefaultPrevented()}function g(e){var t,n;e.dataTransfer&&(f.selection.isCollapsed()&&"IMG"==e.target.tagName&&re.select(e.target),t=f.selection.getContent(),t.length>0&&(n=ue+escape(f.id)+","+escape(t),e.dataTransfer.setData(de,n)))}function v(e){var t;return e.dataTransfer&&(t=e.dataTransfer.getData(de),t&&t.indexOf(ue)>=0)?(t=t.substr(ue.length).split(","),{id:unescape(t[0]),html:unescape(t[1])}):null}function y(e){f.queryCommandSupported("mceInsertClipboardContent")?f.execCommand("mceInsertClipboardContent",!1,{content:e}):f.execCommand("mceInsertContent",!1,e)}function b(){function i(e){var t=C.schema.getBlockElements(),n=f.getBody();if("BR"!=e.nodeName)return!1;for(;e!=n&&!t[e.nodeName];e=e.parentNode)if(e.nextSibling)return!1;return!0}function o(e,t){var n;for(n=e.nextSibling;n&&n!=t;n=n.nextSibling)if((3!=n.nodeType||0!==Z.trim(n.data).length)&&n!==t)return!1;return n===t}function a(e,t,r){var o,a,s;for(s=C.schema.getNonEmptyElements(),o=new n(r||e,e);a=o[t?"next":"prev"]();){if(s[a.nodeName]&&!i(a))return a;if(3==a.nodeType&&a.data.length>0)return a}}function c(e){var n,r,i,o,s;if(!e.collapsed&&(n=C.getParent(t.getNode(e.startContainer,e.startOffset),C.isBlock),r=C.getParent(t.getNode(e.endContainer,e.endOffset),C.isBlock),s=f.schema.getTextBlockElements(),n!=r&&s[n.nodeName]&&s[r.nodeName]&&"false"!==C.getContentEditable(n)&&"false"!==C.getContentEditable(r)))return e.deleteContents(), +i=a(n,!1),o=a(r,!0),C.isEmpty(r)||Z(n).append(r.childNodes),Z(r).remove(),i?1==i.nodeType?"BR"==i.nodeName?(e.setStartBefore(i),e.setEndBefore(i)):(e.setStartAfter(i),e.setEndAfter(i)):(e.setStart(i,i.data.length),e.setEnd(i,i.data.length)):o&&(1==o.nodeType?(e.setStartBefore(o),e.setEndBefore(o)):(e.setStart(o,0),e.setEnd(o,0))),x.setRng(e),!0}function u(e,n){var r,i,s,l,c,u;if(!e.collapsed)return e;if(c=e.startContainer,u=e.startOffset,3==c.nodeType)if(n){if(u0)return e;if(r=t.getNode(e.startContainer,e.startOffset),s=C.getParent(r,C.isBlock),i=a(f.getBody(),n,r),l=C.getParent(i,C.isBlock),!r||!i)return e;if(l&&s!=l)if(n){if(!o(s,l))return e;1==r.nodeType?"BR"==r.nodeName?e.setStartBefore(r):e.setStartAfter(r):e.setStart(r,r.data.length),1==i.nodeType?e.setEnd(i,0):e.setEndBefore(i)}else{if(!o(l,s))return e;1==i.nodeType?"BR"==i.nodeName?e.setStartBefore(i):e.setStartAfter(i):e.setStart(i,i.data.length),1==r.nodeType?e.setEnd(r,0):e.setEndBefore(r)}return e}function d(e){var t=x.getRng();return t=u(t,e),c(t)?!0:void 0}function h(e,t){function n(e,n){return m=Z(n).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),l=e.cloneNode(!1),m=s.map(m,function(e){return e=e.cloneNode(!1),l.hasChildNodes()?(e.appendChild(l.firstChild),l.appendChild(e)):l.appendChild(e),l.appendChild(e),e}),m.length?(p=C.create("br"),m[0].appendChild(p),C.replace(l,e),t.setStartBefore(p),t.setEndBefore(p),f.selection.setRng(t),p):null}function i(e){return e&&f.schema.getTextBlockElements()[e.tagName]}var o,a,l,c,u,d,h,p,m;if(t.collapsed&&(d=t.startContainer,h=t.startOffset,a=C.getParent(d,C.isBlock),i(a)))if(1==d.nodeType){if(d=d.childNodes[h],d&&"BR"!=d.tagName)return;if(u=e?a.nextSibling:a.previousSibling,C.isEmpty(a)&&i(u)&&C.isEmpty(u)&&n(a,d))return C.remove(u),!0}else if(3==d.nodeType){if(o=r.create(a,d),c=a.cloneNode(!0),d=r.resolve(c,o),e){if(h>=d.data.length)return;d.deleteData(h,1)}else{if(0>=h)return;d.deleteData(h-1,1)}if(C.isEmpty(c))return n(a,d)}}function p(e){var t,n,r;d(e)||(s.each(f.getBody().getElementsByTagName("*"),function(e){"SPAN"==e.tagName&&e.setAttribute("mce-data-marked",1),!e.hasAttribute("data-mce-style")&&e.hasAttribute("style")&&f.dom.setAttrib(e,"style",f.dom.getAttrib(e,"style"))}),t=new w(function(){}),t.observe(f.getDoc(),{childList:!0,attributes:!0,subtree:!0,attributeFilter:["style"]}),f.getDoc().execCommand(e?"ForwardDelete":"Delete",!1,null),n=f.selection.getRng(),r=n.startContainer.parentNode,s.each(t.takeRecords(),function(e){if(C.isChildOf(e.target,f.getBody())){if("style"==e.attributeName){var t=e.target.getAttribute("data-mce-style");t?e.target.setAttribute("style",t):e.target.removeAttribute("style")}s.each(e.addedNodes,function(e){if("SPAN"==e.nodeName&&!e.getAttribute("mce-data-marked")){var t,i;e==r&&(t=n.startOffset,i=e.firstChild),C.remove(e,!0),i&&(n.setStart(i,t),n.setEnd(i,t),f.selection.setRng(n))}})}}),t.disconnect(),s.each(f.dom.select("span[mce-data-marked]"),function(e){e.removeAttribute("mce-data-marked")}))}var b=f.getDoc(),C=f.dom,x=f.selection,w=window.MutationObserver,N,E;w||(N=!0,w=function(){function e(e){var t=e.relatedNode||e.target;n.push({target:t,addedNodes:[t]})}function t(e){var t=e.relatedNode||e.target;n.push({target:t,attributeName:e.attrName})}var n=[],r;this.observe=function(n){r=n,r.addEventListener("DOMSubtreeModified",e,!1),r.addEventListener("DOMNodeInsertedIntoDocument",e,!1),r.addEventListener("DOMNodeInserted",e,!1),r.addEventListener("DOMAttrModified",t,!1)},this.disconnect=function(){r.removeEventListener("DOMSubtreeModified",e,!1),r.removeEventListener("DOMNodeInsertedIntoDocument",e,!1),r.removeEventListener("DOMNodeInserted",e,!1),r.removeEventListener("DOMAttrModified",t,!1)},this.takeRecords=function(){return n}}),f.on("keydown",function(e){var t=e.keyCode==te,n=e.ctrlKey||e.metaKey;if(!m(e)&&(t||e.keyCode==ee)){var r=f.selection.getRng(),i=r.startContainer,o=r.startOffset;if(t&&e.shiftKey)return;if(h(t,r))return void e.preventDefault();if(!n&&r.collapsed&&3==i.nodeType&&(t?o0))return;e.preventDefault(),n&&f.selection.getSel().modify("extend",t?"forward":"backward",e.metaKey?"lineboundary":"word"),p(t)}}),f.on("keypress",function(t){if(!m(t)&&!x.isCollapsed()&&t.charCode>31&&!e.metaKeyPressed(t)){var n,r,i,o,a,s;n=f.selection.getRng(),s=String.fromCharCode(t.charCode),t.preventDefault(),r=Z(n.startContainer).parents().filter(function(e,t){return!!f.schema.getTextInlineElements()[t.nodeName]}),p(!0),r=r.filter(function(e,t){return!Z.contains(f.getBody(),t)}),r.length?(i=C.createFragment(),r.each(function(e,t){t=t.cloneNode(!1),i.hasChildNodes()?(t.appendChild(i.firstChild),i.appendChild(t)):(a=t,i.appendChild(t)),i.appendChild(t)}),a.appendChild(f.getDoc().createTextNode(s)),o=C.getParent(n.startContainer,C.isBlock),C.isEmpty(o)?Z(o).empty().append(i):n.insertNode(i),n.setStart(a.firstChild,1),n.setEnd(a.firstChild,1),f.selection.setRng(n)):f.selection.setContent(s)}}),f.addCommand("Delete",function(){p()}),f.addCommand("ForwardDelete",function(){p(!0)}),N||(f.on("dragstart",function(e){E=x.getRng(),g(e)}),f.on("drop",function(e){if(!m(e)){var n=v(e);n&&(e.preventDefault(),l.setEditorTimeout(f,function(){var r=t.getCaretRangeFromPoint(e.x,e.y,b);E&&(x.setRng(E),E=null),p(),x.setRng(r),y(n.html)}))}}),f.on("cut",function(e){m(e)||!e.clipboardData||f.selection.isCollapsed()||(e.preventDefault(),e.clipboardData.clearData(),e.clipboardData.setData("text/html",f.selection.getContent()),e.clipboardData.setData("text/plain",f.selection.getContent({format:"text"})),l.setEditorTimeout(f,function(){p(!0)}))}))}function C(){function e(e){var t=ne.create("body"),n=e.cloneContents();return t.appendChild(n),re.serializer.serialize(t,{format:"html"})}function n(n){if(!n.setStart){if(n.item)return!1;var r=n.duplicate();return r.moveToElementText(f.getBody()),t.compareRanges(n,r)}var i=e(n),o=ne.createRng();o.selectNode(f.getBody());var a=e(o);return i===a}f.on("keydown",function(e){var t=e.keyCode,r,i;if(!m(e)&&(t==te||t==ee)){if(r=f.selection.isCollapsed(),i=f.getBody(),r&&!ne.isEmpty(i))return;if(!r&&!n(f.selection.getRng()))return;e.preventDefault(),f.setContent(""),i.firstChild&&ne.isBlock(i.firstChild)?f.selection.setCursorLocation(i.firstChild,0):f.selection.setCursorLocation(i,0),f.nodeChanged()}})}function x(){f.shortcuts.add("meta+a",null,"SelectAll")}function w(){f.settings.content_editable||ne.bind(f.getDoc(),"mousedown mouseup",function(e){var t;if(e.target==f.getDoc().documentElement)if(t=re.getRng(),f.getBody().focus(),"mousedown"==e.type){if(c.isCaretContainer(t.startContainer))return;re.placeCaretAt(e.clientX,e.clientY)}else re.setRng(t)})}function N(){f.on("keydown",function(e){if(!m(e)&&e.keyCode===ee){if(!f.getBody().getElementsByTagName("hr").length)return;if(re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode(),n=t.previousSibling;if("HR"==t.nodeName)return ne.remove(t),void e.preventDefault();n&&n.nodeName&&"hr"===n.nodeName.toLowerCase()&&(ne.remove(n),e.preventDefault())}}})}function E(){window.Range.prototype.getClientRects||f.on("mousedown",function(e){if(!m(e)&&"HTML"===e.target.nodeName){var t=f.getBody();t.blur(),l.setEditorTimeout(f,function(){t.focus()})}})}function _(){f.on("click",function(e){var t=e.target;/^(IMG|HR)$/.test(t.nodeName)&&"false"!==ne.getContentEditableParent(t)&&(e.preventDefault(),re.getSel().setBaseAndExtent(t,0,t,1),f.nodeChanged()),"A"==t.nodeName&&ne.hasClass(t,"mce-item-anchor")&&(e.preventDefault(),re.select(t))})}function S(){function e(){var e=ne.getAttribs(re.getStart().cloneNode(!1));return function(){var t=re.getStart();t!==f.getBody()&&(ne.setAttrib(t,"style",null),Q(e,function(e){t.setAttributeNode(e.cloneNode(!0))}))}}function t(){return!re.isCollapsed()&&ne.getParent(re.getStart(),ne.isBlock)!=ne.getParent(re.getEnd(),ne.isBlock)}f.on("keypress",function(n){var r;return m(n)||8!=n.keyCode&&46!=n.keyCode||!t()?void 0:(r=e(),f.getDoc().execCommand("delete",!1,null),r(),n.preventDefault(),!1)}),ne.bind(f.getDoc(),"cut",function(n){var r;!m(n)&&t()&&(r=e(),l.setEditorTimeout(f,function(){r()}))})}function k(){document.body.setAttribute("role","application")}function T(){f.on("keydown",function(e){if(!m(e)&&e.keyCode===ee&&re.isCollapsed()&&0===re.getRng(!0).startOffset){var t=re.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}})}function R(){p()>7||(h("RespectVisibilityInDesign",!0),f.contentStyles.push(".mceHideBrInPre pre br {display: none}"),ne.addClass(f.getBody(),"mceHideBrInPre"),oe.addNodeFilter("pre",function(e){for(var t=e.length,n,r,o,a;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)o=n[r],a=o.prev,a&&3===a.type&&"\n"!=a.value.charAt(a.value-1)?a.value+="\n":o.parent.insert(new i("#text",3),o,!0).value="\n"}),ae.addNodeFilter("pre",function(e){for(var t=e.length,n,r,i,o;t--;)for(n=e[t].getAll("br"),r=n.length;r--;)i=n[r],o=i.prev,o&&3==o.type&&(o.value=o.value.replace(/\r?\n$/,""))}))}function A(){ne.bind(f.getBody(),"mouseup",function(){var e,t=re.getNode();"IMG"==t.nodeName&&((e=ne.getStyle(t,"width"))&&(ne.setAttrib(t,"width",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"width","")),(e=ne.getStyle(t,"height"))&&(ne.setAttrib(t,"height",e.replace(/[^0-9%]+/g,"")),ne.setStyle(t,"height","")))})}function B(){f.on("keydown",function(t){var n,r,i,o,a;if(!m(t)&&t.keyCode==e.BACKSPACE&&(n=re.getRng(),r=n.startContainer,i=n.startOffset,o=ne.getRoot(),a=r,n.collapsed&&0===i)){for(;a&&a.parentNode&&a.parentNode.firstChild==a&&a.parentNode!=o;)a=a.parentNode;"BLOCKQUOTE"===a.tagName&&(f.formatter.toggle("blockquote",null,a),n=ne.createRng(),n.setStart(r,0),n.setEnd(r,0),re.setRng(n))}})}function D(){function e(){K(),h("StyleWithCSS",!1),h("enableInlineTableEditing",!1),ie.object_resizing||h("enableObjectResizing",!1)}ie.readonly||f.on("BeforeExecCommand MouseDown",e)}function L(){function e(){Q(ne.select("a"),function(e){var t=e.parentNode,n=ne.getRoot();if(t.lastChild===e){for(;t&&!ne.isBlock(t);){if(t.parentNode.lastChild!==t||t===n)return;t=t.parentNode}ne.add(t,"br",{"data-mce-bogus":1})}})}f.on("SetContent ExecCommand",function(t){"setcontent"!=t.type&&"mceInsertLink"!==t.command||e()})}function M(){ie.forced_root_block&&f.on("init",function(){h("DefaultParagraphSeparator",ie.forced_root_block)})}function P(){f.on("keydown",function(e){var t;m(e)||e.keyCode!=ee||(t=f.getDoc().selection.createRange(),t&&t.item&&(e.preventDefault(),f.undoManager.beforeChange(),ne.remove(t.item(0)),f.undoManager.add()))})}function H(){var e;p()>=10&&(e="",Q("p div h1 h2 h3 h4 h5 h6".split(" "),function(t,n){e+=(n>0?",":"")+t+":empty"}),f.contentStyles.push(e+"{padding-right: 1px !important}"))}function O(){p()<9&&(oe.addNodeFilter("noscript",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.firstChild,r&&n.attr("data-mce-innertext",r.value)}),ae.addNodeFilter("noscript",function(e){for(var t=e.length,n,r,a;t--;)n=e[t],r=e[t].firstChild,r?r.value=o.decode(r.value):(a=n.attributes.map["data-mce-innertext"],a&&(n.attr("data-mce-innertext",null),r=new i("#text",3),r.value=a,r.raw=!0,n.append(r)))}))}function I(){function e(e,t){var n=i.createTextRange();try{n.moveToPoint(e,t)}catch(r){n=null}return n}function t(t){var r;t.button?(r=e(t.x,t.y),r&&(r.compareEndPoints("StartToStart",a)>0?r.setEndPoint("StartToStart",a):r.setEndPoint("EndToEnd",a),r.select())):n()}function n(){var e=r.selection.createRange();a&&!e.item&&0===e.compareEndPoints("StartToEnd",e)&&a.select(),ne.unbind(r,"mouseup",n),ne.unbind(r,"mousemove",t),a=o=0}var r=ne.doc,i=r.body,o,a,s;r.documentElement.unselectable=!0,ne.bind(r,"mousedown contextmenu",function(i){if("HTML"===i.target.nodeName){if(o&&n(),s=r.documentElement,s.scrollHeight>s.clientHeight)return;o=1,a=e(i.x,i.y),a&&(ne.bind(r,"mouseup",n),ne.bind(r,"mousemove",t),ne.getRoot().focus(),a.select())}})}function F(){f.on("keyup focusin mouseup",function(t){65==t.keyCode&&e.metaKeyPressed(t)||re.normalize()},!0)}function z(){f.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")}function U(){f.inline||f.on("keydown",function(){document.activeElement==document.body&&f.getWin().focus()})}function W(){f.inline||(f.contentStyles.push("body {min-height: 150px}"),f.on("click",function(e){var t;if("HTML"==e.target.nodeName){if(a.ie>11)return void f.getBody().focus();t=f.selection.getRng(),f.getBody().focus(),f.selection.setRng(t),f.selection.normalize(),f.nodeChanged()}}))}function V(){a.mac&&f.on("keydown",function(t){!e.metaKeyPressed(t)||t.shiftKey||37!=t.keyCode&&39!=t.keyCode||(t.preventDefault(),f.selection.getSel().modify("move",37==t.keyCode?"backward":"forward","lineboundary"))})}function $(){h("AutoUrlDetect",!1)}function q(){f.on("click",function(e){var t=e.target;do if("A"===t.tagName)return void e.preventDefault();while(t=t.parentNode)}),f.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")}function j(){f.on("init",function(){f.dom.bind(f.getBody(),"submit",function(e){e.preventDefault()})})}function Y(){oe.addNodeFilter("br",function(e){for(var t=e.length;t--;)"Apple-interchange-newline"==e[t].attr("class")&&e[t].remove()})}function X(){f.on("dragstart",function(e){g(e)}),f.on("drop",function(e){if(!m(e)){var n=v(e);if(n&&n.id!=f.id){e.preventDefault();var r=t.getCaretRangeFromPoint(e.x,e.y,f.getDoc());re.setRng(r),y(n.html)}}})}function K(){var e,t;G()&&(e=f.getBody(),t=e.parentNode,t.removeChild(e),t.appendChild(e),e.focus())}function G(){var e;return se?(e=f.selection.getSel(),!e||!e.rangeCount||0===e.rangeCount):0}function J(){function t(e){var t=new d(e.getBody()),n=e.selection.getRng(),r=u.fromRangeStart(n),i=u.fromRangeEnd(n);return!e.selection.isCollapsed()&&!t.prev(r)&&!t.next(i)}f.on("keypress",function(n){!m(n)&&!re.isCollapsed()&&n.charCode>31&&!e.metaKeyPressed(n)&&t(f)&&(n.preventDefault(),f.setContent(String.fromCharCode(n.charCode)),f.selection.select(f.getBody(),!0),f.selection.collapse(!1),f.nodeChanged())}),f.on("keydown",function(e){var n=e.keyCode;m(e)||n!=te&&n!=ee||t(f)&&(e.preventDefault(),f.setContent(""),f.nodeChanged())})}var Q=s.each,Z=f.$,ee=e.BACKSPACE,te=e.DELETE,ne=f.dom,re=f.selection,ie=f.settings,oe=f.parser,ae=f.serializer,se=a.gecko,le=a.ie,ce=a.webkit,ue="data:text/mce-internal,",de=le?"Text":"URL";return B(),C(),a.windowsPhone||F(),ce&&(J(),b(),w(),_(),M(),j(),T(),Y(),a.iOS?(U(),W(),q()):x()),le&&a.ie<11&&(N(),k(),R(),A(),P(),H(),O(),I()),a.ie>=11&&(W(),T()),a.ie&&(x(),$(),X()),se&&(J(),N(),E(),S(),D(),L(),z(),V(),T()),{refreshContentEditable:K,isHidden:G}}}),r(Ie,[ue,w,m],function(e,t,n){function r(e,t){return"selectionchange"==t?e.getDoc():!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)?e.getDoc().documentElement:e.settings.event_root?(e.eventRoot||(e.eventRoot=o.select(e.settings.event_root)[0]),e.eventRoot):e.getBody()}function i(e,t){function n(e){return!e.hidden&&!e.readonly}var i=r(e,t),s;if(e.delegates||(e.delegates={}),!e.delegates[t])if(e.settings.event_root){if(a||(a={},e.editorManager.on("removeEditor",function(){var t;if(!e.editorManager.activeEditor&&a){for(t in a)e.dom.unbind(r(e,t));a=null}})),a[t])return;s=function(r){for(var i=r.target,a=e.editorManager.editors,s=a.length;s--;){var l=a[s].getBody();(l===i||o.isChildOf(i,l))&&n(a[s])&&a[s].fire(t,r)}},a[t]=s,o.bind(i,t,s)}else s=function(r){n(e)&&e.fire(t,r)},o.bind(i,t,s),e.delegates[t]=s}var o=t.DOM,a,s={bindPendingEventDelegates:function(){var e=this;n.each(e._pendingNativeEvents,function(t){i(e,t)})},toggleNativeEvent:function(e,t){var n=this;"focus"!=e&&"blur"!=e&&(t?n.initialized?i(n,e):n._pendingNativeEvents?n._pendingNativeEvents.push(e):n._pendingNativeEvents=[e]:n.initialized&&(n.dom.unbind(r(n,e),e,n.delegates[e]),delete n.delegates[e]))},unbindAllNativeEvents:function(){var e=this,t;if(e.delegates){for(t in e.delegates)e.dom.unbind(r(e,t),t,e.delegates[t]);delete e.delegates}e.inline||(e.getBody().onload=null,e.dom.unbind(e.getWin()),e.dom.unbind(e.getDoc())),e.dom.unbind(e.getBody()),e.dom.unbind(e.getContainer())}};return s=n.extend({},e,s)}),r(Fe,[],function(){function e(e,t,n){try{e.getDoc().execCommand(t,!1,n)}catch(r){}}function t(e){var t,n;return t=e.getBody(),n=function(t){e.dom.getParents(t.target,"a").length>0&&t.preventDefault()},e.dom.bind(t,"click",n),{unbind:function(){e.dom.unbind(t,"click",n)}}}function n(n,r){n._clickBlocker&&(n._clickBlocker.unbind(),n._clickBlocker=null),r?(n._clickBlocker=t(n),n.selection.controlSelection.hideResizeRect(),n.readonly=!0,n.getBody().contentEditable=!1):(n.readonly=!1,n.getBody().contentEditable=!0,e(n,"StyleWithCSS",!1),e(n,"enableInlineTableEditing",!1),e(n,"enableObjectResizing",!1),n.focus(),n.nodeChanged())}function r(e,t){var r=e.readonly?"readonly":"design";t!=r&&(e.initialized?n(e,"readonly"==t):e.on("init",function(){n(e,"readonly"==t)}),e.fire("SwitchMode",{mode:t}))}return{setMode:r}}),r(ze,[m,d],function(e,t){var n=e.each,r=e.explode,i={f9:120,f10:121,f11:122},o=e.makeMap("alt,ctrl,shift,meta,access");return function(a){function s(e){var a,s,l={};n(r(e,"+"),function(e){e in o?l[e]=!0:/^[0-9]{2,}$/.test(e)?l.keyCode=parseInt(e,10):(l.charCode=e.charCodeAt(0),l.keyCode=i[e]||e.toUpperCase().charCodeAt(0))}),a=[l.keyCode];for(s in o)l[s]?a.push(s):l[s]=!1;return l.id=a.join(","),l.access&&(l.alt=!0,t.mac?l.ctrl=!0:l.shift=!0),l.meta&&(t.mac?l.meta=!0:(l.ctrl=!0,l.meta=!1)),l}function l(t,n,i,o){var l;return l=e.map(r(t,">"),s),l[l.length-1]=e.extend(l[l.length-1],{func:i,scope:o||a}),e.extend(l[0],{desc:a.translate(n),subpatterns:l.slice(1)})}function c(e){return e.altKey||e.ctrlKey||e.metaKey}function u(e){return e.keyCode>=112&&e.keyCode<=123}function d(e,t){return t?t.ctrl!=e.ctrlKey||t.meta!=e.metaKey?!1:t.alt!=e.altKey||t.shift!=e.shiftKey?!1:e.keyCode==t.keyCode||e.charCode&&e.charCode==t.charCode?(e.preventDefault(),!0):!1:!1}function f(e){return e.func?e.func.call(e.scope):null}var h=this,p={},m=[];a.on("keyup keypress keydown",function(e){!c(e)&&!u(e)||e.isDefaultPrevented()||(n(p,function(t){return d(e,t)?(m=t.subpatterns.slice(0),"keydown"==e.type&&f(t),!0):void 0}),d(e,m[0])&&(1===m.length&&"keydown"==e.type&&f(m[0]),m.shift()))}),h.add=function(t,i,o,s){var c;return c=o,"string"==typeof o?o=function(){a.execCommand(c,!1,null)}:e.isArray(c)&&(o=function(){a.execCommand(c[0],c[1],c[2])}),n(r(e.trim(t.toLowerCase())),function(e){var t=l(e,i,o,s);p[t.id]=t}),!0},h.remove=function(e){var t=l(e);return p[t.id]?(delete p[t.id],!0):!1}}}),r(Ue,[c,m,z],function(e,t,n){return function(r,i){function o(e){var t,n;return n={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png"},t=n[e.blob().type.toLowerCase()]||"dat",e.id()+"."+t}function a(e,t){return e?e.replace(/\/$/,"")+"/"+t.replace(/^\//,""):t}function s(e){return{id:e.id,blob:e.blob,base64:e.base64,filename:n.constant(o(e))}}function l(e,t,n,r){var s,l;s=new XMLHttpRequest,s.open("POST",i.url),s.withCredentials=i.credentials,s.upload.onprogress=function(e){r(e.loaded/e.total*100)},s.onerror=function(){n("Image upload failed due to a XHR Transport error. Code: "+s.status)},s.onload=function(){var e;return 200!=s.status?void n("HTTP Error: "+s.status):(e=JSON.parse(s.responseText),e&&"string"==typeof e.location?void t(a(i.basePath,e.location)):void n("Invalid JSON: "+s.responseText))},l=new FormData,l.append("file",e.blob(),o(e)),s.send(l)}function c(){return new e(function(e){e([])})}function u(e,t){return{url:t,blobInfo:e,status:!0}}function d(e,t){return{url:"",blobInfo:e,status:!1,error:t}}function f(e,n){t.each(y[e],function(e){e(n)}),delete y[e]}function h(t,n,i){return r.markPending(t.blobUri()),new e(function(e){var o,a,l=function(){};try{var c=function(){o&&(o.close(),a=l)},h=function(n){c(),r.markUploaded(t.blobUri(),n),f(t.blobUri(),u(t,n)),e(u(t,n))},p=function(){c(),r.removeFailed(t.blobUri()),f(t.blobUri(),d(t,p)),e(d(t,p))};a=function(e){0>e||e>100||(o||(o=i()),o.progressBar.value(e))},n(s(t),h,p,a)}catch(m){e(d(t,m.message))}})}function p(e){return e===l}function m(t){var n=t.blobUri();return new e(function(e){y[n]=y[n]||[],y[n].push(e)})}function g(n,o){return n=t.grep(n,function(e){return!r.isUploaded(e.blobUri())}),e.all(t.map(n,function(e){return r.isPending(e.blobUri())?m(e):h(e,i.handler,o)}))}function v(e,t){return!i.url&&p(i.handler)?c():g(e,t)}var y={};return i=t.extend({credentials:!1,handler:l},i),{upload:v}}}),r(We,[c],function(e){function t(t){return new e(function(e){var n=new XMLHttpRequest;n.open("GET",t,!0),n.responseType="blob",n.onload=function(){200==this.status&&e(this.response)},n.send()})}function n(e){var t,n;return e=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(e[0]),n&&(t=n[1]),{type:t,data:e[1]}}function r(t){return new e(function(e){var r,i,o;t=n(t);try{r=atob(t.data)}catch(a){return void e(new Blob([]))}for(i=new Uint8Array(r.length),o=0;o0&&(n&&(l*=-1),r.left+=l,r.right+=l),r}function l(){var n,r,o,a,s;for(n=i("*[contentEditable=false]",t),a=0;a').css(l).appendTo(t),o&&m.addClass("mce-visual-caret-before"),d(),c=a.ownerDocument.createRange(),f=g.firstChild,c.setStart(f,0),c.setEnd(f,1),c):(g=e.insertInline(a,o),c=a.ownerDocument.createRange(),s(g.nextSibling)?(c.setStart(g,0),c.setEnd(g,0)):(c.setStart(g,1),c.setEnd(g,1)),c)}function u(){l(),g&&(e.remove(g),g=null),m&&(m.remove(),m=null),clearInterval(p)}function d(){p=a.setInterval(function(){i("div.mce-visual-caret",t).toggleClass("mce-visual-caret-hidden")},500)}function f(){a.clearInterval(p)}function h(){return".mce-visual-caret {position: absolute;background-color: black;background-color: currentcolor;}.mce-visual-caret-hidden {display: none;}*[data-mce-caret] {position: absolute;left: -1000px;right: auto;top: 0;margin: 0;padding: 0;}"}var p,m,g;return{show:c,hide:u,getCss:h,destroy:f}}}),r(Xe,[p,_,W],function(e,t,n){function r(i){function o(t){return e.map(t,function(e){return e=n.clone(e),e.node=i,e})}if(e.isArray(i))return e.reduce(i,function(e,t){return e.concat(r(t))},[]);if(t.isElement(i))return o(i.getClientRects());if(t.isText(i)){var a=i.ownerDocument.createRange();return a.setStart(i,0),a.setEnd(i,i.data.length),o(a.getClientRects())}}return{getClientRects:r}}),r(Ke,[z,p,Xe,U,te,ne,$,W],function(e,t,n,r,i,o,a,s){function l(e,t,n,o){for(;o=i.findNode(o,e,r.isEditableCaretCandidate,t);)if(n(o))return}function c(e,r,i,o,a,s){function c(o){var s,l,c;for(c=n.getClientRects(o),-1==e&&(c=c.reverse()),s=0;s0&&r(l,t.last(f))&&u++,l.line=u,a(l))return!0;f.push(l)}}var u=0,d,f=[],h;return(h=t.last(s.getClientRects()))?(d=s.getNode(),c(d),l(e,o,c,d),f):f}function u(e,t){return t.line>e}function d(e,t){return t.line===e}function f(e,n,r,i){function l(n){return 1==e?t.last(n.getClientRects()):t.last(n.getClientRects())}var c=new o(n),u,d,f,h,p=[],m=0,g,v;1==e?(u=c.next,d=s.isBelow,f=s.isAbove,h=a.after(i)):(u=c.prev,d=s.isAbove,f=s.isBelow,h=a.before(i)),v=l(h);do if(h.isVisible()&&(g=l(h),!f(g,v))){if(p.length>0&&d(g,t.last(p))&&m++,g=s.clone(g),g.position=h,g.line=m,r(g))return p;p.push(g)}while(h=u(h));return p}var h=e.curry,p=h(c,-1,s.isAbove,s.isBelow),m=h(c,1,s.isBelow,s.isAbove);return{upUntil:p,downUntil:m,positionsUntil:f,isAboveLine:h(u),isLine:h(d)}}),r(Ge,[z,p,_,Xe,W,te,U],function(e,t,n,r,i,o,a){function s(e,t){return Math.abs(e.left-t)}function l(e,t){return Math.abs(e.right-t)}function c(e,n){function r(e,t){return e>=t.left&&e<=t.right}return t.reduce(e,function(e,t){var i,o;return i=Math.min(s(e,n),l(e,n)),o=Math.min(s(t,n),l(t,n)),r(n,t)?t:r(n,e)?e:o==i&&m(t.node)?t:i>o?t:e})}function u(e,t,n,r){for(;r=g(r,e,a.isEditableCaretCandidate,t);)if(n(r))return}function d(e,n){function o(e,i){var o;return o=t.filter(r.getClientRects(i),function(t){return!e(t,n)}),a=a.concat(o),0===o.length}var a=[];return a.push(n),u(-1,e,v(o,i.isAbove),n.node),u(1,e,v(o,i.isBelow),n.node),a}function f(e){return t.filter(t.toArray(e.getElementsByTagName("*")),m)}function h(e,t){return{node:e.node,before:s(e,t)=e.top&&i<=e.bottom}),a=c(o,n),a&&(a=c(d(e,a),n),a&&m(a.node))?h(a,n):null}var m=n.isContentEditableFalse,g=o.findNode,v=e.curry;return{findClosestClientRect:c,findLineNodeRects:d,closestCaret:p}}),r(Je,[_,p,z],function(e,t,n){function r(e){function r(e){return i(e)}function a(t){f(e.getBody()).css("cursor",t)}function s(t){return t==g.element||e.dom.isChildOf(t,g.element)?!1:!i(t)}function l(t){var n,r,i,o,s=0,l=0,c,u,d,h;0===t.button&&(n=t.screenX-g.screenX,r=t.screenY-g.screenY,c=Math.max(Math.abs(n),Math.abs(r)),!g.dragging&&c>10&&(g.dragging=!0,a("default"),g.clone=g.element.cloneNode(!0),i=m.getPos(g.element),g.relX=g.clientX-i.x,g.relY=g.clientY-i.y,g.width=g.element.offsetWidth,g.height=g.element.offsetHeight,f(g.clone).css({width:g.width,height:g.height}).removeAttr("data-mce-selected"),g.ghost=f("
              ").css({position:"absolute",opacity:.5,overflow:"hidden",width:g.width,height:g.height}).attr({"data-mce-bogus":"all",unselectable:"on",contenteditable:"false"}).addClass("mce-drag-container mce-reset").append(g.clone).appendTo(e.getBody())[0],o=e.dom.getViewPort(e.getWin()),g.maxX=o.w,g.maxY=o.h),g.dragging&&(e._selectionOverrides.hideFakeCaret(),e.selection.placeCaretAt(t.clientX,t.clientY),u=g.clientX+n-g.relX,d=g.clientY+r+5,u+g.width>g.maxX&&(s=u+g.width-g.maxX),d+g.height>g.maxY&&(l=d+g.height-g.maxY),h="BODY"!=e.getBody().nodeName?e.getBody().getBoundingClientRect():{left:0,top:0},f(g.ghost).css({left:u-h.left,top:d-h.top,width:g.width-s,height:g.height-l})))}function c(t){var n;if(g.dragging&&(e.selection.setRng(e.selection.getSel().getRangeAt(0)),s(e.selection.getNode()))){var r=g.element;if(n=e.fire("drop",{targetClone:r,clientX:t.clientX,clientY:t.clientY}),n.isDefaultPrevented())return;r=n.targetClone,e.undoManager.transact(function(){e.insertContent(m.getOuterHTML(r)),f(g.element).remove()})}d()}function u(a){var s,u;if(d(),0===a.button&&(s=t.find(e.dom.getParents(a.target),n.or(i,o)),r(s))){if(u=e.fire("dragstart",{target:s}),u.isDefaultPrevented())return;e.on("mousemove",l),e.on("mouseup",c),h!=p&&(m.bind(h,"mousemove",l),m.bind(h,"mouseup",c)),g={screenX:a.screenX,screenY:a.screenY,clientX:a.clientX,clientY:a.clientY,element:s +}}}function d(){f(g.ghost).remove(),a(null),e.off("mousemove",l),e.off("mouseup",d),h!=p&&(m.unbind(h,"mousemove",l),m.unbind(h,"mouseup",d)),g={}}var f=e.$,h=document,p=e.getDoc(),m=e.dom,g={};e.on("mousedown",u),e.on("drop",function(t){var n="undefined"!=typeof t.clientX?e.getDoc().elementFromPoint(t.clientX,t.clientY):null;(i(n)||i(e.dom.getContentEditableParent(n)))&&t.preventDefault()})}var i=e.isContentEditableFalse,o=e.isContentEditableTrue;return{init:r}}),r(Qe,[d,ne,$,k,te,Ye,Ke,Ge,_,T,W,I,z,p,u,Je,S],function(e,t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g){function v(e,t){for(;t=e(t);)if(t.isVisible())return t;return t}function y(c){function y(e){return c.dom.isBlock(e)}function S(e){e&&c.selection.setRng(e)}function k(){return c.selection.getRng()}function T(e,t){c.selection.scrollIntoView(e,t)}function R(e,t,n){var r;return r=c.fire("ShowCaret",{target:t,direction:e,before:n}),r.isDefaultPrevented()?null:(T(t,-1===e),ie.show(n,t))}function A(e){var t;return ie.hide(),t=c.fire("BeforeObjectSelected",{target:e}),t.isDefaultPrevented()?null:B(e)}function B(e){var t=e.ownerDocument.createRange();return t.selectNode(e),t}function D(e,t){var n=i.isInSameBlock(e,t);return!n&&l.isBr(e.getNode())?!0:n}function L(e,t){return t=i.normalizeRange(e,ee,t),-1==e?n.fromRangeStart(t):n.fromRangeEnd(t)}function M(e){return r.isCaretContainerBlock(e.startContainer)}function P(e,t,n,r){var i,o,a,s;return!r.collapsed&&(i=_(r),x(i))?R(e,i,-1==e):(s=M(r),o=L(e,r),n(o)?A(o.getNode(-1==e)):(o=t(o))?n(o)?R(e,o.getNode(-1==e),1==e):(a=t(o),n(a)&&D(o,a)?R(e,a.getNode(-1==e),1==e):s?V(o.toRange()):null):s?r:null)}function H(e,t,n){var r,i,o,l,c,u,d,f,p;if(p=_(n),r=L(e,n),i=t(ee,a.isAboveLine(1),r),o=h.filter(i,a.isLine(1)),c=h.last(r.getClientRects()),E(r)&&(p=r.getNode()),N(r)&&(p=r.getNode(!0)),!c)return null;if(u=c.left,l=s.findClosestClientRect(o,u),l&&x(l.node))return d=Math.abs(u-l.left),f=Math.abs(u-l.right),R(e,l.node,f>d);if(p){var m=a.positionsUntil(e,ee,a.isAboveLine(1),p);if(l=s.findClosestClientRect(h.filter(m,a.isLine(1)),u))return V(l.position.toRange());if(l=h.last(h.filter(m,a.isLine(0))))return V(l.position.toRange())}}function O(t,r){function i(){var t=c.dom.create(c.settings.forced_root_block);return(!e.ie||e.ie>=11)&&(t.innerHTML='
              '),t}var o,a,s;if(r.collapsed&&c.settings.forced_root_block){if(o=c.dom.getParent(r.startContainer,"PRE"),!o)return;a=1==t?ne(n.fromRangeStart(r)):re(n.fromRangeStart(r)),a||(s=i(),1==t?c.$(o).after(s):c.$(o).before(s),c.selection.select(s,!0),c.selection.collapse())}}function I(e,t,n,r){var i;return(i=P(e,t,n,r))?i:(i=O(e,r),i?i:null)}function F(e,t,n){var r;return(r=H(e,t,n))?r:(r=O(e,n),r?r:null)}function z(){return se("*[data-mce-caret]")[0]}function U(e){e=se(e),e.attr("data-mce-caret")&&(ie.hide(),e.removeAttr("data-mce-caret"),e.removeAttr("data-mce-bogus"),e.removeAttr("style"),S(k()),T(e[0]))}function W(e){var t,r;return e=i.normalizeRange(1,ee,e),t=n.fromRangeStart(e),x(t.getNode())?R(1,t.getNode(),!t.isAtEnd()):x(t.getNode(!0))?R(1,t.getNode(!0),!1):(r=c.dom.getParent(t.getNode(),f.or(x,C)),x(r)?R(1,r,!1):(ie.hide(),null))}function V(e){var t;return e&&e.collapsed?(t=W(e),t?t:e):e}function $(e){var t,i,o,a;return x(e)?(x(e.previousSibling)&&(o=e.previousSibling),i=re(n.before(e)),i||(t=ne(n.after(e))),t&&w(t.getNode())&&(a=t.getNode()),r.remove(e.previousSibling),r.remove(e.nextSibling),c.dom.remove(e),J(),c.dom.isEmpty(c.getBody())?(c.setContent(""),void c.focus()):o?n.after(o).toRange():a?n.before(a).toRange():i?i.toRange():t?t.toRange():null):null}function q(e,t,n){var r=c.dom,i,o,a,s;if(-1===e){if(N(n)&&y(n.getNode(!0)))return $(n.getNode(!0))}else if(E(t)&&y(t.getNode()))return $(t.getNode());if(s=c.schema.getTextBlockElements(),i=r.getParent(t.getNode(),r.isBlock),o=r.getParent(n.getNode(),r.isBlock),i===o||!s[i.nodeName]||!s[o.nodeName])return null;for(;a=i.firstChild;)o.appendChild(a);return c.dom.remove(i),n.toRange()}function j(e,t,n,i){var o,a,s,l;return!i.collapsed&&(o=_(i),x(o))?V($(o)):(a=L(e,i),n(a)&&r.isCaretContainerBlock(i.startContainer)?(l=-1==e?te.prev(a):te.next(a),l?V(l.toRange()):i):t(a)?V($(a.getNode(-1==e))):(s=-1==e?te.prev(a):te.next(a),t(s)?-1===e?q(e,a,s):q(e,s,a):void 0))}function Y(){function e(e,t){var n=t(k());n&&!e.isDefaultPrevented()&&(e.preventDefault(),S(n))}function r(e){for(var t=c.getBody();e&&e!=t;){if(C(e)||x(e))return e;e=e.parentNode}return null}function i(e,t,n){return n.collapsed?!1:h.reduce(n.getClientRects(),function(n,r){return n||u.containsXY(r,e,t)},!1)}function o(e){var t=!1;e.on("touchstart",function(){t=!1}),e.on("touchmove",function(){t=!0}),e.on("touchend",function(e){var n=r(e.target);x(n)?t||(e.preventDefault(),G(A(n))):J()})}function l(){var e,t=r(c.selection.getNode());C(t)&&y(t)&&c.dom.isEmpty(t)&&(e=c.dom.create("br",{"data-mce-bogus":"1"}),c.$(t).empty().append(e),c.selection.setRng(n.before(e).toRange()))}function f(e){var t=z();if(t)return"compositionstart"==e.type?(e.preventDefault(),e.stopPropagation(),void U(t)):void(" "!=t.innerHTML&&U(t))}function g(e){var t;switch(e.keyCode){case d.DELETE:t=l();break;case d.BACKSPACE:t=l()}t&&e.preventDefault()}var v=b(I,1,ne,E),w=b(I,-1,re,N),_=b(j,1,E,N),T=b(j,-1,N,E),B=b(F,-1,a.upUntil),D=b(F,1,a.downUntil);c.on("mouseup",function(){var e=k();e.collapsed&&S(W(e))}),c.on("click",function(e){var t;t=r(e.target),t&&x(t)&&e.preventDefault()});var L=function(e){var r=new t(e);if(!e.firstChild)return!1;var i=n.before(e.firstChild),o=r.next(i);return o&&!E(o)&&!N(o)},M=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n===r},P=function(e,t){var n=c.dom.getParent(e,c.dom.isBlock),r=c.dom.getParent(t,c.dom.isBlock);return n&&!M(n,r)&&L(n)};o(c),c.on("mousedown",function(e){var t;if(t=r(e.target))x(t)?(e.preventDefault(),G(A(t))):(J(),i(e.clientX,e.clientY,c.selection.getRng())||c.selection.placeCaretAt(e.clientX,e.clientY));else{J(),ie.hide();var n=s.closestCaret(ee,e.clientX,e.clientY);n&&(P(e.target,n.node)||(e.preventDefault(),c.getBody().focus(),S(R(1,n.node,n.before))))}}),c.on("keydown",function(t){if(!d.modifierPressed(t))switch(t.keyCode){case d.RIGHT:e(t,v);break;case d.DOWN:e(t,D);break;case d.LEFT:e(t,w);break;case d.UP:e(t,B);break;case d.DELETE:e(t,_);break;case d.BACKSPACE:e(t,T);break;default:x(c.selection.getNode())&&t.preventDefault()}}),c.on("keyup compositionstart",function(e){f(e),g(e)},!0),c.on("cut",function(){var e=c.selection.getNode();x(e)&&p.setEditorTimeout(c,function(){S(V($(e)))})}),c.on("getSelectionRange",function(e){var t=e.range;if(ae){if(!ae.parentNode)return void(ae=null);t=t.cloneRange(),t.selectNode(ae),e.range=t}}),c.on("setSelectionRange",function(e){var t;t=G(e.range),t&&(e.range=t)}),c.on("focus",function(){p.setEditorTimeout(c,function(){c.selection.setRng(V(c.selection.getRng()))},0)}),m.init(c)}function X(){var e=c.contentStyles,t=".mce-content-body";e.push(ie.getCss()),e.push(t+" .mce-offscreen-selection {position: absolute;left: -9999999999px;width: 100px;height: 100px;}"+t+" *[contentEditable=false] {cursor: default;}"+t+" *[contentEditable=true] {cursor: text;}")}function K(e){return r.isCaretContainer(e.startContainer)||r.isCaretContainer(e.endContainer)}function G(t){var n,r=c.$,i=c.dom,o,a,s,l,u,d,f,h,p;if(!t)return J(),null;if(t.collapsed){if(J(),!K(t)){if(f=L(1,t),x(f.getNode()))return R(1,f.getNode(),!f.isAtEnd());if(x(f.getNode(!0)))return R(1,f.getNode(!0),!1)}return null}return s=t.startContainer,l=t.startOffset,u=t.endOffset,3==s.nodeType&&0==l&&x(s.parentNode)&&(s=s.parentNode,l=i.nodeIndex(s),s=s.parentNode),1!=s.nodeType?(J(),null):(u==l+1&&(n=s.childNodes[l]),x(n)?(h=p=n.cloneNode(!0),d=c.fire("ObjectSelected",{target:n,targetClone:h}),d.isDefaultPrevented()?(J(),null):(h=d.targetClone,o=r("#"+oe),0===o.length&&(o=r('
              ').attr("id",oe),o.appendTo(c.getBody())),t=c.dom.createRng(),h===p&&e.ie?(o.empty().append(g.ZWSP).append(h).append(g.ZWSP),t.setStart(o[0].firstChild,0),t.setEnd(o[0].lastChild,1)):(o.empty().append("\xa0").append(h).append("\xa0"),t.setStart(o[0].firstChild,1),t.setEnd(o[0].lastChild,0)),o.css({top:i.getPos(n,c.getBody()).y}),o[0].focus(),a=c.selection.getSel(),a.removeAllRanges(),a.addRange(t),c.$("*[data-mce-selected]").removeAttr("data-mce-selected"),n.setAttribute("data-mce-selected",1),ae=n,t)):(J(),null))}function J(){ae&&(ae.removeAttribute("data-mce-selected"),c.$("#"+oe).remove(),ae=null)}function Q(){ie.destroy(),ae=null}function Z(){ie.hide()}var ee=c.getBody(),te=new t(ee),ne=b(v,te.next),re=b(v,te.prev),ie=new o(c.getBody(),y),oe="sel-"+c.dom.uniqueId(),ae,se=c.$;return e.ceFalse&&(Y(),X()),{showBlockCaretContainer:U,hideFakeCaret:Z,destroy:Q}}var b=f.curry,C=l.isContentEditableTrue,x=l.isContentEditableFalse,w=l.isElement,N=i.isAfterContentEditableFalse,E=i.isBeforeContentEditableFalse,_=c.getSelectedNode;return y}),r(Ze,[],function(){var e=0,t=function(){var e=function(){return Math.round(4294967295*Math.random()).toString(36)},t=(new Date).getTime();return"s"+t.toString(36)+e()+e()+e()},n=function(n){return n+e++ +t()};return{uuid:n}}),r(et,[w,g,E,R,A,H,P,Y,J,Q,Z,ee,oe,ae,N,f,Ae,Pe,B,L,Oe,d,m,u,Ie,Fe,ze,je,Qe,Ze],function(e,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E,_,S,k,T,R,A){function B(e,t,i){var o=this,a,s,l;a=o.documentBaseUrl=i.documentBaseURL,s=i.baseURI,l=i.defaultSettings,t=P({id:e,theme:"modern",delta_width:0,delta_height:0,popup_css:"",plugins:"",document_base_url:a,add_form_submit_trigger:!0,submit_patch:!0,add_unload_trigger:!0,convert_urls:!0,relative_urls:!0,remove_script_host:!0,object_resizing:!0,doctype:"",visual:!0,font_size_style_values:"xx-small,x-small,small,medium,large,x-large,xx-large",font_size_legacy_values:"xx-small,small,medium,large,x-large,xx-large,300%",forced_root_block:"p",hidden_input:!0,padd_empty_editor:!0,render_ui:!0,indentation:"30px",inline_styles:!0,convert_fonts_to_spans:!0,indent:"simple",indent_before:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",indent_after:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,tfoot,tbody,tr,section,article,hgroup,aside,figure,figcaption,option,optgroup,datalist",validate:!0,entity_encoding:"named",url_converter:o.convertURL,url_converter_scope:o,ie7_compat:!0},l,t),l&&l.external_plugins&&t.external_plugins&&(t.external_plugins=P({},l.external_plugins,t.external_plugins)),o.settings=t,r.language=t.language||"en",r.languageLoad=t.language_load,r.baseURL=i.baseURL,o.id=t.id=e,o.setDirty(!1),o.plugins={},o.documentBaseURI=new p(t.document_base_url||a,{base_uri:s}),o.baseURI=s,o.contentCSS=[],o.contentStyles=[],o.shortcuts=new k(o),o.loadedCSS={},o.editorCommands=new h(o),t.target&&(o.targetElm=t.target),o.suffix=i.suffix,o.editorManager=i,o.inline=t.inline,o.settings.content_editable=o.inline,t.cache_suffix&&(w.cacheSuffix=t.cache_suffix.replace(/^[\?\&]+/,"")),t.override_viewport===!1&&(w.overrideViewPort=!1),i.fire("SetupEditor",o),o.execCallback("setup",o),o.$=n.overrideDefaults(function(){return{context:o.inline?o.getBody():o.getDoc(),element:o.getBody()}})}var D=e.DOM,L=r.ThemeManager,M=r.PluginManager,P=N.extend,H=N.each,O=N.explode,I=N.inArray,F=N.trim,z=N.resolve,U=g.Event,W=w.gecko,V=w.ie;return B.prototype={render:function(){function e(){D.unbind(window,"ready",e),n.render()}function t(){var e=m.ScriptLoader;if(r.language&&"en"!=r.language&&!r.language_url&&(r.language_url=n.editorManager.baseURL+"/langs/"+r.language+".js"),r.language_url&&e.add(r.language_url),r.theme&&"function"!=typeof r.theme&&"-"!=r.theme.charAt(0)&&!L.urls[r.theme]){var t=r.theme_url;t=t?n.documentBaseURI.toAbsolute(t):"themes/"+r.theme+"/theme"+o+".js",L.load(r.theme,t)}N.isArray(r.plugins)&&(r.plugins=r.plugins.join(" ")),H(r.external_plugins,function(e,t){M.load(t,e),r.plugins+=" "+t}),H(r.plugins.split(/[ ,]/),function(e){if(e=F(e),e&&!M.urls[e])if("-"==e.charAt(0)){e=e.substr(1,e.length);var t=M.dependencies(e);H(t,function(e){var t={prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"};e=M.createUrl(t,e),M.load(e.resource,e)})}else M.load(e,{prefix:"plugins/",resource:e,suffix:"/plugin"+o+".js"})}),e.loadQueue(function(){n.removed||n.init()})}var n=this,r=n.settings,i=n.id,o=n.suffix;if(!U.domLoaded)return void D.bind(window,"ready",e);if(n.getElement()&&w.contentEditable){r.inline?n.inline=!0:(n.orgVisibility=n.getElement().style.visibility,n.getElement().style.visibility="hidden");var a=n.getElement().form||D.getParent(i,"form");a&&(n.formElement=a,r.hidden_input&&!/TEXTAREA|INPUT/i.test(n.getElement().nodeName)&&(D.insertAfter(D.create("input",{type:"hidden",name:i}),i),n.hasHiddenInput=!0),n.formEventDelegate=function(e){n.fire(e.type,e)},D.bind(a,"submit reset",n.formEventDelegate),n.on("reset",function(){n.setContent(n.startContent,{format:"raw"})}),!r.submit_patch||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=function(){return n.editorManager.triggerSave(),n.setDirty(!1),a._mceOldSubmit(a)})),n.windowManager=new v(n),n.notificationManager=new y(n),"xml"==r.encoding&&n.on("GetContent",function(e){e.save&&(e.content=D.encode(e.content))}),r.add_form_submit_trigger&&n.on("submit",function(){n.initialized&&n.save()}),r.add_unload_trigger&&(n._beforeUnload=function(){!n.initialized||n.destroyed||n.isHidden()||n.save({format:"raw",no_events:!0,set_dirty:!1})},n.editorManager.on("BeforeUnload",n._beforeUnload)),n.editorManager.add(n),t()}},init:function(){function e(n){var r=M.get(n),i,o;if(i=M.urls[n]||t.documentBaseUrl.replace(/\/$/,""),n=F(n),r&&-1===I(m,n)){if(H(M.dependencies(n),function(t){e(t)}),t.plugins[n])return;o=new r(t,i,t.$),t.plugins[n]=o,o.init&&(o.init(t,i),m.push(n))}}var t=this,n=t.settings,r=t.getElement(),i,o,a,s,l,c,u,d,f,h,p,m=[];if(this.editorManager.i18n.setCode(n.language),t.rtl=n.rtl_ui||this.editorManager.i18n.rtl,n.aria_label=n.aria_label||D.getAttrib(r,"aria-label",t.getLang("aria.rich_text_area")),n.theme&&("function"!=typeof n.theme?(n.theme=n.theme.replace(/-/,""),c=L.get(n.theme),t.theme=new c(t,L.urls[n.theme]),t.theme.init&&t.theme.init(t,L.urls[n.theme]||t.documentBaseUrl.replace(/\/$/,""),t.$)):t.theme=n.theme),H(n.plugins.replace(/\-/g,"").split(/[ ,]/),e),n.render_ui&&t.theme&&(t.orgDisplay=r.style.display,"function"!=typeof n.theme?(i=n.width||r.style.width||r.offsetWidth,o=n.height||r.style.height||r.offsetHeight,a=n.min_height||100,h=/^[0-9\.]+(|px)$/i,h.test(""+i)&&(i=Math.max(parseInt(i,10),100)),h.test(""+o)&&(o=Math.max(parseInt(o,10),a)),l=t.theme.renderUI({targetNode:r,width:i,height:o,deltaWidth:n.delta_width,deltaHeight:n.delta_height}),n.content_editable||(o=(l.iframeHeight||o)+("number"==typeof o?l.deltaHeight||0:""),a>o&&(o=a))):(l=n.theme(t,r),l.editorContainer.nodeType&&(l.editorContainer=l.editorContainer.id=l.editorContainer.id||t.id+"_parent"),l.iframeContainer.nodeType&&(l.iframeContainer=l.iframeContainer.id=l.iframeContainer.id||t.id+"_iframecontainer"),o=l.iframeHeight||r.offsetHeight),t.editorContainer=l.editorContainer),n.content_css&&H(O(n.content_css),function(e){t.contentCSS.push(t.documentBaseURI.toAbsolute(e))}),n.content_style&&t.contentStyles.push(n.content_style),n.content_editable)return r=s=l=null,t.initContentBody();if(t.iframeHTML=n.doctype+"",n.document_base_url!=t.documentBaseUrl&&(t.iframeHTML+=''),!w.caretAfter&&n.ie7_compat&&(t.iframeHTML+=''),t.iframeHTML+='',!/#$/.test(document.location.href))for(p=0;p',t.loadedCSS[g]=!0}d=n.body_id||"tinymce",-1!=d.indexOf("=")&&(d=t.getParam("body_id","","hash"),d=d[t.id]||d),f=n.body_class||"",-1!=f.indexOf("=")&&(f=t.getParam("body_class","","hash"),f=f[t.id]||""),n.content_security_policy&&(t.iframeHTML+=''),t.iframeHTML+='
              ';var v='javascript:(function(){document.open();document.domain="'+document.domain+'";var ed = window.parent.tinymce.get("'+t.id+'");document.write(ed.iframeHTML);document.close();ed.initContentBody(true);})()';document.domain!=location.hostname&&w.ie&&w.ie<12&&(u=v);var y=D.create("iframe",{id:t.id+"_ifr",frameBorder:"0",allowTransparency:"true",title:t.editorManager.translate("Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help"),style:{width:"100%",height:o,display:"block"}});if(y.onload=function(){y.onload=null,t.fire("load")},D.setAttrib(y,"src",u||'javascript:""'),t.contentAreaContainer=l.iframeContainer,t.iframeElement=y,s=D.add(l.iframeContainer,y),V)try{t.getDoc()}catch(b){s.src=u=v}l.editorContainer&&(D.get(l.editorContainer).style.display=t.orgDisplay,t.hidden=D.isHidden(l.editorContainer)),t.getElement().style.display="none",D.setAttrib(t.id,"aria-hidden",!0),u||t.initContentBody(),r=s=l=null},initContentBody:function(t){var n=this,r=n.settings,s=n.getElement(),h=n.getDoc(),p,m;r.inline||(n.getElement().style.visibility=n.orgVisibility),t||r.content_editable||(h.open(),h.write(n.iframeHTML),h.close()),r.content_editable&&(n.on("remove",function(){var e=this.getBody();D.removeClass(e,"mce-content-body"),D.removeClass(e,"mce-edit-focus"),D.setAttrib(e,"contentEditable",null)}),D.addClass(s,"mce-content-body"),n.contentDocument=h=r.content_document||document,n.contentWindow=r.content_window||window,n.bodyElement=s,r.content_document=r.content_window=null,r.root_name=s.nodeName.toLowerCase()),p=n.getBody(),p.disabled=!0,n.readonly=r.readonly,n.readonly||(n.inline&&"static"==D.getStyle(p,"position",!0)&&(p.style.position="relative"),p.contentEditable=n.getParam("content_editable_state",!0)),p.disabled=!1,n.editorUpload=new T(n),n.schema=new b(r),n.dom=new e(h,{keep_values:!0,url_converter:n.convertURL,url_converter_scope:n,hex_colors:r.force_hex_style_colors,class_filter:r.class_filter,update_styles:!0,root_element:n.inline?n.getBody():null,collect:r.content_editable,schema:n.schema,onSetAttrib:function(e){n.fire("SetAttrib",e)}}),n.parser=new C(r,n.schema),n.parser.addAttributeFilter("src,href,style,tabindex",function(e,t){for(var r=e.length,i,o=n.dom,a,s;r--;)if(i=e[r],a=i.attr(t),s="data-mce-"+t,!i.attributes.map[s]){if(0===a.indexOf("data:")||0===a.indexOf("blob:"))continue;"style"===t?(a=o.serializeStyle(o.parseStyle(a),i.name),a.length||(a=null),i.attr(s,a),i.attr(t,a)):"tabindex"===t?(i.attr(s,a),i.attr(t,null)):i.attr(s,n.convertURL(a,t,i.name))}}),n.parser.addNodeFilter("script",function(e){for(var t=e.length,n,r;t--;)n=e[t],r=n.attr("type")||"no/type",0!==r.indexOf("mce-")&&n.attr("type","mce-"+r)}),n.parser.addNodeFilter("#cdata",function(e){for(var t=e.length,n;t--;)n=e[t],n.type=8,n.name="#comment",n.value="[CDATA["+n.value+"]]"}),n.parser.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",function(e){for(var t=e.length,r,i=n.schema.getNonEmptyElements();t--;)r=e[t],r.isEmpty(i)&&(r.append(new o("br",1)).shortEnded=!0)}),n.serializer=new a(r,n),n.selection=new l(n.dom,n.getWin(),n.serializer,n),n.formatter=new c(n),n.undoManager=new u(n),n.forceBlocks=new f(n),n.enterKey=new d(n),n._nodeChangeDispatcher=new i(n),n._selectionOverrides=new R(n),n.fire("PreInit"),r.browser_spellcheck||r.gecko_spellcheck||(h.body.spellcheck=!1,D.setAttrib(p,"spellcheck","false")),n.quirks=new x(n),n.fire("PostRender"),r.directionality&&(p.dir=r.directionality),r.nowrap&&(p.style.whiteSpace="nowrap"),r.protect&&n.on("BeforeSetContent",function(e){H(r.protect,function(t){e.content=e.content.replace(t,function(e){return""})})}),n.on("SetContent",function(){n.addVisual(n.getBody())}),r.padd_empty_editor&&n.on("PostProcess",function(e){e.content=e.content.replace(/^(]*>( | |\s|\u00a0|)<\/p>[\r\n]*|
              [\r\n]*)$/,"")}),n.load({initial:!0,format:"html"}),n.startContent=n.getContent({format:"raw"}),n.initialized=!0,n.bindPendingEventDelegates(),n.fire("init"),n.focus(!0),n.nodeChanged({initial:!0}),n.execCallback("init_instance_callback",n),n.on("compositionstart compositionend",function(e){n.composing="compositionstart"===e.type}),n.contentStyles.length>0&&(m="",H(n.contentStyles,function(e){m+=e+"\r\n"}),n.dom.addStyle(m)),H(n.contentCSS,function(e){n.loadedCSS[e]||(n.dom.loadCSS(e),n.loadedCSS[e]=!0)}),r.auto_focus&&E.setEditorTimeout(n,function(){var e;e=r.auto_focus===!0?n:n.editorManager.get(r.auto_focus),e.destroyed||e.focus()},100),s=h=p=null},focus:function(e){function t(e){return n.dom.getParent(e,function(e){return"true"===n.dom.getContentEditable(e)})}var n=this,r=n.selection,i=n.settings.content_editable,o,a,s=n.getDoc(),l=n.getBody(),c;if(!e){if(o=r.getRng(),o.item&&(a=o.item(0)),n.quirks.refreshContentEditable(),c=t(r.getNode()),n.$.contains(l,c))return c.focus(),r.normalize(),void n.editorManager.setActive(n);if(i||(w.opera||n.getBody().focus(),n.getWin().focus()),W||i){if(l.setActive)try{l.setActive()}catch(u){l.focus()}else l.focus();i&&r.normalize()}a&&a.ownerDocument==s&&(o=s.body.createControlRange(),o.addElement(a),o.select())}n.editorManager.setActive(n)},execCallback:function(e){var t=this,n=t.settings[e],r;if(n)return t.callbackLookup&&(r=t.callbackLookup[e])&&(n=r.func,r=r.scope),"string"==typeof n&&(r=n.replace(/\.\w+$/,""),r=r?z(r):0,n=z(n),t.callbackLookup=t.callbackLookup||{},t.callbackLookup[e]={func:n,scope:r}),n.apply(r||t,Array.prototype.slice.call(arguments,1))},translate:function(e){var t=this.settings.language||"en",n=this.editorManager.i18n;return e?(e=n.data[t+"."+e]||e.replace(/\{\#([^\}]+)\}/g,function(e,r){return n.data[t+"."+r]||"{#"+r+"}"}),this.editorManager.translate(e)):""},getLang:function(e,n){return this.editorManager.i18n.data[(this.settings.language||"en")+"."+e]||(n!==t?n:"{#"+e+"}")},getParam:function(e,t,n){var r=e in this.settings?this.settings[e]:t,i;return"hash"===n?(i={},"string"==typeof r?H(r.indexOf("=")>0?r.split(/[;,](?![^=;,]*(?:[;,]|$))/):r.split(","),function(e){e=e.split("="),e.length>1?i[F(e[0])]=F(e[1]):i[F(e[0])]=F(e)}):i=r,i):r},nodeChanged:function(e){this._nodeChangeDispatcher.nodeChanged(e)},addButton:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),t.text||t.icon||(t.icon=e),n.buttons=n.buttons||{},t.tooltip=t.tooltip||t.title,n.buttons[e]=t},addMenuItem:function(e,t){var n=this;t.cmd&&(t.onclick=function(){n.execCommand(t.cmd)}),n.menuItems=n.menuItems||{},n.menuItems[e]=t},addContextToolbar:function(e,t){var n=this,r;n.contextToolbars=n.contextToolbars||[],"string"==typeof e&&(r=e,e=function(e){return n.dom.is(e,r)}),n.contextToolbars.push({id:A.uuid("mcet"),predicate:e,items:t})},addCommand:function(e,t,n){this.editorCommands.addCommand(e,t,n)},addQueryStateHandler:function(e,t,n){this.editorCommands.addQueryStateHandler(e,t,n)},addQueryValueHandler:function(e,t,n){this.editorCommands.addQueryValueHandler(e,t,n)},addShortcut:function(e,t,n,r){this.shortcuts.add(e,t,n,r)},execCommand:function(e,t,n,r){return this.editorCommands.execCommand(e,t,n,r)},queryCommandState:function(e){return this.editorCommands.queryCommandState(e)},queryCommandValue:function(e){return this.editorCommands.queryCommandValue(e)},queryCommandSupported:function(e){return this.editorCommands.queryCommandSupported(e)},show:function(){var e=this;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable=!0:(D.show(e.getContainer()),D.hide(e.id)),e.load(),e.fire("show"))},hide:function(){var e=this,t=e.getDoc();e.hidden||(V&&t&&!e.inline&&t.execCommand("SelectAll"),e.save(),e.inline?(e.getBody().contentEditable=!1,e==e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(D.hide(e.getContainer()),D.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.fire("hide"))},isHidden:function(){return!!this.hidden},setProgressState:function(e,t){this.fire("ProgressState",{state:e,time:t})},load:function(e){var n=this,r=n.getElement(),i;return r?(e=e||{},e.load=!0,i=n.setContent(r.value!==t?r.value:r.innerHTML,e),e.element=r,e.no_events||n.fire("LoadContent",e),e.element=r=null,i):void 0},save:function(e){var t=this,n=t.getElement(),r,i;if(n&&t.initialized)return e=e||{},e.save=!0,e.element=n,r=e.content=t.getContent(e),e.no_events||t.fire("SaveContent",e),"raw"==e.format&&t.fire("RawSaveContent",e),r=e.content,/TEXTAREA|INPUT/i.test(n.nodeName)?n.value=r:(t.inline||(n.innerHTML=r),(i=D.getParent(t.id,"form"))&&H(i.elements,function(e){return e.name==t.id?(e.value=r,!1):void 0})),e.element=n=null,e.set_dirty!==!1&&t.setDirty(!1),r},setContent:function(e,t){var n=this,r=n.getBody(),i,o;return t=t||{},t.format=t.format||"html",t.set=!0,t.content=e,t.no_events||n.fire("BeforeSetContent",t),e=t.content,0===e.length||/^\s+$/.test(e)?(o=V&&11>V?"":'
              ',"TABLE"==r.nodeName?e=""+o+"":/^(UL|OL)$/.test(r.nodeName)&&(e="
            • "+o+"
            • "),i=n.settings.forced_root_block,i&&n.schema.isValidChild(r.nodeName.toLowerCase(),i.toLowerCase())?(e=o,e=n.dom.createHTML(i,n.settings.forced_root_block_attrs,e)):V||e||(e='
              '),n.dom.setHTML(r,e),n.fire("SetContent",t)):("raw"!==t.format&&(e=new s({validate:n.validate},n.schema).serialize(n.parser.parse(e,{isRootContent:!0}))),t.content=F(e),n.dom.setHTML(r,t.content),t.no_events||n.fire("SetContent",t)),t.content},getContent:function(e){var t=this,n,r=t.getBody();return e=e||{},e.format=e.format||"html",e.get=!0,e.getInner=!0,e.no_events||t.fire("BeforeGetContent",e),n="raw"==e.format?t.serializer.getTrimmedContent():"text"==e.format?r.innerText||r.textContent:t.serializer.serialize(r,e),"text"!=e.format?e.content=F(n):e.content=n,e.no_events||t.fire("GetContent",e),e.content},insertContent:function(e,t){t&&(e=P({content:e},t)),this.execCommand("mceInsertContent",!1,e)},isDirty:function(){return!this.isNotDirty},setDirty:function(e){var t=!this.isNotDirty;this.isNotDirty=!e,e&&e!=t&&this.fire("dirty")},setMode:function(e){S.setMode(this,e)},getContainer:function(){var e=this;return e.container||(e.container=D.get(e.editorContainer||e.id+"_parent")),e.container},getContentAreaContainer:function(){return this.contentAreaContainer},getElement:function(){return this.targetElm||(this.targetElm=D.get(this.id)),this.targetElm},getWin:function(){var e=this,t;return e.contentWindow||(t=e.iframeElement,t&&(e.contentWindow=t.contentWindow)),e.contentWindow},getDoc:function(){var e=this,t;return e.contentDocument||(t=e.getWin(),t&&(e.contentDocument=t.document)),e.contentDocument},getBody:function(){return this.bodyElement||this.getDoc().body},convertURL:function(e,t,n){var r=this,i=r.settings;return i.urlconverter_callback?r.execCallback("urlconverter_callback",e,n,!0,t):!i.convert_urls||n&&"LINK"==n.nodeName||0===e.indexOf("file:")||0===e.length?e:i.relative_urls?r.documentBaseURI.toRelative(e):e=r.documentBaseURI.toAbsolute(e,i.remove_script_host)},addVisual:function(e){var n=this,r=n.settings,i=n.dom,o;e=e||n.getBody(),n.hasVisual===t&&(n.hasVisual=r.visual),H(i.select("table,a",e),function(e){var t;switch(e.nodeName){case"TABLE":return o=r.visual_table_class||"mce-item-table",t=i.getAttrib(e,"border"),void(t&&"0"!=t||!n.hasVisual?i.removeClass(e,o):i.addClass(e,o));case"A":return void(i.getAttrib(e,"href",!1)||(t=i.getAttrib(e,"name")||e.id,o=r.visual_anchor_class||"mce-item-anchor",t&&n.hasVisual?i.addClass(e,o):i.removeClass(e,o)))}}),n.fire("VisualAid",{element:e,hasVisual:n.hasVisual})},remove:function(){var e=this;e.removed||(e.save(),e.removed=1,e.unbindAllNativeEvents(),e.hasHiddenInput&&D.remove(e.getElement().nextSibling),e.inline||(V&&10>V&&e.getDoc().execCommand("SelectAll",!1,null),D.setStyle(e.id,"display",e.orgDisplay),e.getBody().onload=null),e.fire("remove"),e.editorManager.remove(e),D.remove(e.getContainer()),e._selectionOverrides.destroy(),e.editorUpload.destroy(),e.destroy())},destroy:function(e){var t=this,n;if(!t.destroyed){if(!e&&!t.removed)return void t.remove();e||(t.editorManager.off("beforeunload",t._beforeUnload),t.theme&&t.theme.destroy&&t.theme.destroy(),t.selection.destroy(),t.dom.destroy()),n=t.formElement,n&&(n._mceOldSubmit&&(n.submit=n._mceOldSubmit,n._mceOldSubmit=null),D.unbind(n,"submit reset",t.formEventDelegate)),t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null,t.selection&&(t.selection=t.selection.win=t.selection.dom=t.selection.dom.doc=null),t.destroyed=1}},uploadImages:function(e){return this.editorUpload.uploadImages(e)},_scanForImages:function(){return this.editorUpload.scanForImages()}},P(B.prototype,_),B}),r(tt,[],function(){var e={},t="en";return{setCode:function(e){e&&(t=e,this.rtl=this.data[e]?"rtl"===this.data[e]._dir:!1)},getCode:function(){return t},rtl:!1,add:function(t,n){var r=e[t];r||(e[t]=r={});for(var i in n)r[i]=n[i];this.setCode(t)},translate:function(n){var r;if(r=e[t],r||(r={}),"undefined"==typeof n)return n;if("string"!=typeof n&&n.raw)return n.raw;if(n.push){var i=n.slice(1);n=(r[n[0]]||n[0]).replace(/\{([0-9]+)\}/g,function(e,t){return i[t]})}return(r[n]||n).replace(/{context:\w+}$/,"")},data:e}}),r(nt,[w,u,d],function(e,t,n){function r(e){function l(){try{return document.activeElement}catch(e){return document.body}}function c(e,t){if(t&&t.startContainer){if(!e.isChildOf(t.startContainer,e.getRoot())||!e.isChildOf(t.endContainer,e.getRoot()))return;return{startContainer:t.startContainer,startOffset:t.startOffset,endContainer:t.endContainer,endOffset:t.endOffset}}return t}function u(e,t){var n;return t.startContainer?(n=e.getDoc().createRange(),n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset)):n=t,n}function d(e){return!!s.getParent(e,r.isEditorUIElement)}function f(r){var f=r.editor;f.on("init",function(){(f.inline||n.ie)&&("onbeforedeactivate"in document&&n.ie<9?f.dom.bind(f.getBody(),"beforedeactivate",function(e){if(e.target==f.getBody())try{f.lastRng=f.selection.getRng()}catch(t){}}):f.on("nodechange mouseup keyup",function(e){var t=l();"nodechange"==e.type&&e.selectionChange||(t&&t.id==f.id+"_ifr"&&(t=f.getBody()),f.dom.isChildOf(t,f.getBody())&&(f.lastRng=f.selection.getRng()))}),n.webkit&&!i&&(i=function(){var t=e.activeEditor;if(t&&t.selection){var n=t.selection.getRng();n&&!n.collapsed&&(f.lastRng=n)}},s.bind(document,"selectionchange",i)))}),f.on("setcontent",function(){f.lastRng=null}),f.on("mousedown",function(){f.selection.lastFocusBookmark=null}),f.on("focusin",function(){var t=e.focusedEditor,n;f.selection.lastFocusBookmark&&(n=u(f,f.selection.lastFocusBookmark),f.selection.lastFocusBookmark=null,f.selection.setRng(n)),t!=f&&(t&&t.fire("blur",{focusedEditor:f}),e.setActive(f),e.focusedEditor=f,f.fire("focus",{blurredEditor:t}),f.focus(!0)),f.lastRng=null}),f.on("focusout",function(){t.setEditorTimeout(f,function(){var t=e.focusedEditor;d(l())||t!=f||(f.fire("blur",{focusedEditor:null}),e.focusedEditor=null,f.selection&&(f.selection.lastFocusBookmark=null))})}),o||(o=function(t){var n=e.activeEditor,r;r=t.target,n&&r.ownerDocument==document&&(n.selection&&r!=n.getBody()&&(n.selection.lastFocusBookmark=c(n.dom,n.lastRng)),r==document.body||d(r)||e.focusedEditor!=n||(n.fire("blur",{focusedEditor:null}),e.focusedEditor=null))},s.bind(document,"focusin",o)),f.inline&&!a&&(a=function(t){var n=e.activeEditor,r=n.dom;if(n.inline&&r&&!r.isChildOf(t.target,n.getBody())){var i=n.selection.getRng();i.collapsed||(n.lastRng=i)}},s.bind(document,"mouseup",a))}function h(t){e.focusedEditor==t.editor&&(e.focusedEditor=null),e.activeEditor||(s.unbind(document,"selectionchange",i), +s.unbind(document,"focusin",o),s.unbind(document,"mouseup",a),i=o=a=null)}e.on("AddEditor",f),e.on("RemoveEditor",h)}var i,o,a,s=e.DOM;return r.isEditorUIElement=function(e){return-1!==e.className.toString().indexOf("mce-")},r}),r(rt,[et,g,w,ae,d,m,c,ue,tt,nt],function(e,t,n,r,i,o,a,s,l,c){function u(e){g(C.editors,function(t){"scroll"===e.type?t.fire("ScrollWindow",e):t.fire("ResizeWindow",e)})}function d(e,n){n!==x&&(n?t(window).on("resize scroll",u):t(window).off("resize scroll",u),x=n)}function f(e){var t=C.editors,n;delete t[e.id];for(var r=0;r0&&g(m(t),function(e){var t;(t=p.get(e))?n.push(t):g(document.forms,function(t){g(t.elements,function(t){t.name===e&&(e="mce_editor_"+y++,p.setAttrib(t,"id",e),n.push(t))})})});break;case"textareas":case"specific_textareas":g(p.select("textarea"),function(t){e.editor_deselector&&c(t,e.editor_deselector)||e.editor_selector&&!c(t,e.editor_selector)||n.push(t)})}return n}function d(){function a(t,n,r){var i=new e(t,n,f);m.push(i),i.on("init",function(){++c===y.length&&x(m)}),i.targetElm=i.targetElm||r,i.render()}var c=0,m=[],y;return p.unbind(window,"ready",d),l("onpageload"),y=t.unique(u(n)),n.types?void g(n.types,function(e){o.each(y,function(t){return p.is(t,e.selector)?(a(s(t),v({},n,e),t),!1):!0})}):(o.each(y,function(e){h(f.get(e.id))}),y=o.grep(y,function(e){return!f.get(e.id)}),void g(y,function(e){r(n,e)?i("Could not initialize inline editor on invalid inline target element",e):a(s(e),n,e)}))}var f=this,b,C;C=o.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track colgroup option tbody tfoot thead tr script noscript style textarea video audio iframe object menu"," ");var x=function(e){b=e};return f.settings=n,p.bind(window,"ready",d),new a(function(e){b?e(b):x=function(t){e(t)}})},get:function(e){return arguments.length?e in this.editors?this.editors[e]:null:this.editors},add:function(e){var t=this,n=t.editors;return n[e.id]=e,n.push(e),d(n,!0),t.activeEditor=e,t.fire("AddEditor",{editor:e}),b||(b=function(){t.fire("BeforeUnload")},p.bind(window,"beforeunload",b)),e},createEditor:function(t,n){return this.add(new e(t,n,this))},remove:function(e){var t=this,n,r=t.editors,i;{if(e)return"string"==typeof e?(e=e.selector||e,void g(p.select(e),function(e){i=r[e.id],i&&t.remove(i)})):(i=e,r[i.id]?(f(i)&&t.fire("RemoveEditor",{editor:i}),r.length||p.unbind(window,"beforeunload",b),i.remove(),d(r,r.length>0),i):null);for(n=r.length-1;n>=0;n--)t.remove(r[n])}},execCommand:function(t,n,r){var i=this,o=i.get(r);switch(t){case"mceAddEditor":return i.get(r)||new e(r,i.settings,i).render(),!0;case"mceRemoveEditor":return o&&o.remove(),!0;case"mceToggleEditor":return o?(o.isHidden()?o.show():o.hide(),!0):(i.execCommand("mceAddEditor",0,r),!0)}return i.activeEditor?i.activeEditor.execCommand(t,n,r):!1},triggerSave:function(){g(this.editors,function(e){e.save()})},addI18n:function(e,t){l.add(e,t)},translate:function(e){return l.translate(e)},setActive:function(e){var t=this.activeEditor;this.activeEditor!=e&&(t&&t.fire("deactivate",{relatedTarget:e}),e.fire("activate",{relatedTarget:t})),this.activeEditor=e}},v(C,s),C.setup(),window.tinymce=window.tinyMCE=C,C}),r(it,[rt,m],function(e,t){var n=t.each,r=t.explode;e.on("AddEditor",function(e){var t=e.editor;t.on("preInit",function(){function e(e,t){n(t,function(t,n){t&&s.setStyle(e,n,t)}),s.rename(e,"span")}function i(e){s=t.dom,l.convert_fonts_to_spans&&n(s.select("font,u,strike",e.node),function(e){o[e.nodeName.toLowerCase()](s,e)})}var o,a,s,l=t.settings;l.inline_styles&&(a=r(l.font_size_legacy_values),o={font:function(t,n){e(n,{backgroundColor:n.style.backgroundColor,color:n.color,fontFamily:n.face,fontSize:a[parseInt(n.size,10)-1]})},u:function(n,r){"html4"===t.settings.schema&&e(r,{textDecoration:"underline"})},strike:function(t,n){e(n,{textDecoration:"line-through"})}},t.on("PreProcess SetContent",i))})})}),r(ot,[ue,m],function(e,t){var n={send:function(e){function r(){!e.async||4==i.readyState||o++>1e4?(e.success&&1e4>o&&200==i.status?e.success.call(e.success_scope,""+i.responseText,i,e):e.error&&e.error.call(e.error_scope,o>1e4?"TIMED_OUT":"GENERAL",i,e),i=null):setTimeout(r,10)}var i,o=0;if(e.scope=e.scope||this,e.success_scope=e.success_scope||e.scope,e.error_scope=e.error_scope||e.scope,e.async=e.async!==!1,e.data=e.data||"",n.fire("beforeInitialize",{settings:e}),i=new XMLHttpRequest){if(i.overrideMimeType&&i.overrideMimeType(e.content_type),i.open(e.type||(e.data?"POST":"GET"),e.url,e.async),e.crossDomain&&(i.withCredentials=!0),e.content_type&&i.setRequestHeader("Content-Type",e.content_type),e.requestheaders&&t.each(e.requestheaders,function(e){i.setRequestHeader(e.key,e.value)}),i.setRequestHeader("X-Requested-With","XMLHttpRequest"),i=n.fire("beforeSend",{xhr:i,settings:e}).xhr,i.send(e.data),!e.async)return r();setTimeout(r,10)}}};return t.extend(n,e),n}),r(at,[],function(){function e(t,n){var r,i,o,a;if(n=n||'"',null===t)return"null";if(o=typeof t,"string"==o)return i="\bb t\nn\ff\rr\"\"''\\\\",n+t.replace(/([\u0080-\uFFFF\x00-\x1f\"\'\\])/g,function(e,t){return'"'===n&&"'"===e?e:(r=i.indexOf(t),r+1?"\\"+i.charAt(r+1):(e=t.charCodeAt().toString(16),"\\u"+"0000".substring(e.length)+e))})+n;if("object"==o){if(t.hasOwnProperty&&"[object Array]"===Object.prototype.toString.call(t)){for(r=0,i="[";r0?",":"")+e(t[r],n);return i+"]"}i="{";for(a in t)t.hasOwnProperty(a)&&(i+="function"!=typeof t[a]?(i.length>1?","+n:n)+a+n+":"+e(t[a],n):"");return i+"}"}return""+t}return{serialize:e,parse:function(e){try{return window[String.fromCharCode(101)+"val"]("("+e+")")}catch(t){}}}}),r(st,[at,ot,m],function(e,t,n){function r(e){this.settings=i({},e),this.count=0}var i=n.extend;return r.sendRPC=function(e){return(new r).send(e)},r.prototype={send:function(n){var r=n.error,o=n.success;n=i(this.settings,n),n.success=function(t,i){t=e.parse(t),"undefined"==typeof t&&(t={error:"JSON Parse error."}),t.error?r.call(n.error_scope||n.scope,t.error,i):o.call(n.success_scope||n.scope,t.result)},n.error=function(e,t){r&&r.call(n.error_scope||n.scope,e,t)},n.data=e.serialize({id:n.id||"c"+this.count++,method:n.method,params:n.params}),n.content_type="application/json",t.send(n)}},r}),r(lt,[w],function(e){return{callbacks:{},count:0,send:function(n){var r=this,i=e.DOM,o=n.count!==t?n.count:r.count,a="tinymce_jsonp_"+o;r.callbacks[o]=function(e){i.remove(a),delete r.callbacks[o],n.callback(e)},i.add(i.doc.body,"script",{id:a,src:n.url,type:"text/javascript"}),r.count++}}}),r(ct,[],function(){function e(){s=[];for(var e in a)s.push(e);i.length=s.length}function n(){function n(e){var n,r;return r=e!==t?u+e:i.indexOf(",",u),-1===r||r>i.length?null:(n=i.substring(u,r),u=r+1,n)}var r,i,s,u=0;if(a={},c){o.load(l),i=o.getAttribute(l)||"";do{var d=n();if(null===d)break;if(r=n(parseInt(d,32)||0),null!==r){if(d=n(),null===d)break;s=n(parseInt(d,32)||0),r&&(a[r]=s)}}while(null!==r);e()}}function r(){var t,n="";if(c){for(var r in a)t=a[r],n+=(n?",":"")+r.length.toString(32)+","+r+","+t.length.toString(32)+","+t;o.setAttribute(l,n);try{o.save(l)}catch(i){}e()}}var i,o,a,s,l,c;try{if(window.localStorage)return localStorage}catch(u){}return l="tinymce",o=document.documentElement,c=!!o.addBehavior,c&&o.addBehavior("#default#userData"),i={key:function(e){return s[e]},getItem:function(e){return e in a?a[e]:null},setItem:function(e,t){a[e]=""+t,r()},removeItem:function(e){delete a[e],r()},clear:function(){a={},r()}},n(),i}),r(ut,[w,f,N,E,m,d],function(e,t,n,r,i,o){var a=window.tinymce;return a.DOM=e.DOM,a.ScriptLoader=n.ScriptLoader,a.PluginManager=r.PluginManager,a.ThemeManager=r.ThemeManager,a.dom=a.dom||{},a.dom.Event=t.Event,i.each(i,function(e,t){a[t]=e}),i.each("isOpera isWebKit isIE isGecko isMac".split(" "),function(e){a[e]=o[e.substr(2).toLowerCase()]}),{}}),r(dt,[se,m],function(e,t){return e.extend({Defaults:{firstControlClass:"first",lastControlClass:"last"},init:function(e){this.settings=t.extend({},this.Defaults,e)},preRender:function(e){e.bodyClasses.add(this.settings.containerClass)},applyClasses:function(e){var t=this,n=t.settings,r,i,o,a;r=n.firstControlClass,i=n.lastControlClass,e.each(function(e){e.classes.remove(r).remove(i).add(n.controlClass),e.visible()&&(o||(o=e),a=e)}),o&&o.classes.add(r),a&&a.classes.add(i)},renderHtml:function(e){var t=this,n="";return t.applyClasses(e.items()),e.items().each(function(e){n+=e.renderHtml()}),n},recalc:function(){},postRender:function(){},isNative:function(){return!1}})}),r(ft,[dt],function(e){return e.extend({Defaults:{containerClass:"abs-layout",controlClass:"abs-layout-item"},recalc:function(e){e.items().filter(":visible").each(function(e){var t=e.settings;e.layoutRect({x:t.x,y:t.y,w:t.w,h:t.h}),e.recalc&&e.recalc()})},renderHtml:function(e){return'
              '+this._super(e)}})}),r(ht,[De],function(e){return e.extend({Defaults:{classes:"widget btn",role:"button"},init:function(e){var t=this,n;t._super(e),e=t.settings,n=t.settings.size,t.on("click mousedown",function(e){e.preventDefault()}),t.on("touchstart",function(e){t.fire("click",e),e.preventDefault()}),e.subtype&&t.classes.add(e.subtype),n&&t.classes.add("btn-"+n),e.icon&&t.icon(e.icon)},icon:function(e){return arguments.length?(this.state.set("icon",e),this):this.state.get("icon")},repaint:function(){var e=this.getEl().firstChild,t;e&&(t=e.style,t.width=t.height="100%"),this._super()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("icon"),i,o=e.state.get("text"),a="";return i=e.settings.image,i?(r="none","string"!=typeof i&&(i=window.getSelection?i[0]:i[1]),i=" style=\"background-image: url('"+i+"')\""):i="",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),r=e.settings.icon?n+"ico "+n+"i-"+r:"",'
              "},bindStates:function(){function e(e){var i=n("span."+r,t.getEl());e?(i[0]||(n("button:first",t.getEl()).append(''),i=n("span."+r,t.getEl())),i.html(t.encode(e))):i.remove(),t.classes.toggle("btn-has-text",!!e)}var t=this,n=t.$,r=t.classPrefix+"txt";return t.state.on("change:text",function(t){e(t.value)}),t.state.on("change:icon",function(n){var r=n.value,i=t.classPrefix;t.settings.icon=r,r=r?i+"ico "+i+"i-"+t.settings.icon:"";var o=t.getEl().firstChild,a=o.getElementsByTagName("i")[0];r?(a&&a==o.firstChild||(a=document.createElement("i"),o.insertBefore(a,o.firstChild)),a.className=r):a&&o.removeChild(a),e(t.state.get("text"))}),t._super()}})}),r(pt,[xe],function(e){return e.extend({Defaults:{defaultType:"button",role:"group"},renderHtml:function(){var e=this,t=e._layout;return e.classes.add("btn-group"),e.preRender(),t.preRender(e),'
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "}})}),r(mt,[De],function(e){return e.extend({Defaults:{classes:"checkbox",role:"checkbox",checked:!1},init:function(e){var t=this;t._super(e),t.on("click mousedown",function(e){e.preventDefault()}),t.on("click",function(e){e.preventDefault(),t.disabled()||t.checked(!t.checked())}),t.checked(t.settings.checked)},checked:function(e){return arguments.length?(this.state.set("checked",e),this):this.state.get("checked")},value:function(e){return arguments.length?this.checked(e):this.checked()},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
              '+e.encode(e.state.get("text"))+"
              "},bindStates:function(){function e(e){t.classes.toggle("checked",e),t.aria("checked",e)}var t=this;return t.state.on("change:text",function(e){t.getEl("al").firstChild.data=t.translate(e.value)}),t.state.on("change:checked change:value",function(n){t.fire("change"),e(n.value)}),t.state.on("change:icon",function(e){var n=e.value,r=t.classPrefix;if("undefined"==typeof n)return t.settings.icon;t.settings.icon=n,n=n?r+"ico "+r+"i-"+t.settings.icon:"";var i=t.getEl().firstChild,o=i.getElementsByTagName("i")[0];n?(o&&o==i.firstChild||(o=document.createElement("i"),i.insertBefore(o,i.firstChild)),o.className=n):o&&i.removeChild(o)}),t.state.get("checked")&&e(!0),t._super()}})}),r(gt,[De,be,pe,g],function(e,t,n,r){return e.extend({init:function(e){var t=this;t._super(e),e=t.settings,t.classes.add("combobox"),t.subinput=!0,t.ariaTarget="inp",e.menu=e.menu||e.values,e.menu&&(e.icon="caret"),t.on("click",function(n){var i=n.target,o=t.getEl();if(r.contains(o,i)||i==o)for(;i&&i!=o;)i.id&&-1!=i.id.indexOf("-open")&&(t.fire("action"),e.menu&&(t.showMenu(),n.aria&&t.menu.items()[0].focus())),i=i.parentNode}),t.on("keydown",function(e){"INPUT"==e.target.nodeName&&13==e.keyCode&&t.parents().reverse().each(function(n){var r=t.state.get("value"),i=t.getEl("inp").value;return e.preventDefault(),t.state.set("value",i),r!=i&&t.fire("change"),n.hasEventListeners("submit")&&n.toJSON?(n.fire("submit",{data:n.toJSON()}),!1):void 0})}),t.on("keyup",function(e){"INPUT"==e.target.nodeName&&t.state.set("value",e.target.value)})},showMenu:function(){var e=this,n=e.settings,r;e.menu||(r=n.menu||[],r.length?r={type:"menu",items:r}:r.type=r.type||"menu",e.menu=t.create(r).parent(e).renderTo(e.getContainerElm()),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control===e.menu&&e.focus()}),e.menu.on("show hide",function(t){t.control.items().each(function(t){t.active(t.value()==e.value())})}).fire("show"),e.menu.on("select",function(t){e.value(t.control.value())}),e.on("focusin",function(t){"INPUT"==t.target.tagName.toUpperCase()&&e.menu.hide()}),e.aria("expanded",!0)),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"])},focus:function(){this.getEl("inp").focus()},repaint:function(){var e=this,t=e.getEl(),i=e.getEl("open"),o=e.layoutRect(),a,s;a=i?o.w-n.getSize(i).width-10:o.w-10;var l=document;return l.all&&(!l.documentMode||l.documentMode<=8)&&(s=e.layoutRect().h-2+"px"),r(t.firstChild).css({width:a,lineHeight:s}),e._super(),e},postRender:function(){var e=this;return r(this.getEl("inp")).on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)}),e._super()},renderHtml:function(){var e=this,t=e._id,n=e.settings,r=e.classPrefix,i=e.state.get("value")||"",o,a,s="",l="";return"spellcheck"in n&&(l+=' spellcheck="'+n.spellcheck+'"'),n.maxLength&&(l+=' maxlength="'+n.maxLength+'"'),n.size&&(l+=' size="'+n.size+'"'),n.subtype&&(l+=' type="'+n.subtype+'"'),e.disabled()&&(l+=' disabled="disabled"'),o=n.icon,o&&"caret"!=o&&(o=r+"ico "+r+"i-"+n.icon),a=e.state.get("text"),(o||a)&&(s='
              ",e.classes.add("has-open")),'
              '+s+"
              "},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl("inp").value),this.state.get("value"))},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl("inp").value!=t.value&&(e.getEl("inp").value=t.value)}),e.state.on("change:disabled",function(t){e.getEl("inp").disabled=t.value}),e._super()},remove:function(){r(this.getEl("inp")).off(),this._super()}})}),r(vt,[gt],function(e){return e.extend({init:function(e){var t=this;e.spellcheck=!1,e.onaction&&(e.icon="none"),t._super(e),t.classes.add("colorbox"),t.on("change keyup postrender",function(){t.repaintColor(t.value())})},repaintColor:function(e){var t=this.getEl().getElementsByTagName("i")[0];if(t)try{t.style.background=e}catch(n){}},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.state.get("rendered")&&e.repaintColor(t.value)}),e._super()}})}),r(yt,[ht,ke],function(e,t){return e.extend({showPanel:function(){var e=this,n=e.settings;if(e.active(!0),e.panel)e.panel.show();else{var r=n.panel;r.type&&(r={layout:"grid",items:r}),r.role=r.role||"dialog",r.popover=!0,r.autohide=!0,r.ariaRoot=!0,e.panel=new t(r).on("hide",function(){e.active(!1)}).on("cancel",function(t){t.stopPropagation(),e.focus(),e.hidePanel()}).parent(e).renderTo(e.getContainerElm()),e.panel.fire("show"),e.panel.reflow()}e.panel.moveRel(e.getEl(),n.popoverAlign||(e.isRtl()?["bc-tr","bc-tc"]:["bc-tl","bc-tc"]))},hidePanel:function(){var e=this;e.panel&&e.panel.hide()},postRender:function(){var e=this;return e.aria("haspopup",!0),e.on("click",function(t){t.control===e&&(e.panel&&e.panel.visible()?e.hidePanel():(e.showPanel(),e.panel.focus(!!t.aria)))}),e._super()},remove:function(){return this.panel&&(this.panel.remove(),this.panel=null),this._super()}})}),r(bt,[yt,w],function(e,t){var n=t.DOM;return e.extend({init:function(e){this._super(e),this.classes.add("colorbutton")},color:function(e){return e?(this._color=e,this.getEl("preview").style.backgroundColor=e,this):this._color},resetColor:function(){return this._color=null,this.getEl("preview").style.backgroundColor=null,this},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r=e.state.get("text"),i=e.settings.icon?n+"ico "+n+"i-"+e.settings.icon:"",o=e.settings.image?" style=\"background-image: url('"+e.settings.image+"')\"":"",a="";return r&&(e.classes.add("btn-has-text"),a=''+e.encode(r)+""),'
              '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(r){r.aria&&"down"==r.aria.key||r.control!=e||n.getParent(r.target,"."+e.classPrefix+"open")||(r.stopImmediatePropagation(),t.call(e,r))}),delete e.settings.onclick,e._super()}})}),r(Ct,[],function(){function e(e){function i(e,i,o){var a,s,l,c,u,d;return a=0,s=0,l=0,e/=255,i/=255,o/=255,u=t(e,t(i,o)),d=n(e,n(i,o)),u==d?(l=u,{h:0,s:0,v:100*l}):(c=e==u?i-o:o==u?e-i:o-e,a=e==u?3:o==u?1:5,a=60*(a-c/(d-u)),s=(d-u)/d,l=d,{h:r(a),s:r(100*s),v:r(100*l)})}function o(e,i,o){var a,s,l,c;if(e=(parseInt(e,10)||0)%360,i=parseInt(i,10)/100,o=parseInt(o,10)/100,i=n(0,t(i,1)),o=n(0,t(o,1)),0===i)return void(d=f=h=r(255*o));switch(a=e/60,s=o*i,l=s*(1-Math.abs(a%2-1)),c=o-s,Math.floor(a)){case 0:d=s,f=l,h=0;break;case 1:d=l,f=s,h=0;break;case 2:d=0,f=s,h=l;break;case 3:d=0,f=l,h=s;break;case 4:d=l,f=0,h=s;break;case 5:d=s,f=0,h=l;break;default:d=f=h=0}d=r(255*(d+c)),f=r(255*(f+c)),h=r(255*(h+c))}function a(){function e(e){return e=parseInt(e,10).toString(16),e.length>1?e:"0"+e}return"#"+e(d)+e(f)+e(h)}function s(){return{r:d,g:f,b:h}}function l(){return i(d,f,h)}function c(e){var t;return"object"==typeof e?"r"in e?(d=e.r,f=e.g,h=e.b):"v"in e&&o(e.h,e.s,e.v):(t=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)[^\)]*\)/gi.exec(e))?(d=parseInt(t[1],10),f=parseInt(t[2],10),h=parseInt(t[3],10)):(t=/#([0-F]{2})([0-F]{2})([0-F]{2})/gi.exec(e))?(d=parseInt(t[1],16),f=parseInt(t[2],16),h=parseInt(t[3],16)):(t=/#([0-F])([0-F])([0-F])/gi.exec(e))&&(d=parseInt(t[1]+t[1],16),f=parseInt(t[2]+t[2],16),h=parseInt(t[3]+t[3],16)),d=0>d?0:d>255?255:d,f=0>f?0:f>255?255:f,h=0>h?0:h>255?255:h,u}var u=this,d=0,f=0,h=0;e&&c(e),u.toRgb=s,u.toHsv=l,u.toHex=a,u.parse=c}var t=Math.min,n=Math.max,r=Math.round;return e}),r(xt,[De,we,pe,Ct],function(e,t,n,r){return e.extend({Defaults:{classes:"widget colorpicker"},init:function(e){this._super(e)},postRender:function(){function e(e,t){var r=n.getPos(e),i,o;return i=t.pageX-r.x,o=t.pageY-r.y,i=Math.max(0,Math.min(i/e.clientWidth,1)),o=Math.max(0,Math.min(o/e.clientHeight,1)),{x:i,y:o}}function i(e,t){var i=(360-e.h)/360;n.css(d,{top:100*i+"%"}),t||n.css(h,{left:e.s+"%",top:100-e.v+"%"}),f.style.background=new r({s:100,v:100,h:e.h}).toHex(),s.color().parse({s:e.s,v:e.v,h:e.h})}function o(t){var n;n=e(f,t),c.s=100*n.x,c.v=100*(1-n.y),i(c),s.fire("change")}function a(t){var n;n=e(u,t),c=l.toHsv(),c.h=360*(1-n.y),i(c,!0),s.fire("change")}var s=this,l=s.color(),c,u,d,f,h;u=s.getEl("h"),d=s.getEl("hp"),f=s.getEl("sv"),h=s.getEl("svp"),s._repaint=function(){c=l.toHsv(),i(c)},s._super(),s._svdraghelper=new t(s._id+"-sv",{start:o,drag:o}),s._hdraghelper=new t(s._id+"-h",{start:a,drag:a}),s._repaint()},rgb:function(){return this.color().toRgb()},value:function(e){var t=this;return arguments.length?(t.color().parse(e),void(t._rendered&&t._repaint())):t.color().toHex()},color:function(){return this._color||(this._color=new r),this._color},renderHtml:function(){function e(){var e,t,n="",i,a;for(i="filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr=",a=o.split(","),e=0,t=a.length-1;t>e;e++)n+='
              ';return n}var t=this,n=t._id,r=t.classPrefix,i,o="#ff0000,#ff0080,#ff00ff,#8000ff,#0000ff,#0080ff,#00ffff,#00ff80,#00ff00,#80ff00,#ffff00,#ff8000,#ff0000",a="background: -ms-linear-gradient(top,"+o+");background: linear-gradient(to bottom,"+o+");";return i='
              '+e()+'
              ','
              '+i+"
              "}})}),r(wt,[De],function(e){return e.extend({init:function(e){var t=this;e.delimiter||(e.delimiter="\xbb"),t._super(e),t.classes.add("path"),t.canFocus=!0,t.on("click",function(e){var n,r=e.target;(n=r.getAttribute("data-index"))&&t.fire("select",{value:t.row()[n],index:n})}),t.row(t.settings.row)},focus:function(){var e=this;return e.getEl().firstChild.focus(),e},row:function(e){return arguments.length?(this.state.set("row",e),this):this.state.get("row")},renderHtml:function(){var e=this;return'
              '+e._getDataPathHtml(e.state.get("row"))+"
              "},bindStates:function(){var e=this;return e.state.on("change:row",function(t){e.innerHtml(e._getDataPathHtml(t.value))}),e._super()},_getDataPathHtml:function(e){var t=this,n=e||[],r,i,o="",a=t.classPrefix;for(r=0,i=n.length;i>r;r++)o+=(r>0?'":"")+'
              '+n[r].name+"
              ";return o||(o='
              \xa0
              '),o}})}),r(Nt,[wt],function(e){return e.extend({postRender:function(){function e(e){if(1===e.nodeType){if("BR"==e.nodeName||e.getAttribute("data-mce-bogus"))return!0;if("bookmark"===e.getAttribute("data-mce-type"))return!0}return!1}var t=this,n=t.settings.editor;return n.settings.elementpath!==!1&&(t.on("select",function(e){n.focus(),n.selection.select(this.row()[e.index].element),n.nodeChanged()}),n.on("nodeChange",function(r){for(var i=[],o=r.parents,a=o.length;a--;)if(1==o[a].nodeType&&!e(o[a])){var s=n.fire("ResolveName",{name:o[a].nodeName.toLowerCase(),target:o[a]});if(s.isDefaultPrevented()||i.push({name:s.name,element:o[a]}),s.isPropagationStopped())break}t.row(i)})),t._super()}})}),r(Et,[xe],function(e){return e.extend({Defaults:{layout:"flex",align:"center",defaults:{flex:1}},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.classes.add("formitem"),t.preRender(e),'
              '+(e.settings.title?'
              '+e.settings.title+"
              ":"")+'
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "}})}),r(_t,[xe,Et,m],function(e,t,n){return e.extend({Defaults:{containerCls:"form",layout:"flex",direction:"column",align:"stretch",flex:1,padding:20,labelGap:30,spacing:10,callbacks:{submit:function(){this.submit()}}},preRender:function(){var e=this,r=e.items();e.settings.formItemDefaults||(e.settings.formItemDefaults={layout:"flex",autoResize:"overflow",defaults:{flex:1}}),r.each(function(r){var i,o=r.settings.label;o&&(i=new t(n.extend({items:{type:"label",id:r._id+"-l",text:o,flex:0,forId:r._id,disabled:r.disabled()}},e.settings.formItemDefaults)),i.type="formitem",r.aria("labelledby",r._id+"-l"),"undefined"==typeof r.settings.flex&&(r.settings.flex=1),e.replace(r,i),i.add(r))})},submit:function(){return this.fire("submit",{data:this.toJSON()})},postRender:function(){var e=this;e._super(),e.fromJSON(e.settings.data)},bindStates:function(){function e(){var e=0,n=[],r,i,o;if(t.settings.labelGapCalc!==!1)for(o="children"==t.settings.labelGapCalc?t.find("formitem"):t.items(),o.filter("formitem").each(function(t){var r=t.items()[0],i=r.getEl().clientWidth;e=i>e?i:e,n.push(r)}),i=t.settings.labelGap||0,r=n.length;r--;)n[r].settings.minWidth=e+i}var t=this;t._super(),t.on("show",e),e()}})}),r(St,[_t],function(e){return e.extend({Defaults:{containerCls:"fieldset",layout:"flex",direction:"column",align:"stretch",flex:1,padding:"25 15 5 15",labelGap:30,spacing:10,border:1},renderHtml:function(){var e=this,t=e._layout,n=e.classPrefix;return e.preRender(),t.preRender(e),'
              '+(e.settings.title?''+e.settings.title+"":"")+'
              '+(e.settings.html||"")+t.renderHtml(e)+"
              "}})}),r(kt,[gt,m],function(e,t){return e.extend({init:function(e){var n=this,r=tinymce.activeEditor,i=r.settings,o,a,s;e.spellcheck=!1,s=i.file_picker_types||i.file_browser_callback_types,s&&(s=t.makeMap(s,/[, ]/)),s&&!s[e.filetype]||(a=i.file_picker_callback,!a||s&&!s[e.filetype]?(a=i.file_browser_callback,!a||s&&!s[e.filetype]||(o=function(){a(n.getEl("inp").id,n.value(),e.filetype,window)})):o=function(){var i=n.fire("beforecall").meta;i=t.extend({filetype:e.filetype},i),a.call(r,function(e,t){n.value(e).fire("change",{meta:t})},n.value(),i)}),o&&(e.icon="browse",e.onaction=o),n._super(e)}})}),r(Tt,[ft],function(e){return e.extend({recalc:function(e){var t=e.layoutRect(),n=e.paddingBox;e.items().filter(":visible").each(function(e){e.layoutRect({x:n.left,y:n.top,w:t.innerW-n.right-n.left,h:t.innerH-n.top-n.bottom}),e.recalc&&e.recalc()})}})}),r(Rt,[ft],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v=[],y,b,C,x,w,N,E,_,S,k,T,R,A,B,D,L,M,P,H,O,I,F,z=Math.max,U=Math.min;for(r=e.items().filter(":visible"),i=e.layoutRect(),o=e.paddingBox,a=e.settings,f=e.isRtl()?a.direction||"row-reversed":a.direction,s=a.align,l=e.isRtl()?a.pack||"end":a.pack,c=a.spacing||0,"row-reversed"!=f&&"column-reverse"!=f||(r=r.set(r.toArray().reverse()),f=f.split("-")[0]),"column"==f?(S="y",E="h",_="minH",k="maxH",R="innerH",T="top",A="deltaH",B="contentH",H="left",M="w",D="x",L="innerW",P="minW",O="right",I="deltaW",F="contentW"):(S="x",E="w",_="minW",k="maxW",R="innerW",T="left",A="deltaW",B="contentW",H="top",M="h",D="y",L="innerH",P="minH",O="bottom",I="deltaH",F="contentH"),d=i[R]-o[T]-o[T],N=u=0,t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),m=h.settings,g=m.flex,d-=n-1>t?c:0,g>0&&(u+=g,p[k]&&v.push(h),p.flex=g),d-=p[_],y=o[H]+p[P]+o[O],y>N&&(N=y);if(x={},0>d?x[_]=i[_]-d+i[A]:x[_]=i[R]-d+i[A],x[P]=N+i[I],x[B]=i[R]-d,x[F]=N,x.minW=U(x.minW,i.maxW),x.minH=U(x.minH,i.maxH),x.minW=z(x.minW,i.startMinWidth),x.minH=z(x.minH,i.startMinHeight),!i.autoResize||x.minW==i.minW&&x.minH==i.minH){for(C=d/u,t=0,n=v.length;n>t;t++)h=v[t],p=h.layoutRect(),b=p[k],y=p[_]+p.flex*C,y>b?(d-=p[k]-p[_],u-=p.flex,p.flex=0,p.maxFlexSize=b):p.maxFlexSize=0;for(C=d/u,w=o[T],x={},0===u&&("end"==l?w=d+o[T]:"center"==l?(w=Math.round(i[R]/2-(i[R]-d)/2)+o[T],0>w&&(w=o[T])):"justify"==l&&(w=o[T],c=Math.floor(d/(r.length-1)))),x[D]=o[H],t=0,n=r.length;n>t;t++)h=r[t],p=h.layoutRect(),y=p.maxFlexSize||p[_],"center"===s?x[D]=Math.round(i[L]/2-p[M]/2):"stretch"===s?(x[M]=z(p[P]||0,i[L]-o[H]-o[O]),x[D]=o[H]):"end"===s&&(x[D]=i[L]-p[M]-o.top),p.flex>0&&(y+=p.flex*C),x[E]=y,x[S]=w,h.layoutRect(x),h.recalc&&h.recalc(),w+=y+c}else if(x.w=x.minW,x.h=x.minH,e.layoutRect(x),this.recalc(e),null===e._lastRect){var W=e.parent();W&&(W._lastRect=null,W.recalc())}}})}),r(At,[dt],function(e){return e.extend({Defaults:{containerClass:"flow-layout",controlClass:"flow-layout-item",endClass:"break"},recalc:function(e){e.items().filter(":visible").each(function(e){e.recalc&&e.recalc()})},isNative:function(){return!0}})}),r(Bt,[ye,De,ke,m,rt,d],function(e,t,n,r,i,o){function a(e){function t(t,n){return function(){var r=this;e.on("nodeChange",function(i){var o=e.formatter,a=null;s(i.parents,function(e){return s(t,function(t){return n?o.matchNode(e,n,{value:t.value})&&(a=t.value):o.matchNode(e,t.value)&&(a=t.value),a?!1:void 0}),a?!1:void 0}),r.value(a)})}}function r(e){e=e.replace(/;$/,"").split(";");for(var t=e.length;t--;)e[t]=e[t].split("=");return e}function i(){function t(e){var n=[];if(e)return s(e,function(e){var o={text:e.title,icon:e.icon};if(e.items)o.menu=t(e.items);else{ +var a=e.format||"custom"+r++;e.format||(e.name=a,i.push(e)),o.format=a,o.cmd=e.cmd}n.push(o)}),n}function n(){var n;return n=t(e.settings.style_formats_merge?e.settings.style_formats?o.concat(e.settings.style_formats):o:e.settings.style_formats||o)}var r=0,i=[],o=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",icon:"bold",format:"bold"},{title:"Italic",icon:"italic",format:"italic"},{title:"Underline",icon:"underline",format:"underline"},{title:"Strikethrough",icon:"strikethrough",format:"strikethrough"},{title:"Superscript",icon:"superscript",format:"superscript"},{title:"Subscript",icon:"subscript",format:"subscript"},{title:"Code",icon:"code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Alignment",items:[{title:"Left",icon:"alignleft",format:"alignleft"},{title:"Center",icon:"aligncenter",format:"aligncenter"},{title:"Right",icon:"alignright",format:"alignright"},{title:"Justify",icon:"alignjustify",format:"alignjustify"}]}];return e.on("init",function(){s(i,function(t){e.formatter.register(t.name,t)})}),{type:"menu",items:n(),onPostRender:function(t){e.fire("renderFormatsMenu",{control:t.control})},itemDefaults:{preview:!0,textStyle:function(){return this.settings.format?e.formatter.getCssText(this.settings.format):void 0},onPostRender:function(){var t=this;t.parent().on("show",function(){var n,r;n=t.settings.format,n&&(t.disabled(!e.formatter.canApply(n)),t.active(e.formatter.match(n))),r=t.settings.cmd,r&&t.active(e.queryCommandState(r))})},onclick:function(){this.settings.format&&c(this.settings.format),this.settings.cmd&&e.execCommand(this.settings.cmd)}}}}function o(t){return function(){var n=this;e.formatter?e.formatter.formatChanged(t,function(e){n.active(e)}):e.on("init",function(){e.formatter.formatChanged(t,function(e){n.active(e)})})}}function a(t){return function(){function n(){return e.undoManager?e.undoManager[t]():!1}var r=this;t="redo"==t?"hasRedo":"hasUndo",r.disabled(!n()),e.on("Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",function(){r.disabled(e.readonly||!n())})}}function l(){var t=this;e.on("VisualAid",function(e){t.active(e.hasVisual)}),t.active(e.hasVisual)}function c(t){t.control&&(t=t.control.value()),t&&e.execCommand("mceToggleFormat",!1,t)}var u;u=i(),s({bold:"Bold",italic:"Italic",underline:"Underline",strikethrough:"Strikethrough",subscript:"Subscript",superscript:"Superscript"},function(t,n){e.addButton(n,{tooltip:t,onPostRender:o(n),onclick:function(){c(n)}})}),s({outdent:["Decrease indent","Outdent"],indent:["Increase indent","Indent"],cut:["Cut","Cut"],copy:["Copy","Copy"],paste:["Paste","Paste"],help:["Help","mceHelp"],selectall:["Select all","SelectAll"],removeformat:["Clear formatting","RemoveFormat"],visualaid:["Visual aids","mceToggleVisualAid"],newdocument:["New document","mceNewDocument"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1]})}),s({blockquote:["Blockquote","mceBlockQuote"],numlist:["Numbered list","InsertOrderedList"],bullist:["Bullet list","InsertUnorderedList"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],alignleft:["Align left","JustifyLeft"],aligncenter:["Align center","JustifyCenter"],alignright:["Align right","JustifyRight"],alignjustify:["Justify","JustifyFull"],alignnone:["No alignment","JustifyNone"]},function(t,n){e.addButton(n,{tooltip:t[0],cmd:t[1],onPostRender:o(n)})}),e.addButton("undo",{tooltip:"Undo",onPostRender:a("undo"),cmd:"undo"}),e.addButton("redo",{tooltip:"Redo",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("newdocument",{text:"New document",icon:"newdocument",cmd:"mceNewDocument"}),e.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onPostRender:a("undo"),cmd:"undo"}),e.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onPostRender:a("redo"),cmd:"redo"}),e.addMenuItem("visualaid",{text:"Visual aids",selectable:!0,onPostRender:l,cmd:"mceToggleVisualAid"}),e.addButton("remove",{tooltip:"Remove",icon:"remove",cmd:"Delete"}),s({cut:["Cut","Cut","Meta+X"],copy:["Copy","Copy","Meta+C"],paste:["Paste","Paste","Meta+V"],selectall:["Select all","SelectAll","Meta+A"],bold:["Bold","Bold","Meta+B"],italic:["Italic","Italic","Meta+I"],underline:["Underline","Underline"],strikethrough:["Strikethrough","Strikethrough"],subscript:["Subscript","Subscript"],superscript:["Superscript","Superscript"],removeformat:["Clear formatting","RemoveFormat"]},function(t,n){e.addMenuItem(n,{text:t[0],icon:n,shortcut:t[2],cmd:t[1]})}),e.on("mousedown",function(){n.hideAll()}),e.addButton("styleselect",{type:"menubutton",text:"Formats",menu:u}),e.addButton("formatselect",function(){var n=[],i=r(e.settings.block_formats||"Paragraph=p;Heading 1=h1;Heading 2=h2;Heading 3=h3;Heading 4=h4;Heading 5=h5;Heading 6=h6;Preformatted=pre");return s(i,function(t){n.push({text:t[0],value:t[1],textStyle:function(){return e.formatter.getCssText(t[1])}})}),{type:"listbox",text:i[0][0],values:n,fixedWidth:!0,onselect:c,onPostRender:t(n)}}),e.addButton("fontselect",function(){var n="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",i=[],o=r(e.settings.font_formats||n);return s(o,function(e){i.push({text:{raw:e[0]},value:e[1],textStyle:-1==e[1].indexOf("dings")?"font-family:"+e[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:i,fixedWidth:!0,onPostRender:t(i,"fontname"),onselect:function(t){t.control.settings.value&&e.execCommand("FontName",!1,t.control.settings.value)}}}),e.addButton("fontsizeselect",function(){var n=[],r="8pt 10pt 12pt 14pt 18pt 24pt 36pt",i=e.settings.fontsize_formats||r;return s(i.split(" "),function(e){var t=e,r=e,i=e.split("=");i.length>1&&(t=i[0],r=i[1]),n.push({text:t,value:r})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:n,fixedWidth:!0,onPostRender:t(n,"fontsize"),onclick:function(t){t.control.settings.value&&e.execCommand("FontSize",!1,t.control.settings.value)}}}),e.addMenuItem("formats",{text:"Formats",menu:u})}var s=r.each;i.on("AddEditor",function(t){t.editor.rtl&&(e.rtl=!0),a(t.editor)}),e.translate=function(e){return i.translate(e)},t.tooltips=!o.iOS}),r(Dt,[ft],function(e){return e.extend({recalc:function(e){var t,n,r,i,o,a,s,l,c,u,d,f,h,p,m,g,v,y,b,C,x,w,N,E=[],_=[],S,k,T,R,A,B;t=e.settings,i=e.items().filter(":visible"),o=e.layoutRect(),r=t.columns||Math.ceil(Math.sqrt(i.length)),n=Math.ceil(i.length/r),y=t.spacingH||t.spacing||0,b=t.spacingV||t.spacing||0,C=t.alignH||t.align,x=t.alignV||t.align,g=e.paddingBox,A="reverseRows"in t?t.reverseRows:e.isRtl(),C&&"string"==typeof C&&(C=[C]),x&&"string"==typeof x&&(x=[x]);for(d=0;r>d;d++)E.push(0);for(f=0;n>f;f++)_.push(0);for(f=0;n>f;f++)for(d=0;r>d&&(u=i[f*r+d],u);d++)c=u.layoutRect(),S=c.minW,k=c.minH,E[d]=S>E[d]?S:E[d],_[f]=k>_[f]?k:_[f];for(T=o.innerW-g.left-g.right,w=0,d=0;r>d;d++)w+=E[d]+(d>0?y:0),T-=(d>0?y:0)+E[d];for(R=o.innerH-g.top-g.bottom,N=0,f=0;n>f;f++)N+=_[f]+(f>0?b:0),R-=(f>0?b:0)+_[f];if(w+=g.left+g.right,N+=g.top+g.bottom,l={},l.minW=w+(o.w-o.innerW),l.minH=N+(o.h-o.innerH),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH,l.minW=Math.min(l.minW,o.maxW),l.minH=Math.min(l.minH,o.maxH),l.minW=Math.max(l.minW,o.startMinWidth),l.minH=Math.max(l.minH,o.startMinHeight),!o.autoResize||l.minW==o.minW&&l.minH==o.minH){o.autoResize&&(l=e.layoutRect(l),l.contentW=l.minW-o.deltaW,l.contentH=l.minH-o.deltaH);var D;D="start"==t.packV?0:R>0?Math.floor(R/n):0;var L=0,M=t.flexWidths;if(M)for(d=0;dd;d++)E[d]+=M?M[d]*P:P;for(p=g.top,f=0;n>f;f++){for(h=g.left,s=_[f]+D,d=0;r>d&&(B=A?f*r+r-1-d:f*r+d,u=i[B],u);d++)m=u.settings,c=u.layoutRect(),a=Math.max(E[d],c.startMinWidth),c.x=h,c.y=p,v=m.alignH||(C?C[d]||C[0]:null),"center"==v?c.x=h+a/2-c.w/2:"right"==v?c.x=h+a-c.w:"stretch"==v&&(c.w=a),v=m.alignV||(x?x[d]||x[0]:null),"center"==v?c.y=p+s/2-c.h/2:"bottom"==v?c.y=p+s-c.h:"stretch"==v&&(c.h=s),u.layoutRect(c),h+=a+y,u.recalc&&u.recalc();p+=s+b}}else if(l.w=l.minW,l.h=l.minH,e.layoutRect(l),this.recalc(e),null===e._lastRect){var H=e.parent();H&&(H._lastRect=null,H.recalc())}}})}),r(Lt,[De,u],function(e,t){return e.extend({renderHtml:function(){var e=this;return e.classes.add("iframe"),e.canFocus=!1,''},src:function(e){this.getEl().src=e},html:function(e,n){var r=this,i=this.getEl().contentWindow.document.body;return i?(i.innerHTML=e,n&&n()):t.setTimeout(function(){r.html(e)}),this}})}),r(Mt,[De],function(e){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("infobox"),t.canFocus=!1},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},help:function(e){this.state.set("help",e)},renderHtml:function(){var e=this,t=e.classPrefix;return'
              '+e.encode(e.state.get("text"))+'
              '},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.getEl("body").firstChild.data=e.encode(t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e.state.on("change:help",function(t){e.classes.toggle("has-help",t.value),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Pt,[De,pe],function(e,t){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("widget").add("label"),t.canFocus=!1,e.multiline&&t.classes.add("autoscroll"),e.strong&&t.classes.add("strong")},initLayoutRect:function(){var e=this,n=e._super();if(e.settings.multiline){var r=t.getSize(e.getEl());r.width>n.maxW&&(n.minW=n.maxW,e.classes.add("multiline")),e.getEl().style.width=n.minW+"px",n.startMinH=n.h=n.minH=Math.min(n.maxH,t.getSize(e.getEl()).height)}return n},repaint:function(){var e=this;return e.settings.multiline||(e.getEl().style.lineHeight=e.layoutRect().h+"px"),e._super()},severity:function(e){this.classes.remove("error"),this.classes.remove("warning"),this.classes.remove("success"),this.classes.add(e)},renderHtml:function(){var e=this,t,n,r=e.settings.forId;return!r&&(n=e.settings.forName)&&(t=e.getRoot().find("#"+n)[0],t&&(r=t._id)),r?'":''+e.encode(e.state.get("text"))+""},bindStates:function(){var e=this;return e.state.on("change:text",function(t){e.innerHtml(e.encode(t.value)),e.state.get("rendered")&&e.updateLayoutRect()}),e._super()}})}),r(Ht,[xe],function(e){return e.extend({Defaults:{role:"toolbar",layout:"flow"},init:function(e){var t=this;t._super(e),t.classes.add("toolbar")},postRender:function(){var e=this;return e.items().each(function(e){e.classes.add("toolbar-item")}),e._super()}})}),r(Ot,[Ht],function(e){return e.extend({Defaults:{role:"menubar",containerCls:"menubar",ariaRoot:!0,defaults:{type:"menubutton"}}})}),r(It,[ht,be,Ot],function(e,t,n){function r(e,t){for(;e;){if(t===e)return!0;e=e.parentNode}return!1}var i=e.extend({init:function(e){var t=this;t._renderOpen=!0,t._super(e),e=t.settings,t.classes.add("menubtn"),e.fixedWidth&&t.classes.add("fixed-width"),t.aria("haspopup",!0),t.state.set("menu",e.menu||t.render())},showMenu:function(){var e=this,n;return e.menu&&e.menu.visible()?e.hideMenu():(e.menu||(n=e.state.get("menu")||[],n.length?n={type:"menu",items:n}:n.type=n.type||"menu",n.renderTo?e.menu=n.parent(e).show().renderTo():e.menu=t.create(n).parent(e).renderTo(),e.fire("createmenu"),e.menu.reflow(),e.menu.on("cancel",function(t){t.control.parent()===e.menu&&(t.stopPropagation(),e.focus(),e.hideMenu())}),e.menu.on("select",function(){e.focus()}),e.menu.on("show hide",function(t){t.control==e.menu&&e.activeMenu("show"==t.type),e.aria("expanded","show"==t.type)}).fire("show")),e.menu.show(),e.menu.layoutRect({w:e.layoutRect().w}),void e.menu.moveRel(e.getEl(),e.isRtl()?["br-tr","tr-br"]:["bl-tl","tl-bl"]))},hideMenu:function(){var e=this;e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide())},activeMenu:function(e){this.classes.toggle("active",e)},renderHtml:function(){var e=this,t=e._id,r=e.classPrefix,i=e.settings.icon,o,a=e.state.get("text"),s="";return o=e.settings.image,o?(i="none","string"!=typeof o&&(o=window.getSelection?o[0]:o[1]),o=" style=\"background-image: url('"+o+"')\""):o="",a&&(e.classes.add("btn-has-text"),s=''+e.encode(a)+""),i=e.settings.icon?r+"ico "+r+"i-"+i:"",e.aria("role",e.parent()instanceof n?"menuitem":"button"),'
              '},postRender:function(){var e=this;return e.on("click",function(t){t.control===e&&r(t.target,e.getEl())&&(e.showMenu(),t.aria&&e.menu.items()[0].focus())}),e.on("mouseenter",function(t){var n=t.control,r=e.parent(),o;n&&r&&n instanceof i&&n.parent()==r&&(r.items().filter("MenuButton").each(function(e){e.hideMenu&&e!=n&&(e.menu&&e.menu.visible()&&(o=!0),e.hideMenu())}),o&&(n.focus(),n.showMenu()))}),e._super()},bindStates:function(){var e=this;return e.state.on("change:menu",function(){e.menu&&e.menu.remove(),e.menu=null}),e._super()},remove:function(){this._super(),this.menu&&this.menu.remove()}});return i}),r(Ft,[De,be,d,u],function(e,t,n,r){return e.extend({Defaults:{border:0,role:"menuitem"},init:function(e){var t=this,n;t._super(e),e=t.settings,t.classes.add("menu-item"),e.menu&&t.classes.add("menu-item-expand"),e.preview&&t.classes.add("menu-item-preview"),n=t.state.get("text"),"-"!==n&&"|"!==n||(t.classes.add("menu-item-sep"),t.aria("role","separator"),t.state.set("text","-")),e.selectable&&(t.aria("role","menuitemcheckbox"),t.classes.add("menu-item-checkbox"),e.icon="selected"),e.preview||e.selectable||t.classes.add("menu-item-normal"),t.on("mousedown",function(e){e.preventDefault()}),e.menu&&!e.ariaHideMenu&&t.aria("haspopup",!0)},hasMenus:function(){return!!this.settings.menu},showMenu:function(){var e=this,n=e.settings,r,i=e.parent();if(i.items().each(function(t){t!==e&&t.hideMenu()}),n.menu){r=e.menu,r?r.show():(r=n.menu,r.length?r={type:"menu",items:r}:r.type=r.type||"menu",i.settings.itemDefaults&&(r.itemDefaults=i.settings.itemDefaults),r=e.menu=t.create(r).parent(e).renderTo(),r.reflow(),r.on("cancel",function(t){t.stopPropagation(),e.focus(),r.hide()}),r.on("show hide",function(e){e.control.items().each(function(e){e.active(e.settings.selected)})}).fire("show"),r.on("hide",function(t){t.control===r&&e.classes.remove("selected")}),r.submenu=!0),r._parentMenu=i,r.classes.add("menu-sub");var o=r.testMoveRel(e.getEl(),e.isRtl()?["tl-tr","bl-br","tr-tl","br-bl"]:["tr-tl","br-bl","tl-tr","bl-br"]);r.moveRel(e.getEl(),o),r.rel=o,o="menu-sub-"+o,r.classes.remove(r._lastRel).add(o),r._lastRel=o,e.classes.add("selected"),e.aria("expanded",!0)}},hideMenu:function(){var e=this;return e.menu&&(e.menu.items().each(function(e){e.hideMenu&&e.hideMenu()}),e.menu.hide(),e.aria("expanded",!1)),e},renderHtml:function(){function e(e){var t,r,i={};for(i=n.mac?{alt:"⌥",ctrl:"⌘",shift:"⇧",meta:"⌘"}:{meta:"Ctrl"},e=e.split("+"),t=0;t'+("-"!==a?'\xa0":"")+("-"!==a?''+a+"":"")+(c?'
              '+c+"
              ":"")+(i.menu?'
              ':"")+"
              "},postRender:function(){var e=this,t=e.settings,n=t.textStyle;if("function"==typeof n&&(n=n.call(this)),n){var i=e.getEl("text");i&&i.setAttribute("style",n)}return e.on("mouseenter click",function(n){n.control===e&&(t.menu||"click"!==n.type?(e.showMenu(),n.aria&&e.menu.focus(!0)):(e.fire("select"),r.requestAnimationFrame(function(){e.parent().hideAll()})))}),e._super(),e},hover:function(){var e=this;return e.parent().items().each(function(e){e.classes.remove("selected")}),e.classes.toggle("selected",!0),e},active:function(e){return"undefined"!=typeof e&&this.aria("checked",e),this._super(e)},remove:function(){this._super(),this.menu&&this.menu.remove()}})}),r(zt,[g,ye,u],function(e,t,n){return function(r,i){var o=this,a,s=t.classPrefix,l;o.show=function(t,c){function u(){a&&(e(r).append('
              '),c&&c())}return o.hide(),a=!0,t?l=n.setTimeout(u,t):u(),o},o.hide=function(){var e=r.lastChild;return n.clearTimeout(l),e&&-1!=e.className.indexOf("throbber")&&e.parentNode.removeChild(e),a=!1,o}}}),r(Ut,[ke,Ft,zt,m],function(e,t,n,r){return e.extend({Defaults:{defaultType:"menuitem",border:1,layout:"stack",role:"application",bodyRole:"menu",ariaRoot:!0},init:function(e){var t=this;if(e.autohide=!0,e.constrainToViewport=!0,"function"==typeof e.items&&(e.itemsFactory=e.items,e.items=[]),e.itemDefaults)for(var n=e.items,i=n.length;i--;)n[i]=r.extend({},e.itemDefaults,n[i]);t._super(e),t.classes.add("menu")},repaint:function(){return this.classes.toggle("menu-align",!0),this._super(),this.getEl().style.height="",this.getEl("body").style.height="",this},cancel:function(){var e=this;e.hideAll(),e.fire("select")},load:function(){function e(){t.throbber&&(t.throbber.hide(),t.throbber=null)}var t=this,r,i;i=t.settings.itemsFactory,i&&(t.throbber||(t.throbber=new n(t.getEl("body"),!0),0===t.items().length?(t.throbber.show(),t.fire("loading")):t.throbber.show(100,function(){t.items().remove(),t.fire("loading")}),t.on("hide close",e)),t.requestTime=r=(new Date).getTime(),t.settings.itemsFactory(function(n){return 0===n.length?void t.hide():void(t.requestTime===r&&(t.getEl().style.width="",t.getEl("body").style.width="",e(),t.items().remove(),t.getEl("body").innerHTML="",t.add(n),t.renderNew(),t.fire("loaded")))}))},hideAll:function(){var e=this;return this.find("menuitem").exec("hideMenu"),e._super()},preRender:function(){var e=this;return e.items().each(function(t){var n=t.settings;return n.icon||n.image||n.selectable?(e._hasIcons=!0,!1):void 0}),e.settings.itemsFactory&&e.on("postrender",function(){e.settings.itemsFactory&&e.load()}),e._super()}})}),r(Wt,[It,Ut],function(e,t){return e.extend({init:function(e){function t(r){for(var a=0;a0&&(o=r[0].text,n.state.set("value",r[0].value)),n.state.set("menu",r)),n.state.set("text",e.text||o),n.classes.add("listbox"),n.on("select",function(t){var r=t.control;a&&(t.lastControl=a),e.multiple?r.active(!r.active()):n.value(t.control.value()),a=r})},bindStates:function(){function e(e,n){e instanceof t&&e.items().each(function(e){e.hasMenus()||e.active(e.value()===n)})}function n(e,t){var r;if(e)for(var i=0;i'},postRender:function(){var e=this;e._super(),e.resizeDragHelper=new t(this._id,{start:function(){e.fire("ResizeStart")},drag:function(t){"both"!=e.settings.direction&&(t.deltaX=0),e.fire("Resize",t)},stop:function(){e.fire("ResizeEnd")}})},remove:function(){return this.resizeDragHelper&&this.resizeDragHelper.destroy(),this._super()}})}),r(qt,[De],function(e){function t(e){var t="";if(e)for(var n=0;n'+e[n]+"";return t}return e.extend({Defaults:{classes:"selectbox",role:"selectbox",options:[]},init:function(e){var t=this;t._super(e),t.settings.size&&(t.size=t.settings.size),t.settings.options&&(t._options=t.settings.options),t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))})},options:function(e){return arguments.length?(this.state.set("options",e),this):this.state.get("options")},renderHtml:function(){var e=this,n,r="";return n=t(e._options),e.size&&(r=' size = "'+e.size+'"'),'"},bindStates:function(){var e=this;return e.state.on("change:options",function(n){e.getEl().innerHTML=t(n.value)}),e._super()}})}),r(jt,[De,we,pe],function(e,t,n){function r(e,t,n){return t>e&&(e=t),e>n&&(e=n),e}function i(e,t,n){e.setAttribute("aria-"+t,n)}function o(e,t){var r,o,a,s,l,c;"v"==e.settings.orientation?(s="top",a="height",o="h"):(s="left",a="width",o="w"),c=e.getEl("handle"),r=(e.layoutRect()[o]||100)-n.getSize(c)[a],l=r*((t-e._minValue)/(e._maxValue-e._minValue))+"px",c.style[s]=l,c.style.height=e.layoutRect().h+"px",i(c,"valuenow",t),i(c,"valuetext",""+e.settings.previewFilter(t)),i(c,"valuemin",e._minValue),i(c,"valuemax",e._maxValue)}return e.extend({init:function(e){var t=this;e.previewFilter||(e.previewFilter=function(e){return Math.round(100*e)/100}),t._super(e),t.classes.add("slider"),"v"==e.orientation&&t.classes.add("vertical"),t._minValue=e.minValue||0,t._maxValue=e.maxValue||100,t._initValue=t.state.get("value")},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix;return'
              '},reset:function(){this.value(this._initValue).repaint()},postRender:function(){function e(e,t,n){return(n+e)/(t-e)}function i(e,t,n){return n*(t-e)-e}function o(t,n){function o(o){var a;a=s.value(),a=i(t,n,e(t,n,a)+.05*o),a=r(a,t,n),s.value(a),s.fire("dragstart",{value:a}),s.fire("drag",{value:a}),s.fire("dragend",{value:a})}s.on("keydown",function(e){switch(e.keyCode){case 37:case 38:o(-1);break;case 39:case 40:o(1)}})}function a(e,i,o){var a,l,c,p,m;s._dragHelper=new t(s._id,{handle:s._id+"-handle",start:function(e){a=e[u],l=parseInt(s.getEl("handle").style[d],10),c=(s.layoutRect()[h]||100)-n.getSize(o)[f],s.fire("dragstart",{value:m})},drag:function(t){var n=t[u]-a;p=r(l+n,0,c),o.style[d]=p+"px",m=e+p/c*(i-e),s.value(m),s.tooltip().text(""+s.settings.previewFilter(m)).show().moveRel(o,"bc tc"),s.fire("drag",{value:m})},stop:function(){s.tooltip().hide(),s.fire("dragend",{value:m})}})}var s=this,l,c,u,d,f,h;l=s._minValue,c=s._maxValue,"v"==s.settings.orientation?(u="screenY",d="top",f="height",h="h"):(u="screenX",d="left",f="width",h="w"),s._super(),o(l,c,s.getEl("handle")),a(l,c,s.getEl("handle"))},repaint:function(){this._super(),o(this,this.value())},bindStates:function(){var e=this;return e.state.on("change:value",function(t){o(e,t.value)}),e._super()}})}),r(Yt,[De],function(e){return e.extend({renderHtml:function(){var e=this;return e.classes.add("spacer"),e.canFocus=!1,'
              '}})}),r(Xt,[It,pe,g],function(e,t,n){return e.extend({Defaults:{classes:"widget btn splitbtn",role:"button"},repaint:function(){var e=this,r=e.getEl(),i=e.layoutRect(),o,a;return e._super(),o=r.firstChild,a=r.lastChild,n(o).css({width:i.w-t.getSize(a).width,height:i.h-2}),n(a).css({height:i.h-2}),e},activeMenu:function(e){var t=this;n(t.getEl().lastChild).toggleClass(t.classPrefix+"active",e)},renderHtml:function(){var e=this,t=e._id,n=e.classPrefix,r,i=e.state.get("icon"),o=e.state.get("text"),a="";return r=e.settings.image,r?(i="none","string"!=typeof r&&(r=window.getSelection?r[0]:r[1]),r=" style=\"background-image: url('"+r+"')\""):r="",i=e.settings.icon?n+"ico "+n+"i-"+i:"",o&&(e.classes.add("btn-has-text"),a=''+e.encode(o)+""),'
              '},postRender:function(){var e=this,t=e.settings.onclick;return e.on("click",function(e){var n=e.target;if(e.control==this)for(;n;){if(e.aria&&"down"!=e.aria.key||"BUTTON"==n.nodeName&&-1==n.className.indexOf("open"))return e.stopImmediatePropagation(),void(t&&t.call(this,e));n=n.parentNode}}),delete e.settings.onclick,e._super()}})}),r(Kt,[At],function(e){return e.extend({Defaults:{containerClass:"stack-layout",controlClass:"stack-layout-item",endClass:"break"},isNative:function(){return!0}})}),r(Gt,[Ee,g,pe],function(e,t,n){return e.extend({Defaults:{layout:"absolute",defaults:{type:"panel"}},activateTab:function(e){var n;this.activeTabId&&(n=this.getEl(this.activeTabId),t(n).removeClass(this.classPrefix+"active"),n.setAttribute("aria-selected","false")),this.activeTabId="t"+e,n=this.getEl("t"+e),n.setAttribute("aria-selected","true"),t(n).addClass(this.classPrefix+"active"),this.items()[e].show().fire("showtab"),this.reflow(),this.items().each(function(t,n){e!=n&&t.hide()})},renderHtml:function(){var e=this,t=e._layout,n="",r=e.classPrefix;return e.preRender(),t.preRender(e),e.items().each(function(t,i){var o=e._id+"-t"+i;t.aria("role","tabpanel"),t.aria("labelledby",o),n+='"}),'
              '+n+'
              '+t.renderHtml(e)+"
              "},postRender:function(){var e=this;e._super(),e.settings.activeTab=e.settings.activeTab||0,e.activateTab(e.settings.activeTab),this.on("click",function(t){var n=t.target.parentNode;if(t.target.parentNode.id==e._id+"-head")for(var r=n.childNodes.length;r--;)n.childNodes[r]==t.target&&e.activateTab(r)})},initLayoutRect:function(){var e=this,t,r,i;r=n.getSize(e.getEl("head")).width,r=0>r?0:r,i=0,e.items().each(function(e){r=Math.max(r,e.layoutRect().minW),i=Math.max(i,e.layoutRect().minH)}),e.items().each(function(e){e.settings.x=0,e.settings.y=0,e.settings.w=r,e.settings.h=i,e.layoutRect({x:0,y:0,w:r,h:i})});var o=n.getSize(e.getEl("head")).height;return e.settings.minWidth=r,e.settings.minHeight=i+o,t=e._super(),t.deltaH+=o,t.innerH=t.h-t.deltaH,t}})}),r(Jt,[De,m,pe],function(e,t,n){return e.extend({init:function(e){var t=this;t._super(e),t.classes.add("textbox"),e.multiline?t.classes.add("multiline"):(t.on("keydown",function(e){var n;13==e.keyCode&&(e.preventDefault(),t.parents().reverse().each(function(e){return e.toJSON?(n=e,!1):void 0}),t.fire("submit",{data:n.toJSON()}))}),t.on("keyup",function(e){t.state.set("value",e.target.value)}))},repaint:function(){var e=this,t,n,r,i,o=0,a;t=e.getEl().style,n=e._layoutRect,a=e._lastRepaintRect||{};var s=document;return!e.settings.multiline&&s.all&&(!s.documentMode||s.documentMode<=8)&&(t.lineHeight=n.h-o+"px"),r=e.borderBox,i=r.left+r.right+8,o=r.top+r.bottom+(e.settings.multiline?8:0),n.x!==a.x&&(t.left=n.x+"px",a.x=n.x),n.y!==a.y&&(t.top=n.y+"px",a.y=n.y),n.w!==a.w&&(t.width=n.w-i+"px",a.w=n.w),n.h!==a.h&&(t.height=n.h-o+"px",a.h=n.h),e._lastRepaintRect=a,e.fire("repaint",{},!1),e},renderHtml:function(){var e=this,r=e.settings,i,o;return i={id:e._id,hidefocus:"1"},t.each(["rows","spellcheck","maxLength","size","readonly","min","max","step","list","pattern","placeholder","required","multiple"],function(e){i[e]=r[e]}),e.disabled()&&(i.disabled="disabled"),r.subtype&&(i.type=r.subtype),o=n.create(r.multiline?"textarea":"input",i),o.value=e.state.get("value"),o.className=e.classes,o.outerHTML},value:function(e){return arguments.length?(this.state.set("value",e),this):(this.state.get("rendered")&&this.state.set("value",this.getEl().value),this.state.get("value"))},postRender:function(){var e=this;e.getEl().value=e.state.get("value"),e._super(),e.$el.on("change",function(t){e.state.set("value",t.target.value),e.fire("change",t)})},bindStates:function(){var e=this;return e.state.on("change:value",function(t){e.getEl().value!=t.value&&(e.getEl().value=t.value)}),e.state.on("change:disabled",function(t){e.getEl().disabled=t.value}),e._super()},remove:function(){this.$el.off(),this._super()}})}),r(Qt,[],function(){var e=this||window,t=function(){return e.tinymce};return"function"==typeof e.define&&(e.define.amd||e.define("ephox/tinymce",[],t)),{}}),a([l,c,u,d,f,h,m,g,v,y,C,w,N,E,T,A,B,D,L,M,P,H,I,F,j,Y,J,Q,oe,ae,se,le,ue,fe,he,ve,ye,be,Ce,xe,we,Ne,Ee,_e,Se,ke,Te,Re,Ae,Be,De,Le,Me,Pe,Ie,ze,et,tt,nt,rt,ot,at,st,lt,ct,ut,dt,ft,ht,pt,mt,gt,vt,yt,bt,Ct,xt,wt,Nt,Et,_t,St,kt,Tt,Rt,At,Bt,Dt,Lt,Mt,Pt,Ht,Ot,It,Ft,zt,Ut,Wt,Vt,$t,qt,jt,Yt,Xt,Kt,Gt,Jt])}(this); \ No newline at end of file diff --git a/copy_this/modules/bla/bla-tinymce/version.jpg b/copy_this/modules/bla/bla-tinymce/version.jpg index 6754fd0..276f030 100644 Binary files a/copy_this/modules/bla/bla-tinymce/version.jpg and b/copy_this/modules/bla/bla-tinymce/version.jpg differ diff --git a/copy_this/modules/bla/vendormetadata.php b/copy_this/modules/bla/vendormetadata.php deleted file mode 100644 index f04e82d..0000000 --- a/copy_this/modules/bla/vendormetadata.php +++ /dev/null @@ -1,5 +0,0 @@ -